beautypg.com

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

Page 40

background image

LeCroy Corporation

UWBTrainer Exerciser - Generation Script Language Reference Manual

32

8.5 Frame 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

Frame

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

Frame

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.