Test Functions
A Test Function is a single XJEase function that is run as part of testing a board. For a function to be eligible to be made available to XJRunner it must be in the main project (.xje) file or a device file, or in a code file specified either in the main project (in the Circuit Code Files screen) or from within a test device file (see the Test Device Files screen).
In order for an XJEase function to be available to select in this screen it must be GLOBAL (see Function Scopes), and must return a single integer to indicate pass (value 0) or fail (value 1 or any non-zero value).
Arguments
Test functions can optionally have input arguments. To allow a function with input parameters to be selected as a test function, it must be explicitly marked as GLOBAL, rather than just being an implicit global because it has no explicit scope. Only INT and STRING parameters are supported.
Input arguments must be configured for a test function before it can be run on the Arguments tab of the Edit Test Function dialog. An error will be displayed in the Errors Pane for each function that requires arguments to be set.
Test functions are configured in the Edit Test Function dialog from the XJRunner Setup screen.
Names
Since test functions can be referenced in conditions, they must have a name. By default, for a circuit global function this is just the name of the function (e.g. CheckChain), and for a device function it is the device reference and the function name separated with a dot (e.g. IC5.Test).
Each test function within a group must have a unique name. Functions with duplicate names can exist as long as they're in different groups. Functions with the same name can be disambiguated in HAS_RUN, HAS_PASSED and RESULTOF by prepending the group name. For example, if the CONNTEST function is present in two different test groups named Group1 and Group2 (perhaps because it is being run in different profiles) then rather than use HAS_PASSED("CONNTEST"), you might use HAS_PASSED("Group2.CONNTEST") to identify which function's result to check.
Built-in functions
There are four preset items in the available tests.
- CONNTEST
- Runs the standard connection test. The error detail level will be set by default to All, although this can be configured on the Connection Test settings tab.
- RUNSTAPL
- Uses the XJEase function RUNSTAPL to execute a Jam(TM)/STAPL file and return the result. The options parameters STAPL_AUTOSKEW and STAPL_RESET are both enabled by default (see below for more details).
- RUNSVF
- Uses the XJEase function RUNSVF to execute an SVF file and return the result. The options parameters SVF_AUTOSKEW and SVF_RESET are both enabled by default (see below for more details).
- SAFE
- Uses the XJEase statement SAFE to set the JTAG chain into a SAFE state.
Parameters for RUNSTAPL and RUNSVF can be configured in the Edit Test Function dialog on the Arguments tab. Both functions have an AUTOSKEW parameter and a RESET parameter:
- STAPL_AUTOSKEW and SVF_AUTOSKEW: The XJTAG system normally automatically compensates for skew in the JTAG signals by running a process known as AUTO SKEW. However, this procedure can affect the running of a STAPL or SVF file that attempts to change the TCK frequency, and therefore the user has the ability to enable or disable it using STAPL_AUTOSKEW or SVF_AUTOSKEW.
- STAPL_RESET and SVF_RESET: These parameters control what happens when the file has finished. A STAPL or SVF file may be used to configure a device or leave it in a specific state. When the file completes, if the STAPL_RESET or SVF_RESET option is set the XJTAG system resets the JTAG chain using either a TMS reset or a test-reset sequence if configured. Disabling this option will prevent the reset from being applied.
See Also
XJTAG v4.2.5
