PCIe Series — PCIe-17: Link Training and LTSSM — VLSI Trainers
PCIe Series · PCIe-17

Link Training and LTSSM

All 11 LTSSM states with every substate — what happens in each, how the transitions work, the full Detect→Polling→Configuration→L0 power-on walkthrough, Recovery substates, power states L0s/L1/L2, Hot Reset, Disabled, Loopback, and Gen 6 additions.

📋 What LTSSM Does

The Link Training and Status State Machine (LTSSM) is the hardware state machine inside every PCIe Physical Layer that manages the link from power-on to full operation. It runs entirely in hardware — no software involvement during link training. Software only observes the outcome through Link Status register bits and can initiate certain transitions (like Retrain Link or Enter Compliance) via Link Control registers.

The LTSSM has 11 primary states, each with between 1 and 5 substates. When two PCIe devices are connected and power is applied, both LTSSMs start at Detect independently and work through the state machine simultaneously until both reach L0 — the fully operational state where TLPs and DLLPs flow normally.

LTSSM — 11 States Overview Detect Polling Configuration L0 (Normal) Recovery L0s ASPM L1 Low Power L2 Deep Sleep Hot Reset From L0 or DS Disabled Hi-Z RX Loopback Test mode Substate counts per primary state Detect 2 Polling 3 Configuration 6 L0 1 Recovery 5 L0s 3 L1 2 L2 2 Others varies
Figure 1 — LTSSM overview. The training path runs left to right: Detect → Polling → Configuration → L0. Recovery is the service/maintenance state entered from L0 for speed changes, width changes, or error recovery. L0s, L1, L2 are the ASPM power states. Hot Reset, Disabled, and Loopback are special-purpose states.

📋 What Link Training Configures

Link training is not just about making a connection — it negotiates and configures six distinct link properties before the first TLP can flow:

PropertyWhat is negotiatedState where resolved
Bit LockReceiver CDR locks onto transmitter clock from the incoming bitstream. Must happen before any symbol or block interpretation is possible.Polling.Active
Symbol/Block LockFor 8b/10b: find 10-bit symbol boundaries using COM character. For 128b/130b (Gen 3+): find 130-bit block boundaries using sync header pattern via EIEOS.Polling.Active
Link WidthBoth devices advertise how many lanes they have. The highest common width is selected. A x4 device connecting to a x16 slot trains to x4.Configuration.Linkwidth.Start/Accept
Lane NumbersEach lane gets a logical number (0 to N-1). Lane reversal may be applied if PCB routing requires it (supported by at least one end).Configuration.Lanenum.Wait/Accept
Polarity InversionIf D+ and D− are swapped on a lane (common PCB layout shortcut), the receiver detects and internally corrects it. Mandatory support.Polling.Configuration
Data RateAlways starts at 2.5 GT/s for backward compatibility. Higher rates are advertised in TS1/TS2 Rate ID field. Actual rate change happens in Recovery after initial L0 is reached.Recovery.Speed (first L0 entry)
Equalization (Gen 3+)Tx FIR coefficients are negotiated. Receiver requests specific preset values. Multiple equalization phases may run.Recovery.Equalization
Lane DeskewOn wide links, different lanes arrive at slightly different times. Receiver delays early arrivals to align all lanes before packet reassembly.Configuration.Complete
N_FTSNumber of Fast Training Sequences needed to exit L0s. Receiver tells transmitter how many FTS ordered sets to send when waking the link from L0s standby.Configuration.Complete (from TS2)

📋 TS1 and TS2 Ordered Sets

TS1 and TS2 (Training Sequences) are the primary ordered sets used during link training. They are 16 symbols long and carry all the training parameters. TS1 means “I am training but not yet done.” TS2 means “I am ready to move to the next state — are you?” When both sides are sending TS2, they can advance together.

TS1 / TS2 Structure — 16 Symbols (8b/10b mode) COM K28.5 Sym 0 Link # or PAD Sym 1 Lane # or PAD Sym 2 N_FTS # FTS for Sym 3 Rate ID Supported Sym 4 Train Ctl Control Sym 5 EQ Info / TS Identifier (Symbols 6–9) Equalization presets or TS ID at Gen 3 Sym 6–9 TS Identifier (Symbols 10–15) TS1 ID = D10.2 (Gen1/2) / 4Ah (Gen3) TS2 ID = D5.2 (Gen1/2) / 45h (Gen3) Symbols with special training significance Sym 1 Link#: PAD in Polling · link number in Configuration+ Sym 4 Rate ID: which speeds both devices support Sym 5 bit 2: Loopback · bit 4: Compliance Receive Sym 3 N_FTS: how many FTS symbols Rx needs for L0s exit Sym 6–9: EQ presets at Gen 3 · hot reset / disable bits
Figure 2 — TS1/TS2 ordered set structure (16 symbols, 8b/10b mode). In 128b/130b mode, the COM is replaced by a sync header, the first payload byte identifies TS1 (1Eh) or TS2 (2Dh), and EQ presets fill symbols 6–9. TS1 and TS2 carry the same fields but their identifier byte signals different handshake intent.

Detect State

Detect — Finding a Receiver

Entry point after any reset. The transmitter has never driven the link before and does not know whether a receiver is connected. Everything starts at 2.5 GT/s and the link is in electrical idle.

Detect.Quiet

First state after power-on or cold reset. Entered within 20 ms of reset deassertion.

  • Transmitter is in electrical idle — not driving the differential pair
  • Speed set to 2.5 GT/s regardless of what it was before
  • LinkUp = 0 — DLL and TL are informed the link is not operational
  • Equalization status bits cleared in Link Status 2 register
  • Internal variables reset: directed_speed_change=0, upconfigure_capable=0

Exit to Detect.Active: after 12 ms timeout, or immediately if any lane exits electrical idle.

Detect.Active

The transmitter actively probes for a receiver on each lane. It sets a DC common-mode voltage on the lane, then quickly changes it and measures how fast the voltage transitions.

  • A lane with a connected receiver has lower impedance — the transition is slower (the receiver termination resistor loads the capacitance). A lane with no receiver transitions faster. This time difference is the detection mechanism.
  • Wait at least 12 ms for charge to stabilise before measuring
  • Lanes that detect a receiver become “Detected Lanes”
  • If a partial width is detected (e.g. 4 of 8 lanes respond), wait another 12 ms and test again — if the same lanes respond twice consistently, proceed to Polling with those lanes. The missing lanes go to electrical idle or get their own LTSSM instance if supported.

Exit to Polling: one or more lanes detect a receiver (even after the 12 ms patience window).

Exit back to Detect.Quiet: no lanes detect a receiver after the 12 ms probe. Loop repeats every 12 ms.

Polling State

Polling — Bit Lock, Symbol Lock, Polarity

The link exits electrical idle. TS1 and TS2 ordered sets are exchanged. Both devices acquire Bit Lock (CDR locks onto transmitter clock) and either Symbol Lock (8b/10b) or Block Alignment (128b/130b). Polarity inversion is detected and corrected.

Polling.Active

Transmitters drive the link out of electrical idle and begin sending TS1 ordered sets on all detected lanes simultaneously.

  • Minimum 1024 consecutive TS1 ordered sets must be sent (takes ~64 µs at 2.5 GT/s)
  • Link and Lane fields in TS1 contain PAD — actual numbers not yet assigned
  • All supported data rates are advertised in the Rate ID field, even rates not intended to be used
  • Receiver CDR acquires Bit Lock from the incoming bit transitions in TS1 preamble patterns
  • For 8b/10b: COM characters in TS1 achieve Symbol Lock — receiver knows where 10-bit symbol boundaries are
  • For 128b/130b: EIEOS patterns achieve Block Alignment — receiver finds 130-bit block boundaries
  • If polarity is inverted on a lane, the receiver will see the complement of TS1. This is detected and the receiver corrects the inversion internally — transparent to all higher layers

Exit to Polling.Configuration: after sending ≥1024 TS1s, ALL detected lanes receive 8 consecutive TS1s or TS2s with PAD lane/link numbers AND Compliance Receive bit = 0. Or after a 24 ms timeout if ANY lane met this condition and all lanes had an electrical idle exit.

Exit to Polling.Compliance: Enter Compliance bit set in Link Control 2, or timeout with compliance conditions detected on any lane.

Exit to Detect: 24 ms timeout with insufficient response.

Polling.Configuration

Handshake phase. Having achieved lock, the transmitter switches from TS1 to TS2 to signal “I am ready to proceed to Configuration.” The link partner switches to TS2 when it is also ready. When both sides are sending and receiving TS2, both can advance.

  • Transmitter switches to TS2 with PAD in Link and Lane fields
  • All supported data rates still advertised in Rate ID
  • Each receiver independently applies polarity inversion correction if needed
  • Transmit Margin field reset to 000b (normal operating voltage)

Exit to Configuration: after receiving 8 consecutive TS2s (with PAD link/lane, Compliance Receive=0) on any detected lane AND sending at least 16 TS2s after receiving one.

Exit to Detect: 48 ms timeout without satisfying the TS2 handshake.

Polling.Compliance (test mode only)

A special testing state used exclusively for hardware characterisation. Reached when the Enter Compliance bit is set in Link Control 2, or when a compliance pattern is requested via incoming TS1 Compliance Receive bits.

  • Transmitter sends a defined compliance pattern — a specific repeating sequence that produces worst-case ISI and crosstalk for signal integrity testing
  • For 8b/10b: K28.5 / D21.5 / K28.5 / D10.2 pattern, with optional delay symbols shifted between lanes to stress crosstalk
  • For 128b/130b: scrambled IDL bytes in data blocks, SOS with error status symbols
  • Modified Compliance Pattern adds error counting and pattern lock feedback
  • Cycles through all supported speeds and equalization presets if entered via timeout (useful for automated PHY characterisation)
  • Receiver counts incoming bit errors per lane, reports in SOS error status symbols

Exit to Polling.Active: Enter Compliance bit cleared, or EIOS detected (if upstream port).

Configuration State

Configuration — Width, Lane Numbers, TS2 Handshake

Link width and lane numbers are negotiated. TS1 and TS2 ordered sets now carry real link and lane numbers (not PAD). The six substates implement a negotiation→confirmation→idle sequence that concludes with LinkUp assertion and the link entering L0.

Configuration.Linkwidth.Start (Downstream Port only)

The Downstream Port initiates link width negotiation by sending TS1s with a unique Link Number on each lane and PAD in the Lane Number field.

  • Each lane gets a different proposed Link Number (e.g. Lane 0 → Link N, Lane 1 → Link N+1, …)
  • By observing which lanes the Upstream Port echoes back together under the same Link Number, the Downstream Port determines which lanes connect to the same Upstream Port
  • Lanes that echo different Link Numbers are connected to different devices and will form separate links with independent LTSSM instances

Exit to Linkwidth.Accept: a single Link Number is confirmed for a set of lanes (the downstream port has learned the width).

Configuration.Linkwidth.Accept (Upstream Port only)

The Upstream Port responds to the Downstream Port’s proposed Link Numbers in TS1s. It echoes back the same Link Number on all lanes that belong to the same link, signalling which lanes will be grouped together.

  • Upstream Port may also initiate lane reversal at this point if needed (reverses its internal lane numbering)
  • Width is now determined — the two ports know how many lanes they share

Configuration.Lanenum.Wait

Lane numbers (within the chosen link width) are assigned. Downstream Port sends TS1s with the agreed Link Number and assigns Lane Numbers 0 through N-1 sequentially. Upstream Port sends TS1s echoing the same Link Number with PAD in Lane Number.

  • If lane reversal is in effect, the lane numbers appear reversed in one direction and the correcting device remaps them internally
  • Each device waits until it has received TS1s from its partner confirming the lane number assignments

Configuration.Lanenum.Accept

Both ports have received matching Lane Numbers from each other. Both now echo back TS1s with matching Link and Lane numbers — confirming the assignment. Lane-to-lane deskew is performed during this substate: the receiver delays early-arriving lanes to align with the slowest lane, compensating for trace length differences on the PCB.

  • Intra-pair deskew (within one differential pair) was handled during Bit Lock
  • Inter-lane deskew (between lanes) is handled here: up to 20 ns at Gen 1, 8 ns at Gen 2, 6 ns at Gen 3

Configuration.Complete

The switch from TS1 to TS2. Once a device has matched Link and Lane numbers, it starts sending TS2 to signal “I am done with configuration and ready for L0.” This is the same TS1→TS2 handshake as in Polling, but now with real link and lane numbers.

  • TS2s carry the confirmed Link and Lane numbers (matching what was received)
  • N_FTS value recorded: each receiver records the N_FTS field from the incoming TS2s — this tells it how many FTS ordered sets it must send when the link exits L0s
  • Upconfigure Capability bit: if both sides advertise it in TS2s, the link is upconfigure-capable (can later increase link width without full re-training)
  • For 8b/10b: lane deskew must complete before exiting this substate. Scrambling is disabled if both sides request it in TS2s (not possible at Gen 3+)
  • For 128b/130b: scrambling cannot be disabled; LFSR state is established

Exit to Configuration.Idle: all configured lanes received 8 consecutive TS2s with matching Link and Lane numbers AND rate identifiers, after sending at least 16 TS2s.

Exit to Detect: 2 ms timeout without successful TS2 handshake completion.

Configuration.Idle

The final configuration substate. Transmitters stop sending TS2 and switch to sending Idle data (all-zero bytes that get scrambled). This is the bridge between configuration and L0.

  • For 8b/10b: transmitter sends scrambled Idle characters (0x00 scrambled with 8b/10b)
  • For 128b/130b: transmitter sends one SDS (Start Data Stream) ordered set followed by IDL data in Data Blocks. The first IDL byte on Lane 0 is the first byte of the Data Stream.
  • Physical Layer signals LinkUp = 1 to the DLL and Flow Control initialisation begins (InitFC1 DLLPs start flowing)
  • Lane-to-lane deskew must be completed before Data Stream processing begins (for 128b/130b)

Exit to L0: 8 consecutive Idle data symbols received on all configured lanes, after sending 16 Idle symbols since receiving one.

Exit to Recovery: 2 ms timeout (equalization problem or speed issue — Recovery.RcvrLock retries). Limited to 256 attempts (idle_to_rlock_transitioned counter).

Exit to Detect: if 256 Recovery attempts have failed (counter overflows to FFh).

L0 — Normal Operation

L0 — Fully Operational Link

L0 is the only state where TLPs and DLLPs are exchanged. The Physical Layer has set LinkUp=1, Flow Control has completed initialisation, and the link is ready for normal traffic. This is the state that software observes as the “link is up.”

  • TLPs, DLLPs, and Logical Idle are all transmitted normally
  • Link operates at the negotiated width and speed (initially 2.5 GT/s — speed upgrade happens immediately via Recovery)
  • SKIP ordered sets continue to be sent periodically for clock tolerance compensation

Exits from L0:

  • → Recovery: speed or width change requested; partner sends TS1s/TS2s; Replay Num rollover (4 failed replay attempts); Retrain Link bit set; partner goes to electrical idle unexpectedly; EIOS received but L0s not supported
  • → L0s.Tx_L0s.Entry: ASPM L0s initiated — transmitter sends EIOS and enters electrical idle while receiver stays in L0 receiving
  • → L1: both sides agree via DLL handshake to enter L1; one side sends EIOS on all lanes after agreement
  • → L2: both sides agree to enter L2 (deep sleep); EIOS sent on all lanes

Note: the LTSSM for the transmitter side and receiver side of a port can be in different states simultaneously in L0. One direction can be in L0s while the other remains in L0 — this is the fundamental property that enables ASPM L0s.

Recovery State

Recovery — Re-Lock, Speed Change, Equalization

Recovery is the maintenance state. Either device can initiate it from L0 by starting to send TS1 ordered sets on configured lanes. When the partner sees incoming TS1s, it also enters Recovery and returns TS1s. Both devices then re-acquire Bit Lock and Symbol/Block Lock, and perform whatever specific task caused Recovery to be entered.

Recovery is how link speed is changed after initial L0 (always from 2.5 GT/s to the highest mutually supported speed). Recovery is also how equalization is redone, how link width is changed, and how an AER-triggered link retrain is handled.

Recovery.RcvrLock

Both ports send TS1 ordered sets on all configured lanes using the Link and Lane numbers that were set in Configuration. The receiver re-acquires Bit Lock and Symbol/Block Lock from these TS1s.

  • If entering Recovery for a speed change: the initiating device sets the speed_change bit in the TS1 Rate ID field
  • For Gen 3 equalization: Downstream Port may send EQ TS1s to request that the Upstream Port apply specific Tx preset values before changing to 8 GT/s
  • A new transmitter voltage (Transmit Margin field from Link Control 2) takes effect at entry to this substate
  • Upstream Port may specify de-emphasis level for 5 GT/s operation via Selectable De-emphasis bit in TS1s

Exit to Recovery.RcvrCfg: 8 consecutive TS1s or TS2s received with matching Link/Lane numbers and speed_change bit matching directed_speed_change, AND EC field = 00b (no equalization request).

Exit to Recovery.Equalization: at 8 GT/s, if the incoming TS1s request equalization (EC field non-zero), or if equalization conditions require it.

Exit to Recovery.Speed: conditions indicate the current speed cannot be maintained — fall back to a lower speed.

Exit to Configuration: if no speed change was requested (speed_change=0 in TS1s), go to Configuration to renegotiate link width.

Exit to Detect: 24 ms timeout with no recovery conditions met.

Recovery.Equalization (Gen 3 / 8 GT/s only)

Three-phase equalization process for Gen 3 links. The receiver evaluates the signal quality with different Tx FIR coefficient settings and converges on the optimal values. This substate only runs when changing to or operating at 8 GT/s and one or more equalization phases need to be executed.

  • Phase 1: Downstream Port evaluates the Tx preset values from the Upstream Port. Uses EQ TS1s/TS2s to request specific presets. Duration limited to ensure no transaction timeouts.
  • Phase 2: Upstream Port evaluates Downstream Port’s Tx settings. Requests coefficient values. Reports eval status via EC field in TS1s.
  • Phase 3: Final coefficient confirmation. Both sides record the agreed coefficients. Equalization status bits set in Link Status 2 register (Phase 1/2/3 Successful, Equalization Complete).
  • 24 ms timeout exits back to Recovery.RcvrCfg if equalization cannot converge

Recovery.RcvrCfg

Lock re-acquired. Speed agreed. Equalization done (if needed). Now the devices switch from TS1 to TS2 — the familiar “I am done, are you ready?” handshake used in Polling.Configuration and Configuration.Complete.

  • Transmitters send TS2 with Link and Lane numbers matching what was received
  • Speed change confirmation: if entering Recovery for a speed change, both devices now prepare to change speed — they send TS2s and both go to Recovery.Speed together
  • Data rates higher than currently in use are advertised so either device can later initiate further speed changes

Exit to Recovery.Speed: if a speed change was agreed (speed_change=1 in TS1s and TS2s).

Exit to Recovery.Idle: if no speed change — just re-locking from an error or returning from L1/L0s. Received 8 TS2s, sent 16 TS2s.

Exit to Configuration: if width change needed — link width renegotiation requires going through Configuration again.

Exit to Detect: 48 ms timeout.

Recovery.Speed

The actual speed transition. All lanes briefly enter electrical idle, the clock rate is changed and stabilised, and then the link comes back up at the new speed.

  • Send 1–2 EIOS on all lanes, then enter electrical idle
  • Change PLL frequency to the new target speed (e.g. 5 GT/s or 8 GT/s)
  • Wait 1–2 ms for clock to stabilise at the new rate
  • Exit electrical idle, begin sending TS1 or TS2 at the new speed
  • If the new speed works, proceed to Recovery.Idle at the new rate
  • If the new speed fails, fall back: drop to 2.5 GT/s if at higher speed, or revert to the previous working speed if the attempted new rate failed
  • successful_speed_negotiation variable set on successful speed change

Recovery.Idle

Transitioning back to L0. Same purpose as Configuration.Idle — sending Idle data while confirming the link is stable before asserting it operational.

  • Transmitters send Idle data on all configured lanes
  • LinkUp remains 1 (it was set in Configuration.Idle and stays 1 through Recovery)
  • For 128b/130b: one SDS then IDL data blocks, deskew completed

Exit to L0: 8 consecutive Idle symbols received, 16 sent. idle_to_rlock_transitioned counter cleared.

Exit to Hot Reset: if TS1s with Hot Reset bit set received.

Exit to Disabled: if directed to disable.

Exit to Detect: if recovery has failed enough times.

L0s — ASPM Standby

L0s — Per-Direction Low Power

L0s is a hardware-initiated low-power state for individual link directions. Unlike L1 which requires both directions to be low-power, L0s is asymmetric — one direction can be idle (in L0s) while the other continues normal operation. This is useful for bursty traffic where one direction is much lighter.

Entry/exit is entirely hardware-controlled (ASPM — Active State Power Management). No software or DLL involvement. Exit latency is very short — typically a few hundred nanoseconds.

Tx_L0s.Entry

Transmitter initiates L0s entry. It sends EIOS (Electrical Idle Ordered Set) on all lanes and then stops driving the differential pair, entering electrical idle. The far-end receiver detects EIOS, transitions to L0s receive mode, and stops expecting transmissions.

Tx_L0s.Idle

Transmitter is in electrical idle. The PLL may stay running at reduced power. The transmitter saves energy by not driving the high-frequency differential signal. Entry into this state may be held for as long as no packets are waiting to send.

Tx_L0s.FTS (Exit)

When the transmitter has TLPs or DLLPs to send, it exits L0s by sending FTS (Fast Training Sequences) ordered sets. The number of FTS ordered sets sent equals the N_FTS value that was negotiated during Configuration.Complete — the far-end receiver told the transmitter exactly how many it needs to re-achieve lock.

  • FTS sequences allow the far-end CDR to quickly re-acquire lock at the bit/symbol level without a full re-training sequence
  • After sending the required FTS count, the transmitter transitions back to L0 and resumes normal packet transmission
  • If the receiver fails to achieve lock from the FTS sequences in time, the link escalates to Recovery
  • Extended Synch bit in Link Control: forces 4096 FTS symbols to be sent — useful for test equipment that needs more time to achieve lock

L1 — Low Power

L1 — Both Directions in Low Power

L1 is a deeper power state than L0s where both transmitter and receiver in both link directions enter electrical idle simultaneously. Both devices must agree to enter L1 via a DLL-level handshake before either can initiate. PLLs may be turned off, saving significantly more power than L0s — but exit latency is longer, typically a few microseconds.

L1.Entry

After the DLL handshake confirms both sides are ready, the initiating device sends EIOS on all lanes (one EIOS at 2.5 GT/s, two at 5.0 GT/s). Both transceivers then enter electrical idle. The PLL is allowed to power down.

L1.Idle

Both directions idle. Device logic continues running but at reduced power. Exit is initiated by hardware detecting that packets need to flow, or by software request. Exit from L1 goes through Recovery — there is no fast exit path like FTS in L0s. Recovery re-establishes lock and brings the link back to L0.

  • Power budget: significantly lower than L0s — PLL power is a major component at Gen 3+ speeds
  • Exit latency: typically 2–100 µs to Recovery, then back through Recovery.RcvrLock to L0
  • ASPM L1 requires both endpoints to implement and enable it in ASPM Control register

L2 — Deep Sleep

L2 — Main Power Off, Vaux Only

L2 is the deepest link power state. Main power to the device is removed. Only Vaux (auxiliary voltage, typically 3.3V standby) keeps a minimal wake circuit operational. The transmitter and receiver are completely off.

L2.Idle

Device is in main power-off state. Vaux keeps the wake detector and Beacon generation logic alive. Device cannot receive TLPs or DLLPs.

  • Recommended power: ≤ 1 mW per lane
  • Transmitter and receiver both OFF; both ends in high-impedance state
  • PLL completely OFF; clock to device OFF
  • Vaux ON; main power OFF

L2 Wake

Two wake mechanisms exist. The Beacon is a low-frequency differential signal that a device can drive onto the link from Vaux power to signal the Root Complex that it wants to wake. The WAKE# sideband pin is an alternative — a direct signal from device to Root Complex that does not require the link pair itself. When a wake event is detected, power is restored and the LTSSM eventually transitions back to Detect and performs a full link re-training sequence.

  • Beacon: low-frequency, DC-balanced differential pulse, 2 ns to 16 µs period, max 16 µs between pulses
  • Switches/bridges that do not support Vaux must propagate Beacon upstream or use WAKE#
  • L2 exit latency: 12–50 ms after power restored (full LTSSM must run from Detect)

Hot Reset

Hot Reset — In-Band Reset Propagation

Hot Reset is an in-band reset mechanism where an upstream device resets a downstream device without removing power. It is signalled by setting the Hot Reset bit in TS1 ordered sets sent during Recovery.Idle or from L0. When the downstream device receives TS1s with Hot Reset = 1, it asserts its own internal reset and also propagates Hot Reset downstream through its ports.

  • Entry: from L0 or Recovery.Idle when TS1s with Hot Reset bit = 1 are received on any configured lane
  • A Downstream Port receiving Hot Reset must send TS1s with Hot Reset bit set on all its Downstream Ports (propagation rule)
  • A Root Complex sending Hot Reset can reset all devices in an entire hierarchy branch
  • Switch ports receiving Hot Reset on their Upstream Port must propagate it to all Downstream Ports
  • After the device’s internal reset completes, the LTSSM transitions back to Detect and retrains the link

Disabled

Disabled — Link Administratively Off

The Disabled state is entered when software sets the Link Disable bit in the Link Control register, or when the LTSSM receives TS1s with the Disable Link bit set from the link partner. It is also used when a link encounters persistent reliability problems that equalization cannot solve.

  • Entry: from L0 when TS1s with Link Disable bit received, or from Recovery when directed
  • Transmitter sends EIOS then enters electrical idle
  • Receiver inputs are placed in high-impedance state — termination may be removed to reduce power
  • Exit: clearing the Link Disable bit in software causes a transition back to Detect. The LTSSM restarts full link training from scratch.

Disabled is a clean administrative mechanism — no TLPs are lost because the DLL had already drained before the physical layer disabled the link.

Loopback

Loopback — Physical Layer Test Mode

Loopback is a factory/field test mode where one device (the Master) drives patterns onto the link and the other device (the Slave) receives them and immediately retransmits them back. The Master can verify link quality by comparing what it sent with what comes back. Loopback operates at the Physical Layer — TLPs are not processed.

  • Entry: from Polling.Active when Loopback bit = 1 in received TS1s. The device receiving this request becomes the Slave (loopback entity). The device sending TS1s with Loopback bit = 1 is the Master.
  • Master sends data patterns, Slave reflects everything bit-for-bit back on the return lane
  • For 128b/130b: special loopback rules — SOS can be modified by clock compensation but SDS/EDS tokens are not required
  • Exit: Master sends EIOS. Slave exits electrical idle and both return to Detect for full re-training
  • Used for: BER testing, equalisation verification, physical layer debugging, manufacturing test

Full Detect → L0 Walkthrough

This is the exact sequence a pair of PCIe devices follows from power-on to the first TLP flowing. The sequence runs in parallel on both devices simultaneously.

Detect → Polling → Configuration → L0 — Full Sequence Device A (Downstream) Device B (Upstream) Detect.Quiet Detect.Quiet both in electrical idle · LinkUp=0 Detect.Active Detect.Active probe receiver impedance receiver detected → both exit to Polling Polling.Active Polling.Active TS1 × 1024+ (PAD) TS1 × 1024+ (PAD) Bit Lock · Symbol/Block Lock achieved · polarity correction Polling.Configuration Polling.Configuration TS2 (PAD) → both exit to Configuration Config.Linkwidth Config.Linkwidth TS1 (Link# per lane · Lane=PAD) width negotiated · lane numbers assigned · deskew applied Config.Complete Config.Complete TS2 (Link# · Lane# · N_FTS) N_FTS recorded · upconfigure capability set Config.Idle Config.Idle Idle data (SDS then IDL for Gen3) LinkUp = 1 · FC_INIT begins · DLL becomes active L0 (2.5 GT/s) L0 (2.5 GT/s) TLPs flow! → immediately enters Recovery to change speed
Figure 3 — Detect to L0 walkthrough. The sequence runs simultaneously on both devices. TS1 ordered sets appear in purple (training / not-ready); TS2 appears as dashed purple/green (ready to advance). Link and Lane numbers transition from PAD to real values in Configuration. The link first reaches L0 at 2.5 GT/s, then immediately enters Recovery to change to the highest mutually supported speed.

What happens immediately after the first L0

The first L0 is always at 2.5 GT/s. If both devices support higher speeds and have advertised them in their Rate ID fields during training, one device immediately sets directed_speed_change = 1 and enters Recovery.RcvrLock. The link changes speed to the highest commonly supported rate — Gen 2 (5 GT/s), Gen 3 (8 GT/s), Gen 4 (16 GT/s), or Gen 5 (32 GT/s) — through Recovery.Speed. For Gen 3+ links, Recovery.Equalization runs to negotiate Tx FIR coefficients. The entire speed change from first L0 to operating speed takes roughly 1–5 ms depending on equalization complexity.

LTSSM in Gen 6

The LTSSM structure — 11 states, all substates, the Detect/Polling/Configuration/Recovery sequence — is carried forward unchanged into Gen 6. What changes is the physical layer technology that runs underneath the LTSSM and some Gen 6-specific additions in Training Sequences.

LTSSM featureChange in Gen 6
State structureUnchanged — same 11 states, same substate names, same transition logic
TS1/TS2 ordered setsNew Rate ID field encoding for 64 GT/s (PAM4 rate bit). Gen 6 also carries FEC capability negotiation bits in the TS2 equalization fields.
Speed change via RecoverySame Recovery.RcvrLock → Recovery.Speed sequence. 64 GT/s option added to the speed negotiation.
Equalization (Recovery.Equalization)PAM4-specific equalization is far more complex — more equalization phases, multi-tap DFE coefficients, PAM4 eye monitoring. The state machine is the same; the content of the coefficient exchange changes.
Flit mode entryGen 6 flit mode is negotiated in the TS2 Training Control or in a post-L0 configuration write. The LTSSM itself does not have a flit-specific state — flit framing is transparent to state machine logic above the Physical Layer.
Block alignment (128b/130b path)Gen 6 still starts training at 2.5 GT/s (Gen 1 NRZ) so the initial Polling and Configuration states still use 8b/10b symbol lock. Block alignment (128b/130b) runs when speed changes to Gen 3/4/5 en route to Gen 6. The final transition to 64 GT/s PAM4 goes through Recovery.Speed with PAM4 equalization.
FEC capabilityRS(544,514) FEC is mandatory for Gen 6. The FEC enable bit is negotiated during the speed change to 64 GT/s, carried in TS2 ordered sets before entering Recovery.Speed.
L0s/L1/L2Unchanged. Power states work the same at 64 GT/s PAM4 as at lower speeds. EIOS and EIEOS ordered sets still signal entry and exit.
PCIe backward compatibility is preserved in the LTSSM by design. Every link always trains first to 2.5 GT/s, then steps up. A Gen 6 device can connect to a Gen 1 device — both go to Detect, Polling, Configuration, and reach L0 at 2.5 GT/s. The Gen 6 device advertises 64 GT/s in its Rate ID field; the Gen 1 device does not. Neither attempts a speed change. The link operates at 2.5 GT/s indefinitely. The LTSSM handles this correctly in every generation.

📋 Quick Reference

StateSubstatesPurposeKey exit condition
DetectQuiet · ActiveFind a receiver on each lane via impedance probingReceiver detected on at least one lane → Polling
PollingActive · Configuration · ComplianceAcquire Bit Lock + Symbol/Block Lock. Polarity correction. Handshake readiness.8 TS2s + 16 sent (after Polling.Config) → Configuration
ConfigurationLinkwidth.Start · Linkwidth.Accept · Lanenum.Wait · Lanenum.Accept · Complete · IdleNegotiate link width and lane numbers. Record N_FTS. Assert LinkUp.8 Idle symbols received after Configuration.Idle → L0
L0(single state)Normal operation — TLPs, DLLPs, FC, ACK/NAK all runningSpeed change request / TS1 received / replay timeout → Recovery
RecoveryRcvrLock · Equalization · RcvrCfg · Speed · IdleRe-lock after error, change link speed, redo equalization, change width8 Idle symbols after Recovery.Idle → L0 (at new speed)
L0sTx_L0s.Entry · Idle · FTSPer-direction ASPM standby. Transmitter idles, receiver stays active. Fast exit via FTS.FTS count sent → L0. Lock timeout → Recovery.
L1Entry · IdleBoth-direction low power. PLLs may power off. Requires DLL handshake to enter.Traffic needed → Recovery → L0
L2Idle · WakeMain power off. Vaux only. Wake via Beacon or WAKE# pin.Wake detected → power-on sequence → Detect → L0
Hot Reset(substates per port)In-band reset. TS1 with Hot Reset bit = 1. Propagates downstream through switches.Reset completes → Detect
Disabled(simple)Link administratively off. High-impedance receiver. Software-controlled.Link Disable bit cleared → Detect
LoopbackEntry · Active · ExitPhysical layer test. Master drives patterns; Slave reflects them. BER measurement.EIOS from Master → Detect
Key timerValueContext
Detect.Quiet → Detect.Active12 ms (or on EI exit)Initial wait before probing
Polling.Active minimum TS1s1024 TS1s (~64 µs at 2.5 GT/s)Enough time for CDR lock
Polling.Active timeout24 msAllowed before exit-to-Detect if no TS2s
Polling.Configuration timeout48 msBefore exit-to-Detect if TS2 handshake fails
Configuration.Complete timeout2 msBefore exit to Recovery.Idle or Detect
Configuration.Idle timeout2 msBefore exit to Recovery for equalization retry
Recovery.RcvrLock timeout24 msBefore exit to RcvrCfg even without full handshake
Recovery.Equalization timeout24 msPer equalization phase
Recovery speed change electrical idle1–2 msClock stabilisation at new rate
Max idle_to_rlock_transitioned256 (FFh)Config.Idle→Recovery loop limit before fallback to Detect
Scroll to Top