The parser searches the template list first.
-
If a template with the specified name is not found, it searches the local generation procedure structure variable list.
-
If a local generation procedure structure variable is not found, the parser searches the global structure variable list.
-
If a structure variable is not found, the system reports a parser error.
The named instruction parameters are:
-
Delay: Delay time (in nanoseconds) to wait before sending the packet.
-
Override: Specifies a bitmap that instructs the Voyager USB 3.2 Exerciser to set values for the CRC-5, CRC-16, CRC-32 and Length fieldsfromthe packet templateand insert erroneous values for Delayed and Header Sequence Number fields from the bitmap, rather than calculating them automatically.
|
Send Packet Override Field Instruction Parameters
|
|
|
CRC-5 |
OVR_CRC5 = 0x01 |
|
CRC-16 |
OVR_CRC16 = 0x02 |
|
CRC-32 |
OVR_CRC32 = 0x04 |
|
Delayed |
OVR_DELAYED = 0x08 |
|
HSN |
OVR_HSN = 0x10 |
|
Length |
OVR_LEN = 0x20 |
|
No Override |
OVR_NONE = 0 |
|
Override All |
OVR_ALL = (OVR_CRC5 | OVR_CRC16| OVR_CRC32 | OVR_DELAYED | OVR_HSN | OVR_LEN) |
The default value for the Delay parameter is UNDEFINED (0xFFFFFFFF), so that a delay between packets is taken from the PktDelay global setting (which is 0 by default).
The default value for Override isOVR_NONE.
Delimit instruction parameters use a comma, as shown in the following examples
(“TX_PACKET” after the Send keyword in the examples below denotes some template name.)
To send a TX_Packet with Delay = 0 and No Override: SendTX_PACKET( Delay = 0, Override = OVR_NONE )
To send a TX_Packet with Delay = 200 ns and No Override: SendTX_PACKET( 200, OVR_NONE )
To send a TX_Packet with Delay = 400 ns: SendTX_PACKET( 400 )
To send a TX_Packet with Delay = 20 ns and Override CRC-5:
SendTX_PACKET( Delay = 20, Override = OVR_CRC5)
OR
SendTX_PACKET( 20, OVR_CRC5)
To send a TX_Packet with Delay = 40 ns and Override Length and CRC32: SendTX_PACKET( 40, OVR_LEN | OVR_CRC32 )
To send a TX_Packet with delay = 250 ns and Override All: Send TX_PACKET(Delay = 250, Override = OVR_ALL )
Examples
Main
{
# Send a packet based on the template 'TX_PACKET'
# using default values.
SendTX_PACKET
# Send a packet based on the template 'TX_PACKET'
# using default values overriding some default
# instruction parameters.
SendTX_PACKET ( Delay = 100 )
SendTX_PACKET( 100 ) # the same as the previous instruction
# Send a packet based on the template 'TX_PACKET_1'
# using overridden values and changing the default delay setting.
SendTX_PACKET_1
{
DevAddr = 0x80
Endp = 2
Data = { AA BB CC DD 12 34 56 78 [PATTERN_2] }
}
( Delay = 100 ) # Set the 'Delay' to 100.
# Send a packet and use the provided CRC32 instead of
# automatic calculation.
SendTX_PACKET
{
DevAddr = 0x80
Endp = 2
Data = { AA BB CC DD }
CRC32 = 0x11223344 # This value is used as CRC32
# for this packet.
}
(Override = OVR_CRC32)
}