Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutContactPrivacyTerms
Skip to lesson

Course contents

  • How to Use This Course
  • Reading Paths
  • Concept Map
  • How to Read the Diagrams
  • Part 0: What Is a Protocol?10
  • Part 1: Timing and Clocking11
  • Part 2: Encoding and Framing12
  • Part 3: Handshakes13
  • Part 4: Flow Control17
  • Part 5: Transactions19
  • Part 6: Concurrency and Performance17
  • Part 7: Ordering13
  • Part 8: Sharing and Arbitration12
  • Part 9: Deadlock and Liveness13
  • Part 10: Reliability and Recovery20
  • Part 11: Bring-Up and Link Management10
    • Reset Semantics
    • Reset Sequencing Across Interfaces
    • Presence and Hot-Plug
    • Link Training
    • Capability Negotiation
    • Enumeration and Discovery
    • Link State Machines
    • Versioning and Compatibility
    • Protocols Compared: Bring-Up and Link Management
    • Drills: Bring-Up and Link Management
  • Part 12: Power8
  • Part 13: Shared State and Coherence9
  • Part 14: Security and Isolation7
  • Part 15: Specifying and Verifying11
  • Part 16: Protocols Dissected17
  • Part 17: Capstones5
  • Part 18: Interview Preparation6
Loading lesson

‹Part 11: Bring-Up and Link Management
  1. Topics
  2. First Principles of Hardware Protocols
  3. Part 11: Bring-Up and Link Management
  4. Link Training

Part 11 · Bring-Up and Link Management · Senior (S)

Link Training

A fast serial link cannot carry data the moment it powers up: receivers must lock to the bit stream, find symbol and lane boundaries, and tune equalisation to the channel. Why training exists, its generic steps, and what a link learns.

On this page

    Note

    Level: Senior (S) · Answers: How do the two sides agree at start-up?

    Before this: Alignment and Lock, Embedded Clocks and Clock Recovery

    Two chips are connected by a 16-lane link at 16 gigatransfers per second. At power-up, each receiver sees a fast, distorted stream of edges: it does not know where the bits are, where the symbols begin, which lane is which, or how badly the channel smears each bit into the next. Sending real data now would produce garbage. First the two sides have to rehearse.

    Why must a high-speed link train before it carries data, and what happens during training?

    The obvious answer, and why it breaks

    The obvious link starts sending data as soon as it powers up. Slow, parallel, clock-forwarded buses can do that. A fast serial link cannot: its receivers recover the clock from the data (lesson 1.4), must find symbol boundaries in an unbroken stream (lesson 2.8), and must compensate for a channel that distorts differently on every board. None of that is known in advance. It has to be learned from a known pattern, sent before any data.

    The idea: train in stages, each building on the last

    Stage

    Learns

    How

    Detect

    Is anything connected on each lane?

    Electrical detection of a receiver's termination

    Bit lock

    Where the bits are (clock recovery)

    A transition-rich pattern lets each receiver's CDR lock

    Symbol or block lock

    Where symbols or blocks begin

    Known alignment patterns in training sequences (lesson 2.8)

    Lane alignment and deskew

    Which lane is which, and how to line them up

    Training sequences carry lane numbers; common markers remove lane-to-lane skew

    Equalisation

    How to undo this channel's distortion

    The receiver measures quality and asks the sender to adjust its transmit filter, iterating

    Configuration

    Width, speed and features both support (lesson 11.5)

    Capabilities exchanged in the training sequences

    Each stage builds on the previous one; an active link that loses lock retrains through a shorter recovery path, and falls back to detect only if that fails.

    Why equalisation is learned, not configured

    At high rates, each bit's energy spreads into its neighbours (inter-symbol interference), and how much depends on the trace length, connectors, vias and materials of that particular board. No fixed setting suits every board. So the sender and receiver tune it together: the receiver measures how open the signal's eye is, asks the sender for a different pre-emphasis setting, measures again, and settles on the best. Faster generations spend more training time on this step.

    How real protocols chose

    Protocol

    Training

    PCI Express

    The LTSSM: Detect (find a receiver), Polling (bit and symbol lock, exchanging TS1 and TS2 ordered sets), Configuration (width and lane numbering) to L0; Recovery retrains and changes speed, and from Gen3 includes equalisation phases.

    High-speed Ethernet

    Auto-negotiation and link training on backplane and copper links, including transmitter equalisation adjustment.

    DCLink

    Training words carry capabilities (step 10); lock and alignment are lesson 2.8's mechanisms.

    What breaks

    A board (illustrative) trained reliably at room temperature and sometimes failed to reach the active state in a hot chamber. The equalisation settings found at power-up were marginal as the channel's loss rose with temperature. Allowing the link to re-run equalisation in its recovery path, instead of only at power-up, kept it up across the temperature range.

    Why this matters

    Senior lens. Treat training as part of the protocol, with its own verification and debug: expose the training state, the time spent in each stage, and the equalisation results for every lane. Most bring-up failures on fast links are training failures, and a link that cannot say which stage it is stuck in costs days in the lab.

    Interview

    Asked: "Why does a high-speed link need training?"

    Weak answer: To check the cable.

    Strong answer: Because at power-up the receivers don't know where the bits are, where symbols start, which lane is which, or how the channel distorts the signal. Training sends known patterns so each receiver can lock its clock recovery to the bits, find symbol or block boundaries, number and deskew the lanes, tune equalisation to this particular channel with the sender's help, and finally agree width and speed. Only then can data be decoded reliably. In PCIe that's the LTSSM: Detect, Polling, Configuration, then L0, with Recovery for retraining.

    Follow-ups: (1) Why can't equalisation be configured in advance? (2) What does Recovery do that full training doesn't?

    Check yourself Why must bit lock come before symbol lock?

    Symbol boundaries can only be found in a stream of correctly recovered bits; without bit lock, there are no reliable bits to search.

    Check yourself Why is a shorter recovery path useful for an active link?

    A transient loss of lock can be fixed by relocking and retuning without the full sequence from detection, so the link is back in service sooner.

    Key takeaways

    • Fast serial links must learn bit boundaries, symbol boundaries, lane order and channel equalisation before carrying data.

    • Training proceeds in stages, each building on the last, and ends by agreeing configuration.

    • Expose training state for debug; a recovery path retrains an active link without starting over.

    Keep going

    Next: Lesson 11.5, Capability Negotiation. Agreeing on speed, width and features: the lowest common denominator, built and simulated.

    Related topics

    • Part 11 overview: Bring-Up and Link Management

    Previous

    165 / 234

    Next: Capability Negotiation

    Up next

    Up nextCapability Negotiation

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Reset Semantics
    • Reset Sequencing Across Interfaces
    • Enumeration and Discovery