Teledyne Protocol PCI Express Script Automation User Manual

Protocol Solutions Group
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.
Copyright
© 2010 Teledyne LeCroy; All Rights Reserved. This document may be printed and reproduced without additional permission, but all copies should contain
this copyright notice.
Teledyne LeCroy PCI Express Script Automation Test Tool Manual
iii
Table of Contents
1 Introduction ......................................................................................................................................................... 1
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.3 Folder Structure ........................................................................................................................................... 10
2.4 Running Tests .............................................................................................................................................. 11
2.4.1 Endpoint DUT ..................................................................................................................................... 11
2.4.2 Root Complex DUT ............................................................................................................................. 11
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.1 Dependencies ................................................................................................................................... 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.1 Endpoint Tests ............................................................................................................................................. 17
3.1.1 Link Layer Test Descriptions............................................................................................................... 17
3.1.1.1 Test 41-20. ReservedFieldsDLLPReceive ....................................................................................... 17
3.1.1.2 Test 52-10. RetransmitO nNak ......................................................................................................... 18
3.1.1.3 Test 52-11. REPLAY_TIMER Test ................................................................................................. 19
3.1.1.4 Test 52-12. REPLAY_NUM Test .................................................................................................... 20
3.1.1.5 Test 52-20. LinkRetrainOnRetryFail ............................................................................................... 21
3.1.1.6 Test 52-100. ReplayTLPOrder ......................................................................................................... 22
3.1.1.7 Test 52-150. CorruptedCRC_DLLP ................................................................................................ 23
3.1.1.8 Test 52-160. UndefinedDLLPEncoding .......................................................................................... 24
3.1.1.9 Test 52-170. WrongSeqNumInAckDLLP ....................................................................................... 25
3.1.1.10 Test 53-20. BadLCRC ................................................................................................................. 26
3.1.1.11 Test 53-31. DuplicateTLP ............................................................................................................ 27
3.1.2 Transaction Layer Test Descriptions ................................................................................................... 28
3.1.2.1 Test 2-4. TXN_BFT_ErrorSignaling ............................................................................................... 28
3.1.2.2 Test 3-1. TXN_BFT_FlowControlIni t ............................................................................................. 29
3.1.2.3 Test 5-1. TXN_BFT_VC0TCSupport .............................................................................................. 30
3.1.2.4 Tests Requiring DUT Actions ......................................................................................................... 31
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
PCI_Express_Test_Spec_Link_Layer_1.0.pdf specification
2. Transaction Layer test scripts listed in section 2.1 of the PCI SIG
PCI_Express_Test_Spec_Transaction_Layer_1.0.pdf specification
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:
TestAnalyzer = PETracer; TestGroup = "Link Layer";
TestName = "Link 41-20 ReservedFieldsDLLPReceive"; TestCode = "Test 41-20";
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.";
RecordingOptions = "RootComplex\\link_layer.rec"; GenerationOptions = "RootComplex\\link_layer.gen"; TrainerScript = "RootComplex\\LinkLayer\\link_41-20_ReservedFieldsDLLPReceive.peg";
VerificationScript = "
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"
RootComplex\\LinkLayer\\link_41-20_ReservedFieldsDLLPReceive.pevs";
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,
TrainerScript = "RootComplex\\LinkLayer\\link_41-20_ReservedFieldsDLLPReceive.peg";
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,
VerificationScript = "Endpoint\\LinkLayer\\link_41-20_ReservedFieldsDLLPReceive.pevs";
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.
Loading...
+ 38 hidden pages