Test Program Generator
V93K SMT8 API
This guide covers aspects of the V93K program generator API that are unique to SmarTest 8.
Be sure to also consult the V93K Common API guide which is also applicable to SMT8.
The SMT8 API is enabled by adding smt_version: 8 when instantiating a V93K test environment:
# environment/v93k_smt8.rb
OrigenTesters::V93K.new smt_version: 8
The V93K SMT8 test program generator will create a package with the following structure:
MyAppNamespace/
├── common/
│ └── limits.ods
├── flows/
│ ├── my_flow_1/
│ │ └── MY_SUB_FLOW.flow
│ ├── MY_FLOW_2.flow
│ └── MY_FLOW_1.flow
└── limits/
├── Main.MY_FLOW_2_TESTS.csv
└── Main.MY_FLOW_1_TESTS.csv
Here is a description of each component:
MyAppNamespace/
This is the name of this test program package, it should be unique and the entire directory is intended to be
dropped directly into your test program’s src/ directory.
By default, your Origen application’s namespace is used, though this can be overridden within your V93K environment
file:
# environment/v93k_smt8.rb
OrigenTesters::V93K.new smt_version: 8,
package_namespace: 'something_else'
common/limits.ods
Contains the limits tables for all flows.
flows/
A top-level test program flow file in Origen will generate a correspondingly named file in the flows/ directory,
where the name of the generated file is the upper-cased version of the source file name.
If the flow imports sub-flows or contains groups, then those will be contained in a directory named after the
lower-cased version of the flow name. For sub-flow imports, this can be disabled by passing the option
disable_sub_flow_on_group: true to the import call, or by setting the disable_group option in your sub-flow:
Flow.create(disable_group: true). Note that if both are provided, the import option value will take priority.
When the group is disabled this way, the content of the sub-flow will simply be inserted as if it was defined
in the calling flow instead of a sub flow.
limits/
Origen generates the limts into CSV files before combining them into common/limits.ods. These intermediate files
will not be used by the test program but they are kept around in case they are useful.
The generated flow(s) should be integrated into a top-level (Main) flow like this:
flow Main {
setup {
flow MY_FLOW_1 calls MyAppNamespace.flows.MY_FLOW_1 {}
flow MY_FLOW_2 calls MyAppNamespace.flows.MY_FLOW_2 {}
}
execute {
MY_FLOW_1.execute();
MY_FLOW_2.execute();
}
}
The add_flow_enable: tester option as described in the SMT7 guide
is also supported by the SMT8 generator, though it may not make as much sense to use it in that case.
It generates an ENABLE flow parameter which could be used something like this:
flow Main {
setup {
flow MY_FLOW_1 calls MyAppNamespace.flows.MY_FLOW_1 {}
flow MY_FLOW_2 calls MyAppNamespace.flows.MY_FLOW_2 {}
}
execute {
// Skip FLOW_1 and run only FLOW_2
MY_FLOW_1.ENABLE = 0;
MY_FLOW_2.ENABLE = 1;
MY_FLOW_1.execute();
MY_FLOW_2.execute();
}
}
SMT8 utilizes auxiliary flows to perform recurring actions. add_auxiliary_flow API exists to symlink to a predefined auxiliary flow.
This API does not allow variables to be passed to or from the auxiliary flow since they are stand alone flows.
add_auxiliary_flow :POWERDOWN, 'testflow.POWERDOWN'
flow Main {
setup {
flow POWERDOWN calls testflow.POWERDOWN {}
}
execute {
POWERDOWN.execute();
}
}
Sub-flow variable passing causes variables before and after the execution call to populate the flow. If you wish to have a collapse-able block for the variables, you need to set the flow_variable_grouping variable to true.
# add this line to your origen_site_config.yml
flow_variable_grouping: true
SMT8 provides a built in shmoo element that can be used to shmoo a test suite or test flow.
In order to add setup and execute code to the flow, create the shmoo_test object using shmoo_tests.run(name, options) and add it to the flow with flow.test method.
Example of integrating the shmoo api in an interface:
def shmoo(name, targets, options = {})
if tester.v93k? && tester.smt8?
targets = [targets] unless targets.is_a?(Array)
st = shmoo_tests.run(name, { targets: targets }.merge(options))
flow.test st, options
end
end
Then in the flow, you can add the shmoo element to the flow with the following code:
Flow.create
...
range = { start: 3.0, stop: 5.0, steps: 10 }
axis = { name: :axis1, resource_type: 'specVariable', resource_name: 'vcc', range: range }
shmoo :shmoo_over_ts_1D, :cc_test_0, title: 'shmooOverTest', execution_order: :horizontal, axis: axis
...
end
Please see Advantest TDC Topic 253309 for details ahbout Shmoo parameters.
The above code will generate the following flow code:
flow <FLOW> {
setup {
...
shmoo shmoo_over_ts_1D {
target = cc_test_0;
resultTitle = "shmooOverTest";
executionOrder = horizontal;
axis [axis1] = {
resourceType = specVariable;
resourceName = "vcc";
range.start = 3.0;
range.stop = 5.0;
range.steps = 10;
};
}
...
}
execute {
...
shmoo_over_ts_1D.execute();
...
}
}