Loops – Teledyne LeCroy STX M6-1 SAS_SATA Protocol Analyzer User Manual User Manual
Page 400
LeCroy Corporation
Sierra Trainer Generation Language
398
Sierra M6‐4 SAS/SATA Protocol Analyzer User Manual
X
{
Field16 = 0xEEEE # Example of the data payload assignment which
uses
both
integer
variables,
constants,
hex
literals
and
data
patterns
Data = { y y y y 7a7a7a7a "Some Hex Data" "Some Hex Data" 8b8b8b8b
z z z z [PATTERN_3] }
}
( Repeat = 10, Idle = y ) # uses integer variable for parameter/
setting.
Illegal operations
x = y + 2
SOF ( Repeat = (x+y)*7 )
# - illegal, use z = (x+y)*7 SOF ( Repeat = z ) instead
Loops
Loops can be used in two modes:
1. Using an integer number, loop a specified number of loops. This number has to be
smaller than 64,000.
2. Using the word “infinite”, loops for ever.
Loops ( loop_count/Infinite )
{
send instructions
assignments
change values
send instructions
}
Example:
LOOP( 50 )
{
"CHAIN (ONE)"
"CHAIN (TWO)"
Some_Frame
$Y = Some_Frame { Data = 256, 0xFEFEFEFE }
Y
Change Y { Field32 = x }
Y
Y
}