Add MRAMMemory non-volatile peripheral with fault injection#185
Open
neilberkman wants to merge 2 commits intorenode:masterfrom
Open
Add MRAMMemory non-volatile peripheral with fault injection#185neilberkman wants to merge 2 commits intorenode:masterfrom
neilberkman wants to merge 2 commits intorenode:masterfrom
Conversation
421be7c to
7770dc3
Compare
dd72f8d to
6e7abdd
Compare
…ction Non-volatile memory model with configurable word-write semantics and deterministic fault injection for OTA update resilience testing. Features: - Configurable word size (default 8 bytes) for write granularity - Read-modify-write semantics preserving unaddressed bytes within words - Deterministic power-loss fault injection at configurable write count - Partial-program simulation with configurable tear behavior (RetainOldDataOnFault: MRAM retains old data, flash erases) - Bit-level corruption mode modeling partial cell state transitions - Write trace recording for offline analysis and trace replay - Sticky fault tracking for multi-write sequences Signed-off-by: Neil Berkman <neil@xuku.com>
Add one-shot transient read-fault injection to MRAMMemory. The read fault corrupts the value returned to the CPU without modifying NVM contents, modeling bit flips in the MRAM sense-amplifier path. Features: - ReadFaultAddress: peripheral-relative address to target - ReadFaultSkipCount: skip N qualifying reads before firing - ReadFaultBitFlips: configurable bit flip count (default 1-3) - ReadFaultSeed: deterministic PRNG seed for reproducibility - One-shot: auto-disarms after first fire Also fix Reset() to use `new` instead of `override` since ArrayMemory.Reset() is not virtual, and re-implement IBytePeripheral/IWordPeripheral/IDoubleWordPeripheral so bus-dispatched reads route through the fault-injection interception layer.
9d3d916 to
84c4a2f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issue
renode/renode#875
Description
New feature:
MRAMMemorynon-volatile memory peripheral extendingArrayMemoryinAntmicro.Renode.Peripherals.Memory.Reset()preserves storage contentsWordSize(default 8 bytes) with erase-then-program cycle at word boundariesInjectPartialWrite()simulates power-cut mid-write,InjectFault()for arbitrary corruption,FaultAtWordWritefor automatic injection at Nth write indexEnforceWordWriteSemanticstoggle,EraseFillbyteUsage example
Robot tests are in companion PR renode/renode#876.
Additional information
The Tardigrade project uses this peripheral for OTA fault-injection campaigns.