Voyager™ USB 3.1 Exerciser - Teledyne...

175
Voyager™ USB 3.1 Exerciser SS (5Gbps) and SS+ (10Gbps) Generation Script Language Reference Manual Manual Version 2.23 For USB Protocol Suite Software Version 7.65 and above April 2, 2018

Transcript of Voyager™ USB 3.1 Exerciser - Teledyne...

  • Voyager™ USB 3.1 Exerciser

    SS (5Gbps) and SS+ (10Gbps)

    Generation Script Language

    Reference Manual

    Manual Version 2.23

    For USB Protocol Suite Software Version 7.65 and above

    April 2, 2018

  • Teledyne LeCroy Voyager USB 3.1 Exerciser Generation Script Language Reference Manual

    ii

    Document Disclaimer

    The information contained in this document has been carefully checked and is believed to be reliable. However, no responsibility can be assumed for inaccuracies that may not have been detected.

    Teledyne LeCroy reserves the right to revise the information presented in this document without notice or penalty.

    Trademarks and Servicemarks

    CATC Trace, Voyager M3i, Voyager M3x, Voyager M310, Voyager M310C, Voyager M310P, Voyager ReadyLink, USB Protocol Suite, and BusEngine are trademarks of Teledyne LeCroy.Inc.

    All other trademarks are property of their respective companies.

    Copyright

    Copyright © 2009, Teledyne LeCroy, Inc. All Rights Reserved.

    This document may be printed and reproduced without additional permission, but all copies should contain this copyright notice.

    Version

    This is version 2.23 of the Voyager USB 3.1 Exerciser Generation Script Language Reference Manual. This manual applies to USB Protocol Suite software version 7.65 and higher.

  • Teledyne LeCroy Voyager USB 3.1 Exerciser Generation Script Language Reference Manual

    iii

    Contents

    VOYAGER™ USB 3.1 EXERCISER ................................................ I

    SS (5GBPS) AND SS+ (10GBPS) ................................................... I

    GENERATION SCRIPT LANGUAGE .............................................. I

    LIST OF INSTRUCTIONS, COMMENTS, DEFINITIONS, DIRECTIVES, OPERATORS, PARAMETERS, PRIMITIVES, PROCEDURES, AND SETTINGS VII

    1 INTRODUCTION ..................................................................... 1 1.1 Declaration Conventions ................................................................ 2

    1.1.1 Parentheses................................................................................... 2 1.1.2 Brackets ......................................................................................... 2

    1.2 Script Example Highlighting ............................................................ 2

    2 SCRIPT LANGUAGE STRUCTURE ....................................... 3 2.1 Generation Script Structure ............................................................ 3 2.2 Main Procedure and Other Procedures .......................................... 3

    3 COMMENTS ........................................................................... 4 3.1 Line Comment ................................................................................ 4 3.2 Block Comment .............................................................................. 4

    4 FILE-INCLUDING DIRECTIVES ............................................. 5 4.1 Inline Directive ................................................................................ 5 4.2 Include Directive ............................................................................. 5

    5 CONSTANT DECLARATIONS ............................................... 6 5.1 Predefined Constants ..................................................................... 6 5.2 Constant Definition Examples ........................................................ 6

    6 DATA PATTERN DECLARATIONS ....................................... 7 6.1 Constants and Data Patterns in Declarations ................................ 7 6.2 Leading Zeroes ............................................................................... 7

    7 GLOBAL GENERATION SETTINGS ..................................... 8 7.1 Device Mode Settings ..................................................................... 8 7.2 Link Configuration Settings ............................................................. 9 7.3 Link Delay Settings ....................................................................... 14 7.4 Link Power Management Settings ................................................ 16 7.5 LFPS Settings ............................................................................... 18 7.6 Link Error Settings ........................................................................ 21 7.7 Link Advertisement Error Injection Settings ................................. 24 7.8 Send Packet Error Retry Settings................................................. 25 7.9 Framing Error Settings ................................................................. 26 7.10 Script Parser Settings ................................................................... 29 7.11 Transaction Engine Settings ......................................................... 29 7.12 Device Emulation Settings ............................................................ 30 7.13 Generation Settings Syntax .......................................................... 30 7.14 Generation Settings outside Procedures ...................................... 31 7.15 Generation Settings inside Procedures ........................................ 31 7.16 Arithmetic Expressions in Constants ............................................ 31

  • Teledyne LeCroy Voyager USB 3.1 Exerciser Generation Script Language Reference Manual

    iv

    8 PACKET AND STRUCTURE TEMPLATE DECLARATIONS32 8.1 Predefined Packet/Structure Templates ....................................... 32 8.2 Field Definitions ............................................................................ 33

    8.2.1 Defining a Field at a Specific Offset ............................................ 33 8.2.2 Defining a Field at the Current Offset .......................................... 34 8.2.3 Defining a Field with Variable Length .......................................... 35 8.2.4 Defining a Default Field Value ..................................................... 36 8.2.5 Specifying Byte Order in Field Definitions ................................... 37 8.2.6 Using Byte Stream Literals in Field Assignments........................ 37 8.2.7 List of Possible Field Values Attribute ......................................... 38 8.2.8 Defining Subfields ........................................................................ 39

    8.3 Constants/Arithmetic Expressions in Template Declarations ....... 41 8.4 Packet Template Inheritance ........................................................ 43

    8.4.1 Packet Template Single Inheritance ............................................ 43 8.4.2 Packet Template Multiple Inheritance ......................................... 44 8.4.3 Packet Template Insert Directive ................................................ 46 8.4.4 Complex Packet Templates ......................................................... 48

    8.5 Packet Template Multi-byte Field Byte Order Attribute ................ 50 8.5.1 Big Endian Byte Order ................................................................. 50 8.5.2 Another Example ......................................................................... 51

    8.6 Structure Declaration Examples ................................................... 52

    9 GENERATION PROCEDURES ............................................ 53 9.1 Transaction Engine Instructions ................................................... 54

    9.1.1 SendPipeCommand Instruction ................................................... 55 9.1.2 SetSequenceNumber Instruction................................................. 61 9.1.3 Transaction Engine Scripts supplied with Voyager ..................... 62

    9.2 Device Emulation Instructions ...................................................... 62 9.2.1 StartDeviceFrameworkHandler Instruction .................................. 63 9.2.2 InitDevice Instruction ................................................................... 63 9.2.3 AddDescriptor Instruction ............................................................ 64 9.2.4 WaitForDeviceRequest Instruction .............................................. 66 9.2.5 AddDrive Instruction .................................................................... 67

    9.3 Send Packet Instruction ................................................................ 69 9.3.1 69

    9.4 Using Local Fields in Send Packet Instructions ........................... 70 9.5 Instruction Parameters ................................................................. 71 9.6 Structure Variable Syntax ............................................................. 73

    9.6.1 Omitting the Send Keyword ......................................................... 73 9.7 Changing a Generation Setting .................................................... 74 9.8 SetLinkState Instruction ................................................................ 75

    9.8.1 SendTo_ComplianceMode( DUT_Mode) .................................... 79 9.9 TxSleep Instruction ....................................................................... 81 9.10 SendFile Instruction ...................................................................... 82 9.11 Wait Packet Instruction ................................................................. 82 9.12 Prepare Wait Packet Instruction ................................................... 85 9.13 Wait Event Instruction ................................................................... 86 9.14 Loop Instruction ............................................................................ 87 9.15 BreakLoop Instruction ................................................................... 88 9.16 Exit Instruction .............................................................................. 89 9.17 Analyzer Control Instructions ........................................................ 90

    9.17.1 StartRecording Instruction ........................................................... 90 9.17.2 StopRecording Instruction ........................................................... 91 9.17.3 TriggerAnalyzer instruction .......................................................... 92 9.17.4 Trace Instruction .......................................................................... 93 9.17.5 Trace_B Instruction ..................................................................... 94

  • Teledyne LeCroy Voyager USB 3.1 Exerciser Generation Script Language Reference Manual

    v

    10 ADVANCED SCRIPT PARSER FEATURES ........................ 95 10.1 Local Numeric Parser Variables ................................................... 95 10.2 Local Structure Parser Variables .................................................. 96 10.3 Using Local Fields in Structure Variables ..................................... 98 10.4 Changing Structure Parser Variables ........................................... 99 10.5 Sending Frames using Structure Variables ................................ 103 10.6 Using Special Data Pattern Creators in Field Assignments ....... 104 10.7 Using Structure Variables to Assign Field Values ...................... 105 10.8 Using Multipliers to Assign Field Values .................................... 106 10.9 Using the Append Operator in Field Assignments ..................... 107 10.10 Initializing Struct Variables from Hex Streams ........................... 108

    10.10.1 Assignments for Variables with Fixed-length Fields ............. 108 10.10.2 Assignments for Variables with Variable Length Fields ........ 109

    10.11 Sizeof Operators ......................................................................... 111 10.12 Preprocessor Integer Arithmetic ................................................. 112 10.13 Preprocessor If Operator ............................................................ 113 10.14 Preprocessor Loop Operators .................................................... 114 10.15 Forward Declarations ................................................................. 114 10.16 RAND Token ............................................................................... 116 10.17 RandStream( n ) Primitive .......................................................... 116 10.18 Global Numeric and Structure Variables .................................... 117 10.19 Using the Call Directive for Generation Procedure Insertions .... 118

    10.19.1 Calling a Generation Procedure with Parameters ................ 118 10.19.2 Calling a Generation Procedure with No Parameters ........... 122 10.19.3 Nested Calls Using Global Variables .................................... 123

    10.20 Parser Tracing Functions ........................................................... 124 10.20.1 PTrace( ) : Parser Trace ....................................................... 124 10.20.2 PTraceVar( ) : Parser Trace Variable ................................... 125 10.20.3 PTraceVarEx( ) : Parser Trace Variable Extended ............... 126 10.20.4 PtraceTemplate( ) : Parser Trace Template ......................... 129

    10.21 Name Aliasing ............................................................................. 132 10.22 Include Path Directive ................................................................. 134

    11 APPENDIX A – GENERATION SCRIPT EXAMPLE .......... 135 11.1 Example Script 1......................................................................... 135 11.2 Example Script 2......................................................................... 141

    12 APPENDIX B - RAW REGISTER SETTINGS ..................... 142 12.1 Usage ......................................................................................... 143

    12.1.1 Syntax ........................................................................................ 143 12.1.2 Table of Registers ..................................................................... 143

    12.2 Registers ..................................................................................... 145 12.2.1 SKP_TIMER .............................................................................. 145 12.2.2 SKP_TIMER_SSP ..................................................................... 145 12.2.3 FLOWCONTROL_SETTING ..................................................... 146 12.2.4 PM_ACCEPT_MODE ................................................................ 147 12.2.5 CORRUPT_LC .......................................................................... 148 12.2.6 CORRUPT_LMP ....................................................................... 149 12.2.7 CORRUPT_SHP_FRAMING ..................................................... 150 12.2.8 CORRUPT_SDP_FRAMING ..................................................... 151 12.2.9 CORRUPT_END_FRAMING ..................................................... 152 12.2.10 CORRUPT_SLC_FRAMING ................................................. 153 12.2.11 PKT_CRC5_ERROR_COUNT ............................................. 154 12.2.12 PKT_CRC16_ERROR_COUNT ........................................... 155 12.2.13 PKT_SEQ_ERROR_COUNT ................................................ 155 12.2.14 DELAY_LAU ......................................................................... 155

  • Teledyne LeCroy Voyager USB 3.1 Exerciser Generation Script Language Reference Manual

    vi

    12.2.15 Insert K-Sym Error (LC and HP) ........................................... 156 12.2.16 LTSSM_SETTING ................................................................ 158 12.2.17 LTSSM_U3EXIT_CONTROL ................................................ 159 12.2.18 LTSSM_HOTRESET_TIME .................................................. 160 12.2.19 LTSSM_RXDETECT_CONTROL ......................................... 161 12.2.20 Generate LFPS Command ................................................... 162 12.2.21 LFPS_SCD_TREPEAT_0 ..................................................... 163 12.2.22 LFPS_SCD_TREPEAT_1 ..................................................... 163 12.2.23 LFPS_PWM .......................................................................... 164 12.2.24 LFPS_LBPM_Logic_0 ........................................................... 165 12.2.25 LFPS_LBPM_Logic_1 ........................................................... 165

    13 HOW TO CONTACT TELEDYNE LECROY ....................... 166

  • Teledyne LeCroy Voyager USB 3.1 Exerciser Generation Script Language Reference Manual

    vii

    List of Instructions, Comments, Definitions, Directives, Operators, Parameters, Primitives, Procedures, and Settings aliasing ...................................................................................................................................................... 132 append operator ........................................................................................................................................ 107 block_comment ............................................................................................................................................. 4

    BreakLoop ................................................................................................................................................... 88

    Call directive .............................................................................................................................................. 118 Comments ..................................................................................................................................................... 4 constants instruction ..................................................................................................................................... 6 CRC16ErrRtryCnt setting ............................................................................................................................ 25 CRC5ErrRtryCnt setting .............................................................................................................................. 25 CustomFlowControl ..................................................................................................................................... 12 DataPattern instruction .................................................................................................................................. 7 declarations ............................................................................................................................................... 114 Delay_parameter ......................................................................................................................................... 81 DelayLBAD .................................................................................................................................................. 14 DelayLBADCnt ............................................................................................................................................ 14 DelayLCRD ................................................................................................................................................. 15 DelayLCRDCnt ............................................................................................................................................ 15 DelayLGOOD .............................................................................................................................................. 14 DelayLGOODCnt ........................................................................................................................................ 14 DisableLDN ................................................................................................................................................. 12 DisableLDNTimeout .................................................................................................................................... 12 DisableLPMA setting ................................................................................................................................... 16 DisableLUP ................................................................................................................................................. 12 DisableLUPTimeout .................................................................................................................................... 12 DisablePMLCTimeout ................................................................................................................................. 16 ErrCorruptEND ............................................................................................................................................ 27 ErrCorruptENDMap ..................................................................................................................................... 27 ErrCorruptLinkCmd setting.......................................................................................................................... 22 ErrCorruptLinkCmdLCRDOnly .................................................................................................................... 22 ErrCorruptLMP setting ................................................................................................................................ 22 ErrCorruptLMPCRC16 ................................................................................................................................ 22 ErrCorruptLMPCRC5 .................................................................................................................................. 22 ErrCorruptLMPHSN .................................................................................................................................... 22 ErrCorruptLMPNoCap ................................................................................................................................. 22 ErrCorruptLMPNoCfg .................................................................................................................................. 23 ErrCorruptSDP ............................................................................................................................................ 26 ErrCorruptSDPMap ..................................................................................................................................... 27 ErrCorruptSHP ............................................................................................................................................ 26 ErrCorruptSHPMap ..................................................................................................................................... 26 ErrCorruptSLC ............................................................................................................................................ 27 ErrCorruptSLCMap ..................................................................................................................................... 28 ErrDisparity setting ...................................................................................................................................... 23 ErrLBAD setting .......................................................................................................................................... 23 ErrLostLCRD setting ................................................................................................................................... 21 ErrLostLCRDAdv ......................................................................................................................................... 24 ErrLostLGOOD setting ................................................................................................................................ 21 ErrLostLGOODAdv ..................................................................................................................................... 24 ErrWrongLCRD setting ............................................................................................................................... 21 ErrWrongLCRDAdv ..................................................................................................................................... 24 ErrWrongLGOOD setting ............................................................................................................................ 21

  • Teledyne LeCroy Voyager USB 3.1 Exerciser Generation Script Language Reference Manual

    viii

    ErrWrongLGOODAdv .................................................................................................................................. 24 ErrWrongSymbol setting ............................................................................................................................. 23 Exit .............................................................................................................................................................. 89 fields_definition ........................................................................................................................................... 33 fld_size_operator ....................................................................................................................................... 111 ForceStopRec_parameter ........................................................................................................................... 91 forward declarations .................................................................................................................................. 114 HSNErrRtryCnt setting ................................................................................................................................ 25 %include directive ..................................................................................................................................... 134 %inline directive ............................................................................................................................................ 5 KeepOldTrace_parameter........................................................................................................................... 90 LDNDetectTimeout ...................................................................................................................................... 11 LDNInterval ................................................................................................................................................. 11 LFPSDutyCycle ........................................................................................................................................... 18 LFPSPeriod ................................................................................................................................................. 18 LFPSPingTBurst ......................................................................................................................................... 19 LFPSPingTRepeat ...................................................................................................................................... 19 LFPSPollingTBurst ...................................................................................................................................... 19 LFPSPollingTRepeat ................................................................................................................................... 19 LFPSU1ExitTBurst ...................................................................................................................................... 19 LFPSU2ExitTBurst ...................................................................................................................................... 20 LFPSU3ExitTBurst ...................................................................................................................................... 20 LFPSWarmResetTBurst .............................................................................................................................. 19 line_comment ................................................................................................................................................ 4 Local instruction .......................................................................................................................................... 95 Loop instruction ........................................................................................................................................... 87 LTSSMSettings ........................................................................................................................................... 10 LUPDetectTimeout ...................................................................................................................................... 11 LUPInterval.................................................................................................................................................. 11 Main procedure ............................................................................................................................................. 3 MaxLoopIterCount _setting ......................................................................................................................... 29 MaxLoopIterCount_parser_setting ............................................................................................................ 114 Mode ............................................................................................................................................................. 8 multiplier instruction .................................................................................................................................. 106 Override_parameter .................................................................................................................................... 71 pkt_size_operator ...................................................................................................................................... 111 PktDelay_setting ......................................................................................................................................... 29 PMLCTimeout ............................................................................................................................................. 17 PortCfgAck setting ...................................................................................................................................... 10 PrepareWaitPacket instruction .................................................................................................................... 85 preprocessor If directive ............................................................................................................................ 113 PTrace instruction ..................................................................................................................................... 124 PTraceTemplate instruction ...................................................................................................................... 129 PTraceVar instruction ................................................................................................................................ 125 PTraceVarEx instruction ........................................................................................................................... 126 pttn_size_operator .................................................................................................................................... 111 PwrStateAccept ........................................................................................................................................... 16 RAND token .............................................................................................................................................. 116 RandSeed_setting ....................................................................................................................................... 29 RandStream_primitive ............................................................................................................................... 116 RecOpt_parameter ...................................................................................................................................... 90 RxDescramble ............................................................................................................................................... 9 RxInvertPolarity ............................................................................................................................................. 9 Send instruction .......................................................................................................................................... 69 SendFile instruction ..................................................................................................................................... 82 Set instruction ............................................................................................................................................. 30

  • Teledyne LeCroy Voyager USB 3.1 Exerciser Generation Script Language Reference Manual

    ix

    SetLinkState instruction .............................................................................................................................. 75 SkipPendingCount ...................................................................................................................................... 10 SkipTimer ...................................................................................................................................................... 9 StartRecording instruction ........................................................................................................................... 90 StopRecording instruction ........................................................................................................................... 91 Struct instruction ......................................................................................................................................... 32 subfields_definition ...................................................................................................................................... 39 Trace instruction .......................................................................................................................................... 93 Trace_B instruction ..................................................................................................................................... 94 TraceName_parameter ............................................................................................................................... 90 TriggerAnalyzer instruction ......................................................................................................................... 92 TS1Time ...................................................................................................................................................... 10 TS2Time ...................................................................................................................................................... 11 TSEQNumber .............................................................................................................................................. 10 TxInvertPolarity ............................................................................................................................................. 9 TxScramble ................................................................................................................................................... 9 TxSleep instruction ...................................................................................................................................... 81 UseMMCXConnectors .................................................................................................................................. 8 WaitForTrace_parameter ............................................................................................................................ 91 WaitPacket instruction ................................................................................................................................. 83

  • Teledyne LeCroy Voyager USB 3.1 Exerciser Generation Script Language Reference Manual

    1

    1 Introduction The Voyager USB 3.1 Exerciser Generation Script Language allows you to create USB3 traffic generation scenarios for Voyager USB 3.1 Exerciser devices.

    The Generation Script Language provides rich language and preprocessor capabilities and allows you to implement even complicated generation scenarios.

    Typically, Generation Script Language constructions do not require special separation symbols (such as the semicolon in C languages) to distinguish between different constructions. Where possible, script parsing uses "context-dependency" rather than separation symbols, thus simplifying writing of generation scripts.

    Also, Generation Script Language constructions are not case-sensitive.

    This document describes the commands and syntax of the Voyager USB 3.1 Exerciser Generation Script Language.

    You can start the Voyager USB 3.1 Exerciser script editor by clicking that button in the USB Protocol Suite application to display an editor user interface, in which you can create and edit generation script files, as well as reuse codes.

    Each running module must have at least one function named Main, which starts and ends the generation script.

    Voyager ReadyLink™ Emulation

    The Teledyne LeCroy Voyager USB 3.1 Exerciser features ReadyLink Emulation Mode. The ReadyLink feature handles all USB 3.1 link training and link flow control, allowing the emulator to operate at full line rate and respond to the DUT as defined by the specification. The ReadyLink Emulation Mode helps simplify development of USB 3.1 test scenarios.

    By default, ReadyLink Emulation Mode automatically manages:

    Header Packet Acknowledgements (L_GOOD_n)

    Buffer Credit (L_CRD_x)

    SKIPs at required intervals (SKP)

    Link Synchronization

    Responds to LFPS (Polling.LFPS)

    Responds to polling sequence (Polling.RxEQ)

    Responds to TS1 / TS2 handshaking sequence

    Responds to SS.Inactive (with RX.Detect)

    Power Management Link Commands

    Responds to LGO_Un (with LAU)

    Responds to LAU (with LMPA)

  • Teledyne LeCroy Voyager USB 3.1 Exerciser Generation Script Language Reference Manual

    2

    Test scripts can customize ReadyLink Emulation Mode to include error scenarios, such as:

    Header LBADs

    Invalid link commands

    8B10B / CRC Error

    Running Disparity Error

    Corrupt Link Commands

    Corrupt Flow Control (Wrong L_CRD_x, Wrong L_GOOD_n, Drop L_Good_n)

    Corrupt Header Packet acknowledgement (Send LBAD, LRTY)

    Corrupt Packet Framing (SHP, SDP, END)

    At the packet level, you can send customized data payloads anywhere within the stream to insert logic errors, perform corner-case, or do stress testing. Commands, such as the Set ErrWrongLCRD command, allow link-layer error injection anywhere within the script.

    1.1 Declaration Conventions

    1.1.1 Parentheses

    In declarations and descriptions of Generation Script Language instructions,

    the format "(" ")" specifies a list of keywords that have the same value and can replace

    each other. The declaration

    ( Packet | Struct ) Template_Name …

    specifies that you can use the "Packet", "Packet", or "Struct" keyword for template name declarations.

    1.1.2 Brackets

    In declarations and descriptions of Generation Script Language instructions, the format "[" "]" specifies optional parts of declarations or instruction parameters. The declaration

    ( Packet | Struct ) Template_Name [ Ancestor_1, Ancestor_ 2, … ] [ (Attribute list) ]

    specifies that the listed ancestors and attribute lists are optional for template name declarations.

    1.2 Script Example Highlighting Generation Script Language examples in this document show syntax highlighting similar to that in the Voyager USB 3.1 Exerciser Generation Script Editor.

  • Teledyne LeCroy Voyager USB 3.1 Exerciser Generation Script Language Reference Manual

    3

    2 Script Language Structure

    2.1 Generation Script Structure Typically, a generation script has the following structure:

    Parser directives

    Declarations

    o Constants o Data patterns o Global generation settings o Packet/structure templates o Global numeric variables o Global structure variables (declare a template for a variable before declaring a variable) o Aliases

    Generation procedures

    o List of generation instructions o Global declarations (constants, data patterns, templates, aliases)

    Note: The parser can use previously declared objects in later declarations. In generation procedures, the parser can use global objects before their declaration as long as such objects are finally declared outside of generation procedures.

    Reminder: The generation parser is NOT case-sensitive.

    2.2 Main Procedure and Other Procedures Although you can create many generation procedures, the major execution entry point is a procedure with the name Main. Therefore, you must have a generation procedure named Main. You can invoke the other generation procedures in the Main generation procedure using the Call directive.

    The Call directive makes a "dynamic" insertion, in which the included procedure is re-parsed using the new parser variable values and the latest values of global variables.

  • Teledyne LeCroy Voyager USB 3.1 Exerciser Generation Script Language Reference Manual

    4

    3 Comments Comments instruct the script parser to exclude the commented parts of the script file from parsing.

    3.1 Line Comment

    To comment a line, start the line with the symbol #.

    To comment the end of a line, put the symbol # before the comment. The parser ignores the rest of the line after the # symbol.

    Example

    SomeStuff # The text after the # symbol is not parsed.

    3.2 Block Comment

    To comment a block of text, start with the symbol pair /* and end with the symbol pair */. The parser ignores the part of the file inside the comment block.

    Example

    /*

    Example of a block of comments

    All text between '/' '*' and '*' '/' is ignored.

    */

  • Teledyne LeCroy Voyager USB 3.1 Exerciser Generation Script Language Reference Manual

    5

    4 File-Including Directives To include a file in a generation parsing stream, use the %inline or %include directive.

    4.1 Inline Directive The %inline directive instructs the script parser to insert the content of the named file into the parsing stream when the parser sees this directive, even if the file is already inserted.

    Examples

    %inline "SomeInc1.inc" # Includes the 'SomeInc1.inc' file.

    %inline "SomeInc1.inc" # Includes the 'SomeInc1.inc' file again.

    4.2 Include Directive The %include directive instructs the script parser to insert the content of the named file into the parsing stream only ONCE, the first time the parser sees the directive with the specified file name.

    Examples

    %include "SomeInc1.inc" # Includes the 'SomeInc1.inc' file.

    %include "SomeInc1.inc" # Does nothing.

    Note: For details on how the script parser resolves file names, see the Include Path Directive topic.

  • Teledyne LeCroy Voyager USB 3.1 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*/

  • Teledyne LeCroy Voyager USB 3.1 Exerciser Generation Script Language Reference Manual

    7

    6 Data Pattern Declarations Data pattern declarations declare named byte strings to use where you use byte vectors. Data pattern declaration starts with the DataPattern keyword.

    DataPattern Pattern_Name = { hex_stream }

    Example

    # Declare a data pattern containing the byte string:

    # AA BB CC DD DD EE FF 11 22 33 44 55

    DataPattern PATTERN_1 = { AA BB CC DD EE FF 11 22 33 44 55 }

    # or

    DataPattern PATTERN_1 = { AA BB CC DD EE _11111111 11 22 33 44 55 }

    6.1 Constants and Data Patterns in Declarations You can use constants and previously defined data patterns in data pattern declarations. Place

    constants and data patterns inside a [] block. (You can omit a [] block for constant insertion,

    but for code clarity it is recommended that you use a [] block.)

    Note: When inserting constants into a data pattern, the script parser uses only the least significant byte of the constant. For example, if constant 0xAABBCCDD is inserted, only the 0xDD is put into the data pattern.

    Examples

    Const MY_CONST = 0xCC

    Const "MY CONST" = 0xDD

    # Declare a data pattern containing the byte string:

    # AA AA BB BB CC CC DD DD

    DataPattern PATTERN_1 = { AA AA BB BB [MY_CONST] CC DD ["MY CONST"] }

    # Declare a data pattern containing the byte string:

    # 11 AA AA BB BB CC CC DD DD 88

    DataPattern PATTERN_2 = { 11 [ PATTERN_1 ] 88 }

    6.2 Leading Zeroes For bytes less than 0x10, it is not necessary to add a leading 0.

    Example

    DataPattern PATTERN_4 = { B B 6 B B } # Is the same as 0B 0B 06 0B 0B.

  • Teledyne LeCroy Voyager USB 3.1 Exerciser Generation Script Language Reference Manual

    8

    7 Global Generation Settings A generation script can define global parameters, called "generation settings," that affect aspects of script compilation and execution. You set generation settings using the Set script keyword.

    First, you can initialize values for some settings like Mode. You can use an instruction like this:

    Set Mode = HOST; # HOST is a constant equal to 0.

    After typing the keyword Set, get the list of all available settings and set the required value.

    For some settings, after the keyword = (equals sign), the interface shows fixed constants from which you can select. For example, after typing Set RxInvertPolarity, you can select one of the three constants Yes, No, or Auto.

    Settings are DWORD (unsigned integer) values only. Unless otherwise noted, the limits of values used for settings are from 0 to 0xFFFFFFFF (4294967295 decimal). If values used for a setting are outside the limits prescribed by the USB 3.1 Specification, you are cautioned that unexpected behavior may result.

    7.1 Device Mode Settings This setting specifies the mode that the Voyager USB 3.1 Exerciser uses when it performs

    link management and high-level traffic management.

    Setting Description

    Mode Specifies the mode that the Exerciser uses when it performs link management and high-level traffic management.

    For link-layer-level mode, “Host” means that the Exerciser port is set as “upstream” port and link direction is “downstream”. “Device” means that the Exerciser port is set as “downstream” port and link direction is “upstream”.

    The Exerciser must perform all actions for each direction, as the USB 3.1 specification requires.

    Example: Set Mode = HOST (0)

    Possible values are 0 = HOST or 1 = DEVICE.

    Default value: HOST

    UseMMCXConnectors Specifies whether the Exerciser uses MMCX connectors or regular USB 3.1 connectors.

    Example: Set UseMMCXConnectors = 1

    Possible values are: 0 # Use regular USB 3.1 connectors. 1 # Use MMCX connectors,

    Default value: 0 (Use regular USB 3.1 connectors.)

  • Teledyne LeCroy Voyager USB 3.1 Exerciser Generation Script Language Reference Manual

    9

    7.2 Link Configuration Settings These settings specify the USB 3.1 Link Configuration settings that the Voyager USB 3.1 Exerciser uses for link management.

    Setting Description

    LinkSpeed Specifies the link sped desired.

    Example: Set LinkSpeed = LINK_SPEED_5GBPS

    Possible values are LINK_SPEED_5GBPS, LINK_SPEED_10GBPS

    Default value: LINK_SPEED_5GBPS

    Applicable Speeds: HOST, DEVICE

    TxScramble Specifies whether the Exerciser performs scrambling on the Tx channel.

    Example: Set TxScramble = YES

    Possible values are Yes (1) or No (0).

    Default value: No (0)

    Applicable Mode: HOST, DEVICE

    RxDescramble Specifies whether the Exerciser performs scrambling on the Rx channel.

    Example: Set RxDescramble = YES

    Possible values are Yes (1), No (0), or Auto (0xFFFFFFFF).

    Default value: Auto (set automatically based on the training sequences passed on the link)

    Applicable Mode: HOST, DEVICE

    TxInvertPolarity Specifies whether the Exerciser inverts polarity on the Tx channel.

    Example: Set TxInvertPolarity = YES

    Possible values are Yes (1) or No (0).

    Default value: No

    Applicable Mode: HOST, DEVICE

    RxInvertPolarity Specifies whether the Exerciser inverts polarity on the Rx channel.

    Example: Set RxInvertPolarity = YES

    Possible values are Yes (1), No (0), or Auto (0xFFFFFFFF).

    Default value: Auto (Receiver detects the Rx polarity automatically through the training sequences.)

    Applicable Mode: HOST, DEVICE

    SkipTimer Specifies a periodic timer that controls sending of SKP ordered sets at specific intervals.

    Example: Set SkipTimer = 4700 Example: Set SkipTimer = AUTO

    Possible values are an integer number of nanoseconds or Auto (0xFFFFFFFF).

    Default value: Auto (use automatic timing for SKP intervals)

    Applicable Mode: HOST, DEVICE

    NOTE: The current skip timer resolution is 6.667 ns, so skip time values are rounded to that resolution.

  • Teledyne LeCroy Voyager USB 3.1 Exerciser Generation Script Language Reference Manual

    10

    SkipPendingCount Specifies the number of pending SKP requests before sending a SKP sequence.

    Example: Set SkipPendingCount = 1

    Possible values: 0 to 3 Default value: 0 Applicable Mode: HOST, DEVICE

    PortCfgAck Specifies whether the Exerciser responds to Port Config LMPs or not.

    Example: Set PortCfgAck = 0

    Possible values are: 0 # Do not respond to PortConfig LMPs. 1 # Automatically respond to PortConfig LMPs.

    Default value: 1

    Applicable Mode: HOST, DEVICE

    LTSSMSettings LTSSM Setting flags.

    Example: Set LTSSMSettings = CUSTOM_TS1

    Possible values are any combinations of the following flags: 0 # AUTO. DISABLE_LFPS = 0x1 # Disable Polling.LFPS detection. CUSTOM_TSEQ = 0x2 # Send specified number of TSEQ (TSEQNumber setting), then go to the next state. CUSTOM_TS1 = 0x4 # Send TS1 for specified period of time (TS1Time setting), then go to the next state. CUSTOM_TS2 = 0x8 # Send TS2 for specified period of time (TS2Time setting), then go to the next state. DISABLE_IDLE = 0x10 # Disable Logical Idle handshake, so LTSSM jumps over relevant sub-state.

    Default value: 0 (auto)

    Applicable Mode: DEVICE, HOST

    TSEQNumber Specifies number of TSEQ Ordered Sets to be sent in Polling.RxEQ sub-state. Applies only if CUSTOM_TSEQ bit is set in the LTSSMSettings setting.

    Example: Set TSEQNumber = 64000

    Possible values are any values from 0 to 65535 (0xFFFF).

    Default value: 65535

    Applicable Mode: DEVICE, HOST

    TS1Time Specifies the time in nanoseconds to stay in the Polling.Active or Recovery.Active sub-states, regardless of received pattern. Applies only if bit CUSTOM_TS1 of the LTSSMSettings is set.

    Example: Set TS1Time = 2000

    Possible values are from 0 to 5000000 (5 ms). It is recommended not to use values < 267 ns (required time for sending 8 TS1s)

    Default value: 1000 (1 us)

    Applicable Mode: DEVICE, HOST

  • Teledyne LeCroy Voyager USB 3.1 Exerciser Generation Script Language Reference Manual

    11

    TS2Time Specifies the time to stay in the Polling.Active or Recovery.Active sub-states, regardless of received pattern. Applies only if bit CUSTOM_TS2 of the LTSSMSettings is set.

    Example: Set TS2Time = 1000

    Possible values are from 0 to 5000000 (5 ms). It is recommended not to use values < 267 ns (required time for sending 8 TS2s)

    Default value: 1000 (1 us)

    Applicable Mode: DEVICE, HOST

    LUPInterval Controls the timing schedule of LUP generation.

    Example: Set LUPInterval = 80

    Possible values are: number of nanoseconds for the LUP interval. 0xFFFFFFFF # AUTO (as defined by spec)

    Default value: AUTO (0xFFFFFFFF)

    Applicable Mode: DEVICE

    LDNInterval Controls the timing schedule of LDN generation.

    Example: Set LDNInterval = 80

    Possible values are: number of nanoseconds for the LDN interval. 0xFFFFFFFF # AUTO (as defined by spec)

    Default value: AUTO (0xFFFFFFFF)

    Applicable Mode: HOST

    LUPDetectTimeout Controls the timeout of receiving LUP. If the time passes without any LUP received, an error is raised, and LTSSM is directed to the Recovery state.

    Example: Set LUPDetectTimeout = 20

    Possible values are: positive integer # number of nanoseconds for LUP Detect timeout. 0xFFFFFFFF # AUTO (as defined by spec)

    Default value: AUTO (0xFFFFFFFF)

    Applicable Mode: HOST

    LDNDetectTimeout Controls the timeout of receiving LDN. If the time passes without any LDN received, an error is raised, and LTSSM is directed to the Recovery state.

    Example: Set LDNDetectTimeout = 20

    Possible values are: positive integer # number of nanoseconds for LDN Detect timeout. 0xFFFFFFFF # AUTO (as defined by spec)

    Default value: AUTO (0xFFFFFFFF)

    Applicable Mode: DEVICE

  • Teledyne LeCroy Voyager USB 3.1 Exerciser Generation Script Language Reference Manual

    12

    DisableLUPTimeout Specifies whether the Exerciser raises an error if the LUP is not received during specified timeout (the connected device port does not indicate its presence in the U0 Link state as part of transition to the U0 state), in the Exerciser link layer.

    Example: Set DisableLUPTimeout = 0

    Possible values are: 0 # Enables error raising. 1 # Disables error raising and assumes that Link partner is present.

    Default value: 0

    Applicable Mode: HOST

    DisableLDNTimeout Specifies whether the Exerciser raises an error if the LDN is not received during specified timeout (the connected device port does not indicate its presence in the U0 Link state as part of transition to the U0 state), in the Exerciser link layer.

    Example: Set DisableLDNTimeout = 0

    Possible values are: 0 # Enables error raising. 1 # Disables error raising and assumes that Link partner is present.

    Default value: 0

    Applicable Mode: DEVICE

    DisableLUP Specifies whether the Exerciser should disable LUP generation.

    Example: Set DisableLUP = 0

    Possible values are: 0 # Enables LUP generation. 1 # Disables LUP generation.

    Default value: 0

    Applicable Mode: DEVICE

    DisableLDN Specifies whether the Exerciser should disable LDN generation.

    Example: Set DisableLDN = 0

    Possible values are: 0 # Enables LDN generation. 1 # Disables LDN generation.

    Default value: 0

    Applicable Mode: HOST

    CustomFlowControl Custom USB 3.1 link flow control flags.

    Example: Set CustomFlowControl = NO_LCRD_DETECT

    Possible values are combinations of the following flags: 0 # Automatic link flow control NO_LGOOD_DETECT = _0001 # LGOOD/LBAD detection is disabled, so any packet is sent immediately. NO_LCRD_DETECT = _0010 # The Exerciser assumes that the Link partner always has enough credits for receiving packets. NO_LGOOD_GENERATION = _0100 # The Exerciser ignores any error checking and assumes that all received packets are good packets, without sending LGOOD. NO_LCRD_GENERATION = _1000 # The Exerciser ignores Rx buffer space check and also does not respond with LCRD. NO_FLOW_CTRL = _1111 # Combination of all flags.

    Default value: 0 (automatic link flow control)

    Applicable Mode: DEVICE, HOST

  • Teledyne LeCroy Voyager USB 3.1 Exerciser Generation Script Language Reference Manual

    13

  • Teledyne LeCroy Voyager USB 3.1 Exerciser Generation Script Language Reference Manual

    14

    7.3 Link Delay Settings These settings specify delays that the Voyager USB 3.1 Exerciser adds when it performs

    link management and packet transmission.

    DelayLGOOD Allows adding a specific delay to the response time of LGOODn.

    Note that the requested time is added to the normal (minimum) response time of the system. This is approximately 500ns at SS 5Gbps rate, and 1500ns at SS+ 10Gbps rate.

    Also note that time delay currently has 100 ns granularity.

    Example: Set DelayLGOOD = 200

    Possible values are: delay in nanoseconds # delay to add. 0 # no delay

    Default value: 0

    Applicable Mode: DEVICE, HOST

    DelayLGOODCnt Specifies number of times to add DelayLGOOD.

    Example: Set DelayLGOODCnt = 4

    Possible values are: positive integer # number of times to apply. 0 # no adding 0xFFFFFFFF # Apply this setting an infinite number of times.

    Default value: 0

    Applicable Mode: DEVICE, HOST

    DelayLBAD Allows adding a specific delay to the response time of LBADn.

    Note that the requested time is added to the normal (minimum) response time of the system.

    Also note that time delay currently has 100 ns granularity.

    Example: Set DelayLBAD = 300

    Possible values are: delay in nanoseconds # delay to add. 0 # no delay

    Default value: 0

    Applicable Mode: DEVICE, HOST

    DelayLBADCnt Specifies number of times to add DelayLBAD.

    Example: Set DelayLBADCnt = 7

    Possible values are: positive integer # number of times to apply. 0 # no adding 0xFFFFFFFF # Apply this setting an infinite number of times.

    Default value: 0

    Applicable Mode: DEVICE, HOST

  • Teledyne LeCroy Voyager USB 3.1 Exerciser Generation Script Language Reference Manual

    15

    DelayLCRD Allows adding a specific delay to the response time of LCRDn.

    Note that the requested time is added to the normal (minimum) response time of the system.

    Also note that time delay currently has 100 ns granularity.

    Example: Set DelayLCRD = 100

    Possible values are: delay in nanoseconds # delay to add. 0 # no delay

    Default value: 0

    Applicable Mode: DEVICE, HOST

    DelayLCRDCnt Specifies number of times to add DelayLCRD.

    Example: Set DelayLCRDCnt = 4

    Possible values are: positive integer # number of times to apply. 0 # no adding 0xFFFFFFFF # Apply this setting an infinite number of times.

    Default value: 0

    Applicable Mode: DEVICE, HOST

  • Teledyne LeCroy Voyager USB 3.1 Exerciser Generation Script Language Reference Manual

    16

    7.4 Link Power Management Settings These settings specify the USB 3.1 Link settings that the Voyager USB 3.1 Exerciser uses for link power management.

    PwrStateAccept Specifies how the Exerciser replies in response to a Power Management states entry request in power state change link commands (LGO_U1, LGO_U2, and LGO_U3).

    Bit 0 specifies that the Exerciser replies with the LAU link command on LGO_U1. Otherwise, it replies with the LXU link command.

    Bit 1 specifies that the Exerciser replies with the LAU link command on LGO_U2. Otherwise, it replies with the LXU link command.

    Bit 2 specifies that the Exerciser replies with the LAU link command on LGO_U3. Otherwise, it replies with the LXU link command.

    Example: Set PwrStateAccept = AU1

    Possible values are any combination of the following flags: AU1 = 0x1 # Accept the request of entering U1 by sending LAU. AU2 = 0x2 # Accept the request of entering U2 by sending LAU. AU3 = 0x4 # Accept the request of entering U3 by sending LAU. AU_ALL = (AU1 | AU2 | AU3) AU_AUTO = 0x7 # AUTO mode. Reply to LGO_U1, LGO_U2, or LGO_U3 based on the configured value through LMPs.

    Default value: AUTO (0x7), so that the Exerciser accepts all power state change requests.

    Applicable Mode: HOST, DEVICE

    DisableLPMA Specifies whether the Exerciser responds with the LPMA link command in response to LAU link commands. (This command is used in conjunction with LGO_Ux and LAU handshakes to guarantee that both ports are in the same state.)

    Example: Set DisableLPMA = 1

    Possible values are: 0 # Enables sending of LPMA in response to LAU. (Normal behavior) 1 # Disables sending of LPMA in response to LAU.

    Default value: 0

    Applicable Mode: HOST, DEVICE

    DisablePMLCTimeout Specifies whether the Exerciser link layer raises an error if the PM Link command is not received during specified timeout.

    Example: Set DisablePMLCTimeout = 1

    Possible values are: 0 # Enables detection of timeout on receiving response to PM Link command. 1 # Disables detection of timeout on receiving response to PM Link command.

    Default value: 0

    Applicable Mode: HOST

  • Teledyne LeCroy Voyager USB 3.1 Exerciser Generation Script Language Reference Manual

    17

    PMLCTimeout Controls the timeout of receiving LC response during PM entry handshake, which is the time between LGO_U1, LGO_U2, or LGO_U3 to LAU or LXU and the time between LAU to LPMA.

    Example: Set PMLCTimeout = 40

    Possible values are: number of nanoseconds for PMLC timeout. 0xFFFFFFFF # AUTO (as defined by spec)

    Default value: AUTO (0xFFFFFFFF)

    Applicable Mode: DEVICE, HOST

  • Teledyne LeCroy Voyager USB 3.1 Exerciser Generation Script Language Reference Manual

    18

    7.5 LFPS Settings These settings specify LFPS parameters that the Voyager USB 3.1 Exerciser uses when it

    performs LFPS signaling.

    LFPSDutyCycle LFPS duty cycle flags.

    Example: Set LFPSDutyCycle = DC_60_PERCENT

    Possible values are: DC_50_PERCENT = 0 # 50 percent DC_60_PERCENT = 1 # 60 percent DC_40_PERCENT = 3 # 40 percent

    Default value: DC_50_PERCENT

    Applicable Mode: DEVICE, HOST

    LFPSPeriod LFPS period flags.

    Example: Set LFPSPeriod = PD_24_NS

    Possible values are: PD_16_NS = 0 # 16 nanoseconds PD_20_NS = 1 # 20 nanoseconds PD_24_NS = 2 # 24 nanoseconds PD_32_NS = 3 # 32 nanoseconds PD_40_NS = 4 # 40 nanoseconds PD_48_NS = 5 # 48 nanoseconds PD_56_NS = 6 # 56 nanoseconds PD_64_NS = 7 # 64 nanoseconds PD_72_NS = 8 # 72 nanoseconds PD_80_NS = 9 # 80 nanoseconds PD_88_NS = 10 # 88 nanoseconds PD_96_NS = 11 # 96 nanoseconds PD_100_NS = 12 # 100 nanoseconds PD_104_NS = 13 # 104 nanoseconds PD_112_NS = 14 # 112 nanoseconds PD_120_NS = 15 # 120 nanoseconds

    PD_128_NS = 16 # 128 nanoseconds

    PD_136_NS = 17 # 136 nanoseconds

    PD_144_NS = 18 # 144 nanoseconds

    PD_152_NS = 19 # 152 nanoseconds

    PD_160_NS = 20 # 160 nanoseconds

    PD_168_NS = 21 # 168 nanoseconds

    PD_176_NS = 22 # 176 nanoseconds

    PD_184_NS = 23 # 184 nanoseconds

    PD_192_NS = 24 # 192 nanoseconds

    PD_200_NS = 25 # 200 nanoseconds

    Default value: PD_40_NS

    Applicable Mode: DEVICE, HOST

  • Teledyne LeCroy Voyager USB 3.1 Exerciser Generation Script Language Reference Manual

    19

    LFPSPollingTBurst Specifies the value of tBurst of Polling.LFPS in nanoseconds.

    Note that time value for this setting currently has 8 ns granularity.

    Example: Set LFPSPollingTBurst = 64

    Possible values are: number of nanoseconds for tBurst of Polling.LFPS 0xFFFFFFFF # AUTO. Use the spec value.

    Default value: AUTO (0xFFFFFFFF)

    Applicable Mode: DEVICE, HOST

    LFPSPollingTRepeat Specifies the value of tRepeat of Polling.LFPS in nanoseconds.

    Note that time value for this setting currently has 8 ns granularity.

    Example: Set LFPSPollingTRepeat = 128

    Possible values are: number of nanoseconds for tRepeat of Polling.LFPS 0xFFFFFFFF # AUTO. Use the spec value.

    Default value: AUTO (0xFFFFFFFF)

    Applicable Mode: DEVICE, HOST

    LFPSPingTBurst Specifies the value of tBurst of Ping.LFPS in nanoseconds.

    Note that time value for this setting currently has 8 ns granularity.

    Example: Set LFPSPingTBurst = 256

    Possible values are: number of nanoseconds for tBurst of Ping.LFPS 0xFFFFFFFF # AUTO. Use the spec value.

    Default value: AUTO (0xFFFFFFFF)

    Applicable Mode: DEVICE, HOST

    LFPSPingTRepeat Specifies the value of tRepeat of Ping.LFPS in nanoseconds.

    Note that time value for this setting currently has 8 ns granularity.

    Example: Set LFPSPingTRepeat = 4000

    Possible values are: number of nanoseconds for tBurst of Ping.LFPS 0xFFFFFFFF # AUTO. Use the spec value.

    Default value: AUTO (0xFFFFFFFF)

    Applicable Mode: DEVICE, HOST

    LFPSWarmResetTBurst Specifies the value of tBurst of WarmReset.

    Note that time value for this setting currently has 8 ns granularity.

    Example: Set LFPSWarmResetTBurst = 625

    Possible values are: number of nanoseconds for tBurst of WarmReset 0xFFFFFFFF # AUTO. Use the spec value.

    Default value: AUTO (0xFFFFFFFF)

    Applicable Mode: DEVICE, HOST

    LFPSU1ExitTBurst Specifies the value of tBurst of U1 Exit.

    Note that time value for this setting currently has 8 ns granularity.

    Example: Set LFPSU1ExitTBurst = 8

    Possible values are: number of nanoseconds for tBurst of U1 Exit 0xFFFFFFFF # AUTO. Use the spec value.

    Default value: AUTO (0xFFFFFFFF)

    Applicable Mode: DEVICE, HOST

  • Teledyne LeCroy Voyager USB 3.1 Exerciser Generation Script Language Reference Manual

    20

    LFPSU2ExitTBurst Specifies the value of tBurst of U2 Exit.

    Note that time value for this setting currently has 8 ns granularity.

    Example: Set LFPSU2ExitTBurst = 16

    Possible values are: number of nanoseconds for tBurst of U2 Exit 0xFFFFFFFF # AUTO. Use the spec value.

    Default value: AUTO (0xFFFFFFFF)

    Applicable Mode: DEVICE, HOST

    LFPSU3ExitTBurst Specifies the value of tBurst of U3 Exit.

    Note that time value for this setting currently has 8 ns granularity.

    Example: Set LFPSU3ExitTBurst = 24

    Possible values are: number of nanoseconds for tBurst of U3 Exit 0xFFFFFFFF # AUTO. Use the spec value.

    Default value: AUTO (0xFFFFFFFF)

    Applicable Mode: DEVICE, HOST

  • Teledyne LeCroy Voyager USB 3.1 Exerciser Generation Script Language Reference Manual

    21

    7.6 Link Error Settings These settings specify the USB 3.1 link error injection options that the Voyager USB 3.1

    Exerciser uses when it performs link management and packet transmission.

    ErrLostLGOOD Specifies that the Exerciser does not reply with an LGOODn link command when it receives the next Header Packet (HP).

    Example: Set ErrLostLGOOD = 15

    Possible values are Disabled (0), number of times (1 to 255), or Infinite (0xFFFFFFFF).

    Default value: Disabled (0)

    Applicable Mode: HOST, DEVICE

    Note: This setting is NOT applicable during link advertisement stages.

    ErrWrongLGOOD Specifies that the Exerciser replies with a wrong LGOODn link command when it receives the next Header Packet (HP).

    Example: Set ErrWrongLGOOD = 15

    Possible values are Disabled (0), number of times (1 to 255), or Infinite (0xFFFFFFFF).

    Default value: Disabled (0)

    Applicable Mode: HOST, DEVICE

    Note: This setting is NOT applicable during link advertisement stages.

    ErrLostLCRD Specifies that the Exerciser does not reply with an LCRDn link command when it receives the next Header Packet (HP).

    Example: Set ErrLostLCRD = 15

    Possible values are Disabled (0), number of times (1 to 255), or Infinite (0xFFFFFFFF).

    Default value: Disabled (0)

    Applicable Mode: HOST, DEVICE

    Note: This setting is NOT applicable during link advertisement stages.

    ErrWrongLCRD Specifies that the Exerciser replies with a wrong LCRDn link command when it receives the next Header Packet (HP).

    Example: Set ErrWrongLCRD = 15

    Possible values are Disabled (0), number of times (1 to 255), or Infinite (0xFFFFFFFF).

    Default value: Disabled (0)

    Applicable Mode: HOST, DEVICE

    Note: This setting is NOT applicable during link advertisement stages.

  • Teledyne LeCroy Voyager USB 3.1 Exerciser Generation Script Language Reference Manual

    22

    ErrCorruptLinkCmd Specifies that the Exerciser sends Link Commands with wrong CRC-5.

    Example: Set ErrCorruptLinkCmd = 15

    Possible values are Disabled (0), number of times (1 to 255), or Infinite (0xFFFFFFFF).

    Default value: Disabled (0)

    Applicable Mode: HOST, DEVICE

    Note: This setting is NOT applicable during link advertisement stages.

    ErrCorruptLinkCmdLCRDOnly Specifies that the Link Command corruption setting should be applied to LCRD Link Commands only.

    Example: Set ErrCorruptLinkCmdLCRDOnly = 1

    Possible values: 0 or 1 Default value: 0 Applicable Mode: HOST, DEVICE

    ErrCorruptLMP Specifies that the Exerciser sends Link Management Packets (LMP) Commands with wrong CRC-16.

    Example: Set ErrCorruptLMP = 15

    Possible values are Disabled (0), number of times (1 to 255), or Infinite (0xFFFFFFFF).

    Default value: Disabled (0)

    Applicable Mode: HOST, DEVICE

    ErrCorruptLMPCRC5 Specifies that LMP packets sent by the Exerciser should include a wrong CRC5 value. The number of times to apply this error is specified by the CRC5ErrRtryCnt Setting.

    Example: Set ErrCorruptLMPCRC5 = 1

    Possible values: 0 or 1 Default value: 0 Applicable Mode: HOST, DEVICE

    ErrCorruptLMPCRC16 Specifies that LMP packets sent by the Exerciser should include a wrong CRC16 value. The number of times to apply this error is specified by the CRC16ErrRtryCnt Setting.

    Example: Set ErrCorruptLMPCRC16 = 1

    Possible values: 0 or 1 Default value: 0 Applicable Mode: HOST, DEVICE

    ErrCorruptLMPHSN Specifies that LMP packets sent by the Exerciser should include a wrong Header Sequence Number value. The number of times to apply this error is specified by the HSNErrRtryCnt Setting.

    Example: Set ErrCorruptLMPHSN = 1

    Possible values: 0 or 1 Default value: 0 Applicable Mode: HOST, DEVICE

    ErrCorruptLMPNoCap Specifies that the Exerciser should not send the LMP Capability packet during link initialization.

    Example: Set ErrCorruptLMPNoCap = 1

    Possible values: 0 or 1 Default value: 0 Applicable Mode: HOST, DEVICE

  • Teledyne LeCroy Voyager USB 3.1 Exerciser Generation Script Language Reference Manual

    23

    ErrCorruptLMPNoCfg Specifies that the Exerciser should not send the LMP Configuration Request (HOST mode) or LMP Configuration Response (DEVICE mode) packet during link initialization.

    Example: Set ErrCorruptLMPNoCfg = 1

    Possible values: 0 or 1 Default value: 0 Applicable Mode: HOST, DEVICE

    ErrDisparity Specifies that the Exerciser inserts valid 10-bit symbols with incorrect running disparity in the outgoing traffic. It randomly inserts them in the transmitting stream of data, regardless of the contents of the traffic.

    Example: Set ErrDisparity = 15

    Possible values are Disabled (0), number of times (1 to 255), or Infinite (0xFFFFFFFF).

    Default value: Disabled (0)

    Applicable Mode: HOST, DEVICE

    ErrWrongSymbol Specifies that the Exerciser inserts invalid 10-bit symbols in the outgoing traffic. It randomly inserts them in the transmitting stream of data, regardless of the contents of the traffic.

    Example: Set ErrWrongSymbol = 15

    Possible values are Disabled (0), number of times (1 to 255), or Infinite (0xFFFFFFFF).

    Default value: Disabled (0)

    Applicable Mode: HOST, DEVICE

    ErrLBAD Specifies that the Exerciser sends LBAD LC instead of LGOODn upon receiving correct header packets.

    Example: Set ErrLBAD = 15

    Possible values are Disabled (0), number of times (1 to 255), or Infinite (0xFFFFFFFF).

    Default value: Disabled (0)

    Applicable Mode: HOST, DEVICE

    Note: This setting is NOT applicable during link advertisement stages.

  • Teledyne LeCroy Voyager USB 3.1 Exerciser Generation Script Language Reference Manual

    24

    7.7 Link Advertisement Error Injection Settings These settings specify the USB 3.1 link error injection options that the Voyager USB 3.1

    Exerciser uses when it performs link management and packet transmission during Link

    Advertisement phases.

    ErrLostLGOODAdv Instructs the Exerciser link layer not to send LGOODn LC during advertisement phases. This setting forces the link layer to send an incorrect index number in LGOODn LC during the advertisement phase. For the advertisement after reset, LGOOD_7 is expected. After Recovery, the last Acknowledged header sequence number is expected.

    Example: Set ErrLostLGOODAdv = 4

    Possible values are: positive integer # number of times to apply the error injection. 0 # no error injection

    Default value: 0

    Applicable Mode: DEVICE, HOST

    ErrWrongLGOODAdv Instructs the Exerciser link layer to send some index different than the expected value.

    Example: Set ErrWrongLGOODAdv = 100

    Possible values are: positive integer # number of times to apply the error injection. 0 # no error injection

    Default value: 0

    Applicable Mode: DEVICE, HOST

    ErrLostLCRDAdv Instructs the Exerciser link layer not to send LCRDn LC during advertisement phases. This setting forces the link layer to send an incorrect index number in LCRDn LC during the advertisement phase. For the advertisement after reset, LCRD_7 is expected. After Recovery, the last Acknowledged header sequence number is expected.

    Example: Set ErrLostLCRDAdv = 10

    Possible values are: positive integer # number of times to apply the error injection. 0 # no error injection

    Default value: 0

    Applicable Mode: DEVICE, HOST

    ErrWrongLCRDAdv Instructs the Exerciser link layer to send LCRDx LCs during the advertisement phase in the wrong order. Instead of sending LCRD_A and continuing up to the number of free Rx buffers, it forces the link layer to send LCRDx LCs in shuffled order.

    Example: Set ErrWrongLCRDAdv = 3

    Possible values are: positive integer # number of times to apply the error injection. 0 # no error injection

    Default value: 0

    Applicable Mode: DEVICE, HOST

  • Teledyne LeCroy Voyager USB 3.1 Exerciser Generation Script Language Reference Manual

    25

    7.8 Send Packet Error Retry Settings These settings specify retry values for some error injection options used by the Send Packet

    Instruction.

    CRC5ErrRtryCnt Specifies how many times to send a packet with wrong CRC-5 (set using the Override parameter in the Send Packet instruction). After reaching the specified limit, the Exerciser inserts a correct CRC-5 value and resends the packet.

    Example: Set CRC5ErrRtryCnt = 3

    Possible values are 1 to 15.

    Default value: 1

    Applicable Mode: HOST, DEVICE

    CRC16ErrRtryCnt Specifies how many times to send a packet with wrong CRC-16 (set using the Override parameter in the Send Packet instruction). After reaching the specified limit, the Exerciser inserts a correct CRC-16 value and resends the packet.

    Example: Set CRC16ErrRtryCnt = 15

    Possible values are 1 to 15.

    Default value: 1

    Applicable Mode: HOST, DEVICE

    HSNErrRtryCnt Specifies how many times to send a packet with wrong Header Sequence Number (HSN) (set using the Override parameter in the Send Packet instruction). After reaching the specified limit, the Exerciser inserts a correct HSN value and resends the packet.

    Example: Set HSNErrRtryCnt = 2

    Possible values are 1 to 15.

    Default value: 1

    Applicable Mode: HOST, DEVICE

  • Teledyne LeCroy Voyager USB 3.1 Exerciser Generation Script Language Reference Manual

    26

    7.9 Framing Error Settings These settings specify the Framing error injection options that the Voyager USB 3.1 Exerciser

    uses when it performs link management and packet transmission.

    Note: For the following Framing Error Settings the xxxMap setting has to be specified prior to the

    corresponding error setting for the proper application of the setting.

    ErrCorruptSHP Specifies that the Exerciser sends the next Header Packet with one invalid symbol in the SHP sequence.

    Example: Set ErrCorruptSHP = 15

    Possible values are Disabled (0), number of times (1 to 255), or Infinite (0xFFFFFFFF).

    Default value: Disabled (0)

    Applicable Mode: HOST, DEVICE

    ErrCorruptSHPMap Binary bit masks define which symbols to corrupt in framing sequences: Bit 0 is first symbol, Bit 1 is second symbol, and so on.

    Example: Set ErrCorruptSHPMap = CRPT_SYM1

    Possible values are: CRPT_SYM1 = _0001 # 0x1 Corrupt symbol 1 in the SHP framing sequence. CRPT_SYM2 = _0010 # 0x2 Corrupt symbol 2 in the SHP framing sequence. CRPT_SYM3 = _0100 # 0x4 Corrupt symbol 3 in the SHP framing sequence. CRPT_SYM4 = _1000 # 0x8 Corrupt symbol 4 in the SHP framing sequence.

    Default value: _0000 (no corruption)

    Applicable Mode: DEVICE, HOST

    ErrCorruptSDP Specifies that the Exerciser sends the next Data packet with one invalid symbol in the SDP sequence.

    Example: Set ErrCorruptSDP = 15

    Possible values are Disabled (0), number of times (1 to 255), or Infinite (0xFFFFFFFF).

    Default value: Disabled (0)

    Applicable Mode: HOST, DEVICE

  • Teledyne LeCroy Voyager USB 3.1 Exerciser Generation Script Language Reference Manual

    27

    ErrCorruptSDPMap Binary bit masks define which symbols to corrupt in framing sequences: Bit 0 is first symbol, Bit 1 is second symbol, and so on.

    Example: Set ErrCorruptSDPMap = CRPT_SYM2 | CRPT_SYM3

    Possible values are: CRPT_SYM1 = _0001 # 0x1 Corrupt symbol 1 in the SHP framing sequence. CRPT_SYM2 = _0010 # 0x2 Corrupt symbol 2 in the SHP framing sequence. CRPT_SYM3 = _0100 # 0x4 Corrupt symbol 3 in the SHP framing sequence. CRPT_SYM4 = _1000 # 0x8 Corrupt symbol 4 in the SHP framing sequence.

    Default value: _0000 (no corruption)

    Applicable Mode: DEVICE, HOST

    ErrCorruptEND Specifies that the Exerciser sends the next Data packet with one invalid symbol in the END sequence.

    Example: Set ErrCorruptEND = 15

    Possible values are Disabled (0), number of times (1 to 255), or Infinite (0xFFFFFFFF).

    Default value: Disabled (0)

    Applicable Mode: HOST, DEVICE

    ErrCorruptENDMap Binary bit masks define which symbols to corrupt in framing sequences: Bit 0 is first symbol, Bit 1 is second symbol, and so on.

    Example: Set ErrCorruptENDMap = _0101

    Possible values are: CRPT_SYM1 = _0001 # 0x1 Corrupt symbol 1 in the SHP framing sequence. CRPT_SYM2 = _0010 # 0x2 Corrupt symbol 2 in the SHP framing sequence. CRPT_SYM3 = _0100 # 0x4 Corrupt symbol 3 in the SHP framing sequence. CRPT_SYM4 = _1000 # 0x8 Corrupt symbol 4 in the SHP framing sequence.

    Default value: _0000 (no corruption)

    Applicable Mode: DEVICE, HOST

    ErrCorruptSLC Specifies that the Exerciser sends the next Data packet with one invalid symbol in the SLC sequence.

    Example: Set ErrCorruptSLC = 2

    Possible values are Disabled (0), number of times (1 to 255), or Infinite (0xFFFFFFFF).

    Default value: Disabled (0)

    Applicable Mode: HOST, DEVICE

  • Teledyne LeCroy Voyager USB 3.1 Exerciser Generation Script Language Reference Manual

    28

    ErrCorruptSLCMap Binary bit masks define which symbols to corrupt in framing sequences: Bit 0 is first symbol, Bit 1 is second symbol, and so on.

    Example: Set ErrCorruptSLCMap = _1100

    Possible values are: CRPT_SYM1 = _0001 # 0x1 Corrupt symbol 1 in the SHP framing sequence. CRPT_SYM2 = _0010 # 0x2 Corrupt symbol 2 in the SHP framing sequence. CRPT_SYM3 = _0100 # 0x4 Corrupt symbol 3 in the SHP framing sequence. CRPT_SYM4 = _1000 # 0x8 Corrupt symbol 4 in the SHP framing sequence.

    Default value: _0000 (no corruption)

    Applicable Mode: DEVICE, HOST

  • Teledyne LeCroy Voyager USB 3.1 Exerciser Generation Script Language Reference Manual

    29

    7.10 Script Parser Settings The following Script Parser settings are supported:

    PktDelay Specifies the default delay in nanoseconds between transmitted packets.

    Default value: 0 (packets are transmitted without delay)

    Note: This value can be overridden by the Delay parameter in a Send Packet instruction.

    RandSeed Allows you to set an integer seed for the pseudo-random generator used by the RAND token.

    MaxLoopIterCount Allows you to change the maximum total number of preprocessor loop iterations in a generation script.

    Possible values are 1 to 100,000.

    Default value: 20,000

    TerminationDelay Specifies the time to wait before applying Terminations Off or Terminations On link states by the SetLinkState instruction (see 9.8), in units of 15 milliseconds.

    Default value: 0

    7.11 Transaction Engine Settings The following Transaction Engine settings are supported:

    TransactionEngine Used to turn Transaction Engine functionality On (1) or Off (0).

    Default value is Off (0).

    GenerateITPs Used to turn automatic generation of Isochronous Timestamp Packets (ITPs) in Host Emulation mode On (1) or Off (0).

    Default value is Off (0).

    Note: ITP Generation should be turned on in order for Isochronous and Interrupt transfers to be executed:

    IsoStartBusInterval Used to specify the specific Bus Interval Number during which the next queued (using SendPipeCommand instruction) Isochronous transfer should start. It is applicable to the Host Emulation mode only.

    Possible values are 0 to 0x3FFF, or AUTO.

    Default value: AUTO (0xFFFFFFFF) – The Isochronous transfers start immediately in the next available Bus Interval.

  • Teledyne LeCroy Voyager USB 3.1 Exerciser Generation Script Language Reference Manual

    30

    7.12 Device Emulation Settings The following Device Emulation settings are supported:

    UseAssignedAddress Used to specify whether the Address field in all applicable script instructions uses the address assigned to the device by the Host during Device Emulation.

    The Address value is supplied by the Device Framework Handler.

    The setting value is the 1-based index of the device from which to use the assigned address.

    In this version, the only values supported are: 1 = Use emulated device. 0 = Use the address programmed by the script.

    Default value is 0.

    7.13 Generation Settings Syntax The syntax for generation numeric and string settings is:

    Set NumericSetting = numeric value

    Set StringSetting = "string value"

    Examples

    Set PktDelay = 2000 # decimal

    Set PwrStateAccept = _110 # binary

    Set PwrStateAccept = 0x7 # hexadecimal

  • Teledyne LeCroy Voyager USB 3.1 Exerciser Generation Script Language Reference Manual

    31

    7.14 Generation Settings outside Procedures Generation settings specified outside the generation procedures are set before the first script generation instruction is executed, no matter where they appear in the script. The two examples below are equivalent.

    Example 1

    # Set a setting before the first instruction is executed.

    Set PktDelay = 20

    Main

    {

    # Some generation instructions

    }

    Example 2

    # Set a setting before the first instruction is executed.

    Main

    {

    # Some generation instructions

    }

    # Set before the first instruction is executed,

    # though the Set line is below the instruction in the script.

    Set PktDelay = 12

    7.15 Generation Settings inside Procedures Generation settings specified inside a generation procedure are set only during script execution by the Voyager USB 3.1 Exerciser.

    Main

    {

    Set PktDelay = 24 # Set during runtime.

    }

    7.16 Arithmetic Expressions in Constants You can use arithmetic expressions, such as

    +, -, *, /, %, >>, ( 8 + SOME_CONST )

  • Teledyne LeCroy Voyager USB 3.1 Exerciser Generation Script Language Reference Manual

    32

    8 Packet and Structure Template Declarations Packet/structure declarations declare named packet/structure objects. A packet/structure object gives its target byte stream a set of "fields", each having a unique name. You can fully set up a byte stream using packet/structure fields.

    Note: Templates can inherit field layouts from other templates through ancestor lists.

    ( Packet | Struct ) Template_Name [ : Ancestor_1, Ancestor_ 2, … ] [ (Attribute list) ]

    [

    {

    Field Definition 1

    Field Definition 2

    ...

    }

    ]

    Note: For packet/structure template declarations, you can use the Packet or Struct keyword. However, structures are supposed to be used as building blocks for constructing packet payloads (or similar purposes), rather than for describing full packets.

    8.1 Predefined Packet/Structure Templates Teledyne LeCroy PSG provides some useful USB 3.1 packet templates that can be used in generation scripts. The predefined packet/structure templates are in the {USB Protocol Suite application folder}\Generation\Include folder in the following files:

    o Main_Pkt_Templates.ginc – Generic USB 3.1 templates serving as ancestors or building blocks for other templates

    o Main_DP_Pkt_templates.ginc – Data Packet (DPH/DPP) templates

    o Main_TP_Pkt_templates.ginc – Transaction Packet (TP) templates

    o Main_ITP_Pkt_templates.ginc – Isochronous Timestamp Packet (ITP) templates

    o Main_LMP_Pkt_templates.ginc – Link Management Packet (LMP) templates

    Note: You can use custom templates instead of the Teledyne LeCroy PSG templates.

  • Teledyne LeCroy Voyager USB 3.1 Exerciser Generation Script Language Reference Manual

    33

    8.2 Field Definitions You can define template fields using the following syntax:

    Field_Name : [ offset, ] length [ (Byte Order attribute) ] [ = Field_Value ] [ [ list of possible values ] ]

    or

    Field_Name [: length] { Subfield definitions } [ (Byte Order attribute) [ = Field_Value ] [ [ list of

    possible values ] ]

    Note 1: Specify all field offsets and lengths in bits. Numeric expressions with declared constants

    are allowed in field offset and length definitions. All field and subfie