The PreProcess column allows you to specify a SIMetrix script to be run immediately before the execution of a test. PreProcess scripts are executed after normal DVM circuit configuration, but before any PreProcess script specified in the DVM Control. The PreProcess statement can be blank.
The PreProcess script can perform any actions supported by the script language as well as return scalar and specification values to DVM for inclusion in the report. In order help make programming using post process scripts easier as well as to provide the ability to return scalar and specification values, there is a standard interface between DVM and the PreProcess script. The interface includes five arguments:
The five arguments are described in the following table.
Argument | Description | ||||||||||
retval | Return value for the script:
For additional information, see 7.3 User-Defined Scalar and Spec Values. |
||||||||||
label | Label for the currently executing test. Since the label is passed to both the pre-process and post-process scripts, the script can decode the label and determine which test is currently executing. This allows the script to modify values or make measurements based on the currently executing test. | ||||||||||
report_dir | Base directory for simulation results | ||||||||||
log_file | Location of the overview log file | ||||||||||
controlhandle | Value of the Handle property for the DVM control symbol on the top-level schematic. The PropValues2 Function can read values from the DVM control symbol using the this value. |
To use this interface, place the following line at the top of your PreProcess script.
Arguments @retval label report_dir log_file controlhandle
For more information, see 7.0 Scripting in the DVM tutorial.