PostProcess

The PostProcess column in a testplan allows you to specify a SIMetrix script to be run immediately after the execution of a test. Post-process scripts are executed before processing normal DVM results, but after any post-process script specified on the Files Page page of the DVM control symbol. The PostProcess column can be blank.

The post-process script can perform any actions supported by the script language and can return scalar and specification values to DVM for inclusion in the report. A standard interface helps to make post-process scripts easier to configure. The interface includes five arguments, which are described in the following table.

Argument Description
retval Return value for the script:
  • For pre-process scripts, the return value at index=0 is logged in the test log file.
  • For post-process and final-process scripts, scalars, specifications, statistics and statistical specifications are returned on the indexes described in the following table.
    retval Description
    retval[0] Scalar values measured during the test
    retval[1] Specification values measured during the test
    retval[2] Statistical values measured during the test
    retval[3] Statistical specification values measured during the test

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.

Multiple pre- and post-process scripts can be assigned using the testplan headers Preprocess , PostProcess, and FinalProcess . If multiple scripts are assigned, the order of their execution is as follows:

  1. Scripts assigned in the control symbol
  2. Scripts assigned in the testplan from left to right within the test definition row

To use this interface, place the following line at the top of your PostProcess script.

Arguments @retval label report_dir log_file controlhandle

For more information, see the following topics: