MultiPortCache<T extends Logic> constructor

MultiPortCache<T extends Logic>({
  1. required Logic clk,
  2. required Logic reset,
  3. required int setCount,
  4. required int waysPerSet,
  5. List<CacheLookupPort<T>>? lookupPorts,
  6. List<CacheFillPort<T>>? fillPorts,
  7. int maxFillsPerSet = 1,
  8. CacheReplacement replacement = CacheReplacement.roundRobin,
  9. CacheDataStorage? dataStorage,
  10. MemoryArrayFunctor<T>? dataMemory,
  11. CacheReadDuringFill readDuringFill = CacheReadDuringFill.oldData,
  12. CacheEvictionConcurrency evictionConcurrency = CacheEvictionConcurrency.parallel,
  13. AssociativeMemoryFunctor tagMemory = parallelAssociativeMemoryFunctor,
  14. String name = 'multi_port_cache',
  15. @Deprecated('Use lookupPorts instead.') List<CacheLookupPort<T>>? lookups,
  16. @Deprecated('Use fillPorts instead.') List<CacheFillPort<T>>? fills,
})

Creates a cache with multiple lookup and fill ports.

lookupPorts and fillPorts are required; lookups and fills are their deprecated former names.

Implementation

MultiPortCache({
  required Logic clk,
  required Logic reset,
  required int setCount,
  required int waysPerSet,
  List<CacheLookupPort<T>>? lookupPorts,
  List<CacheFillPort<T>>? fillPorts,
  int maxFillsPerSet = 1,
  CacheReplacement replacement = CacheReplacement.roundRobin,
  CacheDataStorage? dataStorage,
  MemoryArrayFunctor<T>? dataMemory,
  CacheReadDuringFill readDuringFill = CacheReadDuringFill.oldData,
  CacheEvictionConcurrency evictionConcurrency =
      CacheEvictionConcurrency.parallel,
  AssociativeMemoryFunctor tagMemory = parallelAssociativeMemoryFunctor,
  String name = 'multi_port_cache',
  @Deprecated('Use lookupPorts instead.') List<CacheLookupPort<T>>? lookups,
  @Deprecated('Use fillPorts instead.') List<CacheFillPort<T>>? fills,
}) : this._(
        clk: clk,
        reset: reset,
        lookups:
            resolveAssociativePortList(lookupPorts, lookups, 'lookupPorts'),
        fills: resolveAssociativePortList(fillPorts, fills, 'fillPorts'),
        setCount: setCount,
        waysPerSet: waysPerSet,
        maxFillsPerSet: maxFillsPerSet,
        replacement: replacement,
        dataStorage: dataStorage,
        dataMemory: dataMemory,
        readDuringFill: readDuringFill,
        evictionConcurrency: evictionConcurrency,
        tagMemory: tagMemory,
        name: name,
      );