03 29 PCI Express Basics
03 29 PCI Express Basics
03 29 PCI Express Basics
PCI Express is a serial point-to-point interconnect between two devices Implements packet based protocol for information transfer Scalable performance based on number of signal Lanes implemented on the PCI Express interconnect
Signal Wire
Link Lane
Assumes 2.5 GT/s signaling in each direction 80% BW utilized due to 8b/10b encoding overhead Aggregate bandwidth implies simultaneous traffic in both directions Peak bandwidth is higher than any bus available PCIe 2.0 PHYs may optionally support 5 GT/s signaling, thus doubling above bandwidth numbers
Packet
PCIe Device B
5
Differential Signaling
Electrical characteristics of PCI Express signal
Differential signaling
Transmitter Differential Peak voltage = 0.4 - 0.6 V Transmitter Common mode voltage = 0 - 3.6 V
DVcm D+ V Diffp
Two devices at opposite ends of a Link may support different DC common mode voltages
Root Complex
PCIe PCIe PCIe Switch Endpoint PCIe PCIe PCIe
Memory
PCIe Endpoint
PCIe
PCIe Bridge To
PCI/PCI-X
PCIe Endpoint
Legacy Endpoint
PCI/PCI-X
Legend PCI Express Device Downstream Port PCI Express Device Upstream Port
PCI-SIG Developers Conference Copyright 2007, PCI-SIG, All Rights Reserved 7
CPU Root
RCRB
Bus 0
Root Complex
PCIe PCIe PCIe Switch Endpoint PCIe PCIe PCIe
Memory
PCIe Endpoint
PCIe
PCIe Bridge To
PCI/PCI-X
PCIe Endpoint
Legacy Endpoint
Switch
PCI/PCI-X
Virtual PCI Bridge
Legend PCI Express Device Downstream Port PCI Express Device Upstream Port
PCI-SIG Developers Conference Copyright 2007, PCI-SIG, All Rights Reserved
Root Complex
DDR SDRAM
Slots
HDD
S IO
COM1 COM2
GB Ethernet
Root Complex
DDR SDRAM
InfiniBand Endpoint
Switch
Switch
Add-In
Switch
Add-In
Gb Ethernet Endpoint
COM1 COM2
S IO
IEEE 1394
Slots
10
2.
3.
4.
11
Abbreviated Name
MRd MRdLk MWr IORd IOWr CfgRd0, CfgRd1 CfgWr0, CfgWr1 Msg MsgD Cpl CplD CplLk CplDLk
12
Memory and IO requests use address routing. Completions and Configuration cycles use ID routing. Message requests have selectable routing based on a 3-bit code in the message routing sub-field of the header type field.
13
DDR SDRAM
14
DMA Transaction
Processor FSB Completer: -Step 2: Root Complex (completer) receives MRd -Step 3: Root Complex returns Completion with data (CplD) CplD Switch A CplD MRd Switch B Endpoint Endpoint Endpoint Processor
DDR SDRAM
MRd Requester: -Step 1: Endpoint (requester) initiates Memory Read Request (MRd) -Step 4: Endpoint receives CplD
15
Peer-to-Peer Transaction
Processor FSB Processor
Root Complex CplD Switch A CplD MRd Switch B Endpoint MRd Endpoint CplD Endpoint MRd MRd Switch C CplD
DDR SDRAM
MRd
Requester: -Step 1: Endpoint (requester) initiates Memory Read Request (MRd) -Step 4: Endpoint receives CplD
Copyright 2007, PCI-SIG, All Rights Reserved
Completer: -Step 2: Endpoint (completer) receives MRd -Step 3: Endpoint returns Completion with data (CplD)
16
PCI Express Device B Device Core PCI Express Core Logic Interface
RX
17
PCI Express Device B Device Core PCI Express Core Logic Interface
RX TLP Received
18
TLP Structure
Information in core section of TLP comes from Software Layer / Device Core Bit transmit direction
Data Payload
0-1024 DW
PCI Express Device B Device Core PCI Express Core Logic Interface
RX
Transaction Layer
DLLP Transmitted
20
DLLP Structure
Bit transmit direction
Start
1B
DLLP
4B
CRC
2B
End
1B
ACK / NAK Packets Flow Control Packets Power Management Packets Vendor Defined Packets
21
PCI Express Device B Device Core PCI Express Core Logic Interface
RX
Physical Layer
22
Ordered-Set Structure
COM Identifier Identifier Identifier
SKIP
4 character set: 1 COM followed by 3 SKP identifiers
Quality of Service
Processor PCI Express GFX GFX Endpoint InfiniBand Switch Out-of-Box 10Gb Ethernet Endpoint Processor
Root Complex
DDR SDRAM
InfiniBand Endpoint
Switch
Switch
Add-In
Slot
Switch
Video Camera
SCSI Endpoint
COM1 COM2
S IO
IEEE 1394
Slots
24
Transmitter Device A
TC[2:0] maps to VC0 VC0
TC[7:0]
TC/VC Mapping
Buffers
TC[7:3] maps to VC1 VC1
VC1
25
VC0 VC1
ng pi rt 0 ap o M sP VC es C/ Egr T r fo
Link
VC0 Port Arb VC1 Port Arb VC0 VC Arb VC1
VC0 0 VC1
VC0 VC1
T f C or /V Eg C re Ma ss pp P i or ng t0
Link
26
Transmitter
Receiver
Flow Control DLLP (FCx) Receiver sends Flow Control Packets (FCP) which are a type of DLLP (Data Link Layer Packet) to provide the transmitter with credits so that it can transmit packets to the receiver
27
Receiver Device B
To Transaction Layer Rx
LCRC
Tx
Rx
DLLP
ACK / NAK
Tx
Rx
Link
TLP Sequence TLP PCI-SIG Developers Conference LCRC 28
ACK returned for good reception of Request or Completion NAK returned for error reception of Request or Completion
29
Legacy endpoints are required to support MSI (or MSI-X) with 32- or 64-bit MSI capability register implementation
Native PCI Express endpoints are required to support MSI with 64-bit MSI capability register implementation
2. 3.
INTx Emulation.
PCIe -
PCIe
PCIe
31
Errors are classified as correctable and uncorrectable. Uncorrectable errors are further divided into:
Fatal uncorrectable errors Non-fatal uncorrectable errors.
32
Correctable Errors
Errors classified as correctable, degrade system performance, but recovery can occur with no loss of information
Hardware is responsible for recovery from a correctable error and no software intervention is required.
Even though hardware handles the correction, logging the frequency of correctable errors may be useful if software is monitoring link operations. An example of a correctable error is the detection of a link CRC (LCRC) error when a TLP is sent, resulting in a Data Link Layer retry event.
33
Uncorrectable Errors
Errors classified as uncorrectable impair the functionality of the interface and there is no specification mechanism to correct these errors The two subgroups are fatal and non-fatal
1. Fatal Uncorrectable Errors: Errors which render the link unreliable
First-level strategy for recovery may involve a link reset by the system Handling of fatal errors is platform-specific
2.
Non-Fatal Uncorrectable Errors: Uncorrectable errors associated with a particular transaction, while the link itself is reliable
Software may limit recovery strategy to the device(s) involved Transactions between other devices are not affected
34
Support for error logging of error type and TLP header related to error Ability to mask reporting of errors Enable/disable root reporting of errors Identify source of errors
36
37
Virtualization support
Access Control Services
38
40