SlideShare a Scribd company logo
Copyright © 2015, PCI-SIG, All Rights Reserved 1
Troubleshooting PCI Express®
Link Training and Protocol Issues
Gordon Getty
Applications Engineer
Teledyne LeCroy
PCI-SIG Developers Conference
Disclaimer
Copyright © 2015, PCI-SIG, All Rights Reserved 2
Presentation Disclaimer: All opinions, judgments, recommendations,
etc. that are presented herein are the opinions of the presenter of the
material and do not necessarily reflect the opinions of the PCI-SIG®.
PCI-SIG Developers Conference
Agenda
 PCI Express® Layered Model
 Physical Layer Examples
 Power Management Examples
 Link Training Examples
 Equalization Examples
 M-PCIe™
 Data Link Layer Examples
 Flow Control Examples
 Transaction Layer Examples
 Completion Timeout
 PCIe® Storage Examples
 Different PCIe Storage Technologies
– NVMe
– PQI/SCSIe
– AHCI/SATA Express
Copyright © 2015, PCI-SIG, All Rights Reserved 3
PCI-SIG Developers Conference
PCI EXPRESS LAYERED
MODEL
Copyright © 2015, PCI-SIG, All Rights Reserved 4
PCI-SIG Developers Conference
PCI Express Layered Model
5
Data Link
Transaction
Physical
Application
Logical Sub Block
Electrical Sub Block
Software
– Ethernet, NVMe, SOP, AHCI, SATA…
Device Configuration and Control
Data Transfer to/from Memory
Management of Packets:
Flow Control and ACK/NAK Protocol
Electrical (Analog) Signalling
Link Training
Copyright © 2015, PCI-SIG, All Rights Reserved
PCI-SIG Developers Conference
What Can I See at Each Layer?
6
Data Link
Transaction
Physical
Application
Logical Sub Block
Electrical Sub Block
It is all inside the PCI Express Payload,
could include: NVMe commands,
Ethernet Frames etc.
TLPs: Config Rd/Wr, Mem Rd/Wr,
IO Rd/Wr, Messages
DLLPs: InitFC, UpdateFC, ACK, NAK
PM_Enter_L1 etc…..
Eye Diagrams, analog waveforms
TS1, TS2 all Ordered Sets
Copyright © 2015, PCI-SIG, All Rights Reserved
PCI-SIG Developers Conference
Physical
How do Two Devices Talk?
Copyright © 2015, PCI-SIG, All Rights Reserved 7
Data Link
Data Link
Transaction
Physical
Application Application
Transaction
Logical Sub Block
Electrical Sub Block
Logical Sub Block
Electrical Sub Block
RX
RX TX TX
Root Complex End Point
PCI-SIG Developers Conference
What about M-PCIe?
 “A PCI Express Link consists of a PCIe PHY as
defined in chapter 4 whereas the M-PCIe Link
consists of M-PHY, a physical layer specification
developed by MIPI Alliance.”
Copyright © 2015, PCI-SIG, All Rights Reserved 8
PCI-SIG Developers Conference
M-PCIe
Copyright © 2015, PCI-SIG, All Rights Reserved 9
Physical
Data Link
Data Link
Transaction
Physical
Application Application
Transaction
Link Training & Management
M-PHY
Link Training & Management
M-PHY
PCI-SIG Developers Conference
M-PCIe Trace Capture
Copyright © 2015, PCI-SIG, All Rights Reserved 10
PCI-SIG Developers Conference
M-PCIe Layers
Copyright © 2015, PCI-SIG, All Rights Reserved 11
 RRAP Protocol
 Link Training
 Flow Control Initialization and Transaction Layer
PCI-SIG Developers Conference
M-PCIe Form Factor
 M-PCIe may have different form factors
 M.2
 Embedded
Copyright © 2015, PCI-SIG, All Rights Reserved 12
PCI-SIG Developers Conference
M.2 Card Technology
13
 M.2 Card Format defines:
 Socket 2: SATA or x2 PCI Express fits modules with the “B”key for SSD,
cache
 Socket 3: x4 PCIe up to 4 GB/s fits modules with the “M” key for ultimate
performance SSD or cache
 PCIe SSD with both “B” and “M” key fit into both Socket 2 and 3
hosts using only two PCIe lanes in Socket 3 hosts
 Applications
 Notebooks, Ultrabooks & Desktops
 Tablets
 Servers
 Portable Gaming Devices
 Devices that require SSDs
 Portable Mobile Devices
Copyright © 2015, PCI-SIG, All Rights Reserved
PCI-SIG Developers Conference
Which Layer?
 Transaction layer problems
mostly due to legacy carry
over (at present)
 Data link layer problems can
be the most difficult to detect
in development
 Physical layer issues for
protocol are mostly related
to the LTSSM
14
Data Link
Transaction
Physical
Application
Logical Sub Block
Electrical Sub Block
Copyright © 2015, PCI-SIG, All Rights Reserved
PCI-SIG Developers Conference
“PCIe 1.0, 2.0, 3.0???”
 What is the difference?
 These are different revisions of the specification
 They do not necessarily mean a device can support higher
speeds
 The changes go beyond the speed capability and include ECNs
and other updates
 We tend to use Gen 1, Gen 2, Gen 3 synonymously with
2.5GT/s, 5GT/s and 8GT/s
 A PCIe 1.0a or 1.1 device supports 2.5GT/s
 A PCIe 2.0 device must support 2.5GT/s and can support 5GT/s
 A PCIe 3.0 device must support 2.5GT/s and can support up to
5GT/s and 8GT/s
 How does this apply to the layered model?
Copyright © 2015, PCI-SIG, All Rights Reserved 15
PCI-SIG Developers Conference
“PCIe 1.0, 2.0, 3.0???”
 The most significant change in specification
revisions was to add higher speed capabilities
 However, there are many other ECNs that were
approved after the release of a specification that
are rolled into newer releases
 For example, there was a 2.1 revision of the
specification that included ECNs proposed after
the release of the 2.0 specification
 The PCI Express 3.1 Base Specification was
released
Copyright © 2015, PCI-SIG, All Rights Reserved 16
PCI-SIG Developers Conference
“PCIe 1.0, 2.0, 3.0???”
 There are many changes in Configuration Space
that can results in differing test results
 The way PCI-SIG tests devices is not the same
for a PCIe 1.1 device and and PCIe 3.0 device
that only supports 2.5GT/s
Copyright © 2015, PCI-SIG, All Rights Reserved 17
PCI-SIG Developers Conference
PCI-SIG Compliance Testing
 How does this fit into the layered model?
 Compliance testing is split out into sections:
 Configuration Space
– Using PCIECV tool from PCI-SIG
 System BIOS Testing
– Using PCIEPT tool from PCI-SIG
 Link and Transaction Layer
– Transaction Layer testing
– Data Link Layer testing
– Testing Link Training
 Electrical
– Link Equalization/De-emphasis testing
– Transmitter Signal Quality
– Receiver Jitter Tolerance
Copyright © 2015, PCI-SIG, All Rights Reserved 18
Data Link
Transaction
Physical
Application
Logical Sub Block
Electrical Sub Block
PCI-SIG Developers Conference
PHYSICAL LAYER
EXAMPLES
Copyright © 2015, PCI-SIG, All Rights Reserved 19
Data Link
Transaction
Physical
Application
Logical Sub Block
Electrical Sub Block
PCI-SIG Developers Conference
My Device Does Not Show
in Device Manager
 Is the Link Active?
 Firstly do a snapshot trigger
 If the link is active, you will see Update_FC packets
and SKP ordered sets
 If the link is not active, you may see TS1 or TS2
ordered sets
 If the link is unstable, you may see Update_FC and
SKP ordered sets, with occasional TS1/TS2
sequences as the link goes to Recovery
 Bottom Line: If the link is not active, there is no
way the device manager will see the device
Copyright © 2015, PCI-SIG, All Rights Reserved 20
PCI-SIG Developers Conference
Is the Device Seen by the
System?
Copyright © 2015, PCI-SIG, All Rights Reserved 21
PCI-SIG Developers Conference
First Check the Electrical
Characteristics
 Is the Signal Integrity of the
Link good on both sides
 Signal Integrity problems can
show in a whole manner of
ways, from instable links to
devices just not showing up
22
Copyright © 2015, PCI-SIG, All Rights Reserved
PCI-SIG Developers Conference
Snapshot Trigger
Copyright © 2015, PCI-SIG, All Rights Reserved 23
TS1 and TS2
Ordered Sets
would indicate that
the link is not in L0
PCI-SIG Developers Conference
PCIe Link Training From the
Specification
Copyright © 2015, PCI-SIG, All Rights Reserved 22
PCI-SIG Developers Conference
PCIe Link Training Debug
 LTSSM state changes appear as 1000’s of
ordered sets
25
Copyright © 2015, PCI-SIG, All Rights Reserved
PCI-SIG Developers Conference
Example: Link is Not Running at
Maximum Speed
Copyright © 2015, PCI-SIG, All Rights Reserved 26
Do both sides advertise
5GT/s or 8GT/s – Was a
speed change
initiated?
PCI-SIG Developers Conference
Dynamic Equalization
 The PCI Express 3.0 Specification allows for
8.0GT/s data rate
 In order to establish a link reliably at 8GT/s, the
protocol allows for dynamic equalization of the
link during the speed change in the Recovery
state
 This is a 4 phase process and happens in the
Recovery.Equalization substate
Copyright © 2015, PCI-SIG, All Rights Reserved 27
PCI-SIG Developers Conference
Recovery Substate Machine
Copyright © 2015, PCI-SIG, All Rights Reserved 28
Recovery.Equalization
Substate
PCI-SIG Developers Conference
Potential Equalization Problems
 Link does not get to 8GT/s
 Link gets to 8GT/s but is unstable
 Equalization fails because of wrong coefficients
 Does the equalization process complete?
 Protocol Analyzer is the only way to get visibility
Copyright © 2015, PCI-SIG, All Rights Reserved 29
PCI-SIG Developers Conference
How Do I Debug Equalization?
 Use the EC field as a trigger – this will help navigate the equalization
 Compress the Training Sequences helps digest the process – there
are thousands of them!
Copyright © 2015, PCI-SIG, All Rights Reserved 30
PCI-SIG Developers Conference
POWER MANAGEMENT
EXAMPLES
Copyright © 2015, PCI-SIG, All Rights Reserved 31
Data Link
Transaction
Physical
Application
Logical Sub Block
Electrical Sub Block
PCI-SIG Developers Conference
L0s
 It can be challenging to debug L0s problems, it
is important to set things up properly
 The exit latency from L0s is very short
 Give the analyzer the best chance of locking by
disabling auto detection such as speed, link width and
polarity
 Make sure the analyzer is set up properly with L0s
turned off and ensure clean captures
Copyright © 2015, PCI-SIG, All Rights Reserved 32
PCI-SIG Developers Conference
ASPM – L0s
33
Copyright © 2015, PCI-SIG, All Rights Reserved
PCI-SIG Developers Conference
L1 and L1 Substates
 L1 is a more aggressive form of power
management than L0s, and the L1 Substates
ECN takes that further
 There are 2 mechanisms to enter L1 - ASPM L1
and PCIPM L1
 Each have a different entry mechanism
 PCIPM uses a config write from the RC to the
PMSCR register on the device to initiate the transition
to L1
 ASPM L1 the downstream component indicates the
desire to enter the L1 state, and sends
PM_Active_State_Request_L1 to the root, the root
acknowledges with PM_Request_ACK DLLP
Copyright © 2015, PCI-SIG, All Rights Reserved 34
PCI-SIG Developers Conference
ASPM
 Advanced post processing shows how many
times each state was entered
35
Copyright © 2015, PCI-SIG, All Rights Reserved
PCI-SIG Developers Conference
L1 Substates
 A device indicates its support of L1 substates in
the configuration space
 L1 PM Substates is considered enabled on a
Port when any combination of the ASPM L1.1
Enable, ASPM L1.2 Enable, PCI-PM L1.1
Enable and PCI-PM L1.2 Enable bits associated
with that Port are Set
Copyright © 2015, PCI-SIG, All Rights Reserved 36
PCI-SIG Developers Conference
L1 Substates – L1.1
Copyright © 2015, PCI-SIG, All Rights Reserved 37
Upstream Port Initiated Exit from L1.1
Downstream Port Initiated Exit from L1.1
PCI-SIG Developers Conference
L1 Substates – L1.2
Copyright © 2015, PCI-SIG, All Rights Reserved 38
Upstream Port Initiated Exit from L1.2
Downstream Port Initiated Exit from L1.2
PCI-SIG Developers Conference
How Does it Look on a
Protocol Analyzer?
Copyright © 2015, PCI-SIG, All Rights Reserved 39
Link Enters Electrical Idle
CLKREQ# Deasserted
CLKREQ# Asserted
Link Enters Recovery
L1 Entry Request
PCI-SIG Developers Conference
Failed Entry To L1
Copyright © 2015, PCI-SIG, All Rights Reserved 40
PCI-SIG Developers Conference
L1 Transition Sequence
Copyright © 2015, PCI-SIG, All Rights Reserved 41
PCI-SIG Developers Conference
DATA LINK LAYER
EXAMPLES
Copyright © 2015, PCI-SIG, All Rights Reserved 42
Data Link
Transaction
Physical
Application
Logical Sub Block
Electrical Sub Block
PCI-SIG Developers Conference
Data Link Layer Issues
 Some problems are related to flow control
mechanisms
 Most DLL FC problems will not be discovered by the
current compliance tests
 Many DLL FC problems are not discovered until after
a product is released
 Problems may only show up with specific combination
of Root and End Point that is not tested during
compliance testing
 Data Link Layer problems often result in performance
issues
Copyright © 2015, PCI-SIG, All Rights Reserved 42
PCI-SIG Developers Conference 44
Detecting Credit Errors
LOOK
HERE!
Copyright © 2015, PCI-SIG, All Rights Reserved 42
PCI-SIG Developers Conference
Data Link Layer Problems
 Flow control overflow
 Why is a packet getting a NAK?
 Set up trigger on NAK and look what happened
before
Copyright © 2015, PCI-SIG, All Rights Reserved 45
PCI-SIG Developers Conference
TRANSACTION
LAYER EXAMPLES
Copyright © 2015, PCI-SIG, All Rights Reserved 46
Data Link
Transaction
Physical
Application
Logical Sub Block
Electrical Sub Block
PCI-SIG Developers Conference
Completion Timeout Example
 This is a transaction layer problem, but how would it
exhibit itself on the link?
 System may have “Blue Screened”
 Need to look for a request, and then set a timer. If a
completion is not sent before the timer expires, then possible
completion timeout condition may be occurring
 Set the trigger close to the end of the buffer, to capture what
happened before the event
 The link may be still in L0 state, but TLP traffic has
stopped
Copyright © 2015, PCI-SIG, All Rights Reserved 47
PCI-SIG Developers Conference
PCI EXPRESS
STORAGE
Copyright © 2015, PCI-SIG, All Rights Reserved 48
Data Link
Transaction
Physical
Application
Logical Sub Block
Electrical Sub Block
PCI-SIG Developers Conference
PCIe Storage Devices
 Where does this fit into the layered model
 NVMe
 PQI/SOP
 AHCI/SATA Express
 How do I debug?
 “I don’t care about PCI Express!!!”
 Compliance Programs for Storage are outside of
the scope of PCI-SIG, however PCI-SIG is
impacted by form factor changes
Copyright © 2015, PCI-SIG, All Rights Reserved 49
PCI-SIG Developers Conference
PCI Express Storage
50
Data Link
Transaction
Physical
Application
Logical Sub Block
Electrical Sub Block
Software
– Ethernet, NVMe, SOP, AHCI, SATA…
Copyright © 2015, PCI-SIG, All Rights Reserved
PCI-SIG Developers Conference
PCIe Storage Devices
 There are several different technologies emerging for
PCI Express based storage
 These take advantage of the increasing speeds of Flash
Memory storage and the next generations of NAND
technology
 PCI Express provides a solid, scalable, tested platform
to take advantage of these higher speeds
 The principle of storage over PCI Express is the same
for all technologies but the software and implementations
are very different
 These technologies have history in legacy storage
technologies
Copyright © 2015, PCI-SIG, All Rights Reserved 51
PCI-SIG Developers Conference
How Do I Debug These Products?
 It may take a different way of thinking to use a
PCI Express analyzer for debugging a storage
problem
 The storage protocols reside within the PCI
Express payload data, and requires further
decoding
 It is possible that the only interface to these
devices is PCI Express
 New form factors are emerging also, SFF8639,
M.2 for example
Copyright © 2015, PCI-SIG, All Rights Reserved 52
PCI-SIG Developers Conference
PCIe Storage
 The underlying PCIe traffic has an impact on
performance of the Storage layers
 Queue balancing
 Possibility of multiple devices over one link
 Devices behind a switch
 Virtualized devices
 Built in scalability of technologies such as NVMe
Copyright © 2015, PCI-SIG, All Rights Reserved 53
PCI-SIG Developers Conference
NVMe Example
Copyright © 2015, PCI-SIG, All Rights Reserved 54
NVMe Commands on a
PCI Express Link
PCI-SIG Developers Conference
NVMe Example
Copyright © 2015, PCI-SIG, All Rights Reserved 55
The NVMe Commands
are actually PCI Express
Memory Reads and
Writes to specific
addresses
PCI-SIG Developers Conference
NVMe Example - Continued
Copyright © 2015, PCI-SIG, All Rights Reserved 56
PCI-SIG Developers Conference
Serial ATA Example
Copyright © 2015, PCI-SIG, All Rights Reserved 57
SATA Commands on a
PCI Express Link
PCI-SIG Developers Conference
Serial ATA Example
Copyright © 2015, PCI-SIG, All Rights Reserved 58
The ATA Commands are
actually PCI Express
Memory Reads and
Writes to specific
addresses
PCI-SIG Developers Conference
PCI Express Storage
 The packets or frames are all embedded into the
payload of the PCI Express transactions
 The storage technologies are typically quite
simple at the hardware level and leave software
to carry out most of the work
 A PCI Express analyzer with additional decodes
for storage protocols is required for visibility on
the bus
 Bear in mind that storage devices may or may
not reside on standard PCI Express (CEM) form
factors
Copyright © 2015, PCI-SIG, All Rights Reserved 59
PCI-SIG Developers Conference
Summary and Conclusions
 The easiest way to debug PCI Express problems is to
determine which layer is showing the problem
 Using the correct tool will make the job much easier
 Use a “Snapshot” trigger first of all to assess what is
going on
 Ensure lower level (electrical) layers are compliant and
within spec before debugging protocol problems
 Remember the PCI-SIG compliance testing is not a
substitute for thorough validation, it is a useful sanity
check
60
Copyright © 2015, PCI-SIG, All Rights Reserved
PCI-SIG Developers Conference Copyright © 2015, PCI-SIG, All Rights Reserved 61
Thank you for attending the
PCI-SIG Developers Conference Israel
2015
For more information please go to
www.pcisig.com

More Related Content

PDF
Thaker q3 2008
PDF
PCI_Express_Basics_Background.pdf
PPT
INTRODUCTION_TO_PCIE_Express
PPT
Thaker q3 2008
PDF
03_PCIe_3.0_PHY_Electrical_Layer_Requirements_Final[1].pdf
PDF
slide explain basic of pcie protocol should be covered
PPTX
PCIe Gen 3.0 Presentation @ 4th FPGA Camp
PPTX
Point to point interconnect
Thaker q3 2008
PCI_Express_Basics_Background.pdf
INTRODUCTION_TO_PCIE_Express
Thaker q3 2008
03_PCIe_3.0_PHY_Electrical_Layer_Requirements_Final[1].pdf
slide explain basic of pcie protocol should be covered
PCIe Gen 3.0 Presentation @ 4th FPGA Camp
Point to point interconnect

Similar to Troubleshooting_PCI_Express_Link_Training_and_Protocol_Issues_FROZEN.pdf (20)

PDF
Pci express modi
PDF
Verification Strategy for PCI-Express
PPSX
13. peripheral component interconnect (pci)
PDF
Introduction to VIP with PCI Express Technology
PPTX
Difference between PCI PCI-X PCIe
PDF
Pci Express Base Specification Revision 40 Version 10 Unknown
PDF
PCIe BUS: A State-of-the-Art-Review
ODP
Io Architecture
PPTX
PCI DSS and Other Related Updates
PPTX
Will PCIe 5.0 become ubiquitous in tomorrow's SoCs?
PPTX
03_03_Implementing_PCIe_ATS_in_ARM-based_SoCs_Final
PDF
Pcie basic
PDF
Pass DSDSDSDSDSDSDSDSSDSSDSDSSDDSDSDSDS .pdf
PPTX
Gda ipsoc blr_hic_final
PPTX
Bus Interfacing with Intel Microprocessors Based Systems
PPTX
The Evolution of PCI Express®
DOCX
Peripheral Component Interconnect.docx
PDF
Pci Local Bus Specification Revision 30 Change Bar Pci
PDF
Next Generation Storage Networking for Next Generation Data Centers
PDF
A PCIe Congestion-Aware Performance Model for Densely Populated Accelerator S...
Pci express modi
Verification Strategy for PCI-Express
13. peripheral component interconnect (pci)
Introduction to VIP with PCI Express Technology
Difference between PCI PCI-X PCIe
Pci Express Base Specification Revision 40 Version 10 Unknown
PCIe BUS: A State-of-the-Art-Review
Io Architecture
PCI DSS and Other Related Updates
Will PCIe 5.0 become ubiquitous in tomorrow's SoCs?
03_03_Implementing_PCIe_ATS_in_ARM-based_SoCs_Final
Pcie basic
Pass DSDSDSDSDSDSDSDSSDSSDSDSSDDSDSDSDS .pdf
Gda ipsoc blr_hic_final
Bus Interfacing with Intel Microprocessors Based Systems
The Evolution of PCI Express®
Peripheral Component Interconnect.docx
Pci Local Bus Specification Revision 30 Change Bar Pci
Next Generation Storage Networking for Next Generation Data Centers
A PCIe Congestion-Aware Performance Model for Densely Populated Accelerator S...
Ad

Recently uploaded (20)

PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Machine learning based COVID-19 study performance prediction
PDF
KodekX | Application Modernization Development
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Electronic commerce courselecture one. Pdf
PPTX
Big Data Technologies - Introduction.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Unlocking AI with Model Context Protocol (MCP)
Advanced methodologies resolving dimensionality complications for autism neur...
Digital-Transformation-Roadmap-for-Companies.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Chapter 3 Spatial Domain Image Processing.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Network Security Unit 5.pdf for BCA BBA.
Machine learning based COVID-19 study performance prediction
KodekX | Application Modernization Development
Encapsulation_ Review paper, used for researhc scholars
NewMind AI Monthly Chronicles - July 2025
Reach Out and Touch Someone: Haptics and Empathic Computing
NewMind AI Weekly Chronicles - August'25 Week I
Review of recent advances in non-invasive hemoglobin estimation
20250228 LYD VKU AI Blended-Learning.pptx
Electronic commerce courselecture one. Pdf
Big Data Technologies - Introduction.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Unlocking AI with Model Context Protocol (MCP)
Ad

Troubleshooting_PCI_Express_Link_Training_and_Protocol_Issues_FROZEN.pdf

  • 1. Copyright © 2015, PCI-SIG, All Rights Reserved 1 Troubleshooting PCI Express® Link Training and Protocol Issues Gordon Getty Applications Engineer Teledyne LeCroy
  • 2. PCI-SIG Developers Conference Disclaimer Copyright © 2015, PCI-SIG, All Rights Reserved 2 Presentation Disclaimer: All opinions, judgments, recommendations, etc. that are presented herein are the opinions of the presenter of the material and do not necessarily reflect the opinions of the PCI-SIG®.
  • 3. PCI-SIG Developers Conference Agenda  PCI Express® Layered Model  Physical Layer Examples  Power Management Examples  Link Training Examples  Equalization Examples  M-PCIe™  Data Link Layer Examples  Flow Control Examples  Transaction Layer Examples  Completion Timeout  PCIe® Storage Examples  Different PCIe Storage Technologies – NVMe – PQI/SCSIe – AHCI/SATA Express Copyright © 2015, PCI-SIG, All Rights Reserved 3
  • 4. PCI-SIG Developers Conference PCI EXPRESS LAYERED MODEL Copyright © 2015, PCI-SIG, All Rights Reserved 4
  • 5. PCI-SIG Developers Conference PCI Express Layered Model 5 Data Link Transaction Physical Application Logical Sub Block Electrical Sub Block Software – Ethernet, NVMe, SOP, AHCI, SATA… Device Configuration and Control Data Transfer to/from Memory Management of Packets: Flow Control and ACK/NAK Protocol Electrical (Analog) Signalling Link Training Copyright © 2015, PCI-SIG, All Rights Reserved
  • 6. PCI-SIG Developers Conference What Can I See at Each Layer? 6 Data Link Transaction Physical Application Logical Sub Block Electrical Sub Block It is all inside the PCI Express Payload, could include: NVMe commands, Ethernet Frames etc. TLPs: Config Rd/Wr, Mem Rd/Wr, IO Rd/Wr, Messages DLLPs: InitFC, UpdateFC, ACK, NAK PM_Enter_L1 etc….. Eye Diagrams, analog waveforms TS1, TS2 all Ordered Sets Copyright © 2015, PCI-SIG, All Rights Reserved
  • 7. PCI-SIG Developers Conference Physical How do Two Devices Talk? Copyright © 2015, PCI-SIG, All Rights Reserved 7 Data Link Data Link Transaction Physical Application Application Transaction Logical Sub Block Electrical Sub Block Logical Sub Block Electrical Sub Block RX RX TX TX Root Complex End Point
  • 8. PCI-SIG Developers Conference What about M-PCIe?  “A PCI Express Link consists of a PCIe PHY as defined in chapter 4 whereas the M-PCIe Link consists of M-PHY, a physical layer specification developed by MIPI Alliance.” Copyright © 2015, PCI-SIG, All Rights Reserved 8
  • 9. PCI-SIG Developers Conference M-PCIe Copyright © 2015, PCI-SIG, All Rights Reserved 9 Physical Data Link Data Link Transaction Physical Application Application Transaction Link Training & Management M-PHY Link Training & Management M-PHY
  • 10. PCI-SIG Developers Conference M-PCIe Trace Capture Copyright © 2015, PCI-SIG, All Rights Reserved 10
  • 11. PCI-SIG Developers Conference M-PCIe Layers Copyright © 2015, PCI-SIG, All Rights Reserved 11  RRAP Protocol  Link Training  Flow Control Initialization and Transaction Layer
  • 12. PCI-SIG Developers Conference M-PCIe Form Factor  M-PCIe may have different form factors  M.2  Embedded Copyright © 2015, PCI-SIG, All Rights Reserved 12
  • 13. PCI-SIG Developers Conference M.2 Card Technology 13  M.2 Card Format defines:  Socket 2: SATA or x2 PCI Express fits modules with the “B”key for SSD, cache  Socket 3: x4 PCIe up to 4 GB/s fits modules with the “M” key for ultimate performance SSD or cache  PCIe SSD with both “B” and “M” key fit into both Socket 2 and 3 hosts using only two PCIe lanes in Socket 3 hosts  Applications  Notebooks, Ultrabooks & Desktops  Tablets  Servers  Portable Gaming Devices  Devices that require SSDs  Portable Mobile Devices Copyright © 2015, PCI-SIG, All Rights Reserved
  • 14. PCI-SIG Developers Conference Which Layer?  Transaction layer problems mostly due to legacy carry over (at present)  Data link layer problems can be the most difficult to detect in development  Physical layer issues for protocol are mostly related to the LTSSM 14 Data Link Transaction Physical Application Logical Sub Block Electrical Sub Block Copyright © 2015, PCI-SIG, All Rights Reserved
  • 15. PCI-SIG Developers Conference “PCIe 1.0, 2.0, 3.0???”  What is the difference?  These are different revisions of the specification  They do not necessarily mean a device can support higher speeds  The changes go beyond the speed capability and include ECNs and other updates  We tend to use Gen 1, Gen 2, Gen 3 synonymously with 2.5GT/s, 5GT/s and 8GT/s  A PCIe 1.0a or 1.1 device supports 2.5GT/s  A PCIe 2.0 device must support 2.5GT/s and can support 5GT/s  A PCIe 3.0 device must support 2.5GT/s and can support up to 5GT/s and 8GT/s  How does this apply to the layered model? Copyright © 2015, PCI-SIG, All Rights Reserved 15
  • 16. PCI-SIG Developers Conference “PCIe 1.0, 2.0, 3.0???”  The most significant change in specification revisions was to add higher speed capabilities  However, there are many other ECNs that were approved after the release of a specification that are rolled into newer releases  For example, there was a 2.1 revision of the specification that included ECNs proposed after the release of the 2.0 specification  The PCI Express 3.1 Base Specification was released Copyright © 2015, PCI-SIG, All Rights Reserved 16
  • 17. PCI-SIG Developers Conference “PCIe 1.0, 2.0, 3.0???”  There are many changes in Configuration Space that can results in differing test results  The way PCI-SIG tests devices is not the same for a PCIe 1.1 device and and PCIe 3.0 device that only supports 2.5GT/s Copyright © 2015, PCI-SIG, All Rights Reserved 17
  • 18. PCI-SIG Developers Conference PCI-SIG Compliance Testing  How does this fit into the layered model?  Compliance testing is split out into sections:  Configuration Space – Using PCIECV tool from PCI-SIG  System BIOS Testing – Using PCIEPT tool from PCI-SIG  Link and Transaction Layer – Transaction Layer testing – Data Link Layer testing – Testing Link Training  Electrical – Link Equalization/De-emphasis testing – Transmitter Signal Quality – Receiver Jitter Tolerance Copyright © 2015, PCI-SIG, All Rights Reserved 18 Data Link Transaction Physical Application Logical Sub Block Electrical Sub Block
  • 19. PCI-SIG Developers Conference PHYSICAL LAYER EXAMPLES Copyright © 2015, PCI-SIG, All Rights Reserved 19 Data Link Transaction Physical Application Logical Sub Block Electrical Sub Block
  • 20. PCI-SIG Developers Conference My Device Does Not Show in Device Manager  Is the Link Active?  Firstly do a snapshot trigger  If the link is active, you will see Update_FC packets and SKP ordered sets  If the link is not active, you may see TS1 or TS2 ordered sets  If the link is unstable, you may see Update_FC and SKP ordered sets, with occasional TS1/TS2 sequences as the link goes to Recovery  Bottom Line: If the link is not active, there is no way the device manager will see the device Copyright © 2015, PCI-SIG, All Rights Reserved 20
  • 21. PCI-SIG Developers Conference Is the Device Seen by the System? Copyright © 2015, PCI-SIG, All Rights Reserved 21
  • 22. PCI-SIG Developers Conference First Check the Electrical Characteristics  Is the Signal Integrity of the Link good on both sides  Signal Integrity problems can show in a whole manner of ways, from instable links to devices just not showing up 22 Copyright © 2015, PCI-SIG, All Rights Reserved
  • 23. PCI-SIG Developers Conference Snapshot Trigger Copyright © 2015, PCI-SIG, All Rights Reserved 23 TS1 and TS2 Ordered Sets would indicate that the link is not in L0
  • 24. PCI-SIG Developers Conference PCIe Link Training From the Specification Copyright © 2015, PCI-SIG, All Rights Reserved 22
  • 25. PCI-SIG Developers Conference PCIe Link Training Debug  LTSSM state changes appear as 1000’s of ordered sets 25 Copyright © 2015, PCI-SIG, All Rights Reserved
  • 26. PCI-SIG Developers Conference Example: Link is Not Running at Maximum Speed Copyright © 2015, PCI-SIG, All Rights Reserved 26 Do both sides advertise 5GT/s or 8GT/s – Was a speed change initiated?
  • 27. PCI-SIG Developers Conference Dynamic Equalization  The PCI Express 3.0 Specification allows for 8.0GT/s data rate  In order to establish a link reliably at 8GT/s, the protocol allows for dynamic equalization of the link during the speed change in the Recovery state  This is a 4 phase process and happens in the Recovery.Equalization substate Copyright © 2015, PCI-SIG, All Rights Reserved 27
  • 28. PCI-SIG Developers Conference Recovery Substate Machine Copyright © 2015, PCI-SIG, All Rights Reserved 28 Recovery.Equalization Substate
  • 29. PCI-SIG Developers Conference Potential Equalization Problems  Link does not get to 8GT/s  Link gets to 8GT/s but is unstable  Equalization fails because of wrong coefficients  Does the equalization process complete?  Protocol Analyzer is the only way to get visibility Copyright © 2015, PCI-SIG, All Rights Reserved 29
  • 30. PCI-SIG Developers Conference How Do I Debug Equalization?  Use the EC field as a trigger – this will help navigate the equalization  Compress the Training Sequences helps digest the process – there are thousands of them! Copyright © 2015, PCI-SIG, All Rights Reserved 30
  • 31. PCI-SIG Developers Conference POWER MANAGEMENT EXAMPLES Copyright © 2015, PCI-SIG, All Rights Reserved 31 Data Link Transaction Physical Application Logical Sub Block Electrical Sub Block
  • 32. PCI-SIG Developers Conference L0s  It can be challenging to debug L0s problems, it is important to set things up properly  The exit latency from L0s is very short  Give the analyzer the best chance of locking by disabling auto detection such as speed, link width and polarity  Make sure the analyzer is set up properly with L0s turned off and ensure clean captures Copyright © 2015, PCI-SIG, All Rights Reserved 32
  • 33. PCI-SIG Developers Conference ASPM – L0s 33 Copyright © 2015, PCI-SIG, All Rights Reserved
  • 34. PCI-SIG Developers Conference L1 and L1 Substates  L1 is a more aggressive form of power management than L0s, and the L1 Substates ECN takes that further  There are 2 mechanisms to enter L1 - ASPM L1 and PCIPM L1  Each have a different entry mechanism  PCIPM uses a config write from the RC to the PMSCR register on the device to initiate the transition to L1  ASPM L1 the downstream component indicates the desire to enter the L1 state, and sends PM_Active_State_Request_L1 to the root, the root acknowledges with PM_Request_ACK DLLP Copyright © 2015, PCI-SIG, All Rights Reserved 34
  • 35. PCI-SIG Developers Conference ASPM  Advanced post processing shows how many times each state was entered 35 Copyright © 2015, PCI-SIG, All Rights Reserved
  • 36. PCI-SIG Developers Conference L1 Substates  A device indicates its support of L1 substates in the configuration space  L1 PM Substates is considered enabled on a Port when any combination of the ASPM L1.1 Enable, ASPM L1.2 Enable, PCI-PM L1.1 Enable and PCI-PM L1.2 Enable bits associated with that Port are Set Copyright © 2015, PCI-SIG, All Rights Reserved 36
  • 37. PCI-SIG Developers Conference L1 Substates – L1.1 Copyright © 2015, PCI-SIG, All Rights Reserved 37 Upstream Port Initiated Exit from L1.1 Downstream Port Initiated Exit from L1.1
  • 38. PCI-SIG Developers Conference L1 Substates – L1.2 Copyright © 2015, PCI-SIG, All Rights Reserved 38 Upstream Port Initiated Exit from L1.2 Downstream Port Initiated Exit from L1.2
  • 39. PCI-SIG Developers Conference How Does it Look on a Protocol Analyzer? Copyright © 2015, PCI-SIG, All Rights Reserved 39 Link Enters Electrical Idle CLKREQ# Deasserted CLKREQ# Asserted Link Enters Recovery L1 Entry Request
  • 40. PCI-SIG Developers Conference Failed Entry To L1 Copyright © 2015, PCI-SIG, All Rights Reserved 40
  • 41. PCI-SIG Developers Conference L1 Transition Sequence Copyright © 2015, PCI-SIG, All Rights Reserved 41
  • 42. PCI-SIG Developers Conference DATA LINK LAYER EXAMPLES Copyright © 2015, PCI-SIG, All Rights Reserved 42 Data Link Transaction Physical Application Logical Sub Block Electrical Sub Block
  • 43. PCI-SIG Developers Conference Data Link Layer Issues  Some problems are related to flow control mechanisms  Most DLL FC problems will not be discovered by the current compliance tests  Many DLL FC problems are not discovered until after a product is released  Problems may only show up with specific combination of Root and End Point that is not tested during compliance testing  Data Link Layer problems often result in performance issues Copyright © 2015, PCI-SIG, All Rights Reserved 42
  • 44. PCI-SIG Developers Conference 44 Detecting Credit Errors LOOK HERE! Copyright © 2015, PCI-SIG, All Rights Reserved 42
  • 45. PCI-SIG Developers Conference Data Link Layer Problems  Flow control overflow  Why is a packet getting a NAK?  Set up trigger on NAK and look what happened before Copyright © 2015, PCI-SIG, All Rights Reserved 45
  • 46. PCI-SIG Developers Conference TRANSACTION LAYER EXAMPLES Copyright © 2015, PCI-SIG, All Rights Reserved 46 Data Link Transaction Physical Application Logical Sub Block Electrical Sub Block
  • 47. PCI-SIG Developers Conference Completion Timeout Example  This is a transaction layer problem, but how would it exhibit itself on the link?  System may have “Blue Screened”  Need to look for a request, and then set a timer. If a completion is not sent before the timer expires, then possible completion timeout condition may be occurring  Set the trigger close to the end of the buffer, to capture what happened before the event  The link may be still in L0 state, but TLP traffic has stopped Copyright © 2015, PCI-SIG, All Rights Reserved 47
  • 48. PCI-SIG Developers Conference PCI EXPRESS STORAGE Copyright © 2015, PCI-SIG, All Rights Reserved 48 Data Link Transaction Physical Application Logical Sub Block Electrical Sub Block
  • 49. PCI-SIG Developers Conference PCIe Storage Devices  Where does this fit into the layered model  NVMe  PQI/SOP  AHCI/SATA Express  How do I debug?  “I don’t care about PCI Express!!!”  Compliance Programs for Storage are outside of the scope of PCI-SIG, however PCI-SIG is impacted by form factor changes Copyright © 2015, PCI-SIG, All Rights Reserved 49
  • 50. PCI-SIG Developers Conference PCI Express Storage 50 Data Link Transaction Physical Application Logical Sub Block Electrical Sub Block Software – Ethernet, NVMe, SOP, AHCI, SATA… Copyright © 2015, PCI-SIG, All Rights Reserved
  • 51. PCI-SIG Developers Conference PCIe Storage Devices  There are several different technologies emerging for PCI Express based storage  These take advantage of the increasing speeds of Flash Memory storage and the next generations of NAND technology  PCI Express provides a solid, scalable, tested platform to take advantage of these higher speeds  The principle of storage over PCI Express is the same for all technologies but the software and implementations are very different  These technologies have history in legacy storage technologies Copyright © 2015, PCI-SIG, All Rights Reserved 51
  • 52. PCI-SIG Developers Conference How Do I Debug These Products?  It may take a different way of thinking to use a PCI Express analyzer for debugging a storage problem  The storage protocols reside within the PCI Express payload data, and requires further decoding  It is possible that the only interface to these devices is PCI Express  New form factors are emerging also, SFF8639, M.2 for example Copyright © 2015, PCI-SIG, All Rights Reserved 52
  • 53. PCI-SIG Developers Conference PCIe Storage  The underlying PCIe traffic has an impact on performance of the Storage layers  Queue balancing  Possibility of multiple devices over one link  Devices behind a switch  Virtualized devices  Built in scalability of technologies such as NVMe Copyright © 2015, PCI-SIG, All Rights Reserved 53
  • 54. PCI-SIG Developers Conference NVMe Example Copyright © 2015, PCI-SIG, All Rights Reserved 54 NVMe Commands on a PCI Express Link
  • 55. PCI-SIG Developers Conference NVMe Example Copyright © 2015, PCI-SIG, All Rights Reserved 55 The NVMe Commands are actually PCI Express Memory Reads and Writes to specific addresses
  • 56. PCI-SIG Developers Conference NVMe Example - Continued Copyright © 2015, PCI-SIG, All Rights Reserved 56
  • 57. PCI-SIG Developers Conference Serial ATA Example Copyright © 2015, PCI-SIG, All Rights Reserved 57 SATA Commands on a PCI Express Link
  • 58. PCI-SIG Developers Conference Serial ATA Example Copyright © 2015, PCI-SIG, All Rights Reserved 58 The ATA Commands are actually PCI Express Memory Reads and Writes to specific addresses
  • 59. PCI-SIG Developers Conference PCI Express Storage  The packets or frames are all embedded into the payload of the PCI Express transactions  The storage technologies are typically quite simple at the hardware level and leave software to carry out most of the work  A PCI Express analyzer with additional decodes for storage protocols is required for visibility on the bus  Bear in mind that storage devices may or may not reside on standard PCI Express (CEM) form factors Copyright © 2015, PCI-SIG, All Rights Reserved 59
  • 60. PCI-SIG Developers Conference Summary and Conclusions  The easiest way to debug PCI Express problems is to determine which layer is showing the problem  Using the correct tool will make the job much easier  Use a “Snapshot” trigger first of all to assess what is going on  Ensure lower level (electrical) layers are compliant and within spec before debugging protocol problems  Remember the PCI-SIG compliance testing is not a substitute for thorough validation, it is a useful sanity check 60 Copyright © 2015, PCI-SIG, All Rights Reserved
  • 61. PCI-SIG Developers Conference Copyright © 2015, PCI-SIG, All Rights Reserved 61 Thank you for attending the PCI-SIG Developers Conference Israel 2015 For more information please go to www.pcisig.com