14 preprocessor loop operators, 15 forward declarations, Preprocessor loop operators – Teledyne LeCroy Voyager Exerciser Generation Script Language Manual User Manual
Page 121: Forward declarations, Maxloopitercount_p

Teledyne LeCroy
Voyager USB 3.0 Exerciser Generation Script Language Reference Manual
112
10.14 Preprocessor Loop Operators
Note: Loop operators can produce a huge number of instructions. Therefore, you should set a
maximum allowed limit for the total number of loop iterations in a generation script. To do this,
use the MaxLoopIterCount parser setting.
Examples
Main
{
k = 0
# 'while' loop operator.
while
( k <
4
)
{
k++
# Skip the remaining part of the loop iteration.
if( k ==
2
) {
skip_iteration
}
# Stop the loop.
if( k ==
3
) {
stop_loop
}
Send TX_PACKET
{
Endp =
2
DevAddr =
0x10
# Data pattern uses preprocessor variables.
Data = { k k k k k }
}
}
# 'for' loop operator.
for
( k =
0
, k <
10
, k++ )
{
# Skip the remaining part of the loop iteration.
if( k ==
2
) {
skip_iteration
}
# Stop the loop.
if( k ==
4
) {
stop_loop
}
Send TX_PACKET
{
Endp =
0
DevAddr =
0xB
# Data pattern uses preprocessor variables.
Data = { k k k k k }
}
}
}
10.15 Forward Declarations
You can use declared items in generation procedures before their declarations.