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. Drills: Reliability and Recovery

Part 10 · Reliability and Recovery · All levels

Drills: Reliability and Recovery

Interview questions, a whiteboard exercise and a ten-question checkpoint for Part 10.

On this page

    Answer each question out loud before opening it. If you miss more than three in the checkpoint, revisit the lessons linked at the end.

    Interview questions

    Check yourself What does parity miss?

    Any even number of flipped bits; and it cannot correct.

    Check yourself Distance 4: what can you detect and correct?

    Detect 3, or correct 1 and detect 2 (SECDED).

    Check yourself Why CRC rather than a checksum on a link?

    An r-bit CRC catches every burst up to r bits; sums are fooled by cancelling errors.

    Check yourself How does SECDED tell a single from a double error?

    Syndrome plus overall parity: non-zero syndrome with bad parity is single; with good parity, double.

    Check yourself Why did PCIe 6 add FEC?

    PAM4 raised the raw error rate so much that replay alone would cost too much; FEC fixes most errors in place, with CRC and replay behind it.

    Check yourself Why have NAK if there is a timeout?

    NAKs recover corruption in one short round trip; the timer covers total loss.

    Check yourself How many sequence bits does a link need?

    Go-back-N: W ≤ 2^n − 1; selective repeat: W ≤ 2^(n−1).

    Check yourself Why does PCIe have both LCRC and ECRC?

    LCRC protects each link and is regenerated; ECRC protects the whole path, including inside switches.

    Whiteboard exercise

    Task. Design the error handling for a 64 Gb/s chip-to-chip link carrying 256-byte packets, raw BER 1e-12, replay round trip 400 ns, in a fleet of 10 million links. State detection, recovery, sequence numbers, buffering and reporting.

    Check yourself Open a model answer

    Detection: a 32-bit CRC per packet (a 16-bit CRC would let too many errors through across 10 million links). Errors: 64e9 × 1e-12 = 0.064 per second per link, one every ~16 s; replay with ACK/NAK and go-back-N is ample, costing 0.064 × 400 ns of link time per second, negligible. Window: bandwidth × ACK round trip = 64e9 / (280 × 8) × 400 ns ≈ 11 packets; design for 64 outstanding, so 7-bit sequence numbers for go-back-N and a 64-packet replay buffer (about 18 KB). A replay timer above the worst-case round trip. Reporting: count corrected errors (replays), interrupt on a rising rate; a replay counter that rolls over triggers retraining, with lane dropping or a lower speed as degraded modes; uncorrectable conditions reported as fatal for the link. Undetected budget: with CRC-32, pessimistically ~0.064 × 2⁻³² per second per link × 1e7 links × 3.15e7 s ≈ 4,700 per year across the fleet; the realistic figure is far lower (CRC-32 catches every single-bit error and short burst), but if the requirement is near zero, add an end-to-end check on the path.

    Checkpoint: ten questions

    Check yourself 1. Name four error types beyond a single bit flip.

    Bursts, stuck bits, lost, duplicated or reordered messages, soft errors in storage.

    Check yourself 2. Errors per second at 16 Gb/s and BER 1e-12?

    0.016: about one a minute.

    Check yourself 3. What minimum distance corrects 2 errors?

    5.

    Check yourself 4. What does a 16-bit CRC guarantee?

    Detection of every burst of 16 bits or fewer.

    Check yourself 5. What is the difference between a target error and a decode error?

    Target error: the target exists but could not do it; decode error: no target owns the address.

    Check yourself 6. Why poison rather than drop bad data?

    The transaction completes, but whoever consumes the data gets an error; nothing hangs and nothing spreads silently.

    Check yourself 7. Why is link-level replay always safe?

    The far receiver discards duplicates by sequence number, so the target sees each request once.

    Check yourself 8. When does selective repeat beat go-back-N noticeably?

    At high packet error rates, a few percent and above.

    Check yourself 9. What should hardware do with correctable errors?

    Count and log them; interrupt on a rising rate.

    Check yourself 10. A x8 link loses two lanes. What can it do?

    Retrain at the next supported narrower width, typically x4, at half the bandwidth, and report the degraded state.

    Revisit

    • 10.1 Error Models

    • 10.2 Parity

    • 10.3 Hamming Distance

    • 10.4 CRC

    • 10.5 ECC and SECDED

    • 10.6 Forward Error Correction

    • 10.7 Error Responses

    • 10.8 Poison and Containment

    • 10.9 ACK and NAK

    • 10.10 Sequence Numbers

    • 10.11 Replay Buffers

    • 10.12 Go-Back-N or Selective Repeat

    • 10.13 Idempotency and Safe Replay

    • 10.14 Link-Level or End-to-End Protection

    • 10.15 Error Classes and Reporting

    • 10.16 Recovery and Degradation

    • 10.17 Interface Protection and Safety

    • 10.18 The Reliability Budget

    Keep going

    Next: Part 11: Bring-Up and Link Management. How do the two sides agree at start-up?

    Previous

    161 / 234

    Next: Part 11: Bring-Up and Link Management

    Up next

    Up nextPart 11: Bring-Up and Link Management

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Error Models
    • Parity
    • Hamming Distance