createModule method

  1. @override
Module createModule()
override

Creates a Module instance as configured.

Implementation

@override
Module createModule() {
  final sgn1 = Logic();
  final inp1 = Logic(width: inputWidthKnob.value);
  final sgn2 = Logic();
  final carry = Logic();

  final inp2 = Logic(width: inputWidthKnob.value);
  return [
    if (anticipator.value == LeadingDigitAnticipate)
      LeadingDigitAnticipate(inp1, inp2)
    else if (anticipator.value == LeadingZeroAnticipate)
      LeadingZeroAnticipate(sgn1, inp1, sgn2, inp2,
          definitionName: 'LeadingZeroAnticipate')
    else
      LeadingZeroAnticipateCarry(sgn1, inp1, sgn2, inp2,
          endAroundCarry: carry, definitionName: 'LeadingZeroAnticipate')
  ].first;
}