From: Luke Kenneth Casson Leighton Date: Sun, 28 Jul 2019 17:09:44 +0000 (+0100) Subject: add TODO, check mantissa overflow X-Git-Tag: ls180-24jan2020~695 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3de0b9ec52bd5f472afe11638d114d6fdc37ee5a;p=ieee754fpu.git add TODO, check mantissa overflow --- diff --git a/src/ieee754/fcvt/pipeline.py b/src/ieee754/fcvt/pipeline.py index 90c4c0b4..eaa320bf 100644 --- a/src/ieee754/fcvt/pipeline.py +++ b/src/ieee754/fcvt/pipeline.py @@ -150,6 +150,7 @@ class FPCVTFloatToIntMod(Elaboratable): m.d.comb += of.sticky.eq(msr.m_out[0]) m.d.comb += of.m0.eq(msr.m_out[3]) + # XXX TODO: check if this overflows the mantissa with m.If(of.roundz): m.d.comb += self.o.z.eq(msr.m_out[3:]+1) with m.Else():