cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Debugging Versal ACAP Integrated Block for PCI Express link issues using in-built "PCIe Link Debug" feature

deepeshm
Xilinx Employee
Xilinx Employee
7 0 1,283

The Versal™ ACAP Integrated Block for PCI Express® customization provides an option to enable PCIe® Link Debug.

Enabling this option will insert a debug core inside the IP core that will be recognized by the Vivado Hardware Manager and provide PCIe specific debug information and view.

The debug view provides information relating to the current link speed, current link width, and LTSSM state transitions, which can facilitate debug of PCIe link related issues.

This is a new feature introduced for Versal devices. Similar features are available for UltraScale and UltraScale+ devices which require users to go through additional steps. These features are documented in an earlier blog entry here.

For Versal devices, Vivado has an in-built debug cockpit where the LTSSM diagram and other debug related information is displayed within the Vivado GUI framework.

This blog is an addendum to the "PCIe Link Debug Enablement" Appendix provided in (PG343). The blog provides detailed steps with screenshot for each, for better clarity and conceptual usage.

 

Design Generation:

 

Select the VCK190 Board. The design illustrated in this blog is for Vivado 2020.2.

Make sure that the board device selected in Vivado matches with the device on the board. An earlier version of the VCK190 board contains an ES1 device. 

deepeshm_0-1612450822225.png

Select 'Versal ACAP Integrated Block for PCI Express (1.0)" from the IP Catalog. To use the in-built debug feature, "PCIe-Link Debug" and "Enable Debug AXI4 Stream Interfaces" must be selected as shown below.

Link parameters can be set to Gen3x8 as shown below. If you are running into link training issue, try with a Gen1x1 configuration first.

deepeshm_2-1612450891605.png

Once the IP is generated, you will see the following in the 'Sources' window. 

deepeshm_3-1612450924328.png

To use CIPS MIO 38 as a reset source, set insert_cips to true before opening the example design as mentioned in the screen capture from (PG343) below.

This will forward the reset from the MIO pin to the  Versal ACAP Integrated Block for PCIe Express IP (PL PCIe).

Make sure that you see the mio_pl_38 pin in the CIPS connected to pcie_phy and PL PCIe. This is shown highlighted in orange in the schematics diagram shown below.

deepeshm_4-1612450950578.png

deepeshm_0-1612451015453.png
 

 

Right Click and then click on 'Open IP Example Design' to open the example design that comes with the IPRight Click and then click on 'Open IP Example Design' to open the example design that comes with the IP

The screen capture above shows an option to generate an example design that comes with the IP.
Click on 'Open IP Example Design'. This will open a new Vivado project with the file hierarchy in the sources window of the new project, as shown below.

deepeshm_3-1612451296446.png

deepeshm_4-1612451311307.png

 

deepeshm_5-1612451327849.png

 

deepeshm_6-1612451344591.png

Make sure that the REFCLK and GT LOC constraints are as shown below. These constraints are required for a VCK190 board. These constraints are generated automatically when you select a VCK190 board.

deepeshm_7-1612451367941.png

If you are using a VCK190 board with an ES1 device, you need to apply a work-around.

Set the corresponding parameters for PMC MIO 37 as shown below:

deepeshm_8-1612451422257.png

After the above change, you will need to update the IP. 

deepeshm_9-1612451438164.png

After implementing the example design, verify that the I/O ports and Clock are mapped to the pin locations and the QUADs shown below.

The below shown pin locations are required for a VCK190 board. 

deepeshm_10-1612451472614.png

PCIe Debugger

 

After generating the device image, download the generated PDI and LTX files. Straight after downloading the image, you should see the LTSSM diagram as shown below.

This is a new debug feature added for Versal devices. This feature is not currently supported for earlier device families such as UltraScale and UltraScale+. The similar debug feature available for UltraScale and UltraScale+ devices requires that you run separate Tcl files to generate the LTSSM diagram. 

deepeshm_11-1612451493547.png

 

• Green color – transitioned state during the capture window
• Orange color – last state
• Red arrow – last transition state
• Numbers beside the arrow – indicates the number of times the transition happened between the two states

There are additional debug features that you can extract from the debug cockpit. If you check PCIe Debug Core Properties, it gives the lane status and which quad number has PCIe Lane-0.

deepeshm_12-1612451524095.png

Similarly, the GT status can be read from the corresponding GT properties window. 

deepeshm_13-1612451557142.png

deepeshm_14-1612451571383.png

In the Tcl window, you can execute the report_hw_pcie command as shown below.

This will output the general PCIe status and also it provides a list of ltssm states and whether these states were visited or not during the link training process.

deepeshm_15-1612451610787.png

There are a few options that you can apply with the report_hw_pcie command. You can find the details within help as shown below:

deepeshm_16-1612451637591.png

The other available commands for PCIe are as follows:

  • get_hw_pcies
  • reset_hw_pcie
  • refresh_hw_pcie

If you select LTSSM state in the PCIe Debugger window, the corresponding ltssm bit decoding is displayed in the PCIe State Properties window.

deepeshm_19-1612451706006.png

The full list of ltssm bit decoding can be found in the product guide or you can see the list when you run the report_hw_pcie command as shown below.

deepeshm_20-1612451717396.png

In-System IBERT

 

You can easily generate an eye-diagram in the debug cockpit. You will need to first Create Links. All of the steps are shown below and are self-explanatory.

deepeshm_21-1612451742641.png

deepeshm_22-1612451765147.png

deepeshm_23-1612451781464.png

 

deepeshm_24-1612451805871.png

deepeshm_25-1612451817118.png

 

deepeshm_26-1612451827742.png

deepeshm_27-1612451838990.png

 

 

 

Tags (4)