createModule method

  1. @override
Module createModule()
override

Creates a Module instance as configured.

Implementation

@override
Module createModule() {
  final val = directionKnob.value;
  final rotateConstructor =
      val == RotateDirection.left ? RotateLeft.new : RotateRight.new;
  return rotateConstructor(Logic(width: originalWidthKnob.value),
      Logic(width: rotateWidthKnob.value),
      maxAmount: maxAmountKnob.value,
      definitionName:
          'Rotate${val == RotateDirection.left ? "Left" : "Right"}');
}