Some applications have the requirement to stress components being tested by generating as much bus traffic as possible. The LeCroy PETrainer Exerciser can be used for these high-bandwidth requirements by specifying settings that maximize traffic generation. The purpose of this Technical Brief is to define one such method that can be used to accomplish high bus traffic loads for stress testing of devices.

A simple means to provide high bandwidth traffic generation is to create back-to-back memory writes with a repeating loop sequence. This can be accomplished through a combination of a sample file of memory writes and selection of specific system parameters that ensure repeated transmission of the file with minimal delays.

Configuring the System

The system should first be configured to ACK all packets, which allows for constant new traffic and a continuing flushing of the replay buffers. From the Setup menu, choose Generation Options… and select the Integrity tab from the list at the top of this window. Click on the selection Always ACK received TLP packets (see Figure 1).

Figure 1

Next, while the Generation Options… window is still open, click the Flow Control tab to access settings to allow the maximum number of Flow Control credits for the traffic generator (the device under test should also be configured in a similar fashion). For Posted and Non-Posted Transactions, per the PCI Express Specification this is 32 header credits and 1024 data credits. For completions, the values should be set to zero (which allows for infinite credit). These values can be entered in the lower half of the window in the section Initial credits to advertise (see Figure 2). Finally, before closing this window, make sure that the selection Do not send if credit amount is insufficient is checked. This will keep the traffic generator from generating packets without credit (which would force the link to retrain). When the maximum number of credits is reached, there can be up to a 10 symbol delay in generating the next packet (after the proper credit is received).

Figure 2

With these parameters and settings established as shown in Figures 1 and 2, click OK to exit the Generation Options… window.

Generating Traffic

To generate traffic we need a script file of Posted Writes. A file called “StressMemory.peg” is included in the sample files provided with the PETrainer system. Select this file by using the Open... command from the File menu, navigate to the sample files (usually located at C:Program Files>CATC>PETracer>Sample Files), and select the StressMemory.peg file (see Figure 3). Click OK to open the file.

Figure 3

A script file window opens as shown in Figure 4.

Figure 4

A script file window opens as shown in Figure 4.

Note that the screen in Figure 4 is divided into two sections: The top section shows the traffic that will be generated in a format that will be familiar to anyone using a protocol analyzer with a CATC Trace™ display. The lower section of the display is the Generation Script Editor, which shows the script code that generates this traffic, and allows the user to make changes in the script code.

Each line in the script is numbered on the far left for reference. Scroll down in the window and you will see that the loop that generates repeated traffic is contained in lines 23 through 56. A portion of this script is shown in Figure 5, below.

Figure 5

Note that this script contains code for both memory reads and memory writes, however the memory write portion of the code has been deactivated by “comment characters” that instruct the program to ignore anything between these characters. Comments start with “/*” and end with “*/”.

To activate the memory write capability and deactivate the memory read capability, remove the “/*” from line 28, change the “*/” in line 37 to “/*” and add “*/” to line 45. This now activates the memory write code, and places the memory read code within a commented section that will be ignored by the program.

To generate back-to-back packets and maximize bus utilization during the memory write operations, the payload length should be 3, 11, 19 or 27 DWORDS. This can be changed in line 33 by changing this line to read “Length = 3”.

Also, for optimal bus loading the repeat count should be a factor of 4, but the default value provided of 100 (see line 25) already meets this criterion.

To run the script and generate the traffic, make sure the PETrainer is connected and select Start from the Generate menu.