addStopSign method

void addStopSign(
  1. List<Logic> addend,
  2. SignBit sign
)

Helper function for sign extension routines: For signed operands, set the MSB to sign, otherwise add this sign bit.

Implementation

void addStopSign(List<Logic> addend, SignBit sign) {
  if (!signed) {
    addend.add(sign);
  } else {
    addend.last = sign;
  }
}