AssociativeInvalidateLookupPort constructor

AssociativeInvalidateLookupPort({
  1. required int indexWidth,
  2. required int keyWidth,
})

Creates a lookup port.

Implementation

AssociativeInvalidateLookupPort(
    {required this.indexWidth, required this.keyWidth}) {
  if (indexWidth < 1 || keyWidth < 1) {
    throw ArgumentError('Key and index widths must be positive.');
  }
  setPorts([Logic.port('key', keyWidth), Logic.port('invalidate')],
      [DataPortGroup.control]);
  setPorts([Logic.port('index', indexWidth), Logic.port('hit')],
      [DataPortGroup.data]);
}