CacheModelBackingStore class

Sparse, persistent backing storage for CacheModel.

Unwritten blocks contain unknown data and metadata. Resetting a cache does not reset this object; callers may share it or initialize it explicitly.

Implemented types
Annotations

Constructors

CacheModelBackingStore({required int dataWidth, required int metadataWidth, int? addrWidth, @Deprecated('Use addrWidth instead.') int? addressWidth})
Creates an empty backing store.

Properties

addressWidth → int
Former name of addrWidth.
no setter
addrWidth → int
Width of a block address.
final
dataWidth → int
Width of block data.
final
hashCode → int
The hash code for this object.
no setterinherited
metadataWidth → int
Width of opaque line metadata.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

load(CacheModelBackingStoreImage image, {bool replace = false}) → void
Validates and atomically overlays or replaces the sparse backing state.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
peek(int address) → LogicValue?
Reads raw data, or null when the block has not been initialized.
override
peekBigInt(BigInt address) → LogicValue?
Reads raw state at an arbitrary-width logical address.
override
poke(int address, LogicValue value) → void
Writes raw data, preserving existing metadata or initializing it to X.
override
pokeBigInt(BigInt address, LogicValue value) → void
Replaces raw state at an arbitrary-width logical address.
override
read(BigInt address) → CacheModelBlock
Reads a block, returning unknown values for an uninitialized address.
snapshot() → CacheModelBackingStoreImage
Captures a detached image of every initialized block and its metadata.
override
toString() → String
A string representation of this object.
inherited
write(BigInt address, {required LogicValue data, required LogicValue metadata}) → void
Writes a complete block and its metadata.

Operators

operator ==(Object other) → bool
The equality operator.
inherited