2 script language structure, 1 generation script structure, 2 main procedure and other procedures – Teledyne LeCroy Voyager Exerciser Generation Script Language Manual User Manual
Page 12: Script language structure, Generation script structure, Main procedure and other procedures, Main, 2script language structure

Teledyne LeCroy
Voyager USB 3.0 Exerciser Generation Script Language Reference Manual
3
2
Script Language Structure
2.1 Generation Script Structure
Typically, a generation script has the following structure:
Parser directives
Declarations
o Constants
o Data patterns
o Global generation settings
o Packet/structure templates
o Global numeric variables
o Global structure variables (declare a template for a variable before declaring a variable)
o Aliases
Generation procedures
o List of generation instructions
o Global declarations (constants, data patterns, templates, aliases)
Note: The parser can use previously declared objects in later declarations. In generation
procedures, the parser can use global objects before their declaration as long as such objects are
finally declared outside of generation procedures.
Reminder: The generation parser is NOT case-sensitive.
2.2 Main Procedure and Other Procedures
Although you can create many generation procedures, the major execution entry point is a
procedure with the name Main. Therefore, you must have a generation procedure named Main.
You can invoke the other generation procedures in the Main generation procedure using the
Call directive.
The Call directive makes a "dynamic" insertion, in which the included procedure is re-parsed
using the new parser variable values and the latest values of global variables.