5 specifying byte order in field definitions, 6 using byte stream literals in field assignments, Specifying byte order in field definitions – Teledyne LeCroy Voyager Exerciser Generation Script Language Manual User Manual

Page 45: Using byte stream literals in field assignments

Advertising
background image

Teledyne LeCroy

Voyager USB 3.0 Exerciser Generation Script Language Reference Manual

36

8.2.5 Specifying Byte Order in Field Definitions

You can specify the byte order for integer fields (length <= 32 bits) using the Byte Order field
attribute. The Byte Order field attribute indicates how numeric values are assigned to integer

fields. By default, the byte order for integer fields is Big Endian: MSB->LSB. For example, the
integer value 0xAABBCCDD is assigned as the {AA BB CC DD} byte stream.

Example

# Specify byte order for some fields of a template.

Packet

Mixed

{
F1 :

16

F2 :

32

(MSB)

F3 :

16

(MSB) =

0xAABB

F4 :

32

=

0xAABBCCDD

}

# Template with the same field layout as the template above

Packet

MSBMixed (MSB)

{
F1 :

16

(LSB)

F2 :

32

F3 :

16

=

0xAABB

F4 :

32

(LSB) =

0xAABBCCDD

}

8.2.6 Using Byte Stream Literals in Field Assignments

You can specify the byte order explicitly using byte stream literals:

Example

Field_32 :

32

=

{

AA BB CC DD

}

Advertising