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

  • RTL Foundations36
  • Combinational Design25
  • Sequential Design27
  • FSM & Control27
  • Timing & Clocking39
  • Reset & CDC34
  • Memory & Buses57
  • Advanced RTL28
  • Senior & Interview76
    • Low-Power RTL Hub
    • DFT and Scan Hub
    • Physical Awareness Hub
    • Waveform Debug Hub
    • STA and ECO Hub
    • RTL-to-Implementation Closure
    • DFT-Ready RTL
    • Capstone: Resilient Streaming Peripheral
      • Stage 1: Specification
      • Stage 2: CSR and Control
      • Stage 3: Buffered Streams
      • Stage 4: CDC and Reset
      • Stage 5: Arithmetic and Reliability
      • Stage 6: Verification
      • Stage 7: Constraints and Implementation
      • Stage 8: Signoff Review
    • Principal Design Review
    • Senior RTL Interview Questions & Model Answers
  • Glossary and Notation
Loading lesson

‹Capstone: Resilient Streaming Peripheral
  1. Topics
  2. RTL Design
  3. Senior & Interview
  4. Capstone: Resilient Streaming Peripheral
  5. Stage 5: Arithmetic and Reliability

Part 9 · Senior · Senior

Stage 5: Arithmetic and Reliability

Add the fixed-point gain transform (a framed MAC is an extension), explicit quantization, protected storage, and controlled error injection.

Why this matters

A corrected or poisoned beat that loses its metadata sends the wrong status to the wrong packet. Counting a corrected error as a second transfer breaks the accounting that stage 6 relies on.

After this lesson you can: keep data, correction status and poison state aligned through the pipeline, and state what SECDED and parity-only protection each guarantee.

Decision

CP-1 baseline / optional extension

Input/output format

Signed Q1.15 sample and coefficient; one output per input

Intermediate width

32-bit full product F=30; no accumulator in baseline

Quantization

Nearest-even once; truncation is a separately specified extension

Overflow

Saturate once; wrapping is an extension with different expected results

FIFO protection

32-bit payload SECDED plus metadata parity; parity-only is an alternative detection-only variant

Fault injection

One-shot XOR after encoding/before checking for transient experiments; persistent corruption needs storage modification and repair/reread evidence

The arithmetic and reliability decisions now extend the transaction model rather than creating a separate example: data, packet metadata, correction status, and poison state remain aligned through the same pipeline and output scoreboard.

Flow: SECDED encode, one-shot XOR injection for test, FIFO storage, SECDED decode. No error or a corrected error goes to the gain transform; an uncorrectable error forces data to zero with ue and poison set. Both reach the output beat with ce and ue flags. A metadata parity error leaves storage to quarantine and coordinated cancel.
The protected path: injection sits between the encoder and the checker, the decoder corrects or poisons the payload, and a metadata error leaves the normal path entirely.

Read top down along one beat. Only the payload goes through the decoder; metadata has its own check.

For SECDED, a correctable payload error is corrected before arithmetic/use and sets ce on the aligned beat. With trusted metadata, an uncorrectable payload sets ue/poison, forces output data to zero, and raises sticky error/IRQ. Baseline payload UE stops acceptance of new packets, completes the currently open input packet, and drains already accepted work; the poisoned beat still retires as delivered. CE/UE snapshots count flagged delivered beats; repeated storage corrections on one beat still count once, and a fault cancelled before delivery is not counted as a delivered UE. Preserve keep/last/owner from trusted metadata; if metadata itself is untrustworthy, quarantine and coordinated-reset cancellation are required, not forwarding a guessed tag or LAST.

A parity-only variant cannot correct and must not produce CE. It detects an odd-bit corruption under its stated fault model, then poisons/contains or cancels under the agreed policy. SECDED guarantees also require the assumed at-most-two-bit fault model. Protection for metadata must be strong enough to preserve ownership or use a separately trusted record; simple parity does not detect every corruption.

Partial final beat

Required aligned result

Epoch7/op3/tag1/index2, KEEP=0011, LAST=1; one payload bit corrupted in protected storage

SECDED corrects before transform; preserve KEEP/LAST/owner; CE=1, UE=0, poison=0. Increment CE once when this beat transfers at the output

Same final beat, detected uncorrectable payload error; metadata remains trusted

Output data=0, KEEP=0011, LAST=1, UE=1, poison=1; consumer closes that packet as failed, not valid numeric data. One delivered beat, not a hidden discard

Detected metadata corruption

Do not guess packet termination or error address from corrupt metadata. Quarantine the affected operation and cancel via coordinated reset; classify remaining owners explicitly

Transient XOR removed / persistent fault repaired

Transient removal shows normal decode only; prove stored repair by removing injection and rereading the repaired storage, including scrub/write arbitration

Check yourself Why should fault injection occur after encoding and before checking?

It emulates corruption in storage or transit without changing the normal encoder, allowing the real decoder and reporting path to be tested.

Remember

  • A correctable error is fixed before use and sets ce on that beat; an uncorrectable one sets ue and poison and forces the data to zero.

  • A poisoned beat is still delivered, so it counts as delivered, not discarded.

  • Parity detects but cannot correct, and SECDED assumes at most two bit errors.

Rule of thumb: the real decoder and reporting path must be exercised, so inject faults without changing the normal encoder.

Keep going

  • Practice: ECC memory RTL design

  • Code lab: ECC SECDED decode

  • Interview: run a mock interview on this topic

Related topics

  • Arithmetic datapaths

  • Memory reliability

  • Stage 6: Verification

Previous

307 / 350

Next: Stage 6: Verification

Up next

Up nextStage 6: Verification

Sign in to save progress

Practice this lessonReport an error

See also

  • Stage 1: Specification
  • Stage 2: CSR and Control
  • Stage 3: Buffered Streams