createModule method

  1. @override
Module createModule()
override

Creates a Module instance as configured.

Implementation

@override
Module createModule() {
  final dataWidth = max(1, dataWidthKnob.value);
  final resourceCount = max(1, resourceCountKnob.value);
  final tagWidth = max(1, tagWidthKnob.value);
  return ReadyValidResourceClassifier<Logic>(
    upstream: ReadyAndValidInterface<Tagged<Logic>>(Tagged(
        Logic(name: 'upstream_data', width: dataWidth),
        tagWidth: tagWidth)),
    downstream: ReadyAndValidInterface<ResourceTransaction<Logic>>(
        ResourceTransaction(Logic(name: 'downstream_data', width: dataWidth),
            tagWidth: tagWidth, resourceCount: resourceCount)),
    resourceCount: resourceCount,
    selectionGenerator: _lowBitsResourceSelectionGenerator,
    selectionName: 'lowBits',
  );
}