beautypg.com

1 big endian byte order, Big endian byte order – Teledyne LeCroy Voyager Exerciser Generation Script Language Manual User Manual

Page 58

background image

Teledyne LeCroy

Voyager USB 3.0 Exerciser Generation Script Language Reference Manual

49

8.5 Packet Template Multi-byte Field Byte Order
Attribute

By default, for fields up to 32 bits, the parser uses the Little Endian (LSB -> MSB) byte order.
For example, if a 32-bit field has the value 0xAABBCCDD, it is written into the byte stream as:
DD CC BB AA

Example

Packet

MY_TEMPLATE

{
Field_16 :

16

=

0xEEFF

Field_32 :

32 = 0xAABBCCDD

}

The byte stream based on this template is:

FF EE DD CC BB AA

8.5.1 Big Endian Byte Order

You can require that all template fields have the Big Endian (MSB -> LSB) byte order.
Adding (MSB) after the ancestor list in the template declaration instructs the script parser to
choose the MSB -> LSB byte order.

Example

Packet

MY_TEMPLATE (MSB)

{
Field_16 :

16

=

0xEEFF

Field_32 :

32 = 0xAABBCCDD

}

The byte stream based on this template is

EE FF AA BB CC DD.

Note: This attribute is needed only for assignments in which numeric literals (such as
0xAABBCCDD or 12323344 ) are used.