Teledyne PETracer Reference Manual

Protocol Solutions Group 3385 Scott Blvd., Santa Clara, CA 950 54 Tel: +1/408.727.6600 Fax: +1/408.727.6622
PETrainer
Scripting Language
Reference Manual
For PETrainer™ Software Version 7.xx
January 2014
Teledyne LeCroy PETrainer Scripting Language
Document Disclaim er
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, PETrainer EML, PETra iner ML, P ETr ac er EML, PETrac er ML, PET rac er , PETracer Summit, Summit Z2-16, Summit Z3-16, and BusEngine are trademarks of Teledyne
LeCroy. Microsoft and Windows are registered trademarks of Microsoft Inc. All other trademarks are property of their respective companies.
Copyright
© 2012 Teledyne LeCroy, Inc. All Rights Reserved. This document may be printed and reproduced without additional permission, but all copies
should contain this copyright notice.
ii
Teledyne LeCroy PETrainer Scripting Language

Contents

1 Introduction................................................................... 1
1.1 Support Resources ............................................................ 1
2 Command List............................................................... 2
3 Packet Command ......................................................... 3
3.1 Packet = TLP ..................................................................... 3
3.1.1 TLPType = MRd32, MRdlk32, MWr32 .....................................9
3.1.2 TLPType = MRd64, MRdLk64, MWr64 ................................. 10
3.1.3 TLPType = IoRd, IoWr ........................................................... 11
3.1.4 TLPType = Cfgrd0, Cfgwr0, Cfgrd1, Cfgwr1 ....................... 12
3.1.5 TLPType = Msg, Msgd .......................................................... 13
3.1.6 TLPType = Cpl, CplLk, CplD, CplDLk .................................. 15
3.1.7 TLP Field or Payload Substitution ....................................... 17
3.2 Packet = DLLP ................................................................. 19
3.2.1 DLLPType = Ack, Nak ........................................................... 21
3.2.2 DLLPType = InitFC1_P, InitFC1_NP, InitFC1_Cpl, InitFC2_P, InitFC2_NP, InitFC2_Cpl, UpdateFC_P,
UpdateFC_NP, UpdateFC_Cpl .................................... 22
3.2.3 DLLPType = Vendor .............................................................. 23
3.3 Packet = OrderedSet ....................................................... 24
3.3.1 SetType = TS1, TS2 ............................................................... 25
3.3.2 SetType = Skip ...................................................................... 28
3.4 Packet = Raw................................................................... 29
3.5 Packet = <TemplateName> ............................................. 30
4 Idle Command ............................................................. 31
5 Link Command............................................................ 32
5.1 Link = L0 32
5.2 Link = L0s ........................................................................ 32
5.3 Link = L1 32
5.4 Link = L23 ........................................................................ 32
5.5 Link = Disabled ................................................................ 32
5.6 Link = HotReset ............................................................... 32
5.7 Link = Recovery ............................................................... 32
5.8 Link = Detect .................................................................... 33
5.9 Link = LTSSMOff ............................................................. 33
5.10 Link = InitFC .................................................................... 33
5.11 Link = PERST .................................................................. 33
5.12 Link = PERST_Asser t ...................................................... 33
5.13 Link = PERST_Deassert .................................................. 33
5.14 Link = 2_5 ........................................................................ 33
iii
Teledyne LeCroy PETrainer Scripting Language
5.15 Link = 5_0 ........................................................................ 34
5.16 Link = 8_0 ........................................................................ 34
5.17 Link = Xn 34
6 Config Command........................................................ 35
6.1 Config = General .............................................................. 35
6.2 Config = FCTx .................................................................. 37
6.3 Config = FCRx ................................................................. 38
6.4 Config = TLP .................................................................... 39
6.5 Config = AckNak .............................................................. 40
6.6 Config = Transactions ...................................................... 42
6.7 Config = Link .................................................................... 43
6.8 Config = Definitions .......................................................... 44
6.9 Config = SendInterrupt ..................................................... 46
6.10 Config = NVMe ................................................................ 47
6.11 Config = NVMeDriveErrorInjection ................................... 48
7 Wait Command ........................................................... 50
7.1 Wait = TLP ....................................................................... 50
7.2 Wait = LinkCondition ........................................................ 53
7.3 Wait = Payload ................................................................. 54
7.4 Wait = User ...................................................................... 56
7.5 Wait = FastTransmitIdle ................................................... 57
7.6 Additional “Wait” Modifiers ............................................... 58
8 Branch Command....................................................... 59
8.1 Branch = <condition> ....................................................... 59
8.2 Branch = Disable ............................................................. 61
9 Proc Command ........................................................... 62
9.1 Proc = Begin .................................................................... 62
9.2 Proc = End ....................................................................... 62
10 Loop Command .......................................................... 63
10.1 Loop = Begin ................................................................... 63
10.2 Loop = End ...................................................................... 63
11 Repeat Command ....................................................... 64
11.1 Repeat = Begin ................................................................ 65
11.1.1 Counter Parameter ...................................................... 65
12 Template Com mand ................................................... 68
13 Include Command ...................................................... 70
14 AddressSpace Command .......................................... 71
14.1 AddressSpace = Read ..................................................... 72
14.2 AddressSpace = Write ..................................................... 73
iv
Teledyne LeCroy PETrainer Scripting Language
15 Structure Command ................................................... 75
15.1 Command Parameters ..................................................... 75
15.2 Creating Errors in Structures ............................................ 78
16 FastTransmit Engine Commands ............................. 79
16.1 FastTrans mi t Command ................................................... 79
16.1.1 FastTransmit = Setup .................................................. 80
16.1.2 FastTransmit = Start .................................................... 80
16.1.3 FastTransmit = Pause ................................................. 80
16.1.4 FastTransmit = Continue ............................................ 80
16.1.5 FastTransmit = Stop .................................................... 80
16.2 Send Command ............................................................... 81
16.2.1 Send = MRd32/MWr32 ................................................. 83
16.2.2 Send = MRd64/MWr64 ................................................. 83
How to Contact Teledyne LeCroy .................................... 84
v
Teledyne LeCroy PETrainer Scripting Language

1 Introduction

This manual describes the scripting language used to create traffic generation files for PETrainer™, including the Summit Z2-16and Summit Z3-16 Trainers.

1.1 Support Resources

As new functionalities are added, not all of them are supported by older versions of the PETracer software. For newer releases of the analyzer's software, please refer to Teledyne LeCroy's web site:
teledynelecroy.com/
Syntax PETrainer™ Script files consist of the statements with the following format:
COMMAND = MODIFIER { PARAM1 = VALUE1 ... PARAMn = VALUEn }
See the list of all commands with all applicable modifiers on page 2. For some commands the list of the parameters is optional.
All literals are not case sensitive. All default values are zeros unless otherwise noted. Integer literals represent numeric values with no fractions or decimal points. Hexadecimal, decimal, and binary notations are supported:
Hexadecimal numbers must be preceded by 0x: 0x2A, 0x54, 0xFFFFFF01
Decimal numbers are written as usual: 24, 1256, 2
Binary numbers are denoted with 0b: 0b01101100, 0b01, 0b100000
It is possible to use expressions, for example, (i - 239). See Page 65 for more examples. String literals are surrounded by double quotes. Array data types are represented by integer or string literals surrounded by “(“ and “)” characters, and
separated by a comma “,”. For example, (2,23,4). Single-line comments are supported and should be preceded by a semicolon “;”. Multi-line comments are also supported. Multi-line comments begin with a “/*” combination, and end with
the reverse “*/” combination.
1
Teledyne LeCroy PETrainer Scripting Language
Defines and controls high-
16 Trainers.
MRd32, MWr32
Defines a sequence of packets to
Trainers.

2 Command List

COMMAND MODIFIERS Comment
Packet TLP, DLLP, OrderedSet, Raw,
<TemplateName>
Idle <# of ns> Sends idle symbols (D0.0). Link L0, L1, L0s, HotReset, Disabled,
Recovery, Detect, LTSSMOff, InitFC
Config General, FCTx, FCRx, TLP, AckNak,
Transactions, Link, Definitions
Wait TLP, DLLP, Error, LinkCondition,
BOB, Payload, User
Include <Include file path> Branch TLP, DLLP, Error, Link, BOB,
Payload, User
Proc Begin, End Declares the procedure to be
Loop Begin, End Repeat Begin, End Repeats traffic some number of
Sends a packet.
Sets a link condition.
Configures the PETrainer™
Waits for the condition specified.
Includes a PETrainer script file. Enables/disables an interru pt for
the specified condition.
used in a branch statement. Creates a PETrainer loop.
times.
Template TLP, DLLP, OrderedSet, Raw,
AddressSpace Read, Write Reads/Writes address space. FastTransmit Setup, Start, Pause, Continue, Stop
Send
<TemplateName>
MRd64, MWr64
Creates a template for a packet that can be used in the Packet command.
performance generation. Note: Available only for the Summit Z2-16™ and Summit Z3-
send once, a number of times, or repeatedly. Available only in a
Setup command section of a FastTransmit block. Note: Available only for the
Summit Z2-16 and Summit Z3-16
2
Teledyne LeCroy PETrainer Scripting Language
Parameter
Values
Default Value
Comment
PSN
0:4095, Incr
0
When Incr is specified, the PSN for the
packets will have the same PSN.
TLPType
MRd32
CplDLk
0
Sets the Fmt (bits 6:5 of byte 0 in the TLP
TC
0:7
0
Traffic Class: bits 6:4 of byte 1 in the TLP header
TD
0:1 0 Bit 7 of byte 2 in the TLP header: form of a single DW at the end of the TLP.
EP
0:1 0 Bit 6 of byte 2 in the TLP header: 1 indicates the TLP is poisoned.
0:1 0 Bit 4 of byte 2 in the TLP header:

3 Packet Command

This command initiates transmission of a specified packet on the bus.

3.1 Packet = TLP

This command initiates transmission of TLP packet on the bus. The parameters of the Packet = TLP command cover all the fields in the TLP header: TLP Payload, PSN (Packet Sequence Number), ECRC, and LCRC. Reserved fields can be set with the RawData parameter.
current TLP is assigned as the PSN of the previously sent TLP incremented by 1. When the PSN is generated automatically (see the AutoSeqNumber parameter, Page 38), this parameter has no effect. Note: When automatic PSN is turned off PSN=Incr will work properly only for TLP transmissions with Count=1. Count instructs the exerciser to repeat the same packet and when automatic PSN generation is turned off, all repeated
MRdLk32 MWr32 MRd64 MRdLk64 MWr64 IoRd IoWr CfgRd0 CfgWr0 CfgRd1 CfgWr1 Msg MsgD Cpl CplLk CplD
header) and Type (bits 4:0 of byte 0 in the TLP header) fields in the TLP header.
Also, this field can be specified as a direct numeric value that specifies bits 6:0 of byte 0 in the TLP header.
1 indicates presence of TLP digest in the
3
Teledyne LeCroy PETrainer Scripting Language
Parameter
Values
Default Value
Comment
Snoop
0 indicates that hardware enforced cache
coherency is not expected.
Ordering
0:1 0 Bit 5 of byte 2 of TLP header:
Model.
Length
0:1023
1
Length of data payload in DWORDs.
(because 0 means 1024).
Tag
0:255
0
Byte 6 of the TLP Header for Memory, IO,
16 and Summit Z3-16 trainers.
RequesterID
(XX:XX:X) or direct
0
Bytes 4-5 of the TLP Header for Memory,
DeviceNumber : FunctionNumber)
ECRC
0x00000000:
Calculate
cally
When not specified, the PETracer™
LCRC
0x00000000:
Calculate
When not specified, the PETracer
parameter has no eff ec t.
coherency is expected. 1 indicates that hardware enforced cache
0 indicates PCI Strongly Ordered Model. 1 indicates PCI-X Relaxed Ordering
If not specified, this field is 1 for all read requests and calculated according to the actual payload for write requests. For a length of 1024, set Length to 0
LAST_CFG_TAG LAST_IO_TAG LAST_MEM_TAG
value
and Configuration TLP packets. Byte 10 for Completion TLP packets. When Tags are generated automatically (see the TagGeneration parameter, Page
38), this parameter has no effect for Memory, IO, and Configuration TLP packets. The LAST_CFG_TAG, LAST_IO_TAG, and LAST_MEM_TAG modifiers are only valid for the Summit Z2-16 and Summit Z3-16 Trainers and are only applicable to Completion TLPs. When a LAST_CFG_TAG, LAST_IO_TAG, or LAST_MEM_TAG modifier is used for a completion TLP, the Tag field value is set to the value of the Tag in the latest­received Configuration, IO, or Memory request, respectively, as seen by the Z2-
IO, and Configuration TLP packets. Bytes 8-9 for Completion TLP packets. This parameter can be set in the following format: (BusNumber :
0xFFFFFFFF
0xFFFFFFFF
d automati
d automati cally
4
software automatically calculates the ECRC. (TD field has to be specified.)
software automatically calculates the LCRC. When LCRC is generated automatically by the PETrainer™ hardware (see the AutoLCRC parameter, Page 38
), this
Teledyne LeCroy PETrainer Scripting Language
Parameter
Values
Default Value
Comment
Payload
(XXXX,XXXX,…)
Specified as the array of DWORDs in
Data TLP packets.
Field[<start>:<end>]
The arbitrary TLP Header field could be
field.
RawData@<start>
Inserts raw data symbols at <start> byte
ML and EML Trainers.
Count
1:65535
1
Repeats this packet the number of times specified.
Field[<pos>]
Incr Random Zeros Ones
hexadecimal format (Big Endian). The Payload parameter applies only to TLP packets with data. Incr: Specifies a payload as the sequence (0, 1, …’Length’).
Random: Specifies a random payload. Zeros: Specifies a payload of all zeros. Ones: Specifies a payload of all ones. Note: When Incr, Random, Zeros, and Ones are used, the Length parameter
must be specified before the payload. Payload can be specified for Memory, IO, Configuration writes, and Completion with
specified by using Field parameter. Start, end, and pos are bit positions from the beginning of TLP Header. Position 0 corresponds to the Most Significant Bit of the first byte of TLP Header. Position 95 for 3 DWORD header (and position 127 for 4 DWORD header) correspond to the Least Significant Bit of the last byte of TLP Header. Fields are limited by 32 bit values. Use Field[<start>:<end>] syntax to specify multi bit field. Use Field[<pos>] to specify single bit
position from the beginning of the TLP. See the Packet = Raw des cr iption, Page 29, for possible raw data formats. Note: This parameter is available only on
5
Teledyne LeCroy PETrainer Scripting Language
Parameter
Values
Default Value
Comment
AutoIncrementAddress
Yes
No
This parameter is supported only for the
specified.
StoreData
( FROM_MEMxx_x,
N/A
This parameter is supported only for the
Substitution (see 3.1.7)
No
Summit Z2-16 and Summit Z3-16 Trainers. It applies to Memory Write and Memory Read Request TLPs. If the parameter is set to the "Yes" modifier, and the "Count" modifier is set to a value greater than 1, the Summit Z2-16 and Summit Z3-16 Trainers perform a "burst" of Memory Writes or Reads, with the Address value for each subseque nt address automatically incremented according to the Length value for the write or read. The manual or automatic Tag policy is applied to the transmitted TLPs as
offset )
Summit Z3-16 Trainer. It can be used for any Memory Read TLP. When used it instructs the Trainer to collect all the data returned as a response to this Memory Read and copy it to the specified Address Space locat ion. Values have the same notation as in Field
Example 1: Read one DWORD of data from address 0x1000.
Length parameter is not specified, so the default value of 1 is used. TC, TD, EP, Ordering, Snoop, and Tag parameters are not specified, so the default value of 0 is used. LCRC is not specified, so the LCRC is calculated by software.
Packet = TLP { PSN = 0 TLPType = MRd32 Address = 0x1000 }
6
Teledyne LeCroy PETrainer Scripting Language
Example 2: Read 32 DWORDs of data starting from address 0x1000.
PSN would accept values 0 for first TLP and 1 for second TLP. TC, EP, Ordering, and Snoop parameters are not specified, so the default value of 0 is used. LCRC is not specified, so the LCRC is calculated by software. ECRC is not specified, so the ECRC is calculated by software.
Packet = TLP { PSN = Incr TLPType = MRd32 Tag = 0 Address = 0x1000
TD = 1
FirstDwBe = 0xF Length = 16 } Packet = TLP { PSN = Incr TLPType = MRd32 Tag = 1 Address = 0x1010
TD = 1
FirstDwBe = 0xF Length = 16 }
Example 3: This example does not specify PSN, Tag, and LCRC. Those values are calculated automatically by the
PETrainer hardware (see more on Config = TLP command, Page 39).
Config = TLP { AutoSeqNumber = Yes AutoLCRC = Yes TagGeneration = Default
}
Packet = TLP { TLPType = MRd32 Address = 0x1010
TD = 1 Length = 1 }
Example 4: This example shows how to specify a reserved field in the TLP header using the RawData parameter
(see more on the RawData parameter, Page 29). Packet = TLP {
TLPType = MRd32 Address = 0x1010 RawData@4 = ( D1 ) }
7
Teledyne LeCroy PETrainer Scripting Language
Example 5: This example shows how to specify reserved fields in the TLP header using the Field parameter:
Packet=TLP { TLPType=CfgRd0 Register = 0x34 Length = 1 FirstDwBe = 0xF
Field[0] = 0x1 Field[8] = 0x1
Field[12:15] = 0xF Field[20:21] = 0x3
Field[80:83] = 0xF
}
Example 6: This example shows how to specify the TLP type directly. Any invalid TLP type can be generated with this
method.
Packet = TLP {
TLPType = 0x4F
}
Example 7: Repeat this TLP packet 64 times. Packet = TLP {
TLPType = MRd32 Address = 0x1000 Count = 64 }
8
Teledyne LeCroy PETrainer Scripting Language
Parameter
Value
Default
Comment
LastDwBe
0:15
0
Byte 7 in the TLP header. See rules for Specification.
FirstDwBe
0:15
0
Byte 7 in the TLP header. See rules for Specification.
Address
0x00000000: 0xFFFFFFFF
0
Bytes 8-11 in the TLP header.

3.1.1 TLPType = MRd32, MRdlk32, MWr32

Last DW BE in the PCI Expres s
1st DW BE in the PCI Express
Example 1: This example shows how to send a 32-bit Memory Write TLP.
The Length field is not specified, so it would be calculated by software. (Length = 4 would be used.)
TC, TD, EP, Ordering, Snoop, and Tag parameters are not specified, so the default value of 0 is used. LCRC is not specified, so the LCRC is calculated by software.
Packet = TLP { TLPType = MWr32 LastDwBe = 0xF FirstDwBe = 0xF Address = 0x1000 Payload = ( 0x2, 0x4, 0x6, 0x8 )
}
Example 2: This example shows how to send a 32-bit Memory Write TLP. This command would generate a random
payload of 1024 DWORDs.
Packet = TLP { TLPType = MWr32 LastDwBe = 0xF FirstDwBe = 0xF Address = 0x1000 Length = 0 ; 0 means 1024 DWORDs of payload Payload = Random
}
9
Teledyne LeCroy PETrainer Scripting Language
Parameter
Value
Default
Comment
LastDwBe
0:15
0
Byte 7 in the TLP header. See rules for Specification.
FirstDwBe
0:15
0
Byte 7 in the TLP header. See rules for Specification.
AddressLo
0x00000000: 0xFFFFFFFF
0
Bytes 8-11 in the TLP header.
AddressHi
0x00000000: 0xFFFFFFFF
0
Bytes 12-15 in the TLP header.

3.1.2 TLPType = MRd64, MRdLk64, MWr64

Last DW BE in the PCI Expres s
1st DW BE in the PCI Express
Example 1: This example shows how to send a 64-bit Memory Write TLP.
Length parameter is set to 3 intentionally in order to generate a TLP with incorrect length. TC, TD, EP, Ordering, Snoop, and Tag parameters are not specified, so the default value of 0 is used. LCRC is not specified, so the LCRC is calculated by software.
Packet = TLP { TLPType = MWr64 LastDwBe = 0xF FirstDwBe = 0xF AddressLo = 0x1000 AddressHi = 0x60000000 Payload = ( 0x2, 0x4, 0x6, 0x8, 0x2, 0x4, 0x6, 0x8 ) Length = 3
}
10
Teledyne LeCroy PETrainer Scripting Language
Parameter
Value
Default
Comment
LastDwBe
0:15
0
Byte 7 in the TLP header. See rules for Specification.
FirstDwBe
0:15
0
Byte 7 in the TLP header. See rules for Specification.
Address
0x00000000: 0xFFFFFFFF
0
Bytes 8-11 in the TLP header.

3.1.3 TLPType = IoRd, IoWr

Last DW BE in the PCI Expres s
1st DW BE in the PCI Express
Example 1: Read one DWORD of data from address 0x1000 of the IO address space.
Length parameter is not specified, so the default value of 1 is used. TC, TD, EP, Ordering, Snoop, and Tag parameters are not specified, so the default value of 0 is used. LCRC is not specified, so the LCRC is calculated by software
Packet = TLP { TLPType = IoRd Address = 0x1000 }
11
Teledyne LeCroy PETrainer Scripting Language
Parameter
Value
Default
Comment
LastDwBe
0:15
0
Byte 7 in the TLP header. See rules for Specification.
FirstDwBe
0:15
0
Byte 7 in the TLP header. See rules for Specification.
DeviceID
(XX:XX:X) or direct
0
Bytes 8-9 in the TLP header. This
FunctionNumber)
Register
0 Bytes 10-11 in the TLP header.

3.1.4 TLPType = Cfgrd0, Cfgwr0, Cfgrd1, Cfgwr1

Last DW BE in the PCI Express
1st DW BE in the PCI Express
value
Example 1: This example reads the Capability Pointer from the device’s configuration space
(Bus Number 0, Device Number 2, Function Number 4).
Packet = TLP { TLPType = CfgRd0 DeviceId = (0:2:4) Register = 0x34 Length = 1 FirstDwBe = 0x1
}
Example 2: This example writes to the Command Register of the device’s configuration space
(Bus Number 0, Device Number 0, Function Number 1).
Packet = TLP { TLPType = CfgWr0 DeviceId = 1 Register = 0x04 Length = 1 FirstDwBe = 0x3 Payload = ( 0x03000000 )
}
parameter can be set in the following format: (BusNumber : DeviceNumber :
12
Teledyne LeCroy PETrainer Scripting Language
Parameter
Value
Default
Comment
MessageRoute
ToRootComplex
Gather
ToRootComplex
MessageRoute affects the Type field
MessageCode
Assert_INTA
also be used.
0
Byte 7 in the TLP Header
AddressHi
0x00000000: 0xFFFFFFFF
0
Used only if MessageRoute=ByAddress
AddressLo
0x00000000: 0xFFFFFFFF
0
Used only if MessageRoute=ByAddress
DeviceID
(XX:XX:X) or direct value
0
Used only if MessageRoute=ById.
DeviceNumber : FunctionNumber)

3.1.5 TLPType = Msg, Msgd

ByAddress ByID FromRootComplex Local
Assert_INTB Assert_INTC Assert_INTD
Deassert_INTA Deassert_INTB Deassert_INTC Deassert_INTD
PM_Active_State_Nak PM_PME PME_Turn_Off PME_TO_Ack
ERR_COR ERR_NONFATAL ERR_FATAL
Unlock Set_Slot_Power_Limit Vendor_Defined_Type0
Vendor_Defined_Type1 Attention_Indicator_On
Attention_Indicator_Blink Attention_Indicator_Off Power_Indicator_On Power_Indicator_Blink Power_Indicator_Off Attention_Button_Pressed
Direct numeric values can
of TLP header. (Bits 2:0).
This parameter can be set in the following format: (BusNumber :
13
Teledyne LeCroy PETrainer Scripting Language
Example 1: This example shows how to send a PME_Turn_Off Power Management Message while emulating the
Root Complex.
Packet = TLP { TLPType = Msg MessageCode = PME_Turn_Off MessageRoute = FromRootComplex
}
Example 2: This example shows how to send a Vendor_Defined_Type0 Vendor Defined Message to the function 1
of device 1 on bus 0.
Packet = TLP { TLPType = Msg MessageCode = Vendor_Defined_Type0 MessageRoute = ByID DeviceID = (0:1:1)
}
14
Teledyne LeCroy PETrainer Scripting Language
Parameter
Value
Default
Comment
CompleterId
(XX:XX:X) or direct value
0
Identifies the Completer.
FunctionNumber)
ComplStatus
SC
CA
SC
Indicates the completion status.
BCM
0:1
0
Byte Count Modified: Must not be set by
the entire remaining byte count.
ByteCount
0:4095
0
Remaining byte count for the request
LowerAddr
0:63
0
Lower byte address for the starting byte of the completion

3.1.6 TLPType = Cpl, CplLk, CplD, CplDLk

This parameter can be set in the following format: (BusNumber : DeviceNumber :
UR CRS
PCI Express Completers and may only be set by PCI-X completers. Indicates that the Byte Count field reports the size of just the first packet instead of
Note: For the Summit Z2-16 and Summit Z3-16 Trainers you can specify the automatic Tag value modifiers to make the Completion automatically respond to incoming requests., See the modifier values for the Tag parameter on page 5, in the Packets = TLP table, for reference.
Example 1: This example shows how to send a Completion TLP. This Completion TLP returns Unsupported Request
(UR) status. Requester is Function 0 of Device 0 on Bus 0. Completer is Function 0 of Device 1 on Bus 0. This completes the TLP request with Tag Number 4.
Packet = TLP {
TLPType = Cpl RequesterId = (0:0:0) CompleterId = (0:1:0) Tag=4 ComplStatus = UR
}
15
Teledyne LeCroy PETrainer Scripting Language
Example 2: This example shows how to send a Completion with Data TLP. This Completion TLP returns
Successful Completion (SC) status. Requester is Function 0 of Device 0 on Bus 0. Completer is Function 0 of Device 1 on Bus 0. This completes the TLP request with Tag Number 4. This is the last Completion of the Split Transaction, since ByteCount field is equal to the number of bytes transferred and BCM is not set.
Packet = TLP {
TLPType = CplD RequesterId = (0:0:0) CompleterId = (0:1:0) Tag=4 ComplStatus = SC ByteCount = 32 Payload = ( 0x00000001, 0x00000002, 0x00000003, 0x00000004,
0x00000005, 0x00000006, 0x00000007, 0x00000008 )
}
16
Teledyne LeCroy PETrainer Scripting Language

3.1.7 TLP Field or Payload Substitution

(For Summit Z2-16 and Summit Z3-16 Trainers only)
When the Summit Z2-16 and Summit Z3-16 Trainers Are Emulating a PCI Express™ Endpoint Device
When you use the Summit Z2-16 and Sum mit Z3-16 Trainers to emulate a PCI Express Endpoint Device, you must enable automatic handling of the device Configuration space.
You can also enable automatic handling of Memory and IO spaces. If you enable automatic handling of Memory and IO spaces, and you perform BAR setup for the initial device Configuration Space image, you can enable up to three memory spaces (Mem64, Mem32 A, and Mem32 B) and up to two IO spaces (IO A and IO B). The enabled address spaces have a corresponding data image in the internal memory of the -16 and Summit Z3-16 Trainers. Whatever the system writes into those spaces over PCI Express can be read back over PCI Express.
For the Summit Z2-16 and Summit Z3-16 Trainers only, the PETrainer script language provides extensions that allow data written into Configuration, Memory, or IO spaces to modify behavior of the running script. If the script specifies values of specific fields and/or Payload in the TLPs for transmission, you can define that the system use the value from a location in a Configuration, Memory, or IO space of the device that the Summit Z2-16 and Summit Z3-16 Trainers are emulating.
Field payload substitution allows modifying the behavior of running scripts. When a script that has substitution definitions is running, a test scenario can write new values to specific locations in Configuration, Memory, or IO spaces. Subsequent TLPs transmitted by the script use the updated values of the corresponding fields and/or Payload.
A substitution definition has the following format:
... FieldName = ( address_space_designation, [address_space_offset], [SwapBytes]) ...
The address_space_designation parameter specifies the address space from which to take the value for the field. The defined address-space-ID keywords are:
o FROM_CFG o FROM_MEM64 o FROM_MEM32_A o FROM_MEM32_B o FROM_IO_A o FROM_IO_B
The address_space_offset parameter is optional. It defines the byte offset into the address space for the location from which to take the substitution value. If you omit this parameter, the offset is zero and the system takes the value from the beginning of the specified address space.
The SwapBytes parameter, when present, specifies that the PETrainer Z3 should swap the Endian order of the bytes in a 2-byte or 4-byte field before copying it into the specified field of the TLP to transmit.
Some example field name substitution defin it ions are:
17
Teledyne LeCroy PETrainer Scripting Language
Address = ( FROM_MEM32_A, 32 ) The system takes the value of the Address field from the Mem32 A address space, starting with byte 32 from the beginning of the memory space image.
Tag = ( FROM_CFG, 256 ) The system takes the value of the Tag field from Configuration Space byte location 256 (which is register location 64).
Payload = ( FROM_MEM64 ) The system copies the data Payload stream for this TLP from the beginning of the Memory Space 64 image.
Scripts can define substitution only for the following TLP fields:
o Payload o Tag o RequesterId o CompleterId o Address o AddressLo o AddressHi o ComplStatus
Note: The Summit Z2-16 and Summit Z3-16 Trainers track all accesses and locations of address spaces. The substitution address_space_offset parameter can be the string value LAST_WRITTEN. When performing a substitution that uses LAST_WRITTEN for the address_space_offset parameter, the Summit Z2-16 and Summit Z3-16 Trainers use the value from the beginning of the location where the system performed the latest Write transaction. The LAST_WRITTEN option allows writing new values at random locations or at locations that the script writer cannot determine beforehand and making such values available for later field or Payload substitution.
An example Packet definition with field name substitution using the LAST_WRITTEN option is:
Packet=TLP { TLPType=MemWr32 Length = 16 ... Payload= ( FROM_MEM32_A, LAST_WRITTEN ) }
If the script transmits this TLP packet in a loop, initially the system sends a Payload f illed w ith zer oes (or whatever value initialized memory space 32 A). Before the system writes into a memory space, the last­written address initializes to the beginning of the memory space, so the LAST_WRITTEN parameter starts at 0. Now suppose that the system writes into memory space 32 A at offset 0x100. The next transmitted TLP Payload specified by the above code includes 16 dwords of the data the system wrote starting at offset 0x100 of memory space 32 A.
18
Teledyne LeCroy PETrainer Scripting Language
Parameter
Values
Default
Comment
DLLPType
Ack
Vendor
First byte in the DLLP
CRC
0: 65535
Automatically
Bytes 4-5 in the DLLP. calculated automatically.
Field[<start>:<end>]
The arbitrary DLLP field could
single bit field.
RawData@<start>
Inserts raw data symbols at
formats.
Count
1: 65535
1
Repeats this packet the number of times specified.

3.2 Packet = DLLP

This command initiates transmission of DLLP packets on the bus. Parameters for the Packet = DLP command cover all the fields in a DLLP. Reserved fields can be set using the RawData parameter.
Nak InitFC1_P InitFC1_NP InitFC1_Cpl InitFC2_P InitFC2_NP InitFC2_Cpl UpdateFC_P UpdateFC_NP UpdateFC_Cpl PM_Enter_L1 PM_Enter_L23 PM_Active_State_Request_L1 PM_Request_Ack
Field[<pos>]
calculated
When not specified, it is
be specified by using Field parameter. Start, end, and pos are bit positions from the beginning of DLLP. Position 0 corresponds to the Most Significant Bit of the first byte of DLLP. Position 31 corresponds to the Least Significant Bit of the last byte of DLLP. Use Field[<start>:<end>] syntax to specify multi bit field. Use Field[<pos>] to specify
<start> byte position from the beginning of the DLLP. See Packet = Raw description (page 29
) for possible raw data
19
Teledyne LeCroy PETrainer Scripting Language
Example 1: This example shows how to send a PM_Active_State_Request_L1 power management DLLP. This
DLLP would be sent 132 times. The DLLP’s CRC is calculated automatically since CRC is not specified.
Packet = DLLP { DLLPType = PM_Active_State_Request_L1 Count = 132
}
Example 2: This example shows how to send a DLLP with an incorrect CRC.
Packet = DLLP { DLLPType = PM_Enter_L1 CRC = 0x1234
}
Example 3: This example shows how to modify reserved fields in a DLLP using the RawData parameter. (See the
RawData parameter, Page 29.)
Packet = DLLP {
DLLPType = PM_Active_State_Request_L1
RawData@3 = ( D11.1, D11.2 )
}
Example 4: This example shows how to specify reserved fields in a DLLP using the Field parameter.
Packet = DLLP { DLLPType = Ack Field[8:19] = 0b101001000111
}
20
Teledyne LeCroy PETrainer Scripting Language
Parameter
Values
Default
Comment
AckNak_SeqNum
0:4095
0
Bytes 2-3 in the DLLP

3.2.1 DLLPType = Ack, Nak

Example 1: This example acknowledges all TLP packets with a sequence number less than or equal to 120 and
initiates retransmission of TLP packets with a sequence number more than 120. The DLLP’s CRC is calculated automatically since CRC is not specified.
Packet = DLLP {
DLLPType = Ack
AckNak_SeqNum = 120
}
21
Teledyne LeCroy PETrainer Scripting Language
Parameter
Values
Default
Comment
VC_ID
0:7 0 Virtual Channel, bits 2:0 in the first byte of the DLLP
HdrFC
0:255
0
Contains the credit value for headers of the indicated type (P, NP, or Cpl)
DataFC
0:4095
0
Contains the credit value for payload (P, NP, or Cpl)
3.2.2 DLLPType = InitFC1_P, InitFC1_NP, InitFC1_Cpl, InitFC2_P, InitFC2_NP,
InitFC2_Cpl, UpdateFC_P, UpdateFC_NP, UpdateFC_Cpl
Data of the indicated type
Example 1: The following example initializes credits for VC 0 for posted TLP requests.
Credit value for headers is 0. Credit value for data payload is infinite. The DLLP’s CRC is calculated automatically since CRC is not specified.
Packet = DLLP {
DLLPType = InitFc1_P VC_ID = 0 HdrFC = 2 DataFC = 0
}
22
Loading...
+ 62 hidden pages