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. Link-Level or End-to-End Protection

Part 10 · Reliability and Recovery · Senior (S)

Link-Level or End-to-End Protection

A per-link check protects data on the wire; an end-to-end check protects it everywhere between source and destination, including inside switches. Why each misses what the other catches, and the end-to-end argument applied to data integrity.

On this page

    Note

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

    Before this: CRC, Layering and the End-to-End Argument

    A packet crosses three links and two switches. Every link checks its CRC and the packet passes every check. Yet it arrives with a corrupted byte. Inside one of the switches, between checking the incoming CRC and generating the outgoing one, a buffer cell flipped a bit. The switch dutifully computed a fresh, valid CRC over the corrupted data. Every link was protected; the path was not.

    Is checking every link enough, and if not, what is missing?

    The obvious answer, and why it breaks

    The obvious answer is to protect every hop: if every link delivers what it was given, the path delivers what the source sent. But a link check covers only the wire. Every switch, bridge and buffer in between receives the data, checks it, stores it, and regenerates the check for the next link. Any corruption inside that device, after the check and before the regeneration, is sealed in under a new, valid check. Only a check made by the source and verified by the destination covers the whole path.

    The idea: two scopes of protection

    Link (per-hop) check

    End-to-end check

    Computed by

    Each link's sender

    The original source

    Checked by

    Each link's receiver, then regenerated

    Only the final destination

    Protects

    The wire and its electrical path

    Everything between source and destination: wires, switch buffers, bridges

    Recovery

    Fast local replay on that link

    The destination reports an error; recovery is end to end

    Misses

    Corruption inside a device between check and regeneration

    Nothing on the path, but it detects late and recovers slowly

    Each link CRC is valid over what was sent on that link; the end-to-end CRC, unchanged since the source, is the only check that sees corruption inside the switch.

    Why use both

    • Link checks make the common case cheap: wire errors are the most frequent, and fixing them by local replay on one link is fast and invisible.

    • End-to-end checks make the path trustworthy: rare internal faults are caught, by the only party that can know what the source meant (the end-to-end argument, lesson 0.7).

    • Devices protect their insides too: ECC or parity on internal buffers reduces what the end-to-end check must catch.

    How real protocols chose

    Protocol

    Protection

    PCI Express

    A 32-bit LCRC on every TLP, checked and regenerated on each link, with replay; an optional 32-bit ECRC computed by the requester and checked by the completer, unchanged by switches.

    Ethernet with TCP

    A CRC-32 per frame on each link (switches check and regenerate), plus a TCP checksum end to end.

    Memory systems

    ECC that travels with the data from memory to the consumer, rather than being re-encoded at each hop.

    What breaks

    The opening switch (illustrative) had no protection on one internal buffer and no end-to-end CRC on the path. Its rare buffer flips became silent data corruption at the destination, traced only after weeks of comparing logs. Enabling the end-to-end CRC (and adding parity to the buffer) made each occurrence an immediately reported error.

    Why this matters

    Senior lens. Map every place data rests or is transformed on its path (wires, buffers, width converters, bridges) and name the check covering each. Per-link checks cover wires; internal ECC or parity covers storage; only an end-to-end check covers the gaps between them. Where silent corruption is unacceptable, insist on end-to-end protection, and check that no bridge strips or regenerates it.

    Interview

    Asked: "Why does PCIe have both LCRC and ECRC?"

    Weak answer: For double protection.

    Strong answer: They cover different things. The LCRC protects each link: the receiver checks it and the link replays bad packets quickly, but every switch then regenerates it, so corruption inside a switch, after checking and before regenerating, gets a fresh valid LCRC. The ECRC is computed by the requester and checked only by the completer; switches pass it through unchanged, so it catches corruption anywhere on the path. LCRC makes wire errors cheap; ECRC makes the end-to-end path trustworthy, the end-to-end argument applied.

    Follow-ups: (1) Where can data be corrupted without any link check failing? (2) Why must a bridge not regenerate an end-to-end CRC?

    Check yourself A switch buffer flips a bit. Which check catches it: the incoming link CRC, the outgoing link CRC, or an end-to-end CRC?

    Only the end-to-end CRC: the incoming check passed before the flip, and the outgoing CRC was computed over the flipped data.

    Check yourself Why not use only an end-to-end check?

    Wire errors are frequent; recovering them end to end is slow. Link checks fix them with fast local replay.

    Key takeaways

    • Link checks protect wires and are regenerated at every hop; end-to-end checks protect the whole path.

    • Corruption inside a switch or bridge passes every link check; only an end-to-end check sees it.

    • Use both: link checks for fast recovery, end-to-end checks (plus internal ECC) for trust.

    Keep going

    Next: Lesson 10.15, Error Classes and Reporting. Correctable, non-fatal and fatal: classifying, logging and escalating errors.

    Related topics

    • Part 10 overview: Reliability and Recovery

    Previous

    155 / 234

    Next: Error Classes and Reporting

    Up next

    Up nextError Classes and Reporting

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Error Models
    • Parity
    • Hamming Distance