Teledyne LeCroy Verification Script Engine for Teledyne LeCroy PETracer Reference Manual User Manual

Page 9

Advertising
background image

Teledyne LeCroy

Verification Script Engine Reference Manual

Version 6.6x

4

3 Interaction between PETracer and a verification script


When a user runs a script against a pre-recorded trace, the following sequence occurs:

1. Prior to sending information to the script's main processing function ProcessEvent(), VSE looks for the

function OnStartScript() and calls it if it is found. In this function, setup actions are defined, such as
specifying the kind of trace events that should be passed to the script and setting up initial values for
script-specific global variables.


2. Next, the VSE parses the recorded trace to verify that the current packet or other event meets specific

criteria – if it does, VSE calls the script’s main processing function ProcessEvent(), placing information
about the current event in the script’s input context variables.
(Please refer to the topic Input context variables later in this document for a full description of
verification script input context variables )

3. ProcessEvent() is the main verification routine for processing incoming trace events. This function must

be present in all verification scripts. When the verification program consists of a few stages, the
ProcessEvent() function processes the event sent to the script, verifies that information contained in the
event is appropriate for the current stage, and decides if VSE should continue running the script or, if the
whole result is clear on the current stage, tell VSE to complete execution of the script.
The completion of the test before the entire trace has been evaluated is usually done by setting the output
context variable in this manner:
out.Result = _VERIFICATION_PASSED or _VERIFICATION_FAILED.

(Please refer to the topic Output context variables later in this document for a full description of
verification script output context variables)

NOTE: Not only does a verification script evaluate recorded traces against some criteria, but it can also
extract information of interest and post-process it later by some third-party applications. (There is a set of
script functions allowing you to save extracted data in text files or send it to other applications, via
COM/Automation interfaces.)

4. When the script has completed running, VSE looks for the function OnFinishScript() and calls it if found.

In this function, some resetting procedures can be done.

Advertising