3385 Scott Blvd., Santa Clara, CA 95054 Tel: +1/408.727.6600 Fax: +1/408.727.6622
PCI Express™ Script Automation Test Tool
Version 3.2
User Manual
for
Teledyne LeCroy PETracer/PETrainer™
January 2014
Teledyne LeCroy PCI Express Script Automation Test Tool 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 presente d in this document without notice or
penalty.
Trademarks and Servicemarks
Teledyne LeCroy, CATC Trace, PETracer EML, PETra cer ML, PETracer, PETrainer EML, PETrainer
ML, PETracer Summit, Summit T2-16, Summit Z2-16, and PETracer Automation are trademarks of
Teledyne LeCroy.
Microsoft and Windows are registered trademarks and Windows Server is a trademark of Microsoft Inc.
All other trademarks are property of their respective companies.
1.1 PCI Express Automated Test Scr ipts ............................................................................................................. 2
1.2 Summaries of the PCI Express Automated Tests .......................................................................................... 3
2 Script Automation Test To ol .............................................................................................................................. 4
2.1 Graphical User Interface ................................................................................................................................ 4
2.2 Test Information ............................................................................................................................................ 7
2.4.3 Switch Downstream Port DUT ............................................................................................................ 12
2.5 Device Emulator Driver for Root Complex Testing .................................................................................... 13
2.5.1 Installatio n In str uc t io ns und er W ind ows ............................................................................................. 13
2.5.2 Installatio n In str uc t io ns und er Li nu x ................................................................................................... 14
2.5.2.2 Module Use ...................................................................................................................................... 14
2.5.3 Test Driver Functionality (Windo ws or Linux) ................................................................................... 16
3 PCI Express Te sts .............................................................................................................................................. 17
3.2 Root Complex T ests .................................................................................................................................... 35
3.2.1 Link Layer Test Descriptions............................................................................................................... 35
3.2.1.1 Test 41-20. ReservedFieldsDLLPReceive ....................................................................................... 35
3.2.1.2 Test 52-10. RetransmitO nNak ......................................................................................................... 36
3.2.1.3 Test 52-11. REPLAY_TIMER Test ................................................................................................. 37
3.2.1.4 Test 52-12. REPLAY_NUM Test .................................................................................................... 38
3.2.1.5 Test 52-20. LinkRetrainOnRetryFail ............................................................................................... 39
3.2.1.6 Test 52-100. ReplayTLPOrder ......................................................................................................... 40
3.2.1.7 Test 52-150. CorruptedCRC_DLLP ................................................................................................ 41
3.2.1.8 Test 52-160. UndefinedDLLPEncoding .......................................................................................... 42
3.2.1.9 Test 52-170. WrongSeqNumInAckDLLP ....................................................................................... 43
3.2.1.10 Test 53-20. BadLCRC ................................................................................................................. 44
3.2.1.11 Test 53-31. DuplicateTLP ............................................................................................................ 45
3.2.2 Transaction Layer Test Descriptions ................................................................................................... 46
3.2.2.1 Test 1-1. TXN_BFT_RequestComplet i on ....................................................................................... 46
Teledyne LeCroy PCI Express Script Automation Test Tool Manual
iv
3.2.2.2 Test 1-2. TXN_BFT_CompletionTime out ...................................................................................... 47
3.2.2.3 Test 2-4. TXN_BFT_ErrorSignaling ............................................................................................... 48
3.2.2.4 Test 3-1. TXN_BFT_FlowControlIni t ............................................................................................. 49
3.2.2.5 Test 4-0. TXN_BFT_TransactionTypes .......................................................................................... 50
How to Contact Teledyne LeCroy ............................................................................................................................ 51
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
1
1 Introduction
This document describes operation of the Teledyne LeCroy PCI Expr e ss™ Sc ript Automation Test Tool. The
software includes tests for the Link Layer and Transaction Layer built to the guidelines defined by the PCI Special
Interest Group (PCI SIG) specifications. The PCI Express Script Automation Test Tool operates on the
PETracer/Trainer ML™, PETracer/Trainer EML™ and PETracer/Trainer Summit™ Z2-16/T2-16 platforms at x1,
x2, x4, x8, and x16 lane widths. The PETracer™ Edge analyzer is also supported in combination with ML or EML
Trainer. The Teledyne LeCroy PCI Express Script Automation Test Tool supports Endpoint testing and Root
Complex testing (and optionally supports Switch Downstream Port testing).
For both Endpoint Device and Roo t Complex testing, you must install PETracer/Trainer s oftware on the PC running
the Script Automation Test Tool software and attach the PETracer/Trainer hardware to the USB ports on the PC.
The PC must have the Microsoft
common Linux distributions (refer to the Linux driver installation instructions).
Note: You must do the following before using a network (Ethernet) attached Summit T2-16 Tracer and/or
Summit Z2-16 Trainer with the Script Automation Test Tool. Run the PETracer/Trainer software. Use the
connection procedure to find and connect to the Tracer and/or Trainer device in the “All Connected Devices” dialog.
In the “Connection Properties” dialog, displayed during the connection process, select Automatically connect to the device.
For Endpoint Device testing, place the device under test (DUT) into a PETrainer™ Host Emulation module. To
emulate a root complex and exercise the DUT, connect the PETrainer Host Emulation module to a PETrainer. To
capture and analyze traffic between the PETrainer and the DUT, also connect the PETrainer Host Emulation
module to a PETracer.
For Root Complex (and Switch Downstream Port) testing, place a P ETrainer Device Emulator card into the
PCI Express slot in the Root Complex (or Switch Downstream P ort) device under test. To emulate an Endpoint and
exercise the DUT, connect the PETrainer Device Emulator card to a PETrainer. To capture and analyze traffic
between the PETrainer and the DUT, also connect the PETrainer Device Emulator card to a PETracer.
For Root Complex testing, after you have completed the PETracer/Trainer setup described above, you must power
up (boot) the DUT into the Microsoft Windows XP or Windows Server 2003 OS, or one of the common Linux
distributions. Turn on the PC. Open the Script Automation Test Tool software. Press the Boot RC button in the
Script Automation Test Tool software , then turn on the DUT. You can then perform Root Complex testing. I nstall
the Teledyne LeCroy PETrainer Device Emulator driver for the Device Emulator card (see instructions below).
The Teledyne LeCroy PCI Express Script Automation Test Tool software graphical user interface (GUI) allows you
to select one or more PCI Express tests to run sequentially and to set property values such as lane width, polarity
reversal; and log saving. The software automatically configures the PETrainer and PETracer systems. After test
initiation, the log window shows te st execution progress in real time. After completion of testing, the log window
shows each Automated Test with a test result of either PASSED or FAILED.
®
Windows® XP or Windows Server™ 2003 operating system (OS), or one of the
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
2
1.1 PCI Express Automated Test Scripts
The PCI Express Automated Test scripts follow the test specification created by PCI SIG for manufacturers to use to
assure a successful product. The test specification has five test areas:
1. Link Layer Tests: Device behavior for link level protocol
2. Transaction La yer Tests: Device behavior for transaction level protocol
3. Configuration Space Te st s: Configurati on space in P C I Express devices
4. Electrical Tests: Platform and add-in card signal testing
5. Platform BIOS Tests: Platform BIOS ability to recognize and configure PCI Express devices
For each of these test areas, different tests are run for the:
• Root Complex
• Endpoint Device
• Switch Downstream Port
• Switch Upstream Port/Bridge
The PCI SIG te st spe c ifications identify tests that can be performed wit h automated test equipment. Teledyne
LeCroy has developed some PCI Express Automated Test scripts for Link Layer and Transaction Layer Endpoint
Device testing based on the following PCI SIG specifications:
1. Link Layer t e st scripts listed in section 2.1 of the PCI SIG
Teledyne LeCroy has also developed PCI Express Automated Test Scripts for Root Complex testing.
The automated tests can be used for lane widths of x1, x2, x4, x8, and x16 on PETracer/PETrainer ML and EML,
PETracer/Trainer Summit™ Z2-16/T2-16 platforms, or with the PETracer Edge analyzer.
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
3
1.2 Summaries of the PCI Express Automated Tests
The following Link Layer t ests are supported:
•Link Test 41-20 ReserveFieldsDLLPReceive Test
o Verify that DUT ignores reserved fields in an ACK DLLP.
•Link Test 52-10 RetransmitOnNak Test
o Ensure that a DUT retransmits a transaction for which a NAK has been issued.
•Link Test 52-11 REPLAY_TIMER Test
o Ensure that a DUT REPLAY_TIMER does not send an ACK or N AK.
•Link Test 52-12 REPLAY_NUM Test
o Ensure that a DUT keeps retransmitting a transaction for which a NAK has bee n issued on
purpose until the number of times i n REPLAY_NUM.
•Link Test 52-20 LinkRetrainOnRetryFail Test
o Ensure that the link connected to the DUT goe s into retraini ng after tryin g and failing fo r
REPLAY_NUM of times to get a TLP through.
o Check that the retry buffer and link states are not changed while in retraining.
•Link Test 52-100 ReplayTLPOrder Test
o Verify that the oldest unacknowledged TLP is retra nsmitted first in replay, followed by the other
unacknowledged TLPs in t he same order in which they were initially trans mitted .
•Link Test 52-150 CorruptedCRC_DLLP Test
o Ensure that a DUT recognizes a DLLP with a bad CRC, drops it, and logs a BAD_DLLP port
error.
•Link Test 52-160 UndefinedDLLPEncoding Test
o Verify that the DUT silently drops any DLLP with undefined encoding and that no error is
associated with it.
•Link Test 52-170 WrongSeqNuminAckDLLP Test
o Verify that the DUT drops any ACK DLLP that does not have a sequence number corresponding
to an unacknowledged TLP and logs a BAD DLLP error associated with the port.
•Link Test 53-20 BadLCRC Test
o Verify that a receiver discards a TLP wit h a bad CRC by N AKing it and repo rts a BAD TLP error
associated with the port.
•Link Test 53-31 DuplicateTLP Test
o Verify that the duplicate TLPs are handled properly by the DUT.
The following Transaction Layer tests are supported:
•Transaction Test 2-4 TXN_BFT_ErrorSignaling
o Verify basic signaling functionality and message generation of a slotted Endpoint device.
•Transaction Test 3-1 TXN_BFT_FlowControllni t
o Verify that a slotted Endpoint device re c e iver c omplies with basic flow control credit
advertisement requirements.
•Transaction Test 5-1 TXN_BFT_VC0TCSupport
o Verify that slotted Endpoint devices which do not support Virtual Channels beyond the default
still handle requests with non-zero TC correctly.
•Transaction Test 1-1 TXN_BFT_RequestComple tion
o Verify basic Request and Completion handling of slotted Endpoint devices.
•Transaction Test 1-2 TXN_BFT_CompletionTim eout
o Verify basic Completion Timer requirements of slotted Endpoint devices.
•Transaction Test 2-1 TXN_BFT_LegacyInt
o Verify basic INTx message support requirements of slotted Endpoint devices.
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
4
2 Script Automation Test Too l
The PCI Express™ Script Automation Test Tool runs as a stand-alone (automated) application. The PCI Express
Script Automation Test Tool uses t he PETracer Automation™ API to communicate commands to the PETracer and
PETrainer platforms. It generates the stimulus for the test, records the traffic, and runs a Verification script to check
the test result.
You can configure and operate a PETracer™ Analyzer and PETrainer™ Exerciser and sequentially run the tests
described in this user manual. The PCI Express Script Automation Test Too l starts the recording and then measures
the performance characteristics of the DUT according to the standards defined by the appropriate test specification.
2.1 Graphical User Interface
The PCI Express ™ Script Automation Test Tool application has a graphical user interface. This example shows the
applicati on running Endpoint tests.
Figure 1. PCI Express Script Automation Test Tool Graphical User Interface
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
5
The upper left Settings and Status areas show the following:
•PETracer Analyzer and PETrainer Exerciser Platform: ML, EML or Edge for the Tracer platform, ML or EML
for the Trainer pla tform [display only]
NOTE: Do not c onnect more than one trainer, only one is supported.
•Test Device: From the list, select the device type to test. The two main device types supplied by Teledyne
LeCroy are "Endpoint" and "Root Complex". You can create additional device types by specifying strings for
the TestDevice variable in the Test Script File for user -defined tests (see the Test Script Files
section).
•Test Group: From the list, select a group of tests for a Test Device. Test Group is a parameter specified in the
Test Script File for each test (see the Test Script Files
section). The application sorts all Test Groups for a
Test Device and adds the m to the list. In addition to the defined groups, the list inc ludes a group named “All”,
which has all tests for the Test Device.
• Lane Width: Select x1, x2, x4, x8, or x16.
• Speed (for the 5GT/s capable PETracer Summit, Summit T2-16, and Summit Z2-16 systems only): You can
select 2.5 GT/s, 5 GT/s, or Auto as the speed at which to run the tests. The Auto setting sets the speed for
recording to “Auto” and the speed of generation to whatever is defined in Generation Options and the Trainer
script, allowing tests that change spee d as they run. See the Setting Test Speed
section for how this setting
affects the script and options files u sed in the tests.
•Use Options files: C heck to use the Lane Reversal and Polarity settings that you set in Recording Optio ns and
use the Generation Option files spe c ified for tests. This includes the Automatic polarity settings. Uncheck to set
Lane Reversal and Polarity settings manually.
• Reversal/Polarity: Displays the dialog for manually specifying Lane Reversal and Polarity settings.
• Preserve Traces: Select All, Failed, or None. If set to Failed or All, double-clicking a test in the list in the
upper right of the window displays the CATC Trace™ of the test in the PETracer application. Use the Go to
Marker menu to locate failure points. Position the cursor over the vertic a l red bar indicating a marker to the left
of the failed packet to read a too l tip with an explanation of why the PCI Express test failed. See below for an
example of Link Layer Test 41-20 showing a marked failed packet and a tooltip explanation of the failure.
•Save logs: Select to save the log files. A log file includes test results and traces for a test. The log files are
stored in the TestLog folder of the ScriptAutomationTestTool folder. The name of the subfolder for each run
of the tests is based on the date and time of the test run (for example, 06_28_2005__15_07). An example log
file folder is C:\Program Files\CATC\PETracer\ScriptAutomationTestTool\TestLog\06_28_2005__15_07.
See below for an example of a test log for a run of one Link Layer Test (41-20) for an Endpoint DUT in which
the test passed. If a test fails, the test log identifies both the location of the failure (i.e., the packet number) and
the reason for the test failure.
•Run in a loop: You can run one or more tests repeatedly to accumulate loop results. Use loops to stress test all
or some of the tests. After you select the Run in a loop option, the application allows you to specify the number
of times to run the test cycle. If you leave the edit control empty or specify 0, the loop runs until you press the
Stop Tests button. As the loop cycles, the application will display the number of runs remaining and will count
the passed and failed test cycles.
The upper right of the wind ow lists the available tests and their status or results. The bottom hal f of t he window
displays in real time the status of the test, the log, and the test results.
Before running tests, select one or more tests to run sequentially:
1. Select a test and place it in the sequence of tests:
• Position the cursor over a test, then press the Shift key and an "up arrow" or "down arrow” key.
• Alternatively, press the Shift (for down) or Ctrl (for up) key and left-click the mouse.
• You can also left-click the test and dra g t he test up or down.
Selected tests have a shaded background. Unselected tests have no background. All selected tests
should be in the top of the list with no u nselecte d tests among them. Unselected tests should be last in
the list.
2. To initiate testing, select the Run Tests button. The tests run automaticall y.
The upper right of the wind ow shows test results (eit her PASSED in green or FAILED in red) for each
selected test, (see the window example on the previous page).
Note: To terminate testing before all selected tests have been run, click the Stop Tests button.
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
6
Figure 2. Test Log for a Link Layer Test (41-20) for an Endpoint DUT
Figure 3. CATC Trace in PETracer for a Link Layer Test (41-20) for an Endpoint DUT
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
7
2.2 Test Information
The PCI Express Script Automation Test Tool uses the PETracer/Trainer Automation API to run the tests. The
PETracer Automation™ API loads required Ge ner a tion Options into PETrainer, loads required Recording Options
into PETracer, generates test stimuli from the PETrainer script file, records the traffic, and runs a Verification script
against the recorded trace to determine if the test PASSED or FAILED.
Each of the tests has the following information in its subfolders:
• test script files
• Recording Option settings file ( .rec file)
• Generation Option settings file (.gen file)
• PETrainer Trainer Script (.peg file) for the test
• PETracer Verification Script (.pevs file and its corresponding .inc files) for the test
Test Script Files
All the components for a specific test are supplied in a test script file. Each test script file represents one test. The
test script files for Endpoint Device test ing are in the Endpoint subfolder of the AutomatedTests folder. The test
script files for Root Complex testing are in the RootComplex subfolder of the AutomatedTests folder. The format
of a test script file is:
TestDescription = "The intent of this test is to verify that the DUT truly ignores
reserved fields in an ACK DLLP by sending arbitrary data in those fields.";
GenerationTimeout = 4000; // Optional parameter, tells the application to stop
// generation and recording after specified time in
// milliseconds in case generation didn’t progress through
// all the stages and stopped in its own course.
// The default value of the timeout is 2 seconds.
TestDevice = "Root Complex"; // Optional parameter, specifies the DUT type.
// Default value is "Endpoint", specifying the Endpoint DUT
TestGenerator = "All"; // Optional parameter, specifies the type of LeCroy
// PCI Express Trainer product that must be used with this
// automated test. The possible values are:
// "EML/ML" (default)
// "All"
// "Z2-16"
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
8
You can add tests to the package to expand test coverage. To add a test, copy a similar existing test script file into
any text editor. Replace the TestName and other information. Replace the Generation Options path, Recording
Options path, Trainer Script pa th, a nd V e rification Script path. Save as a new test script file in the Endpoint or
RootComplex subfolder, depending on the DUT type, of the AutomatedTests folder. Ensure that the Generation
Options file, Recording Options file, Trainer Script file, and Verification Script file are in the appropriate folders.
Please refer to PETracer/Trainer documentation for information on how to create Recording and Generation
Options and Trainer and Verification Scripts. You can use the Trainer and Verification Scripts included with the
PCI Express Script Automation Test Tool to build your own tests.
Please refer to the 2.3 Folder Structure
section for sp e c ific file locations.
Special
TestGroup
Besides the "Link Layer" and "Transaction Layer" TestGroup, there is a TestGroup called Special. This TestGroup
includes all tests that are executed before running the actual test. These tests do not appear in the test selection list
but are always executed first each time you press the Run Tests button. The Special tests read the configuration
space of the DUT and create a definitions file for the test that defines the required register addresses. The definitions
file is required to customize the Trainer and Verification Scripts for the DUT. The
AutomatedTests\Endpoint\special_test.cts and AutomatedTests\RootComplex\special_test.cts files have
examples of the Special tests.
RootBoot
TestGroup
Besides the "Special," "Link Layer," and "Transaction Layer" TestGroup, there is a TestGroup called RootBoot.
This TestGroup includes a test that is executed for a Root Complex DUT when you press the Boot RC button.
Sections 2.4 and 2.5 have details on running Root Complex tests.
Custom Initialization for Endpoint Device Testing
Some Endpoint devices require special initialization before a test can be pe rformed. Custom initialization ma y
require a Configuration Write, Memory Write, and/or IO Write transaction. For example, IO Write special
initialization is required to enab le e rror reporting.
To initialize an Endpoint device, modify the file TrainerScripts\Templates\device_specific_init.peg to include
Configuration Write, Memory Write, and/or IO Write transactions.
The TrainerScripts\Templates\device_specific_init.peg file includes commented sa mple c ode to illustrate special
initialization. Use that sample code to modify the file for special Endpoint Devic e te sting. At the end of the file, set
the VAR_CURRENT_SEQUENCE_NUMBER parameter to an appropriate value.
The PCI Express Script Automation Test To ol runs the TrainerScripts\Templates\device_specific_init.peg script
after each Link Up before starting the actual test.
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
9
Setting Test Speed
The Script Automation Test Tool application Speed
setting allows you to select the spee d at which to run the test.
This setting applies only to the 5GT/s capable PETracer Summit, Summit T2-16, and Summit Z2-16 platforms. For
these platforms, the TrainerScripts folder has a Speed subfolder, which contains t hree generator scripts with names
related to the three speed settings:
o speed_2_5.peg: T his empty sc r ipt does not contain any instructions.
o speed_5_0.peg: T his scrip t c ontains a speed switch to 5 GT/s and a wait for 100 milliseconds.
o speed_auto.peg: This empty script does not contain any instructions.
When you select a speed setting in the application, the application copies the script corresponding to the selected
speed to the Speed subfolder and gives it t he name switch_speed.peg. This fil e name is included at the end of the
common linkup script, so all Link/Transaction tests can use it. You can include t his file name in any user-defined
test in order to use the Speed setting.
When you select a speed setting in the application, the application also modifies the following parameters in the
Recording Options and Generation Options for each test, before executing the test:
o If Speed = 2.5 GT/s, Recording Options Speed is set to 2.5 GT/s, and Generation Options TS Data Rate is
set to 2.5 GT/s.
o If Speed = 5.0 GT/s, Recording Options Spee d is set to 5.0 GT/s, and Generation Optio ns TS Data Rate is
set to 5.0 and 2.5 GT/s.
o If Speed = Auto, Recording Options Speed is set to Auto, and Generation Options TS Data Rate is set to
5.0 and 2.5 GT/s.
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
10
2.3 Fol der Structure
The PCI Express Script Automation Test To ol uses a specific folder structure. The top folder is
C:\Program Files\CATC\PETracer\ScriptAutomationTestTool, which has the follo wi ng req uire d subfolders:
• AutomatedTests
• RecordingOptions
• GenerationOptions
• TrainerScripts
• Verification Scrip ts
AutomatedTests Folder
Contains the test script files in the Endpoint (for Endpoint Device tes ting) or RootComplex (for Root Complex
testing) subfolders.
RecordingOptions Folder
Contains rec ording optio n files in the ML (for PETracer ML .rec files), EML (for PETracer EML .rec files) or
Edge (for PETracer Edge .rec files) subfolders. The ML, EML and Edge subfolders each have Endpoint (for
Endpoint Device testing) and RootComplex (for Root Complex testing) subfolders. For Endpoint Device testing,
place a PETracer ML recording options file in ML\Endpoint, a P E Tracer EML rec ording options file of the same
name in EML\Endpoint and a PETracer Edge recording options file of the same name in Edge\Endpoint. For Root
Complex testing, place a PETracer ML recording options file in ML\RootComplex, a PETracer EML recording
options file of the same name in EML\RootComplex, and a PETracer Edge recording options file of the same name
in Edge\RootComplex. Enter the file path in the test script file RecordingOptions line, for example,
RecordingOptions = "Endpoint\\user_test.rec";
GenerationOptions Folde r
Contains generation option files. This folder has the same subfolders as the RecordingOptions folder, except the
Edge subfolder. Enter the file path in the test script file GenerationOp tions line, for example,
GenerationOptions = "Endpoint\\user_test.gen";
TrainerScripts Folder
Contains PETrainer script (.peg) files. You can use any subfo l der structure. Enter the file path in the test script file
TrainerScript line, for example,
The path is relative from the TrainerScripts folder. In this example, a subfolder named LinkLayer is under the
RootComplex folder in the TrainerScripts folder and contains the link_41-20_ReservedFieldsDLLPReceive.peg
script.
Verification Scripts Folder
Contains PETracer Verification Script (.pevs) files (and their corresponding .inc files). You can use any subfolder
structure. If .inc files are included in a Verification Script, reference them by the relative path from the Verification
Script location. Enter the file pa th in t he test script file VerificationScript line, for e xample,
In this example, a subfolder named LinkLayer is und er the Endpoint fol der in the VerificationScripts folder and
contains the script link_41-20_ReservedFieldsDLLPReceive.pevs.
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
11
2.4 Runni ng T ests
For the Endpoint or Root Complex DUT type, perform the following steps to execute a test.
2.4.1 Endpoint DUT
For Endpoint Device testing, perform the following steps to execute a test:
1. Turn OFF the PETrainer Host Emulation module.
2. Place the Endpoint DUT into the PETrainer Host Emulation module.
Note: If a PETracer ML is used with a PETrainer EML (or vice versa), insert the PETracer Interposer Card
(cabled to the PETracer) between the PETrainer Host Emulation module and the Endpoint DUT. If a PETracer
Edge is used with ML or EML Trainer, place the Edge card between the PETrainer Host Emulation module and
the Endpoint DUT.
3. Connect the PETrainer Exerciser system to the PETrainer Host Emulation module using cables supplied by
Teledyne LeCroy.
4. Connect the PETracer Analyzer system (unless it is the Edge system) to the PETrainer Host Emulation module
using cables supplied by Teledyne LeCroy.
5. Connect the PETracer and PETrainer systems to the USB ports of the PC on which the PCI Express Script
Automation Test Tool is running.
6. Power on the PC and the PETracer and PETrainer systems.
7. Open the PCI Express Script Auto mation Test Tool and select Endpoint fo r the DUT Type in the GUI.
8. Turn ON the PETrainer Host Emulation module.
Note: If the DUT card requires external power to run, attach the power supply to it and turn it on.
9. Select Endpoint tests to execute.
10. Click the Run Tests b utton to begin testing.
Note: If the Special test to scan and process the DUT configuration space fails, press the Reset button on the
PETrainer Host Emulation module to try again.
2.4.2 Root Complex DUT
For Root Complex testing, perform the following steps to execute a test:
1. Turn OFF the DUT PC.
2. Insert the PETrainer Device Emulator card in the slot to be tested on the DUT system.
Note: If a PETracer ML is used with a PETrainer EML (or vice versa), insert the PETracer Interposer Card
(cabled to the PETracer) between the DUT PCI Express™ slot and the PETrainer Device Emulator card. If a
PETracer Edge is used with ML or EML Trainer, place the Edge card between the DUT PCI Express™ slot and
the PETrainer Device Emulator card.
3. Connect the PETrainer Exerciser system to the PETrainer Device Emulator card using cables supplied by
Teledyne LeCroy.
4. Connect the PETracer Analyzer syste m (unless it is the Edge system) to the Device Emulator card using cables
supplied by Teledyne Le Cro y.
5. Connect the PETracer and PETrainer systems to the USB ports of the PC on whi ch the PCI Express Script
Automation Test Tool is running.
6. Power ON the PC and the PETracer and PETrainer systems.
7. Open the PCI Express Script Auto mation Test Tool and select Root Complex as the DUT Type in the GUI.
8. Click the Boot RC button in the PCI Express Script Automation Test Tool.
9. Turn ON the DUT PC.
10. Boot the DUT PC into the Windo ws
common Linux distributions.
®
XP or Windows Server™ 2003 operating system, or to one of the
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
12
11. Install the Teledyne LeCroy PETrainer Device Emulator driver for the Device Emulator card using the
installation instructions below.
12. Select Root Complex tests to execute.
2.4.3 Switch Downstream Port DUT
The Root Complex setup can also be used to test a downstream port of a Switch device.
Insert the Switch interface card in the PCI Express slot of the host PC. Insert the Device Emulator card in the
downstream slot on the Switch.
Otherwise, perform the same steps as in 2.4.2 Root Complex DUT.
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
13
2.5 Device Emulator Driver for Root Complex Testing
Root Complex testing requires installing a driver for the Device Emulator PCI Express Endpoint on the DUT
system. Curre nt l y sup p or te d operating systems are:
- Windows XP and Windows Server 2003 (lcrypede.inf driver)
- Windows 7 (see details below)
- Ubuntu 13.10 (see details below)
After installing the PETracer application, you can find the drivers at \Public
Documents\Lecroy\Petracer\ScriptAutomationTestTool\Drivers folder. Copy the
\ScriptAutomationTestTool\Drivers folder from the testing PC to a CD to use for installation on the DUT.
The \Drivers folder contains three subfolders:
o \Xp contains the lcrypede.inf dr i ver for the Windows XP opera t ing system.
o \Server2003 contains the lcrypede.inf driver for the Windows Server 2003 operating system.
o \Win7 contains the lcrypede.inf driver for the Windows 7 op erating system.
o \Linux contains the files needed to install and build the driver under Linux distributions.
2.5.1 Installation Instructions under Windows
When you first boot the system for Root Complex testing, the New Device plug-and-play wizard appears for the
Device Emulator PCI Express Endpoint. The Device Emulator presents itself to the system as an Ethernet Controller
device. Follow the wizard instructions. When asked for the driver location, point to the appropriate subfolder of the
\Drivers folder for your operating system.
The lcrypede.inf driver installs. The Device Emulator device appears in the Device Manager under a
Sample Drivers group named LeCroy PETrainer Device Emulator Driver for PCI Express Root testing.
After you install the driver, you can restart the DUT, if necessary, and perform testing.
If you move the D evice Emula t or to another P CI Express slot for testing, you must install the dr iver a gain. After the
first test, you can use the Install the software automatically option of the New Device plug-and-play wizard to
install the driver.
Note on Enabling the “phantom” Advanced Error Re porting Capability
The Advanced Error Reporting Capability structure for the Root or Switc h ports should enable by default. However,
some Root Complex DUT setups may not enable the Advanced Err or Reporting Capability structure for the Root or
Switch ports. Advanced Error Reporting may be fully operational, but the Advanced Error Reporting Capability
structure does not link within the Root or Switch port’s Enhanced Configuration Space.
The Device Emulator Driver includes an option to test Advanced Error Reporting fe at ur e s. After yo u insta ll the
driver, perform t he following steps to perform the test:
1. Using a registry editor, locate the enumerator key for the Device Emulator under the
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\PCI path. The name is based o n the
LeCroy Vendor ID (0x1570) and the Product ID used for Root testing (0xA239).
2. Under the enumerator key, find the key for the current device instance. That key includes a Control entry.
3. Open the DeviceParameters folder for the instance key.
4. Add a DWORD value named AdvancedErrorStructOffset in the DeviceParameters folder. Set the value
for this entry to the byte offset of the “phantom” Advanced Error Reporting Capability structure within the
Root or Switch port’s Enhanced Confi guration Space.
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
14
5. Restart the DUT.
You can now perform full test ing of the port, including Advanced Error Reporti ng.
2.5.2 Installation Instructions under Linux
2.5.2.1 Dependencies
2.5.2.1.1 Root Access
Installation of the module requires root privileges. Preferably, grant sudo access to normal users:
$ su –c “vi /etc/sudoers” (or editor of choice)
(You can also log in as the r oot user, or switch to root via the su command.)
Add individual user access by adding your username and permissions. For example:
<username> ALL=(ALL) ALL
You can also add group access by uncommenting and/or modifying one of the provided examples.
The sudoers file describes the various permissions.
2.5.2.1.2 GNU C Compiler (GCC)
Only a GNU C compiler can compile t he Device Emulator module source code. Some Linux distrib utio ns install this
compiler by default. To check whether your Linux distribution has installed GCC, type gcc to see if the command
is found or not.
Ubuntu typically installs GCC by default.
2.5.2.1.3 Linux Kernel Headers
To compile the module for the particular kernel requires kernel headers. The kernel header version shoul d match
that of the kernel. The package management system usually ma nages kernel headers.
2.5.2.2 Module Use
2.5.2.2.1 Source Installation
Choose a directory in which to place the module sources, change to that directory, and "untar" the source tarball.
$ tar xzf pcide_1_0.tar.gz
$ cd pcide
$ make
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
15
poll=1
poll=1 is for module to poll Device Emulator commands.
generator. Use the poll=0 interrupt mode for all other cases.
msi=1
msi=1 is for MSI mode interrupts.
Note: This setting is currently not in use.
debug=1
debug=1 prints verbose debug messages to the system or kernel logging file.
If you omit this parameter, default is 0.
mcfg=<ADDRESS>
Use decimal or hexadecimal (prefixed with “0x”) for the root port configuration space
address. The system us es this address only if the module does not find the value.
aer=<ADDRESS>
Use decimal or hexadecimal (prefixed with “0x”) for the root port advanced error reporting
space address. The system uses this address only if the module does not find the value.
2.5.2.2.2 Module Installation
You must have root privileges to install the module. Preferably, use the sudo command to install the mo dule with
root privileges. Duri ng installation, you can pas s optional commands to control the module.
$ sudo insmod pcide.ko <option=0|1>
The available options are:
poll=0 is for module to use an interrupt.
If you omit this parameter, default is 0.
Important: Use the poll=1 polling mode when t esting with the Summit Z2 Trainer traffic
msi=0 is for legacy interrupts. Legacy interrupt s are ignored if you use the poll=1 option.
If you omit this parameter, default is 0.
debug=0 prints normal messages.
An example of module installation with options is:
$ sudo insmod pcide.ko debug=1 poll=1
2.5.2.2.3 Module Removal
To remove the module, t ype:
$ sudo rmmod pcide
Using the above methods, the module does not stay loaded in memory. You must install the module after each
reboot. To
To install the module so that it stays loaded in memory, you can:
o Call the sudo insmod … command from a script run at boot time with root privileges.
o Copy the pcide.ko file into the path /lib/modules/$(uname –r) where it will load automatically.
$(uname –r) will resolve into the p a rticular kernel version number that is curr ently running.
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
16
2.5.3 Test Driver Functionality (Windows or Linux)
The driver does the following:
- Allocate s a buffer in the system memory that is accessible by the Device Emulator for storing commands to
the driver as well as for general DMA.
- Maps the Device Emulator memory and IO spaces for access.
- Locates the configuration space for the Root or Switch downstream port to which the Device Emulator
attaches.
- Takes control of the named Root or Switch port and configures it so that no errors on that port result in an
interrupt being forwarded to the s ystem software.
- Implements a protocol with the Device Emulator that the CTP will use for executing the tests.
The driver locates the configuration space for the Root or Switc h d ownstream port to which the Device Emula tor
attaches by following the ACPI structures created by the system BIOS . It looks for the MCFG structure (as defined
by the PCI Firmware specification) to be pointed at by the ACPI RSDT or XSDT structures. The MCFG structure
points to the location of the mapped PCI Express configuration spaces.
If the driver cannot find the MCFG structure, RSDT structure, XSDT structure, Device Emulator configuration
space, or Root or Switch downstream port configuration space, the Script Automation Test Tool refuses to perform
any of the normal tests. To indicate this case, the software reports that the Special test FAILED.
The Device Emulator communicates with the driver by:
1) Writing a command in the command area o f t he system buffer.
2) Interrupting the system using legacy PCI interrupt emulation.
Upon receiving the interrupt, the driver acknowledges it, examines the command buffer contents, and executes the
command.
The command types that the driver can execute are:
- Report information about system variables (such as the physical address of the command buffer) and the
root/switch port found. The Special test for Root testing uses this command (the default command).
- Execute a Configuration Read transaction from the PCI compatible portion of the Device Emulator
configuration space.
- Execute a Configuration Write transaction to the PCI compatible portion of the Device Emulator
configuration space.
- Execute a Memory Read transaction to one of the two Memory spaces on the Device Emulator.
- Execute a Memory Write transaction to one of the two Memory spaces on the Device Emulator.
- Execute an IO Read transaction to the IO space on the Device Emulator.
- Execute an IO Write transaction to the IO space on the Device Emulator.
- Clear all error status bits for the Root or S witch po rt to which the Device Emulator attaches.
- Reflect the current values of the Er ror Reporting Registers for the Root or Switch port to which the Device
Emulator attaches to the PCI Express link. Thi s can use Configuration Writes or Me mory Writes.
- Retrain or Hard Reset the link to the Device Emulator.
- Send a series of Memory Write transactions. The Device Emulator monitors those transactions and signals
when the dri ver should stop sending them. (This command can ensure that the next transaction from the
DUT has a specific Tag value, so that it can be completed from the Trainer script.)
- Read a specified register from the Configuration Space for the Root or Switch port to which the Device
Emulator attaches.
- Write a specified register to the Configuration Space for the Root or Switch port to which the Device
Emulator attaches.
Chapter 3 refers to these commands when describing how Root Complex tests are performed.
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
17
3 PCI Express Tests
This section describes the PCI Express™ tests.
3.1Endpoint Tests
3.1.1 Link Layer Test Descriptions
3.1.1.1 Test 41-20. ReservedFieldsDLLPReceive
ASSERTIONS COVERED: DLL.4.1#2
The intent of this test is to verify that the DUT truly ignores reserved fields in an ACK DLLP by sending arbitrary
data in those fields.
1. Write 0x0000000F to Device Control Register, to enable Error Reporting for all error types.
2. Write 0xFFFFFFFF to Advanced U ncorrectable Error Status Register, to clear all prior error bits.
3. Write 0xFFFFFFFF to Advanced Correctable Error Status Register, to clear all prior error bits.
4. Main test stage. Do the following:
a. Send configuration read request TLP.
b. Wait for completion.
c. S end an Ac k DL LP with no n -zero reserved field.
5. Read Device Status Register. No error bits should be set.
6. Read Advanced Uncorrectable Error Status Register. No error bits should be set.
7. Read Advanced Correctable Error Status Register. No error bits should be set.
8. Write 0 to Device Control Register, to disable Error Reporting for all error types.
Pass/Fail Criteria:
Test should successfull y progress though all test stages.
All test stages should be executed without protocol violations.
Verify that:
a) The DUT ignored the non-zero field(s) in the ACK and did not r e tr a nsmit the CONFIG_RD_COMPLETI O N
TLP.
b) The DUT did not set any error bit in its Device Status register and did not generate any error messages.
c) The DUT did not set any error bit in the Advanced Error Reporting registers (if implemented).
If the DUT meets all these criteria, the DUT passes the test.
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
18
3.1.1.2 Test 52-10. RetransmitOnNak
ASSERTIONS COVERED: DLL.5.2#1
The intent of this test is to ensure that a DUT retransmits a transaction for which a NAK has been issued.
1. Write 0x0000000F to Device Control Register, to enable Error Reporting for all error types.
2. Write 0xFFFFFFFF to Advanced U ncorrectable Error Status Register, to clear all prior error bits.
3. Write 0xFFFFFFFF to Advanced Correctable Error Status Register, to clear all prior error bits.
4. Main test stage. Do the following:
a. Send configuration read request TLP.
b. Wait for completion.
c. Send a Nak DLLP.
d. Wait for retransmitted comple tion.
e. Ac k the retransmitted completion.
5. Read Device Status Register. No error bits should be set.
6. Read Advanced Uncorrectable Error Status Register. No error bits should be set.
7. Read Advanced Correctable Error Status Register. No error bits should be set.
8. Write 0 to Device Control Register, to disable Error Reporting for all error types.
Pass/Fail Criteria:
Test should successfull y progress though all test stages.
All test stages should be executed without protocol violations.
Verify that:
a) The CONFIG_RD_COMPLETION TLP for which a NAK is received is retransmitted by the DUT.
b) The DUT did not set any error bit in its Device Status register and did not generate any error messages.
c) The DUT did not set any error bit in the Advanced Error Reporting registers (if implemented).
If the DUT meets all these criteria, the DUT passes the test.
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
19
3.1.1.3 Test 52-11. REPLAY_TIMER Test
ASSERTIONS COVERED: DLL.5.2#1.1
The intent of this test is to ensure that a DUT REPLAY_TIMER is working properl y by not sending an ACK or
NAK.
1. Write 0x0000000F to Device Control Register, to enable Error Reporting for all error types.
2. Write 0xFFFFFFFF to Advanced U ncorrectable Error Status Register, to clear all prior error bits.
3. Write 0xFFFFFFFF to Advanced Correctable Error Status Register, to clear all prior error bits.
4. Main test stage. Do the following:
a. Disa ble the automatic Ack/Nak.
b. Send configuration read request TLP.
c. Wait for completion.
d. Wait for the replayed completion.
e. Ack the replayed completion.
5. Read Device Sta t us Register. Onl y ERR_CORR bit should be set.
6. Read Advanced Uncorrectable Error Status Register. No error bits should be set.
7. Read Advanced Correctable Error Status Register. Only Replay Timer Timeout Status bit should be set.
8. Write 0 to Device Control Register, to disable Error Reporting for all error types.
Pass/Fail Criteria:
Test should successfull y progress though all test stages.
All test stages should be executed without protocol violations.
Verify that:
a) The DUT retransmits the CONFIG_RD_COMPLETION TLP for which it received no ACK or NAK.
b) The DUT set only the ERR_CORR bit in its Device Status register and generated ERR_CORR message.
c) The DUT set “Replay Timer Timeout Status” bit in the Advanced Error Reporting Correctable Error Status
register (if implemented).
If the DUT meets all these criteria, the DUT passes the test.
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
20
3.1.1.4 Test 52-12. REPLAY_NUM Test
ASSERTIONS COVERED: DLL.5.2#1.2
The intent of this test is to ensure that a DUT keeps retransmitting a transacti on for which a NAK has been issued on
purpose until the number of times i n its REPLAY_NUM.
Trainer Stimulus: link_52-12_REPLAY_NUM.peg
Recording Options: link_layer_common.rec
Verification Scripts: link_52-12_REPLAY_NUM.pevs
Test Algorithm:
1. Write 0x0000000F to Device Control Register, to enable Error Reporting for all error types.
2. Write 0xFFFFFFFF to Advanced U ncorrectable Error Status Register, to clear all prior error bits.
3. Write 0xFFFFFFFF to Advanced Correctable Error Status Register, to clear all prior error bits.
4. Main test stage. Do the following:
a. Set the Ack/Nak policy to “Always Nak”.
b. Send configuration read request TLP.
c. Wait for the completion TLP to arrive for REPLAY_NUM times, while sending Nak.
d. Switch back to Automatic Ack po licy.
e. Acknowledge the next completion TLP.
5. Read Device Status Register. No error bits should be set.
6. Read Advanced Uncorrectable Error Status Register. No error bits should be set.
7. Read Advanced Correctable Error Status Register. No error bits should be set.
8. Write 0 to Device Control Register, to disable Error Reporting for all error types.
Pass/Fail Criteria:
Test should successfull y progress though all test stages.
All test stages should be executed without protocol violations.
Verify that:
a) The DUT trans mits the CONFIG_RD_COMPLETION for REPLAY_NUM of times with the same sequence
number.
b) The DUT did not set any error bit in its Device Status register and did not generate any error messages.
c) The DUT did not set any error bit in the Advanced Error Reporting registers (if implemented).
If the DUT meets all these criteria, the DUT passes the test.
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
21
3.1.1.5 Test 52-20. LinkRetrainOnRetryFail
ASSERTIONS COVERED: DLL.5.2#2, DLL.5.2#7
The intent of this test is to ensure that t he link connected to the DUT goes into retraining after trying and failing for
REPLAY_NUM of times to get a TLP through. It also tests that the retry buffer and link states are not changed
while in retraining and that the pe nding TLP is retransmitted after link retraini ng completes.
1. Write 0x0000000F to Device Control Register, to enable Error Reporting for all error types.
2. Write 0xFFFFFFFF to Advanced Uncorrectable Error Status Register – clear all prior error bits.
3. Write 0xFFFFFFFF to Advanced Correctable Error Status Register – clear all prior error bits.
4. Main test stage. Do the following:
a. Set the Ack/Nak policy to “Disable”.
b. Send configuration read request TLP.
c. Wait (with timeout) for retraining to occur as a result of REPLAY_NUM plus one replays.
d. Switch back to Automatic Ack po licy.
e. Ac knowledge the next completion TLP ( that c omes after link retraining).
5. Read Device Sta t us Register. Onl y ERR_CORR bit should be set.
6. Read Advanced Uncorrectable Error Status Register. No error bits should be set.
7. Read Advanced Correctable Error Status Register. Only Replay Timer Timeout and REPLAY_NUM
Rollover Status bits should b e set.
8. Write 0 to Device Control Register, to disable Error Reporting for all error types.
Pass/Fail Criteria:
Test should successfull y progress though all test stages.
All test stages should be executed without protocol violations.
Verify that:
a) The link did not change its state and the Config Read Completion TLP is sent af te r the retraining is complete (that
the DATA_BUF contains the correct data). If not, treat it as DUT failure (DLL.5.2#7).
b) The DUT set ERR_CORR bit in its Device Status register and generated ERR_CORR message. If not treat it as
DUT failure (DLL.5.2#2).
c) The DUT set “REPLAY_NUM Rollover Status” bit in the Advanced Error Reporting Correctable Error Status
register (if implemented). If not treat it as DUT failure (DLL.5.2#2).
If the DUT meets all these criteria, the DUT passes the test.
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
22
3.1.1.6 Test 52-100. ReplayTLPOrder
ASSERTIONS COVERED: DLL.5.2#10
The intent of this test is to verify that the oldest unacknowledged TLP is retransmitted first in replay followed by the
other unacknowledged TLPs in the same order they were transmitted.
Note: Requires reconfiguration of input based on MAX_PAYLOAD_SIZE, link width, and other variables. You
must think about configuration input.
1. Write 0x0000000F to Device Control Register, to enable Error Reporting for all error types.
2. Write 0xFFFFFFFF to Advanced Uncorrectable Error Status Register – clear all prior e rror bits.
3. Write 0xFFFFFFFF to Advanced Correctable Error Status Register – clear all prior error bits.
4. Main test stage. Do the following:
a. Disa ble the automatic Ack/Nak.
b. In a loop, send DUT-dependent number of Configuration Read requests with increasing addresses
in the configuration space.
c. In a loop, wait for the corresponding number of completions.
d. Switch back to Automatic Ack po licy.
e. Wait some time for all the outstanding completions to be acknowledged.
5. Read Device Status Register. Only ERR_CORR bit should be set.
6. Read Advanced Uncorrectable Error Status Register. No error bits should be set.
7. Read Advanced Correctable Error Status Register. Only Replay Timer Timeout Status bit should be set.
8. Write 0 to Device Control Register, to disable Error Reporting for all error types.
Pass/Fail Criteria:
Test should successfull y progress though all test stages.
All test stages should be executed without protocol violations.
Verify that:
a) The retransmitted CONFIG_RD_COMPLETION TLPs are in the original order sent.
b) The DUT set ERR_CORR bit in its Device Status register and generated ERR_CORR message (message by itself
can be replayed).
c) The DUT set “Replay Timer Timeout Status” bit in the Advanced Error Reporting Correctable Error Status
register (if implemented).
If the DUT meets all these criteria, the DUT passes the test.
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
23
3.1.1.7 Test 52-150. CorruptedCRC_DLLP
ASSERTIONS COVERED: DLL.5.2#15
The intent of this test is to ensure that a DUT recognizes a DLLP with a bad CRC, drops it, and logs a BAD_DLLP
port error.
1. Write 0x0000000F to Device Control Register, to enable Error Reporting for all error types.
2. Write 0xFFFFFFFF to Advanced Uncorrectable Error Status Register – clear all prior error bits.
3. Write 0xFFFFFFFF to Advanced Correctable Error Status Register – clear all prior error bits.
4. Main test stage. Do the following:
a. Disa ble the automatic Ack/Nak.
b. Send configuration read request TLP.
c. Wait for completion.
d. Send the Ack DLLP with bad CRC.
e. Wait for the retransmitted completion.
f. Switch back to Automatic Ack policy.
5. Read Device Sta t us Register. Onl y ERR_CORR bit should be set.
6. Read Advanced Uncorrectable Error Status Register. No error bits should be set.
7. Read Advanced Correctable Error Status Register. Only BAD DLLP bit should be set. (Replay Timer
Timeout Status can also be set. See the Notes.)
8. Write 0 to Device Control Register, to disable Error Reporting for all erro r types.
Pass/Fail Criteria:
Test should successfull y progress though all test stages.
All test stages should be executed without protocol violations.
Verify that:
a) The CONFIG_RD_COMPLETION TLP for which the DUT received an ACK with a bad CRC is retransmitted
by the DUT.
b) The DUT set ERR_CORR bit in its Device Status register and generated ERR_CORR message.
c) The DUT set “BAD DLLP” bit in the Advanced Error Reporting Correctable Error Status register (if
implemented).
If the DUT meets all these criteria, the DUT passes the test.
Notes: Because the PETrainer™ stays in the Ack/Nak disabled mode waiting for the retransmitted completion while
the ERR_CORR message can be sent, there is a good chance the ERR_CORR message is going to be replayed. This
in turn is goi ng to prompt another ERR_CORR message and set a Replay Timer Timeout Status bit in the Advanced
Error Reporting Correctable Error Status register (if implemented). T his situation has to be tracked by the
verification script and not treated a s a failure.
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
24
3.1.1.8 Test 52-160. UndefinedDLLPEncoding
ASSERTIONS COVERED: DLL.5.2#16
The intent of this test is to verify that the DUT silently drops any D LLP with undefined encoding (any pattern for
DLLP type that is reserved right now) and no error is associated with it.
Verification Scripts: link_52-160_UndefinedDLLPEncoding.pevs
Test Algorithm:
1. Write 0x0000000F to Device Control Register, to enable Error Reporting for all error types.
2. Write 0xFFFFFFFF to Advanced U ncorrectable Error Status Register, to clear all prior error bits.
3. Write 0xFFFFFFFF to Advanced Correctable Error Status Register, to clear all prior error bits.
4. Main test stage. Do the following:
a. Disa ble the automatic Ack/Nak.
b. Send configuration read request TLP.
c. Wait for completion.
d. Send a DLLP with undefined encoding.
e. Wait for the retransmitted completion.
f. Switch back to Automatic Ack policy.
5. Read Device Status Register. Only ERR_CORR bit should be set.
6. Read Advanced Uncorrectable Error Status Register. No error bits should be set.
7. Read Advanced Correctable Error Status Register. Only Replay Timer Timeout Status bit should be set.
8. Write 0 to Device Control Register, to disable Error Reporting for all error types.
Pass/Fail Criteria:
Test should successfull y progress though all test stages.
All test stages should be executed without protocol violations.
Verify that:
a) The DUT silently drops the DLLP with undefined encoding and retransmits the CONFIG_RD_COMPLETION
TLP for which it received an undefined DLLP.
b) The DUT set ERR_CORR bit in its Device Status register and generated ERR_CORR message.
c) The DUT set “Replay Timer Timeout Status” bit in the Advanced Error Reporting Correctable Error Status
register (if implemented).
If the DUT meets all these criteria, the DUT passes the test.
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
25
3.1.1.9 Test 52-170. WrongSeqNumInAckDLLP
ASSERTIONS COVERED: DLL.5.2#17
The intent of this test is to verify that the DUT dro ps any ACK DLLP that does not have a sequence number
corresponding to an unacknowledged TLP and logs a BAD DLLP error associated with the port.
1. Write 0x0000000F to Device Control Register, to enable Error Reporting for all error types.
2. Write 0xFFFFFFFF to Advanced Uncorrectable Error Status Register, to clear all prior error bits.
3. Write 0xFFFFFFFF to Advanced Correctable Error Status Register, to clear all prior error bits.
4. Main test stage. Do the following:
a. Disa ble the automatic Ack/Nak.
b. Send configuration read request TLP.
c. Wait for completion.
d. Send an Ack DLLP wit h wro ng sequence number (expected minus one).
e. Switch back to Automatic Ack policy.
5. Read Device Sta t us Register. Onl y ERR_CORR bit should be set.
6. Read Advanced Correctable Error Status Register. No error bits should be set.
7. Read Advanced Uncorrectable Error Status Register. Only Data Link Protocol Error bit should be set.
8. Write 0 to Device Control Register, to disable Error Reporting for all error types.
Pass/Fail Criteria:
Test should successfull y progress though all test stages.
All test stages should be executed without protocol violations.
Verify that:
a) The DUT set only the ERR_FATAL bit in its Device Status register and generated ERR_FATAL message.
b) The DUT set “BAD DLLP” bit in the Advanced Error Reporting Correctable Error Status register (if
implemented).
If the DUT meets all these criteria, the DUT passes the test.
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
26
3.1.1.10 Test 53-20. BadLCRC
ASSERTIONS COVERED: DLL.5.3#2
The intent of this test is to verify that a receiver discards a TLP with a bad CRC by NAKing it and reports a BAD
TLP error associated with the port.
Trainer Stimulus: link_53-20_BadLCRC.peg
Recording Options: link_layer_common.rec
Verification Scripts: link_53-20_BadLCRC.pevs
Test Algorithm:
1. Write 0x0000000F to Device Control Register, to enable Error Reporting for all error types.
2. Write 0xFFFFFFFF to Advanced U ncorrectable Error Status Register, to clear all prior error bits.
3. Write 0xFFFFFFFF to Advanced Correctable Error Status Register, to clear all prior error bits.
4. Main test stage. Do the following:
a. Turn off auto matic sequence numbering, LCRC generation, and Replay Timer.
b. Send configuration read request TLP with bad LCRC.
c. Wait enough time for the TLP to be Nak’ed and the message to arrive.
d. Proceed with the rest of the test, setting PSNs and Tag manually.
5. Read Device Status Register. Only ERR_CORR bit should be set.
6. Read Advanced Uncorrectable Error Status Register. No error bits should be set.
7. Read Advanced Correctable Error Status Register. Only BAD_TLP bit should be set.
8. Write 0 to Device Control Register, to disable Error Reporting for all error types.
Pass/Fail Criteria:
Test should successfull y progress though all test stages.
All test stages should be executed without protocol violations.
Verify that:
a) The DUT NAKs the TLP with bad CRC.
b) The DUT set only the ERR_CORR bit in its Device Status register and generated ERR_CORR message.
c) The DUT set “BAD_TLP” bit in the Advanced Error Reporting Correctable Error Status register (if
implemented).
If the DUT meets all these criteria, the DUT passes the test.
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
27
3.1.1.11 Test 53-31. DuplicateTLP
ASSERTIONS COVERED: DLL.5.3#3.1
The intent of this test is to verify that the duplicate TLPs are handled properly by the DUT. (Duplicate TLPs have
the same sequence number associated at the link layer as in the last 2048 TLPs received.)
1. Write 0x0000000F to Device Control Register, to enable Error Reporting for all error types.
2. Write 0xFFFFFFFF to Advanced Uncorrectable Error Status Register, to clear all prior error bits.
3. Write 0xFFFFFFFF to Advanced Correctable Error Status Register, to clear all prior error bits.
4. Main test stage. Do the following:
a. Turn off the automatic sequence numbering and Replay Timer.
b. Turn off Flow Control credits monitoring (so both TLPs can be sent no matter how many credits
are advertised).
c. Send configuration read request TLP, setting the PSN manually.
d. Repeat the same read request TLP with the same PSN.
e. Wait enough time for the completion to be sent and acknowledged.
f. Turn Flow Control credits monitoring ba c k o n.
g. Proceed with the rest of the test, setting PSNs and Tag manually.
5. Read Device Status Register. No error bits should be set.
6. Read Advanced Uncorrectable Error Status Register. No error bits should be set.
7. Read Advanced Correctable Error Status Register. No error bits should be set.
8. Write 0 to Device Control Register, to disable Error Reporting for all error types.
Pass/Fail Criteria:
Test should successfully progress though all test stages.
All test stages should be executed without protocol violations.
Verify that:
a) The duplicated CONFIG_RD_REQ TLP has received two ACKs or a single coalesced ACK, but a single
completion with data from the DUT.
b) The DUT did not set any error bit in its Device Status register and did not generate an y er ror messages.
c) The DUT did not set any error bit in the Advanced Error Reporting registers (if implemented).
If the DUT meets all these criteria, the DUT passes the test.
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
2. Write 0x0000000F to the Device Control Register, to enable Error Reporting for all error types.
3. Send Memory Write request TLP with a wrong PSN number, which is supposed to generate a Correctable
error.
4. Send a Poisoned Memory Write request TLP, which is supposed to generate a Non-Fatal error.
5. Send a Malformed Memory Write request TLP (data/length field mismatch), which is supposed to generate
a Fatal error.
6. Read Device Status Register. All three error-type bits should be set.
Pass/Fail Criteria:
Test should successfully progress though all test stages.
All test stages should be executed without protocol violations.
Verify that:
a) Error messages of ERR_COR, ERR_NONFATAL, and ERR_FATAL types are sent in proper sequence as
responses to the errors created.
b) Error Reporting Status bits ar e set in the DUT Device Status Register (ERR_COR, ERR_NONFATAL, and
ERR_FATAL are recorded in these status bits).
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
29
3.1.2.2 Test 3-1. TXN_BFT_FlowControlInit
ASSERTIONS COVERED: TXN.6.1#14, TXN.6.1#16, TXN.5.1#1
The intent of this test is to verify that a slotted Endpoint device receiver complies with basic flow control credit
advertisement requirements.
3. If non-zero VCs are implemented, read the Virtual Channel Capability structure.
Pass/Fail Criteria:
Test should successfully progress though all test stages.
All test stages should be executed without protocol violations.
Verify that:
a) DUT advertises compliant flow control credit values for each supported VC, using the Max_Payload_Size value
read from the Device Capabilities register.
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
30
3.1.2.3 Test 5-1. TXN_BFT_VC0TCSupport
ASSERTIONS COVERED: TXN.5.0#3, TXN.5.0#4
The intent of this test is to verify that slotted Endpoint devices that do not support VCs beyond the default still
handle reques ts wit h non -zero TC correctly.
2. Send a Memory Read request for address zero with TC value of 1.
3. Wait for Completion. TC in completion should be set to 1.
Pass/Fail Criteria:
Test should successfully progress though all test stages.
All test stages should be executed without protocol violations.
Verify that:
a) The Traffic Class ID in the Completion from the DUT is the same Traffic Class ID used in the initial Request.
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
31
3.1.2.4 Tests Requiring DUT Actions
The following three tests require some DUT actions to check all assertions. When the test is executed, the
PCI Express Script Automation Test Tool instructs the PETrainer™ to wait for the specific DUT action at the
proper point with the timeout of four seconds.
If the DUT does not send the expected TLP, the test proceeds to the next stage. When verification is executed, it
checks for the presence of the DUT actions at the proper stages.
If the DUT did not send the TLPs expected, the corresponding assertions are not checked, and the notification is
given in the log.
If no assertions could be checked for a test run, it is declared DONE rather then PASSED or FAILED.
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
2. Write 0x0000000F to Device Control Register, to enable Error Reporting for all error types.
3. Write 0xFFFFFFFF to Advanced U ncorrectable Error Status Register, to clear all prior error bits.
4. Write 0xFFFFFFFF to Advanced Correctable Error Status Register, to clear all prior error bits.
5. Main test stage. Do the following:
a. Wait for the DUT to initiate a Memory Read transaction (using MemRd32 TLP). Time out in four
seconds.
b. Send the Memory Read Completion with Unsupported Request status.
c. Issue a Vendor_Defined_Type0 request using Message TLP with vendor ID set to
LeCroy vendor ID and request code of 0x7F.
6. Read Device Status Register.
7. Read Advanced Uncorrectable Error Status Register.
Pass/Fail Criteria:
Test should successfull y progress though all test stages.
All test stages should be executed without protocol violations.
Verify that:
a) The Completer ID field in step 2 contains the Bus and Device numbers supplied with the Configuration Write
Request.
b) The Bus and Device Numbers supplied with the Configuration Write Request to the DUT (step 2) are present in
Requester ID of the Request from the DUT in step 5a. (If the DUT did not send the request, this assertion is not
checked.)
c) The following error conditions are raised and corresponding bits are set in the Device Status Register and
Advanced Uncorrectable Error Status Register (if implemented):
• Unsupported Request condition (for the Vendor request in step 5c).
• Unexpected Completion condition (only in case the DUT did not send the request in step 5a).
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
Verify Basic Completion Timer requirements of a slotted Endpoint device. The Completion Timeout timer must not
expire in less than 50 µs, but it must e xpire if a Request is not completed in 50 ms.
2. Write 0x0000000F to Device Control Register, to enable Error Reporting for all error types.
3. Write 0xFFFFFFFF to Advanced U ncorrectable Error Status Register, to clear all prior error bits.
4. Write 0xFFFFFFFF to Advanced Correctable Error Status Register, to clear all prior error bits.
5. Main test stage. Do the following:
a. Wait for the DUT to initiate a Memory Read transaction (using MemRd32 TLP). Time out in four
seconds.
b. Wait for 49 microseconds.
c. Send the Memory Read Completion with Unsupported Request status.
d. Read the DUT Device Status Register and Advanced Uncorrectable Error Status Register.
e. Wait for the DUT to initiate another Memory Read transaction (using MemRd32 TLP). Time out
in four seco nds.
f. Wait for 50 milliseconds plus 1 microsecond.
g. Send the Memory Read Completion with Unsupported Request status.
6. Read Device Status Register.
7. Read Advanced Uncorrectable Error Status Register.
Pass/Fail Criteria:
Test should successfull y progress though all test stages.
All test stages should be executed without protocol violations.
Verify that:
a) The following error conditions are set by the DUT in case the DUT has initiated the memory requests (if it did
not, no assertions can be checked, and the test is declared DONE):
• No errors are set in error registers in step 5d.
• The ERR_CORR bit is set in the Device Status register in step 6.
• The Completion Time-out bit is set in the Advanced Uncorrectable Error Status register (if implemented) in
step 7.
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
2. Read the DUT Interrupt Pin Register value (register address 0x3C).
3. Read the DUT Interrupt Disable bit value (register address 0x4).
4. Main test stage. Do the following:
a. Wait for the DUT to assert interrupt (using ASSERT_INTx Message T LP). Time out in four
seconds.
b. Set the Interrupt Disable bit.
c. Wait enough time for DUT to de-assert the asserted interrupt.
Pass/Fail Criteria:
Test should successfully progress though all test stages.
All test stages should be executed without protocol violations.
Verify that:
a) In case the DUT asserted interrupt (if it did not, the results are not applicable, and the test is marked DONE):
• The DUT has asserted the interrupt using the appropriately mapped Message TLP.
• The DUT has asserted the interrupt in step 4c using the appropriately mapped Message TLP.
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
35
3.2 Root Complex Tests
In the following test descriptions, the term “Issue command to the Driver” is often used. This term indicates that the
following sequence of steps is performed.
- Write the Command DWORD to the Command system buffer.
- Assert the legacy interrupt to interr upt the system.
- Wait for the Memory Write transaction from the system that acknowledges the interrupt.
- Deassert the legacy interrupt.
Note: All the Root Complex tests start with re-training and initialization of the PCI Expre ss link, so this first default
step is omitted in the test descrip tions.
3.2.1 Link Layer Test Descriptions
3.2.1.1 Test 41-20. ReservedFieldsDLLPReceive
ASSERTIONS COVERED: DLL.4.1#2
The intent of this test is to verify that the DUT truly ignores reserved fields in an ACK DLLP by sending arbitrary
data in those fields.
1. Issue command to the Driver to clea r a ll e rror status bits for the Root or Switch port to which the Device
Emulator is attached.
2. Main test stage. Do the following:
a. Switch to the 'Disable' ACK/NAK policy.
b. Re-train and initialize the link.
c. Wait for the Set_Slot_Power_Limit Messa ge from the Root.
d. Send an Ack DLLP wit h non -zero reserved field.
e. Switch back to the 'Automatic' ACK/NAK policy.
3. Issue command to the Driver to reflect the current values of the Error Reporting Registers for the port to
which the Device Emulator is attached (using Configuration Writes).
Pass/Fail Criteria:
Test should successfull y progress though all test stages.
All test stages should be executed without protocol violations.
Verify that:
a) The DUT ignored the non-zero field(s) in the ACK and did not r e tr a nsmit the Set_Slot_Power_Limit Message
TLP.
b) The DUT did not set any error bits in its Device Status register.
c) The DUT did not set any error bits in the Advanced Error Reporting registers (if implemented). This includes the
Advanced Uncorrectable Error Status register, Advanced Correctable Error Status register, and Root Error Status
register.
If the DUT meets all these criteria, the DUT passes the test.
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
36
3.2.1.2 Test 52-10. RetransmitOnNak
ASSERTIONS COVERED: DLL.5.2#1
The intent of this test is to ensure that a DUT retransmits a transaction for which a NAK has been issued.
1. Issue command to the Driver to clea r a ll e rror status bits for the Root or Switch port to which the Device
Emulator is attached.
2. Main test stage. Do the following:
a. Issue command to the Driver to perform 1-DWORD Memory Write to the Device Emulator.
b. Switch to the 'Always Nak' ACK/NAK policy.
c. Wait for the Memory Write TLP.
d. Switch back to the 'Automatic' A CK/NAK policy.
3. Issue command to the Dri ver to reflect the current values of the Error Reporting Registers for the port to
which the Device Emulator is attached (using Configuration Writes).
Pass/Fail Criteria:
Test should successfully progress though all test stages.
All test stages should be executed without protocol violations.
Verify that:
a) The Memory Write TLP for which a NAK is received is retransmitted by the DUT.
b) The DUT did not set any error bits in its Device Status register.
c) The DUT did not set any error bits in the Advanced Error Reporting registers (if implemented). This includes
Advanced Uncorrectable Error Status register, Advanced Correctable Error Status register and Root Error Status
register.
If the DUT meets all these criteria, the DUT passes the test.
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
37
3.2.1.3 Test 52-11. REPLAY_TIMER Test
ASSERTIONS COVERED: DLL.5.2#1.1
The intent of this test is to ensure that a DUT REPLAY_TIMER is working properl y by not sending an ACK or
NAK.
1. Issue command to the Driver to clea r a ll e rror status bits for the Root or Switch port to which the Device
Emulator is attached.
2. Main test stage. Do the following:
a. Issue command to the Driver to perform 1-DWORD Memory Write to the De vice Emulator.
b. Switch to the 'Disable' ACK/NAK policy.
c. Wait for the Memory Write TLP.
d. Switch back to the 'Automatic' A CK/NAK policy.
3. Issue command to the Driver to reflect the current values of the Error Reporting Registers for the port to
which the Device Emulator is attached (using Configuration Writes).
Pass/Fail Criteria:
Test should successfull y progress though all test stages.
All test stages should be executed without protocol violations.
Verify that:
a) The DUT retransmits the Memory Write TLP for which it received no ACK or NAK.
b) The DUT set only the ERR_CORR bit in its Device Status register.
c) The DUT did not set any error bits in the Advanced Uncorrectable Error Status register (if implemented).
d) The DUT set the “Replay Timer Timeout Status” bit in the Advanced Error Reporting Correctable Error Status
register (if implemented).
e) The DUT set the “Correctable Error Received” bit in the Root Error Status register (if implemented and
applicable).
If the DUT meets all these criteria, the DUT passes the test.
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
38
3.2.1.4 Test 52-12. REPLAY_NUM Test
ASSERTIONS COVERED: DLL.5.2#1.2
The intent of this test is to ensure that a DUT keeps retransmitting a t ransaction for which a NAK has been issued on
purpose until the number of times in its REPLAY_NUM.
Trainer Stimulus: link_52-12_REPLAY_NUM.peg
Recording Options: link_layer.rec
Verification Scripts: link_52-12_REPLAY_NUM.pevs
Test Algorithm:
1. Issue command to the Driver to clear all error status bits for the Root or Switch port to which the Device
Emulator is attached.
2. Main test stage. Do the following:
a. Issue command to the Driver to perform 1-DWORD Memory Write to the Device Emulator.
b. Switch to the 'Disable' ACK/NAK policy.
c. Wait for the Memory Write TLP to be sent REPL AY_N UM times.
d. Switch back to the 'Automatic' A CK/NAK policy.
3. Issue command to the Driver to reflect the current values of the Error Reporting Registers for the port to
which the Device Emulator is attached (using Configuration Writes).
Pass/Fail Criteria:
Test should successfull y progress though all test stages.
All test stages should be executed without protocol violations.
Verify that:
a) The DUT transmits the Memory Write TLP for REPLAY_NUM of times with the same sequence number.
b) The DUT did not set any error bits in its Device Status register.
c) The DUT did not set any error bits in the Advanced Error Reporting registers (if implemented). This includes the
Advanced Uncorrectable Error Status register, Advanced Correctable Error Status register, and Root Error Status
register.
If the DUT meets all these criteria, the DUT passes the test.
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
39
3.2.1.5 Test 52-20. LinkRetrainOnRetryFail
ASSERTIONS COVERED: DLL.5.2#2, DLL.5.2#7
The intent of this test is to ensure that t he link connected to the DUT goes into retraini ng after trying and failing for
REPLAY_NUM of times to get a TLP through. It also tests that the retry buffer and link states are not changed
while in retraining and that the pe nding TLP is retransmitted after link retraini ng completes.
1. Issue command to the Driver to clea r a ll e rror status bits for the Root or Switch port to which the Device
Emulator is attached.
2. Main test stage. Do the following:
a. Issue command to the Driver to perform 1-DWORD Memory Write to the Device Emulator.
b. Switch to the 'Disable' ACK/NAK policy.
c. Wait (with timeout) for the link to be retrained as a result of Memory Write TLP to be sent
REPLAY_NUM + 1 times.
d. Switch back to the 'Automatic' A CK/NAK policy.
e. Ack nowledge the TLP that comes after link retraining.
3. Issue command to the Driver to reflect the current values of the Error Reporting Registers for the port to
which the Device Emulator is attached (using Configuration Writes).
Pass/Fail Criteria:
Test should successfull y progress though all test stages.
All test stages should be executed without protocol violations.
Verify that:
a) The link did not change its state, and the Memory Write TLP is sent after the retraining is complete (that the
DATA_BUF contains the correct data). If not, treat it as DUT failure (DLL.5.2#7).
b) The DUT set the ERR_CORR bit in its Device Status register. If not, treat it as DUT failure (DLL.5.2#2).
c) The DUT did not set any error bits in the Advanced Uncorrectable Error Status register (if imp lemented).
d) The DUT set the “REPLAY_NUM Rollover Status” bit in the Advanced Error Reporting Correctable Error Status
register (if implemented). If not, treat it as DUT failure (DLL.5.2#2).
e) The DUT set the “Correctable Error Received” bit in the Root Error Status register (if implemented and
applicable).
If the DUT meets all these criteria, the DUT passes the test.
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
40
3.2.1.6 Test 52-100. ReplayTLPOrder
ASSERTIONS COVERED: DLL.5.2#10
The intent of this test is to verify that the oldest unacknowledged TLP is retransmitted first in replay, followed by
the other unacknowledged TLPs in the same order that they were transmitted.
1. Issue command to the Driver to clea r a ll e rror status bits for the Root or Switch port to whi ch the Device
Emulator is attached.
2. Main test stage. Do the following:
a. Issue command to the Driver to perform a series of six 1-DWORD Memory Writes to the Device
Emulator with zero delay.
b. Switch to the 'Disable' ACK/NAK policy.
c. Wait for the Memory Write TLP to be sent six times.
d. Switch back to the 'Automatic' A CK/NAK policy.
3. Issue command to the Driver to reflect the current values of the Error Reporting Registers for the port to
which the Device Emulator is attached (using Configuration Writes).
Pass/Fail Criteria:
Test should successfull y progress though all test stages.
All test stages should be executed without protocol violations.
Verify that:
a) The retransmitted Memory Write TLPs are in the original order sent.
b) The DUT set t he ERR_CORR bit in its Device Status register.
c) The DUT did not set any error bits in the Advanced Uncorrectable Error Status register (if implemented).
d) The DUT set the “Replay Timer Timeout Status” bit in the Advanced Error Reporting Correctable Error Status
register (if implemented).
e) The DUT set the “Correctable Error Received” bit in the Root Error Status register (if implemented and
applicable).
If the DUT meets all these criteria, the DUT passes the test.
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
41
3.2.1.7 Test 52-150. CorruptedCRC_DLLP
ASSERTIONS COVERED: DLL.5.2#15
The intent of this test is to ensure that a DUT recognizes a DLLP with a bad CRC, drops it, and logs a BAD_DLLP
port error.
1. Issue command to the Driver to clea r a ll e rror status bits for the Root or Switch port to which the Device
Emulator is attached.
2. Main test stage. Do the following:
a. Issue command to the Driver to perform 1-DWORD Memory Wr ite to the Device Emulator.
b. Switch to the 'Disable' ACK/NAK policy.
c. Wait for the Memory Write TLP.
d. Send the Ack DLLP with bad CRC.
e. Switch back to the 'Automatic' ACK/NAK policy.
f. Acknowledge the retransmitted T LP .
3. Issue command to the Driver to reflect the current values of the Error Reporting Registers for the port to
which the Device Emulator is attached (using Configuration Writes).
Pass/Fail Criteria:
Test should successfull y progress though all test stages.
All test stages should be executed without protocol violations.
Verify that:
a) The Memory Write TLP for which the DUT received an ACK with a bad CRC is retransmitted by the DUT.
b) The DUT set the ERR_CORR bit in its Device Status register.
c) The DUT did not set any error bits in the Advanced Uncorrectable Error Status register (if implemented).
d) The DUT set the “BAD DLLP” and “Replay Timer Timeout Status” bits in the Advanced Error Reporting
Correctable Error Status register (if implemented).
e) The DUT set the “Correctable Error Received” and “Multiple Correctable Errors Received” bits in the Root Error
Status register (if implemented a nd a pplicable).
If the DUT meets all these criteria, the DUT passes the test.
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
42
3.2.1.8 Test 52-160. UndefinedDLLPEncoding
ASSERTIONS COVERED: DLL.5.2#16
The intent of this test is to verify that t he DUT silently drops any DLLP with undefined encod ing (any pattern for
DLLP type that is currently reserved) and no error is associated with it.
Verification Scripts: link_52-160_UndefinedDLLPEncoding.pevs
Test Algorithm:
1. Issue command to the Driver to clea r a ll e rror status bits for the Root or Switch port to which the Device
Emulator is attached.
2. Main test stage. Do the following:
a. Issue command to the Driver to perform 1-DWORD Memory Write to the Device Emulator.
b. Switch to the 'Disable' ACK/NAK policy.
c. Wait for the Memory Write TLP.
d. Send a DLLP with undefined encoding.
e. Switch back to the 'Automatic' ACK/NAK policy.
f. Acknowledge the retransmitted TLP.
3. Issue command to the Driver to reflect the current values of the Error Reporting Registers for the port to
which the Device Emulator is attached (using Configuration Writes).
Pass/Fail Criteria:
Test should successfull y progress though all test stages.
All test stages should be executed without protocol violations.
Verify that:
a) The DUT silently drops t he DLLP with undefined encoding and retransmits the Memory Write TLP for which it
received an undefined DLLP.
b) The DUT set the ERR_CORR bit in its Device Status register.
c) The DUT did not set any error bits in the Advanced Uncorrectable Error Status register (if implemented).
d) The DUT set the “Replay Timer Timeout Status” bit in the Advanced Error Reporting Correctable Error Status
register (if implemented).
e) The DUT set the “Correctable Error Received” bit in the Root Error Status register (if implemented and
applicable).
If the DUT meets all these criteria, the DUT passes the test.
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
43
3.2.1.9 Test 52-170. WrongSeqNumInAckDLLP
ASSERTIONS COVERED: DLL.5.2#17
The intent of this test is to verify that the DUT drops any ACK DLLP that does not have a sequence number
corresponding to an unacknowledged TLP and logs a BAD DLLP error associated with the port.
1. Issue command to the Driver to clea r a ll e rror status bits for the Root or Switch port to which the Device
Emulator is attached.
2. Main test stage. Do the following:
a. Issue command to the Driver to perform 1-DWORD Memory Write to the Device Emulator.
b. Switch to the 'Disable' ACK/NAK policy.
c. Wait for the Memory Write TLP.
d. Send an Ack DLLP with wrong sequence number.
e. Switch back to the 'Automatic' ACK/NAK policy.
f. Acknowledge the retransmitted T LP .
3. Issue command to the Driver to reflect the current values of the Error Reporting Registers for the port to
which the Device Emulator is attached (using Configuration Writes).
Pass/Fail Criteria:
Test should successfull y progress though all test stages.
All test stages should be executed without protocol violations.
Verify that:
a) The DUT set t he ERR_CORR and ERR_FATAL bits in its D evice Status regist er.
b) The DUT set the “Data Link Error” bit in the Advanced Error Reporting Uncorrectable Error Status register (if
implemented).
d) The DUT set the “Replay Timer Timeout Status” bit in the Advanced Error Reporting Correctable Error Status
register (if implemented).
e) The DUT set the “Correctable Error Received”, “Uncorrectable Error Received”, “Fatal Error Received”, and
“First Uncorrectable Fatal” b its in t he Ro ot Error Status register (if implemented and applicable).
If the DUT meets all these criteria, the DUT passes the test.
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
44
3.2.1.10 Test 53-20. BadLCRC
ASSERTIONS COVERED: DLL.5.3#2
The intent of this test is to verify that a receiver discards a TLP with a bad CRC by NAKing it and reports a BAD
TLP error associated with the port.
Trainer Stimulus: link_53-20_BadLCRC.peg
Recording Options: link_layer.rec
Verification Scripts: link_53-20_BadLCRC.pevs
Test Algorithm:
1. Issue command to the Driver to clea r a ll e rror status bits for the Root or Switch port to which the Device
Emulator is attached.
2. Main test stage. Do the following:
a. Turn off automatic LCRC generation and automatic sequence numbering.
b. Send a Memory Read Request TLP with bad LCRC.
c. Wait for some time.
d. Send the same Memory Read Request TLP, now with good LCRC.
3. Issue command to the Driver to reflect the current values of the Error Reporting Registers for the port to
which the Device Emulator is attached (using Memory Writes).
4. Switch back to automatic settings, re tr a in, a nd initialize the link.
Pass/Fail Criteria:
Test should successfull y progress though all test stages.
All test stages should be executed without protocol violations.
Verify that:
a) The DUT NAKs the TLP with bad CRC.
b) The DUT completes the Memory Read transaction.
c) The DUT set only the ERR_CORR b it in its Device Status register.
d) The DUT did not set any error bits in the Advanced Uncorrectable Error Status register (if implemented).
e) The DUT set the “BAD_TLP” bit in the Advanced Error Reporting Correctable Error Status register (if
implemented).
f) The DUT set the “Correctable Error Received” bit in the Root Error Status register (if implemented and
applicable).
If the DUT meets all these criteria, the DUT passes the test.
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
45
3.2.1.11 Test 53-31. DuplicateTLP
ASSERTIONS COVERED: DLL.5.3#3.1
The intent of this test is to verify that the duplicate TLPs are handled properly by the DUT. (Duplicate TLPs have
the same sequence number associated at the link layer as in the latest 2048 TLPs received.)
1. Issue command to the Driver to clea r a ll e rror status bits for the Root or Switch port to which the Device
Emulator is attached.
2. Main test stage. Do the following:
a. Turn off auto matic LCRC gen eration and automatic sequence numbering.
b. Send a Memory Read Request TLP.
c. Immediately send the same Memory Read Request TLP, with the same PSN.
d. Wait enough time for the DUT to complete the transaction.
3. Issue command to the Driver to reflect the current values of the Error Reporting Registers for the port to
which the Device Emulator is attached (using Memory Writes).
4. Switch back to automatic settings, re tr a in, a nd initialize the link.
Pass/Fail Criteria:
Test should successfull y progress though all test stages.
All test stages should be executed without protocol violations.
Verify that:
a) The duplicated Memory Read Request TLP has received two ACKs or a single coalesced ACK and a single
completion with data from the DUT.
b) The DUT did not set any error bits in its Device Status register.
c) The DUT did not set any error bits in the Advanced Error Reporting registers (if implemented). This includes the
Advanced Uncorrectable Error Status register, Advanced Correctable Error Status register, and Root Error Status
register.
If the DUT meets all these criteria, the DUT passes the test.
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
46
3.2.2 Transaction La yer Test Descriptions
3.2.2.1 Test 1-1. TXN_BFT_RequestCompletion
ASSERTIONS COVERED: TXN.2.7#9, TXN.2.21#15, TXN.2.21# 19, TXN. 3 .1#1, TXN.3.1#2
Verify Basic Request and Completio n handling of Root Complex devices.
1. Issue command to the Driver to clear all error status bits for the Root or Switch port to which the Device
Emulator is attached.
2. Issue command to the Driver to perform a Tag synchronization sequence (if needed) to ensure the next
transaction is done with an expected Tag value.
3. Issue command to the Driver to perform a Memory Read transaction.
4. Wait for the Memory Read Request and issue Memory Read Completion with Unsupported Request status.
5. Issue command to the Driver to reflect the current values of the Error Reporting Registers for the port to
which the Device Emulator is attached (using Configuratio n Writes).
6. Issue command to the Driver to clea r all error status bits for the Root or Switch port to which the Device
Emulator is attached.
7. Perform Memory Read transaction from the DUT (command me mory system area).
8. Issue command to the Driver to reflect the current values of the Error Reporting Registers for the port to
which the Device Emulator is attached (using Configuration Writes).
Pass/Fail Criteria:
Test should successfull y progress though all test stages.
All test stages should be executed without protocol violations.
Verify that:
a) The DUT system constructed Memory Read Request and Completion TLPs properly.
b) The DUT did not set any error b its in its Device Status register.
c) The DUT did not set any error bits in the Advanced Error Reporting registers (if i mplemented). This includes the
Advanced Uncorrectable Error Status register, Advanced Correctable Error Status register, and Root Error Status
register.
If the DUT meets all these criteria, the DUT passes the test.
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
47
3.2.2.2 Test 1-2. TXN_BFT_CompletionTimeout
ASSERTIONS COVERED: TXN.8.0#1.1, TXN.8.0#2, TXN.8.0#3 , TXN.8.0#4, TXN.8.0#5
Verify Basic Completion Timer requirements of a Root Complex device. The Completion Timeout timer must not
expire in less than 50 µs, but it must expire if a Request is not completed in 50 ms.
1. Issue command to the Driver to read and reflect to the link the value of the Uncorrectable Error Severity
register for the Root or Switch port to which the Device Emulator is attached. The Verification script uses
this value to determine how Completion Timeout and Unexpected Completion errors should be reported.
2. Issue command to the Driver to clea r a ll e rror status bits for the Root or Switch port to which the Device
Emulator is attached.
3. Issue command to the Driver to perform a Tag synchronization sequence (if needed) to ensure the next
transaction is done with an expected Tag value.
4. Issue command to the Driver to perform a Memory Read transaction.
5. Wait for the Memory Read Request, then wait for 49 microseconds and issue Memory Read Completion.
6. Issue command to the Driver to reflect the current values of the Error Reporting Registers for the port to
which the Device Emulator is attached (using Configuration Writes).
7. Issue command to the Driver to perform a Tag synchronization sequence (if needed) to ensure the next
transaction is done with an expected Tag value.
8. Issue command to the Driver to perform a Memory Read transaction.
9. Wait for the Memory Read Request, then wait for 50 milliseconds plus 1 microsecond and issue Memory
Read Completion.
10. Issue command to the Driver to reflect the current values of the Error Reporting Registers for the port to
which the Device Emulator is attached (using Configuration Writes).
Pass/Fail Criteria:
Test should successfull y progress though all test stages.
All test stages should be executed without protocol violations.
Verify that:
a) The following error conditions are set by the DUT:
• No errors are set in error registers in step 6.
• The ERR_NONFATAL and/or ERR_FATAL bits are set in the Device Status register in step 10,
depending on the severity of the Completion Timeout and Unexpected Completion errors.
•The Completion Timeout and Unexpected Completion error bits are set in the Advanced Uncorrectable
Error Status register (if implemented) in step 10.
• No errors are set in the Advanced Correctable Error Sta tus register ( if implemented) in step 10.
• Error bits are set in the Ro ot Error Status register (if implemented) in step 10, depending on the severity of
the Completion Timeout and Unexpe c te d Completion errors.
If the DUT meets all these criteria, the DUT passes the test.
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
The intent of this test is to verify basic e r ror signaling functionality of a Root or Switch port related to Uncorrectable
(Non-Fatal or Fatal) errors.
1. Issue command to the Driver to read and reflect to the link the value of the Uncorrectable Error Severity
register for the Root or Switch port to which the Device Emulator is attached. The Verification script uses
this value to determine how each of the errors created during the test should be reported.
2. Issue command to the Driver to clear all error status bits for the Root or Switch port to which the Device
Emulator is attached.
3. Send Memory Write TLP with Length = 1, but no Payload, thus creating a Malformed TLP error.
4. Issue command to the Driver to reflect the current values of the Error Reporting Registers for the port to
which the Device Emulator is attached (using Configuration Writes).
5. Issue four commands to the Driver to read and reflect to the link the value of the fo ur DWORDS of the
Header Log register for the Root or Switch port to which the Device Emulator is attached. (If Advanced
Error Reporting capability is not implemented, the values are ignored).
6. Issue command to the Driver to clea r all error status bits for the Root or Switch port to which the Device
Emulator is attached.
7. Send Memory Read Completion that is not expected, thus creating an Unexpected Completion error.
8. Issue command to the Driver to reflect the current values of the Error Reporting Registers for the port to
which the Device Emulator is at tached (using C onfiguration Writes).
9. Issue four commands to the Driver to read and reflect to the link the value of the fo ur DWORDS of the
Header Log register for the Root or Switch port to which the Device Emulator is attac hed.
10. Send Memory Write TLP with EP = 1, thus creating a Poisoned TLP error.
11. Issue command to the Driver to reflect the current values of the Error Reporting Registers for the port to
which the Device Emulator is attached (using Configuration Writes).
12. Issue four commands to the Driver to read and reflect to the link the value of the four DWORDS of the
Header Log register for the Root or Switch port to which the Device Emulator is attac hed.
Pass/Fail Criteria:
Test should successfull y progress though all test stages.
All test stages should be executed without protocol violations.
Verify that:
a) After each of the three error types, the DUT set the corresponding Non-Fatal or Fatal bit in the Device Status
register for the Root/Switch port.
b) The DUT did not set any error b its in the Advanced Correctable Error Status register (if implemented), for all
three types of errors.
c) The DUT set the corresponding error bits in the Advanced Uncorrectable Error Status register (if implemented),
for each of the three types of errors.
d) The DUT logged the four DWORDS of the header for each of the three erroneous TLPs the Device Emulator
generated in the Header Log register (if implemented).
e) The DUT set the corresponding bits in the Root Error Status register (if implemented), for each of the three types
of errors.
If the DUT meets all these criteria, the DUT passes the test.
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
49
3.2.2.4 Test 3-1. TXN_BFT_FlowControlInit
ASSERTIONS COVERED: TXN.6.1#14, TXN.6.1#16, TXN.5.1#1
The intent of this test is to verify that a Roo t Complex device receiver complies with basic flow control credit
advertisement requirements.
1. Bring the link up, capturing InitFC DLLPs and the Set_Slot_Power_Limit message form the Root.
Pass/Fail Criteria:
Test should successfully progress though all test stages.
All test stages should be executed without protocol violations.
Verify that:
a) The DUT advertises compliant flow control credit values for each supported VC, using the Max_Payload_Size
value in the De vice Capabilities register of the Root or Switch port.
b) The DUT sends the proper Set_Slot_Power_Limit message on the Link Up event, according to the values read
from the Device Capabilities register of the Root or Switch port.
If the DUT meets all these criteria, the DUT passes the test.
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
50
3.2.2.5 Test 4-0. TXN_BFT_TransactionTypes
ASSERTIONS COVERED: N/A
Verify Root Complex capability to create transactions of various types and pass data between Root Complex and an
Endpoint.
1. Issue command to the Driver to perform a Tag synchronization sequence (if needed) to ensure the next
transaction is done with an expected Tag value.
2. Issue command to the Driver to perform a Memory Read transaction.
3. Wait for the Memory Read Request and issue Memory Read Completion with some data.
4. Issue command to the Driver to perform a Tag synchronization sequence (if needed) to ensure the next
transaction is done with an expected Tag value.
5. Issue command to the Driver to perform a 1-byte IO Read transaction.
6. Wait for the IO Read Request and issue IO Read Completion with certain data. The Driver places this data
in the system buffer.
7. Issue command to the Driver to perform a Tag synchronization sequence (if needed) to ensure the next
transaction is done with an expected Tag value.
8. Issue command to the Driver to perform a 1-byte IO Write transaction with the data that was placed in the
system buffe r.
9. Issue command to the Driver to perform a 1-byte Configuration Read transaction from a certain location in
the Device Emulator configuration space. The Driver places this data in the system buffer.
10. Issue command to the Driver to perform a 1-byte Configuration Write transaction with the data that was
placed in the system buffer.
Pass/Fail Criteria:
Test should successfull y progress though all test stages.
All test stages should be executed without protocol violations.
Verify that:
a) The DUT has properly constructed and executed all the types of transactions in the test.
b) The data used for the IO Write was the one read by the IO Read.
c) The data used for the Configuration Write was the one read by the Configuration Read.
If the DUT meets all these criteria, the DUT passes the test.
Teledyne LeCroy PCI Express Script Automation Test Tool User Manual
51
Type of Service
Contact
Call for technical support…
US and Canada: 1 (800) 909-7112
Fax your questions…
Worldwide: 1 (408) 727-6622
Write a letter …
Teledyne LeCroy
Santa Clara, CA 95054-3115
Send e-mail…
psgsupport@teledynelecroy.com
Visit the Teledyne LeCroy web site…
teledynelecroy.com/
How to Contact Teledyne LeCroy
Worldwide: 1 (408) 653-1260
Protocol Solutions Group
Customer Support
3385 Scott Blvd.
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.