ReplacementAllocationInterface constructor

ReplacementAllocationInterface(
  1. int entryCount
)

Creates an allocation port.

Implementation

ReplacementAllocationInterface(this.entryCount) {
  if (entryCount < 1) {
    throw ArgumentError.value(entryCount, 'entryCount', 'Must be positive.');
  }
  setPorts([Logic.port('en'), Logic.port('commit')], [DataPortGroup.control]);
  setPorts([
    Logic.port('valid'),
    Logic.port('index', max(1, (entryCount - 1).bitLength)),
    Logic.port('evict'),
  ], [
    DataPortGroup.data
  ]);
}