rchitect-of-info
rchitect-of-info

Reputation: 1586

Way to find the valid test method parameters for the V93K platform?

I am adding a quality check into my test interface that compares the test method parameters passed to the valid parameters defined in the test method library. I found some code that works to return the valid parameters, but it is destructive in that it inserts empty test methods into the flow.

valid_params = test_methods.v93k.send(test_method_params[:test_method]).instance_variables.grep(/^\@[A-Z]/).map { |p| p.to_s.delete('@').to_sym }

Is there a way to simply query the test method library for the valid test method parameters for a particular test method? I looked here but didn't see anything.

thx

Upvotes: 1

Views: 34

Answers (2)

rchitect-of-info
rchitect-of-info

Reputation: 1586

Creating a V93K test method library is described here, and the answer is to query the test method library itself, rather than the approach above.

# Given that the test method library is the variable tml
valid_params = tml.definition[test_method_params[:test_method].to_sym].ids.reject { |p| p.is_a? Symbol }

This code yields the same information and does not create empty parameter sets.

thx

Upvotes: 1

Ginty
Ginty

Reputation: 3501

YMMV on other platforms, but for the V93K, you can call test_methods.<library>.definitions to return a Hash which contains all the info supplied by a library definition like this - http://origen-sdk.org/origen/guides/program/v93k/#Custom_Test_Methods

The built in-libraries are defined in the same way, so here is an example:

(byebug) test_methods.dc_tml.definitions[:general_pmu]
{:class_name=>"GeneralPMU", :pinlist=>[:string, "@"], :force_mode=>[:string, "VOLT", ["VOLT", "CURR"]], :force_value=>[:force_mode, 3.8], :spmu_clamp=>[:force_modeb, 0], :precharge=>[:string, "OFF", ["ON", "OFF"]], :precharge_voltage=>[:voltage, 0], :settling_time=>[:time, 0], :tester_state=>[:string, "CONNECTED", ["CONNECTED", "DISCONNECTED", "UNCHANGED"]], :termination=>[:string, "OFF", ["ON", "OFF"]], :measure_mode=>[:string, "PPMUpar", ["PPMUpar", "PPMUser", "SPMUser"]], :relay_switch_mode=>[:string, "DEFAULT(BBM)", ["DEFAULT(BBM)", "BBM", "MBB", "PARALLEL"]], :ppmu_clamp_low=>[:voltage, 0], :ppmu_clamp_high=>[:voltage, 0], :output=>[:string, "None", ["None", "ReportUI", "ShowFailOnly"]], :test_name=>[:string, "passLimit_uA_mV"]}

Upvotes: 1

Related Questions