beautypg.com

Teledyne LeCroy Voyager Exerciser Generation Script Language Manual User Manual

Page 107

background image

Teledyne LeCroy

Voyager USB 3.0 Exerciser Generation Script Language Reference Manual

98

# Note: If the length value is omitted, the default is 8 bits.

offset =

16

# Preprocessor variable keeps the offset.

len =

8

# Preprocessor variable keeps the length.

$X[offset, len] =

0xAA

$X[offset] =

0xAA

$Y = MY_STRUCT

# Change the structure variable from a hex stream.

$Y = {

11 22 33 44 55 66 77 88

}

# After the above change, the variable Y fields have the
# following values:
# Y.V1 = { 11 22 }
# Y.V2 = 0x33
# Y.V3 = 0x44
# Y.V4 = { 55 66 77 88 }


# Change $Y from the above to {AA BB CC DD 55 66 77 88} and

# add local field F6 to variable X.

$Y { V_123 : 0, 32 = { AA BB CC DD }

$Z = MY_STRUCT_2

# Attempt to copy $Y to $Z. This will NOT work and may or may not

# generate a parse error.
# If no error is generated, the parser skipped this instruction.
# (Because $Z is derived from MY_STRUCT_2 and $Y is no longer
# purely MY_STRUCT_2 with its local variables,
# this assignment is not valid).

$Z = $Y

# Copy $Y to a newly instantiated $W structure variable.

# This is legal because $W does not have a packet template
# associated with it, because it is being declared.

$W = $Y

# Change $Y from the above to

# {AA BB CC DD 55 66 77 88 00 00 00 00 FF FF}
# and add local variable V5 at offset 96 with length 16.
# Offset 64-95 is padded with zeroes.

$Y { V5 : 96, 16 = { FF FF } }