PCI Express is a packet-switched, point-to-point serial link. Each lane is two AC-coupled differential pairs, one per direction, running NRZ at 16 GT/s in Gen 4. Bytes are striped across lanes, wrapped in 128b/130b blocks and scrambled; the receiver recovers its own clock and needs no forwarded clock per lane, only a shared 100 MHz reference. This page follows one concrete system, a CPU root port driving an M.2 NVMe SSD on an x4 link, through the signals, the power-up sequence, link training and equalization, the board constraints, and a 4 KB read at the level of individual transaction-layer packets.
Specifications: PCI Express Base Specification 4.0 [1], CEM 4.0 [2], PCI-SIG M.2 [3], NVM Express Base [4].
New to PCIe? Start with PCI Express: how it works and why it exists.
| Gen 1 | Gen 2 | Gen 3 | Gen 4 | Gen 5 | |
|---|---|---|---|---|---|
| Transfer rate per lane | 2.5 GT/s | 5.0 GT/s | 8.0 GT/s | 16.0 GT/s | 32.0 GT/s |
| Encoding | 8b/10b | 8b/10b | 128b/130b | 128b/130b | 128b/130b |
| Data per lane, per direction | 250 MB/s | 500 MB/s | 985 MB/s | 1.97 GB/s | 3.94 GB/s |
| x4 link, per direction | 1.0 GB/s | 2.0 GB/s | 3.94 GB/s | 7.88 GB/s | 15.75 GB/s |
| Unit interval (UI) | 400 ps | 200 ps | 125 ps | 62.5 ps | 31.25 ps |
| Nyquist frequency | 1.25 GHz | 2.5 GHz | 4 GHz | 8 GHz | 16 GHz |
| Channel loss budget (approx., ball to ball) | — | — | ≈ 22 dB | ≈ 28 dB | ≈ 36 dB |
| Refclk jitter limit (common clock) | — | 3.1 ps | 1.0 ps | 0.5 ps RMS | 0.15 ps RMS |
The OSI model splits any communication system into seven layers, each solving one problem and handing a unit of data to the layer below. PCIe defines only three layers of its own (Transaction, Data Link, Physical), and NVMe plus the operating system sit above them. The mapping below is the conventional one; PCIe was not written against OSI, so the edges are approximate. Click a layer to see what it does in this system and where this page covers it. Every section below carries the same layer tags.
| Signal | Direction | Electrical | Function | What to get right |
|---|---|---|---|---|
| TX0±…TX3± (host) | Host → SSD | Differential NRZ, 16 GT/s, ~0.8–1.2 Vpp,diff launch, 3-tap FIR | Downstream data lanes | 85 Ω diff, AC cap 176–265 nF at the transmitter side, intra-pair skew, insertion loss |
| RX0±…RX3± (host) | SSD → Host | Same, received with CTLE + DFE + CDR | Upstream data lanes | No caps on the host RX side (they are on the SSD), keep away from TX pairs (NEXT) |
| REFCLK± | Host → SSD | 100 MHz HCSL (or LP-HCSL), ±300 ppm, SSC down-spread ≤ 0.5 % at 30–33 kHz | Reference for both PLLs; CDR tracks data | Jitter ≤ 0.5 ps RMS (Gen 4 common clock), 85/100 Ω, stable ≥ 100 µs before PERST# releases |
| PERST# | Host → SSD | Single-ended, 3.3 V (1.8 V on newer M.2 hosts) | Fundamental reset of the device | Released ≥ 100 ms after 3.3 V is stable and ≥ 100 µs after REFCLK is stable |
| CLKREQ# | Bidirectional | Open-drain, pulled up on host | Device requests REFCLK; deasserts in L1 substates so the host can stop the clock | Hold low (or route to a clock generator OE) if L1.2 is not used |
| PEWAKE# | SSD → Host | Open-drain | Wake request from D3cold | Pull-up on the always-on rail |
| SMB_CLK / SMB_DATA | Bidirectional | SMBus, open-drain | Out-of-band management (NVMe-MI, thermal) | Optional on M.2; level of pull-ups |
| 3.3 V, GND | Host → SSD | 3.3 V ± 5 %, several pins | All SSD power; PMIC makes core and NAND rails | Gen 4 SSDs peak 7–9 W; size for transient, keep GND pins tied solidly (they are also the lanes' return) |
| SUSCLK | Host → SSD | 32.768 kHz, 3.3 V | Low-power timer clock | Optional |
The physical layer does not see packets as a byte stream on one wire. It takes the framed TLP, deals the bytes round-robin across the lanes (byte 0 to lane 0, byte 1 to lane 1, …), and on each lane packs 16 bytes into a 128-bit block preceded by a 2-bit sync header: 10b marks a data block, 01b an ordered-set block (training sets, SKP, electrical idle). The 128 data bits are scrambled with a 23-bit LFSR (x23+x21+x16+x8+x5+x2+1) so the line has frequent transitions and a flat spectrum; the sync headers are not scrambled, which guarantees at least one transition every 130 bits for the CDR.
At Gen 3 and later the TLP is framed by a 4-byte STP token (TLP length, a framing CRC and the 12-bit sequence number) and closed by a 4-byte LCRC. Pick a TLP from the NVMe read below to see how it lands on the four lanes.
Signaling is how a symbol becomes a voltage on the wire (how many levels, single-ended or differential, what driver). Encoding is how data bits are turned into the symbols that are sent, to guarantee transitions for clock recovery, keep the line DC-balanced through the AC capacitors, and mark block and packet boundaries. PCIe has changed its encoding twice and its signaling once.
| Where | Signaling (electrical) | Encoding / coding | Why it was chosen |
|---|---|---|---|
| Data lanes, Gen 1–2 | NRZ (PAM2), differential, AC-coupled CML / SST driver | 8b/10b + scrambling | DC balance and a transition at least every 5 bits, at a 20 % bandwidth cost |
| Data lanes, Gen 3–5 (Gen 4 here) | NRZ (PAM2), 2 levels, 1 bit per UI, 3-tap TX FIR | 128b/130b: 2-bit sync header + 128 scrambled bits; 23-bit LFSR scrambler; framing tokens (STP, SDP, END, EDB) | 1.5 % overhead instead of 20 %; the scrambler supplies transitions and spectral spreading, the sync header bounds the run length and marks blocks |
| Data lanes, Gen 6–7 (for contrast) | PAM4: 4 levels, 2 bits per UI (32 GBd for 64 GT/s), Gray-coded, optional precoding | FLIT mode (1b/1b): fixed 256-byte FLITs with lightweight FEC and CRC; no sync headers | Doubles the data rate without doubling the Nyquist frequency; PAM4's smaller eyes raise the raw BER, which FEC corrects |
| Training and control | Same lanes | Ordered sets: TS1, TS2, SKP, EIOS, EIEOS (a low-frequency pattern that wakes receivers from electrical idle) | Link training, clock compensation, power-state entry and exit |
| Reference clock | 100 MHz HCSL (≈ 0.7 V single-ended swing, current-mode, 50 Ω to ground), SSC down-spread | None: a clock | Common timing for both PLLs; SSC spreads EMI |
| Receiver detect | Common-mode step on TX, charge-time sensing | None | Find which lanes have a partner before any data is sent |
| Sideband (PERST#, CLKREQ#, PEWAKE#, SMBus) | LVCMOS 3.3 V or 1.8 V; open-drain for CLKREQ#, PEWAKE#, SMBus | Static levels; SMBus is I²C-like | Slow control that must work before the link exists |
At 8 GHz Nyquist a PCB trace loses roughly 0.6–1.2 dB per inch, so a long run plus vias, connector and packages approaches 28 dB: the received signal is a small, smeared copy of what was sent. Both ends fight this. The transmitter uses a 3-tap FIR: a pre-cursor tap (preshoot) and a post-cursor tap (de-emphasis) that lower the steady-state level relative to transitions, a high-pass pre-distortion. The receiver adds a CTLE (continuous-time linear equalizer, analog peaking) and a DFE (decision-feedback equalizer that subtracts the post-cursor ISI of already decided bits).
During link training the receiver asks the far transmitter to try presets P0–P10 and fine coefficient values and keeps the best one. The simulation below runs a PRBS7 pattern through the chosen preset and a lossy channel and folds the result into an eye. It has no receiver equalization, so it shows how much the transmitter alone can do.
| Preset | P4 | P1 | P3 | P2 | P0 | P5 | P6 | P9 | P8 | P7 |
|---|---|---|---|---|---|---|---|---|---|---|
| Preshoot (dB) | 0 | 0 | 0 | 0 | 0 | 1.9 | 2.5 | 3.5 | 3.5 | 3.5 |
| De-emphasis (dB) | 0 | −3.5 | −2.5 | −4.4 | −6.0 | 0 | 0 | 0 | −3.5 | −6.0 |
| c−1, c+1 | 0, 0 | 0, −0.167 | 0, −0.125 | 0, −0.200 | 0, −0.250 | −0.100, 0 | −0.125, 0 | −0.166, 0 | −0.125, −0.125 | −0.100, −0.200 |
The Link Training and Status State Machine runs in both ports. The link always comes up at 2.5 GT/s first, agrees on width and lane numbers, enters L0, and only then changes speed through Recovery, equalizing at 8 GT/s and again at 16 GT/s. Click a state.
The host reads one 4 KB block (eight 512-byte LBAs starting at LBA 1000h) from the SSD. NVMe keeps queues in host memory, so the SSD does almost all the bus traffic: it fetches the command, writes the data and posts the completion by DMA. The CPU touches the link only twice, both times to write a doorbell register. Max payload size (MPS) is 256 bytes.
| Symptom | Likely cause | Check / fix |
|---|---|---|
| SSD not enumerated at all | No REFCLK (CLKREQ# gating), PERST# never released or released too early, TX wired to TX | Scope REFCLK and PERST# against 3.3 V; check LTSSM state register in the root port (stuck in Detect means no receiver termination seen) |
| Link trains at Gen 3 (8 GT/s) or Gen 1, not Gen 4 | Equalization at 16 GT/s failed: too much loss, reflections, crosstalk | Read the negotiated speed and EQ status bits; run lane margining; check stubs and the loss budget |
| Link trains x2 or x1 instead of x4 | One lane open, a missing or wrong AC cap, a lane swapped without reversal support | Check which lanes are missing; continuity and cap placement |
| Correctable errors increasing (Bad TLP, Bad DLLP, Replay rollover) | Marginal eye; errors fixed by replay but throughput drops | AER counters per port; lane margining to find the weak lane; temperature dependence |
| Drops off the bus after idle | L1.2 exit: CLKREQ# not wired or REFCLK not restarted in time | Disable ASPM L1 substates to confirm, then fix the CLKREQ# path |
| Fails only with spread spectrum on | Separate clocks used with SSC (not SRIS-capable) | Use common REFCLK, or enable SRIS mode on both ends |
4 × 16 GT/s × 128/130 ÷ 8 = 7.88 GB/s. With 256-byte payloads, 24 bytes of TLP framing and a few percent of DLLPs, about 7.0–7.2 GB/s is available; Gen 4 SSDs advertise around 7 GB/s sequential reads.
One series capacitor per line is enough to block DC between the two ends' common-mode voltages. Placing them at each transmitter's side means each board (host and add-in card) carries the caps for the pairs it drives, so any card works in any slot. Receiver detection also relies on sensing the far termination through this capacitor.
Each lane recovers its own clock, and the receiver aligns lanes using the block boundaries and training sets, with several nanoseconds of deskew per lane. Only the P and N of each pair must match.
The SSD. It is a bus master: it fetches the command with a memory read and writes the data into host memory with posted memory writes. The CPU only writes the submission doorbell and the completion doorbell.
Equalization at 16 GT/s. Compare lane margining results, then the channel: laminate lot (loss), via stub length (back-drill depth), and the AC cap and connector region for impedance discontinuities.