SetAssociativeCacheLayout class
Immutable geometry and address mapping for set-associative storage.
Tag, data, and validity sidecars share the same [set, way] slot mapping.
The layout does not select replacement or retirement policy; callers can
pair it with any associative lookup and invalidation controller.
Constructors
- SetAssociativeCacheLayout({required int addrWidth, required int setCount, required int wayCount, required int lineWidth})
- Creates set-associative storage geometry.
Properties
- addrWidth → int
-
Width of the incoming address.
final
- entryCount → int
-
Total number of tag/data/valid slots.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- lineWidth → int
-
Width of one cache line payload.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- setCount → int
-
Number of cache sets.
final
- setWidth → int
-
Width of the set index.
final
- tagWidth → int
-
Width of the tag sidecar.
final
- wayCount → int
-
Number of ways in each set.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setForAddress(
int address) → int -
Returns the set selected by
address. -
slotFor(
int set, int way) → int -
Returns the flattened sidecar index for
setandway. -
tagForAddress(
int address) → int -
Returns the tag selected by
address. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited