R-Tile Avalon® Streaming Intel® FPGA IP for PCI Express* User Guide

ID 683501
Date 12/04/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

6.2.1. Using lspci Utility to Read Negotiated Link Speed

To read the negotiated link speed of the R-Tile Avalon-ST IP for PCIe from a host system, you can perform the following command:

sudo lspci -s $bdf -vvv

-s refers to "slot" and is used with the bus, device and function (bdf) number.

Figure 59.  lspci Output Using the Bus, Device and Function Number
sudo lspci -s 98:00.0 -vvv
98:00.0 Unassigned class [ff00]: Altera Corporation Device 0000 (rev 01)
        Physical Slot: 28
        Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        NUMA node: 1
        Region 0: Memory at c9400000 (32-bit, non-prefetchable) [disabled] [size=64K]
        Capabilities: [40] Power Management version 3
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold-)
                Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [70] Express (v2) Endpoint, MSI 00
                DevCap: MaxPayload 512 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
                        ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset- SlotPowerLimit 75.000W
                DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
                        RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+
                        MaxPayload 512 bytes, MaxReadReq 4096 bytes
                DevSta: CorrErr+ NonFatalErr- FatalErr- UnsupReq+ AuxPwr+ TransPend-
                LnkCap: Port #1, Speed 32GT/s, Width x16, ASPM not supported
                        ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp+
                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk-
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 32GT/s (ok), Width x16 (ok)
                        TrErr- Train- SlotClk- DLActive- BWMgmt- ABWMgmt-
                DevCap2: Completion Timeout: Range ABCD, TimeoutDis+, NROPrPrP-, LTR+
                         10BitTagComp+, 10BitTagReq+, OBFF Not Supported, ExtFmt+, EETLPPrefix+, MaxEETLPPrefixes 1
                         EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
                         FRS-, TPHComp+, ExtTPHComp-
                         AtomicOpsCap: 32bit+ 64bit+ 128bitCAS+
                DevCtl2: Completion Timeout: 260ms to 900ms, TimeoutDis-, LTR-, OBFF Disabled
                         AtomicOpsCtl: ReqEn+
                LnkCtl2: Target Link Speed: 32GT/s, EnterCompliance- SpeedDis-
                         Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                         Compliance De-emphasis: -6dB
                LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete-, EqualizationPhase1-
                         EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
        Capabilities: [100 v2] Advanced Error Reporting
                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
                CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr-
                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+
                AERCap: First Error Pointer: 00, ECRCGenCap+ ECRCGenEn- ECRCChkCap+ ECRCChkEn-
                        MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
                HeaderLog: 00000000 00000000 00000000 00000000
Figure 60.  lspci Output Using the Bus, Device and Function Number (continued)
        Capabilities: [148 v1] Virtual Channel
                Caps:   LPEVC=0 RefClk=100ns PATEntryBits=1
                Arb:    Fixed- WRR32- WRR64- WRR128-
                Ctrl:   ArbSelect=Fixed
                Status: InProgress-
                VC0:    Caps:   PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
                        Arb:    Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
                        Ctrl:   Enable+ ID=0 ArbSelect=Fixed TC/VC=ff
                        Status: NegoPending- InProgress-
        Capabilities: [174 v1] Alternative Routing-ID Interpretation (ARI)
                ARICap: MFVC- ACS-, Next Function: 0
                ARICtl: MFVC- ACS-, Function Group: 0
        Capabilities: [184 v1] Secondary PCI Express
                LnkCtl3: LnkEquIntrruptEn-, PerformEqu-
                LaneErrStat: 0
        Capabilities: [1b4 v1] Physical Layer 16.0 GT/s <?>
        Capabilities: [1e4 v1] Lane Margining at the Receiver <?>
        Capabilities: [22c v1] Extended Capability ID 0x2a
        Capabilities: [4ac v1] Data Link Feature <?>
        Capabilities: [d00 v1] Vendor Specific Information: ID=1172 Rev=0 Len=05c <?>
        Kernel modules: altera_cvp

The LnkCap under Capabilities indicates the advertised link speed and width capabilities of the device. The LnkSta under Capabilities indicates the negotiated link speed and width of the device.

You can use the following command if you do not know the bdf assigned to the device in the system topology:

sudo lspci -d $vid:$did -vvv

Figure 61.  lspci Output Using the Vendor ID
$ sudo lspci -d 1172: -v
98:00.0 Unassigned class [ff00]: Altera Corporation Device 0000 (rev 01)
        Physical Slot: 28
        Flags: fast devsel, NUMA node 1
        Memory at c9400000 (32-bit, non-prefetchable) [disabled] [size=64K]
        Capabilities: [40] Power Management version 3
        Capabilities: [70] Express Endpoint, MSI 00
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [148] Virtual Channel
        Capabilities: [174] Alternative Routing-ID Interpretation (ARI)
        Capabilities: [184] Secondary PCI Express
        Capabilities: [1b4] Physical Layer 16.0 GT/s <?>
        Capabilities: [1e4] Lane Margining at the Receiver <?>
        Capabilities: [22c] Extended Capability ID 0x2a
        Capabilities: [4ac] Data Link Feature <?>
        Capabilities: [d00] Vendor Specific Information: ID=1172 Rev=0 Len=05c <?>
        Kernel modules: altera_cvp

-d refers to "device" and is used with the Device ID that was configured during the parameterization of the R-Tile Avalon-ST IP for PCIe prior to compilation.

You can rescan the PCIe bus using the following commands. You must have root privileges to perform these commands:

To detach the device from the tree:

echo 1 > /sys/bus/pci/devices/0000\:98\:00.0/remove

To rescan the bus:

echo 1 > /sys/bus/pci/rescan