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
    • SRAM and ROM
    • Register Files
    • Valid/Ready Handshake
    • AXI-Lite
    • AXI-Stream
    • Bus Integration
    • Synchronous FIFO
    • Register-Map and CSR RTL
    • Memory Reliability
      • Failure Model and Protection Choice
      • Parity Datapath
      • SECDED Encode and Syndrome
      • Correction and Reporting
      • Partial Writes and Scrubbing
      • Initialization, Injection, and Signoff
      • SECDED on a 32-bit Word, Worked
    • Peripheral RTL Integration
    • Full AXI4: RTL Roadmap
  • Advanced RTL28
  • Senior & Interview76
  • Glossary and Notation
Loading lesson

‹Memory Reliability
  1. Topics
  2. RTL Design
  3. Memory & Buses
  4. Memory Reliability
  5. Initialization, Injection, and Signoff

Part 7 · Memory & Buses · Intermediate

Initialization, Injection, and Signoff

Establish valid protection state, inject every error class, and hand off repair and diagnostic behavior.

Why this matters

A clean syndrome does not prove a word was ever written: all-zero data and check bits form a valid codeword for parity and SECDED. Fault injection that is left enabled in production is a hole in the protection.

After this lesson you can: make uninitialised memory safe, inject transient and persistent faults for tests, and list the evidence needed for ECC signoff.

Uninitialized data and check bits are untrusted, not a guaranteed mismatch: their power-up values may accidentally form a valid codeword. For example, all-zero data and check bits pass the even-parity and SECDED schemes described here. A clean syndrome therefore does not prove initialization. Either initialize data and check bits together, track per-line validity independently of the syndrome, or block reads until software/hardware has written the location.

Check yourself An unwritten line contains a valid all-zero codeword and its syndrome is clean. May it be returned as initialized data?

No. Protection checks codeword consistency, not write history. If the interface requires initialized contents, independent line validity or the initialization gate must still block that read, even though no ECC error is detected.

Integration work: implement line validity, the frozen 39-bit layout, response-aligned reporting, address-atomic partial writes and bounded scrub arbitration. The table below is the test plan. Transient read-path XOR tests the decoder but leaves storage unchanged. Persistent corruption must alter the stored codeword once, so it needs a second, test-only path: a raw-codeword write that bypasses the encoder (locked in production) or a backdoor/MBIST write. The read-path XOR is for transient decoder tests only. After the corruption, disable injection, run repair, then reread actual storage with injection still off to prove repair.

Functional write data goes through the ECC encoder into 39-bit storage. A test-only raw-codeword write also reaches storage, bypassing the encoder. Storage feeds an inject XOR on the read path, then the decoder, which outputs data and CE or UE.
Two injection points: a read-path XOR flips bits on the way to the decoder and leaves storage clean, while a test-only raw-codeword write stores a corrupt word that stays until repaired

Read the picture from the top: the two test paths touch different places, so they test different things.

  • Read-path XOR: tests the decoder and reporting. Turn the mask off and the next read is clean, because storage never changed.

  • Raw-codeword write: tests repair. The bad word stays in storage until a scrub or write fixes it, so a reread with injection off proves the repair.

Planned harness phase

Stimulus and independent check

Initialization

Hold reads blocked after reset, including an unwritten all-zero codeword; initialize data+ECC then permit reads

39-bit decoder coverage

For known data, inject each of 39 single masks and all 741 distinct pairs; expect original data+CE for singles, UE/poison for pairs; keep an independent golden word

Persistent repair

Corrupt stored position 5 once through the raw-codeword write bypass, read CE, scrub/rewrite under address ownership, remove all masks, reread stored 39 bits: clean syndrome and golden data

Partial write/collision

After stored CE, merge selected golden bytes; race functional write versus scrub at same address; final storage must contain newer functional data with matching ECC

Reporting/backpressure

Pipeline A/B, corrupt A, stall response: first address=A and exactly one event/count; check saturating counter and CSR set/clear collision

Test

Expected result

Flip each data bit

Every location yields a CE and corrected data

Flip each check bit

Correct classification; data unchanged where appropriate

Flip every pair in a small codeword

UE, never silent correction

Partial write after CE

Correct old word, merge bytes, store clean codeword

Scrub collision

No lost functional access or stale rewrite

Repeated address faults

Diagnostic capture and repair/retirement escalation

  • Keep the transient injection XOR after storage and before decode so production encoding is unchanged; keep any raw-codeword write bypass test-only and locked in production.

  • Protect injection controls from accidental software access.

  • Verify sticky flags, counters, first-error capture, and clear semantics through the CSR interface.

  • Hand off memory instance mapping, protection width, repair pins, MBIST ownership, and power/reset behavior.

Interview

Connect ECC RTL to its operating lifecycle: initialize, inject, classify, correct, report, scrub, detect recurrence, and hand permanent failures to MBIST or repair.

Check yourself What is the most dangerous ECC verification failure?

A double-bit error that the decoder miscorrects and returns as valid data. Exhaustive pair injection on a reduced-width configuration is a strong way to expose it.

Remember

  • Initialise data and check bits together, track line validity separately from the syndrome, or block reads until written.

  • A read-path XOR tests the decoder only. A persistent fault needs a test-only raw-codeword write, or a backdoor or MBIST write.

  • Lock injection controls in production and verify sticky flags, counters and first-error capture through the CSR interface.

Rule of thumb: treat the protection as unproven until every syndrome and response path has been injected.

How this was checked

The integration items and test tables on this page are a plan. They have not been run against a final SRAM and harness.

Keep going

  • Practice: ECC memory RTL design

  • Interview: run a mock interview on this topic

Related topics

  • MBIST integration

  • Memory repair flow

Previous

237 / 350

Next: SECDED on a 32-bit Word, Worked

Up next

Up nextSECDED on a 32-bit Word, Worked

Sign in to save progress

Practice this lessonReport an error

See also

  • Failure Model and Protection Choice
  • Parity Datapath
  • SECDED Encode and Syndrome