createModule method

  1. @override
Module createModule()
override

Creates a Module instance as configured.

Implementation

@override
Module createModule() {
  final entryCount = max(1, entryCountKnob.value);
  final valueWidth = max(1, valueWidthKnob.value);
  // Keep the index-only configuration free of selection-value ports.
  // ignore: deprecated_member_use_from_same_package
  return AssociativeMatchSelector(
    matchVector: Logic(name: 'matchVector', width: entryCount),
    selectionValues: useSelectionValuesKnob.value
        ? [
            for (var index = 0; index < entryCount; index++)
              Logic(name: 'selectionValue$index', width: valueWidth)
          ]
        : null,
  );
}