FloatingPointRounder.fromGRS constructor

FloatingPointRounder.fromGRS({
  1. required Logic retainedLsb,
  2. required Logic guard,
  3. required FloatingPointRoundingMode roundingMode,
  4. Logic? roundBit,
  5. Logic? sticky,
  6. Logic? extraSticky,
  7. Logic? sign,
})

Determines rounding from explicit retained and discarded-bit fields.

roundBit and sticky default to zero for datapaths that collapse or do not generate those positions. extraSticky includes discarded information from an earlier alignment or normalization operation.

Implementation

FloatingPointRounder.fromGRS(
    {required Logic retainedLsb,
    required Logic guard,
    required FloatingPointRoundingMode roundingMode,
    Logic? roundBit,
    Logic? sticky,
    Logic? extraSticky,
    Logic? sign}) {
  _configure(
      retainedLsb: retainedLsb,
      guard: guard,
      roundBit: roundBit ?? Const(0),
      sticky: sticky ?? Const(0),
      extraSticky: extraSticky,
      roundingMode: roundingMode,
      sign: sign);
}