Teledyne LeCroy Voyager Exerciser Generation Script Language Manual User Manual
Page 116

Teledyne LeCroy
Voyager USB 3.0 Exerciser Generation Script Language Reference Manual
107
10.10.2 Assignments for Variables with Variable Length Fields
For structure variables that have one variable length field:
1. The hex stream fills all fixed-length fields prior to the first variable-length field, using a
top-down approach.
2. The hex stream fills all fixed-length fields following the variable-length field using a bottom-up
approach, in which the required number of bytes comes from the end of the hex stream and
the fixed-length fields are filled in order.
3. The hex stream fills the variable-length field with the remaining bytes from the middle of the
hex stream.
If a structure variable has more than one variable-length field (including interleaved variable-
length and fixed-length fields), only the first variable-length field receives data. Later
variable-length fields receive no data and are blank. For these types of structure variables, it is
not recommended to explicitly modify fields after assignment from a hex stream, because data is
not logically assigned. Essentially, a structure variable with more than one variable-length field
becomes a structure variable with only one variable-length field, the first one listed in offset order.
Example
Packet
SF_Beacon
{
PHY : 40
MAC : 80
BH : 64
IEs : *
DATA: *
}
Packet
GenericSample
{
First3_Bytes : 24
More_Bytes : *
Some_More_Len : 8
Some_More_Bytes : *
Even_More_Len : 8
Even_More_Bytes : *
Total_Len : 16
}
SF_Beacon $BeaconSlot2
GenericSample $X