RoundRNE constructor
Determine whether the input should be rounded up given
inp
the input bitvector to consider roundinglsb
the bit position at which to consider rounding
Implementation
RoundRNE(Logic inp, int lsb) {
final last = inp[lsb];
final guard = (lsb > 0) ? inp[lsb - 1] : Const(0);
final round = (lsb > 1) ? inp[lsb - 2] : Const(0);
final sticky = (lsb > 2) ? inp.getRange(0, lsb - 2).or() : Const(0);
_doRound = guard & (last | round | sticky);
}