createModule method

  1. @override
Module createModule()
override

Creates a Module instance as configured.

Implementation

@override
Module createModule() {
  final entryCount = max(1, entryCountKnob.value);
  if (boundaryKnob.value == ConfiguratorBoundary.readyValid) {
    return ReadyValidAssociativeInvalidator(
      clk: Logic(name: 'clk'),
      reset: Logic(name: 'reset'),
      request: ReadyValidInterface(
          AssociativeInvalidationRequest(entryCount: entryCount)),
      updates: IrrevocableReadyValidInterface(AssociativeUpdateRequest(
          keyWidth: 1,
          indexWidth: scheduledAssociativeIndexWidth(entryCount))),
      completion: IrrevocableReadyValidInterface(Logic(name: 'completion')),
      entryCount: entryCount,
      keyWidth: 1,
    );
  }
  return AssociativeInvalidator(
    clk: Logic(name: 'clk'),
    reset: Logic(name: 'reset'),
    load: Logic(name: 'load'),
    request: AssociativeInvalidationRequest(entryCount: entryCount),
    advance: _consumeControl(retainResultsKnob, 'advance'),
    consumeCompletion:
        _consumeControl(retainResultsKnob, 'consumeCompletion'),
  );
}