beautypg.com

4 using local fields in send packet instructions, Using local fields in send packet instructions – Teledyne LeCroy Voyager Exerciser Generation Script Language Manual User Manual

Page 78

background image

Teledyne LeCroy

Voyager USB 3.0 Exerciser Generation Script Language Reference Manual

69

9.4 Using Local Fields in Send Packet Instructions

You can add local fields to Send instructions. You can use them to add to the existing packet
template or structure variable or to override specified offsets within the declared structures.

These local fields only exist for the specific instance of the Send instruction in which they are
declared. The packet template or structure variable remains unmodified and does not retain the
local fields created. (To learn how to retain local fields, see the section

Using Local Fields in

Structure Variables.

)

With local fields, you can assign a portion of a larger field using bit offsets or append information
to a specific packet, without having to redefine a template. (Local fields are also applicable to
Register Condition Instructions.)

Format

# Send instruction with a local field appended

Send

(

Packet Template name | Structure variable name

)

[

( packet delay, override bitmap )

{
Field = Value
...

# Declare local field “Lfield” 48 bits long at the packet end.

LField :

48

= {

01 02 03 04 05 06

}

}

]

# Send instruction with a local field overwriting an offset

Send

(

Packet Template name | Structure variable name

)

[

{
Field = Value
...

# Declare local field “FirstByte” 8 bits long at offset 0.

FirstByte :

0

,

8

= {

01

}

}
( packet delay, override bitmap )

]

# Send instruction with local fields appended and override an offset

Send

(

Packet Template name | Structure variable name

)

[

( packet delay, override bitmap )
{
Field = Value
...

# Declare local field “Lfield” 48 bits long at packet end.

LField : 48 = { 01 02 03 04 05 06 }

# Declare local field “FirstByte” 8 bits long at offset 0.

FirstByte : 0,8 = { 01 }

}

]