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
    • Error Models
    • Parity
    • Hamming Distance
    • CRC
    • ECC and SECDED
    • Forward Error Correction
    • Error Responses
    • Poison and Containment
    • ACK and NAK
    • Sequence Numbers
    • Replay Buffers
    • Go-Back-N or Selective Repeat
    • Idempotency and Safe Replay
    • Link-Level or End-to-End Protection
    • Error Classes and Reporting
    • Recovery and Degradation
    • Interface Protection and Safety
    • The Reliability Budget
    • Protocols Compared: Reliability and Recovery
    • Drills: Reliability and Recovery
  • Part 11: Bring-Up and Link Management10
  • 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 10: Reliability and Recovery
  1. Topics
  2. First Principles of Hardware Protocols
  3. Part 10: Reliability and Recovery
  4. Recovery and Degradation

Part 10 · Reliability and Recovery · Senior (S)

Recovery and Degradation

When errors are too frequent for replay to hide, a link can retrain, drop a failing lane, or run at a lower speed, trading bandwidth for staying alive. The recovery ladder, what each step costs, and when to give up.

On this page

    Note

    Level: Senior (S) · Answers: What if bits go wrong?

    Before this: Error Classes and Reporting

    A 16-lane link in a server has one lane with a damaged connector pin. That lane produces errors constantly; replay keeps up at first, then the replay counter rolls over, and the link drops. Without recovery, the server loses the device until a technician visits. With recovery, the link retrains with 8 lanes, at half the bandwidth, and keeps running until the next maintenance window.

    What can a link do when errors are too frequent for replay to hide?

    The obvious answer, and why it breaks

    The obvious response to a link that keeps failing is to declare it dead and report a fatal error. That is safe, but it turns one failing wire among dozens into a total loss of service. Most link failures are partial: one lane, one marginal speed, a temporary loss of lock. A link that can step down gracefully keeps the system alive at reduced performance.

    The idea: a recovery ladder

    Flowchart. When errors exceed what replay can absorb, retrain at the same width and speed. If stable, resume and log. If not, drop failing lanes for a narrower link; if stable, resume degraded and report the bandwidth loss. If not, lower the speed; if stable, resume degraded and report. Otherwise, the link is down: fatal error, contain.
    Each step trades bandwidth for stability; only when the lowest step fails is the link declared dead.

    Step

    Fixes

    Costs

    Retrain (re-run alignment and equalisation)

    Lost lock, drifted equalisation, a transient glitch

    Microseconds to milliseconds without traffic

    Drop lanes (narrower link)

    A broken or noisy lane

    Bandwidth in proportion to lanes lost

    Lower the speed

    A marginal channel at the top rate

    Bandwidth; sometimes latency

    Declare the link down

    Nothing: it contains the failure

    The device is lost until reset or repair

    What recovery needs

    • Detection with thresholds: a replay counter or error-rate monitor that decides when replay is no longer enough (PCIe uses a replay-number counter: when it rolls over, the link retrains).

    • Traffic that survives: transactions in flight during a retrain must be held and replayed, or completed with errors, never silently lost.

    • Reporting: every step down is logged and reported, because the system now runs slower than designed and someone should know (lesson 10.15).

    • A way back up: after repair or a quiet period, retrain at full width and speed.

    How real protocols chose

    Protocol

    Recovery

    PCI Express

    The LTSSM's Recovery state retrains the link; a replay counter that rolls over triggers retraining and is logged as a correctable error; links can be retrained to a lower speed or fewer lanes to keep working.

    High-speed Ethernet

    Loss of lock or alignment triggers link re-establishment; FEC statistics expose degrading channels.

    What breaks

    A system (illustrative) allowed its link to drop lanes automatically but never reported it. A server ran for months at half its storage bandwidth after a lane failed, and performance investigations blamed the software. A degraded-mode report to the operating system, and a log entry, would have pointed straight at the connector.

    Why this matters

    Senior lens. Design the recovery ladder explicitly: thresholds for each step, how in-flight traffic is preserved, how each degraded state is reported, and how the link returns to full capability. Test it with injected faults (a dead lane, a noisy lane, a marginal speed) as part of verification and bring-up, not only in theory.

    Interview

    Asked: "A lane keeps failing. What can the link do?"

    Weak answer: Report an error and stop.

    Strong answer: Climb down a recovery ladder instead of dying. First retrain, in case it was a transient. If that lane is still bad, retrain without it, at a narrower width, losing bandwidth in proportion. If the channel is marginal at the top speed, drop the speed. Only if the lowest step fails is the link declared down. Each step needs in-flight traffic preserved or replayed, and must be logged and reported, because the system is now slower than designed. PCIe's LTSSM supports retraining and running at lower width or speed.

    Follow-ups: (1) What triggers a retrain in PCIe? (2) Why must degraded operation be reported?

    Check yourself A x16 link drops to x8 after a lane fails. What happens to its bandwidth?

    It halves (at the same speed per lane).

    Check yourself Why should a degraded link be reported even though it works?

    The system now runs below its designed performance; without a report, the cause of the slowdown is invisible and the failing part is not replaced.

    Key takeaways

    • When replay is not enough, a link can retrain, drop lanes, or lower its speed before giving up.

    • Each step trades bandwidth for stability; only the last one declares the link dead.

    • Preserve in-flight traffic, report every degraded state, and provide a way back to full capability.

    Keep going

    Next: Lesson 10.17, Interface Protection and Safety. Protecting valid and ready themselves, and functional safety at concept level.

    Related topics

    • Part 10 overview: Reliability and Recovery

    Previous

    157 / 234

    Next: Interface Protection and Safety

    Up next

    Up nextInterface Protection and Safety

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Error Models
    • Parity
    • Hamming Distance