AssociativeModel class

Clock-stepped software model for indexed CAM updates and associative lookup.

Each call to step samples one request per port. An update with latency zero commits on that step; a lookup with latency zero completes on that step. Longer latencies are measured in subsequent calls to step. Lookup visibility is relative to updates committing on the same step.

This API uses null for a disabled request, rather than modeling uncertain enables or indices. Keys, masks, and stored validity retain four-state values. Raw access and snapshots do not capture external callers.

Implemented types

Constructors

AssociativeModel(AssociativeMemoryRequest configuration, {AssociativeModelMatcher? matcher})
Creates an initially invalid associative memory.

Properties

behavioralModel → ComponentModel
The selected portable model, or null when unavailable.
no setteroverride
componentModel → ComponentModel
The selected portable model, or null when this is an RTL implementation.
no setteroverride
componentModelVerilog → ComponentModelVerilog
The selected Verilog model, or null if unavailable.
no setteroverride
configuration → AssociativeMemoryRequest
Requested geometry and behavior.
final
cycle → int
Number of calls to step since creation or the last restored snapshot.
no setter
description → AssociativeModelDescription
Immutable configuration shared by execution backends.
latefinal
hashCode → int
The hash code for this object.
no setterinherited
matcher → AssociativeModelMatcher?
Required pure implementation for context-qualified matching.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stateTransactionCapabilities → StateTransactionCapabilities
Snapshot and restore behavior exposed by this component.
no setteroverride
stateTransactions → StateTransactionEndpoint<AssociativeModelExecutionImage>
Snapshot and restore endpoint.
latefinal

Methods

entry(int index) → AssociativeModelEntry
Reads key and validity without applying lookup semantics.
generateSystemC({required String className, SystemCModelOptions options = const SystemCModelOptions()}) → String
Emits a standalone SystemC definition using className.
override
load(AssociativeModelState image, {bool replace = false}) → void
Validates the complete image before changing state.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
peek(int address) → LogicValue?
Reads a key, or null when the entry is definitely invalid.
override
peekBigInt(BigInt address) → LogicValue?
Reads raw state at an arbitrary-width logical address.
override
poke(int address, LogicValue value) → void
Writes a valid key without architectural update timing.
override
pokeBigInt(BigInt address, LogicValue value) → void
Replaces raw state at an arbitrary-width logical address.
override
reset() → void
Invalidates all entries and cancels in-flight work.
restoreExecution(AssociativeModelExecutionImage image) → void
Atomically restores an execution image from a compatible configuration.
snapshot() → AssociativeModelState
Captures detached state without allocating hardware signals.
override
snapshotExecution() → AssociativeModelExecutionImage
Captures raw state and all in-flight operations.
step({required List<AssociativeModelLookup?> lookups, required List<AssociativeModelUpdate?> updates}) → List<AssociativeModelResult?>
Samples requests and returns completions due on this step, by port.
toString() → String
A string representation of this object.
inherited
writeEntry(int index, {required LogicValue key, required LogicValue valid}) → void
Writes raw key and validity, atomically validating duplicate policy.

Operators

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