CompoundAdder constructor

CompoundAdder(
  1. Logic a,
  2. Logic b, {
  3. String name = 'compound_adders',
})

Takes in input a and input b and return the sum of the addition result and sum1 sum + 1. The width of input a and b must be the same.

Implementation

CompoundAdder(super.a, super.b, {super.name = 'compound_adders'}) {
  if (a.width != b.width) {
    throw RohdHclException('inputs of a and b should have same width.');
  }
  addOutput('sum1', width: a.width + 1);
}