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. Error Classes and Reporting

Part 10 · Reliability and Recovery · Senior (S)

Error Classes and Reporting

Errors differ in what they leave behind: corrected, one transaction lost, or the whole link unreliable. How hardware classifies errors, logs them, counts them, and escalates, so software sees what it must and is not flooded by what it need not.

On this page

    Note

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

    Before this: Error Responses, Poison and Containment

    A link replays a packet after a CRC error and raises an interrupt to report it. The link sees one such error a minute, and the operating system handles a minute's worth of interrupts that require no action. On another link, errors rise from one a minute to a thousand a second, a sign that a connector is failing, and nobody notices, because each one was quietly corrected. One design reports too much; the other too little.

    How should hardware classify and report errors so software sees what matters?

    The obvious answer, and why it breaks

    The obvious policy is to report every error the same way, say with an interrupt. Corrected errors then flood software with events that need no action, while the one fatal error looks no different from a thousand harmless ones. The opposite policy, reporting only failures, hides the trend that predicts failure. Errors need classes that say what they left behind, and counting that turns harmless events into a useful signal.

    The idea: classify by consequence

    Class

    What it left behind

    Hardware does

    Software does

    Correctable

    Nothing: the error was fixed (replay, ECC correction)

    Count it; log the first and summary; interrupt only above a threshold

    Watch the rate; act on trends (replace a part, lower a speed)

    Uncorrectable, non-fatal

    One transaction is bad; the link or device still works

    Log the details (address, request header); report; poison or error-respond

    Recover that transaction: retry, end the process, reset the function

    Uncorrectable, fatal

    The link or device can no longer be trusted

    Log; report urgently; contain (stop traffic)

    Reset the link or device, or the system

    Flowchart. When an error is detected: if it was corrected, count it; if the rate is below threshold, log quietly, otherwise interrupt as a trend warning. If not corrected: if the link or device is still trustworthy, it is non-fatal: log details, error-respond or poison, and report. Otherwise it is fatal: stop traffic, log, and report urgently.
    Corrected errors are counted and reported only as a trend; uncorrectable ones are classified by whether the link or device can still be trusted.

    What to log

    • The first error in detail: the error type, the request header or address, the time; later errors often follow from the first, so the first is the one to diagnose.

    • Counters per class and per source, readable by software, so rates and trends are visible without interrupts.

    • Sticky status bits that survive a reset where possible, so a crash leaves evidence for the next boot.

    How real protocols chose

    Protocol

    Error classes and reporting

    PCI Express

    Correctable errors (for example a link CRC error fixed by replay) and uncorrectable errors, split into non-fatal (that transaction is unreliable, the link works) and fatal (the link is unreliable). With Advanced Error Reporting, devices log errors with details and send error messages to the root port, which logs them; a poisoned TLP is reported as non-fatal.

    Memory systems

    Corrected ECC errors are counted and logged; uncorrectable ones are poisoned or raised as machine-check errors.

    What breaks

    The second link in the opening story (illustrative) corrected every error silently, with no counter software could read. When its error rate climbed for weeks before a connector failed outright, nothing in the logs showed it. Adding a readable correctable-error counter, with an interrupt above a threshold, turned the next failing connector into a planned replacement.

    Why this matters

    Senior lens. Define the error classes and the reporting for every block before tape-out: what each error leaves behind, what is logged (first error in detail, counters for all), what triggers an interrupt, and what software is expected to do. Correctable errors are data, not noise: their rate is the best early warning of a failing part.

    Interview

    Asked: "What should hardware do with a correctable error?"

    Weak answer: Ignore it, since it was corrected.

    Strong answer: Count it and log it, but usually not interrupt for each one. It left no damage, so software needn't act on every occurrence, but the rate matters: a rising correctable-error rate is the best early warning that a link or memory is degrading. So: per-source counters software can read, details of the first occurrence, and an interrupt only when the rate crosses a threshold. Uncorrectable errors are different: log the details and report, non-fatal if just one transaction is lost, fatal if the link can't be trusted.

    Follow-ups: (1) What distinguishes non-fatal from fatal? (2) Why log the first error in detail?

    Check yourself A link CRC error is fixed by replay. Which class is it?

    Correctable: the replay fixed it and nothing was lost.

    Check yourself Why do error logs keep the first error in the most detail?

    Later errors are often consequences of the first; the first is usually the one that explains the failure.

    Key takeaways

    • Classify errors by what they leave behind: correctable, uncorrectable non-fatal, uncorrectable fatal.

    • Count correctable errors and interrupt only on trends; log uncorrectable ones in detail and report.

    • Keep the first error in detail and counters readable by software; rising corrected rates predict failure.

    Keep going

    Next: Lesson 10.16, Recovery and Degradation. Retrain, drop lanes, slow down: keeping a failing link alive.

    Related topics

    • Part 10 overview: Reliability and Recovery

    Previous

    156 / 234

    Next: Recovery and Degradation

    Up next

    Up nextRecovery and Degradation

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Error Models
    • Parity
    • Hamming Distance