beautypg.com

Teledyne LeCroy Voyager Exerciser Generation Script Language Manual User Manual

Page 68

background image

Teledyne LeCroy

Voyager USB 3.0 Exerciser Generation Script Language Reference Manual

59

Examples of calling the SendPipeCommand instruction

# Host emulation

%include "Generation\Include\TransactionEngine\PipeCommands.ginc"

Main

{

# Send Setup transaction to a device at address 1
# specifying GET_DESCRIPTOR request for Device descriptor.

SendPipeCommand

( PIPE_CMD_WRITE_DATA, PIPE_TYPE_CONTROL, 8, 1,

SB_USER_DEFINED, 1 )

{
PipeCommandData
{
DevAddr = 1
Endp = 0
Data = { 80 06 00 01 00 00 12 00 }
}
}

# Perform a read of 80000 bytes on a Bulk IN endpoint number 3
# device address 2, with burst size of 4

SendPipeCommand

( PIPE_CMD_READ_DATA, PIPE_TYPE_BULK, 80000, 0,

0, 1 )

{
PipeCommandData
{
DevAddr = 2
Endp = 3
Dir = 1
NumP = 4
}
}

SendPipeCommand

( PIPE_CMD_WRITE_DATA, PIPE_TYPE_CONTROL,

8, 1, SB_USER_DEFINED, 1 )
{
PipeCommandData
{
DevAddr = 0
Endp = 0
Data = $RequestPayload
Crc32Err = 1 # Will send the data packet with CRC32 error
# and retry it properly when it is not
# acknowledged by the device.
}

}
}