beautypg.com

5 constant declarations, 1 predefined constants, 2 constant definition examples – Teledyne LeCroy Voyager Exerciser Generation Script Language Manual User Manual

Page 15: Constant declarations, Predefined constants, Constant definition examples, Constants, 5constant declarations

background image

Teledyne LeCroy

Voyager USB 3.0 Exerciser Generation Script Language Reference Manual

6

5

Constant Declarations

You can declare numeric script constants to use later in assignments or arithmetic operations.
The limits of values of constants are from 0 to 0xFFFFFFFF (4294967295 decimal).
Constants are DWORD (unsigned integer) values only.

5.1 Predefined Constants

For information about the predefined constants, see the genconstants.ginc file in the
Generation\Include folder in the Application directory.

5.2 Constant Definition Examples

Examples

Const

SOME_HEX_DATA =

0xAABBFFEE

# Define a hexadecimal constant.

Const

SOME_DEC_DATA =

12

# Define a decimal constant.

Const

"SOME DEC DATA" =

64

# Define a decimal constant.

Const

SOME_BIN_DATA =

_11110000

# Define a binary constant.

Const

"Some Hex Data" =

0xCDCDBEBE

Const

LMP_PORT_CFG_ACK =

6

# The parser can use arithmetic operations in constant definitions.

Const

TX_PAYLOAD_OFFSET =

16

*

8

# Payload offset(in bits) for

# the Tx packet

# Payload offset(in bits) for the Rx packet

Const

SOME_CONST =

16

Const

SOME_PAYLOAD_OFFSET = TX_PAYLOAD_OFFSET + SOME_CONST

# Example of a complex name in an expression

Const

MY_Data = "Some Hex Data" +

12 - _1111000

/*binary literal*/