PortableSparseMemoryStorage class final
Sparse storage with a portable, constant value for unpopulated reads.
Unlike an arbitrary MemoryStorage.onInvalidRead callback, this behavior
can be reproduced by the behavioral SystemC exporter.
- Inheritance
-
- Object
- MemoryStorage
- SparseMemoryStorage
- PortableSparseMemoryStorage
Constructors
- PortableSparseMemoryStorage({required int addrWidth, required int dataWidth, required LogicValue missingReadValue})
- Creates identity-addressed sparse storage with a fixed missing-read value.
Properties
-
addresses
→ List<
LogicValue> -
A list of addresses which have data stored in this memory.
no setterinherited
- addrWidth → int
-
The width of addresses.
finalinherited
- alignAddress → LogicValue Function(LogicValue addr)
-
A function to align addresses when used for transactions.
finalinherited
- dataWidth → int
-
The width of data.
finalinherited
- hasCustomAddressAlignment → bool
-
Whether address alignment was supplied by the caller.
finalinherited
- hasDefaultPortableBehavior → bool
-
Whether callbacks and address mapping have their built-in behavior.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- invalidWritePolicy → MemoryStorageInvalidWritePolicy
-
Configured invalid-write policy.
finalinherited
- isEmpty → bool
-
Returns
trueif there is no data stored in this memory.no setterinherited - missingReadValue → LogicValue
-
The value returned when an address is not populated.
final
- onInvalidRead → LogicValue Function(LogicValue addr, int dataWidth)
-
A function called if a read is made to an address that has no data.
finalinherited
- onInvalidWrite → void Function()
-
A function called when a write has uncertain control or address bits.
finalinherited
- preserveHighImpedance → bool
-
Whether raw setData and symbolic state loads preserve high-impedance.
The inherited timed writeData API still normalizes high-impedance bits.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- symbolicAddressMappingId → String
-
Stable identity of the address mapping used by symbolic writes.
no setterinherited
-
uncertainWrites
→ List<
UncertainMemoryWrite> -
Symbolic writes affecting words not explicitly represented in storage.
no setterinherited
- unknownAddressMappingId → String?
-
Stable identity for the custom symbolic address mapping.
finalinherited
- unknownAddressMatcher → UnknownAddressMatcher?
-
Matcher required to interpret uncertain addresses with custom alignment.
finalinherited
Methods
-
dumpMemString(
{int radix = 16, int bitsPerAddress = 8}) → String -
Dumps the contents of memory to a verilog-compliant hex file.
inherited
-
getData(
LogicValue addr) → LogicValue? -
Returns the data at
addr, ornullif it is not present.inherited -
invalidWrite(
) → void -
Triggers behavior associated with an invalid write, including calling
onInvalidWrite. Its effect is controlled by invalidWritePolicy.
inherited
-
loadMemHex(
String hexMemContents) → void -
Loads a Verilog-compliant hexadecimal memory file.
inherited
-
loadMemString(
String memContents, {int radix = 16, int bitsPerAddress = 8}) → void -
Reads a verilog-compliant mem file and preloads memory with it.
inherited
-
loadSymbolicState(
Map< LogicValue, LogicValue> entries, List<UncertainMemoryWrite> writes, {bool replace = false}) → void -
Validates and atomically applies symbolic writes and explicit entries.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readData(
LogicValue addr) → LogicValue -
Aligns the address with alignAddress, then returns either the getData
result in storage or else onInvalidRead's result.
inherited
-
reset(
) → void -
Resets all memory to initial state.
inherited
-
setData(
LogicValue addr, LogicValue data) → void -
Loads
dataintoaddrdirectly into storage.inherited -
toString(
) → String -
A string representation of this object.
inherited
-
writeData(
LogicValue addr, LogicValue data) → void -
Performs some validation on a write, aligns the address with
alignAddress, and then calls setData.
inherited
-
writeUncertainAddress(
LogicValue address, LogicValue affectedBits) → void -
Records a write that may affect any word compatible with
address.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited