CacheModel<T extends Logic, M extends Logic, C extends Logic, R extends Logic>.serialized constructor

CacheModel<T extends Logic, M extends Logic, C extends Logic, R extends Logic>.serialized({
  1. required Logic clk,
  2. required Logic reset,
  3. required List<CacheTransactionPort<T, M, C, R>> ports,
  4. required int setCount,
  5. required int waysPerSet,
  6. required CacheModelBackingStore backingStore,
  7. int dataReadLatency = 1,
  8. int backingReadLatency = 1,
  9. String name = 'cache_model',
})

Creates a model with the cycle timing of a SerializedCache that has a backing store, round-robin replacement, a data array of dataReadLatency and a backing store of backingReadLatency.

Ports, responses, evictions and storage match that RTL cycle for cycle; payloads are defined while their valid is high. Snapshots and portable execution images include the controller registers.

Implementation

CacheModel.serialized({
  required Logic clk,
  required Logic reset,
  required List<CacheTransactionPort<T, M, C, R>> ports,
  required int setCount,
  required int waysPerSet,
  required CacheModelBackingStore backingStore,
  int dataReadLatency = 1,
  int backingReadLatency = 1,
  String name = 'cache_model',
}) : this._create(
        clk: clk,
        reset: reset,
        ports: ports,
        setCount: setCount,
        waysPerSet: waysPerSet,
        maxOutstanding: 1,
        backingStore: backingStore,
        operationsPerCycle: 1,
        operationLatency: 1,
        replacement: null,
        timing: CacheModelTiming.serialized,
        dataReadLatency: dataReadLatency,
        backingReadLatency: backingReadLatency,
        name: name,
      );