createModule method

  1. @override
Module createModule()
override

Creates a Module instance as configured.

Implementation

@override
Module createModule() {
  final command = TensorAddressCommand(
      addressWidth: addressWidthKnob.value,
      mWidth: mWidthKnob.value,
      nWidth: nWidthKnob.value,
      kWidth: kWidthKnob.value,
      commandIdWidth: commandIdWidthKnob.value);
  final result = TensorAddressBeat(
      addressWidth: addressWidthKnob.value,
      mWidth: mWidthKnob.value,
      nWidth: nWidthKnob.value,
      kWidth: kWidthKnob.value,
      commandIdWidth: commandIdWidthKnob.value);
  return boundaryKnob.value == InferenceConfiguratorBoundary.readyValid
      ? TensorStridedAddressGenerator(
          clk: Logic(),
          reset: Logic(),
          upstream: ReadyValidInterface(command),
          downstream: ReadyValidInterface(result),
          counterWidth: counterWidthKnob.value,
          clearCounters: clearCountersKnob.value ? Logic() : null)
      : TensorStridedAddressGeneratorCore(
          clk: Logic(),
          reset: Logic(),
          command: command,
          resultSchema: result,
          load: Logic(),
          advance: Logic(),
          counterWidth: counterWidthKnob.value,
          clearCounters: clearCountersKnob.value ? Logic() : null);
}