From: Luke Kenneth Casson Leighton Date: Mon, 15 Jul 2019 16:45:56 +0000 (+0100) Subject: hilarious: fp upconvert of zero was wrong X-Git-Tag: ls180-24jan2020~834 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=23f909f9a968fd5def056ebe53ca4a3a7ec5352d;p=ieee754fpu.git hilarious: fp upconvert of zero was wrong --- diff --git a/src/ieee754/fcvt/pipeline.py b/src/ieee754/fcvt/pipeline.py index 865b036b..16f602b9 100644 --- a/src/ieee754/fcvt/pipeline.py +++ b/src/ieee754/fcvt/pipeline.py @@ -108,6 +108,8 @@ class FPCVTUpConvertMod(Elaboratable): m.d.comb += self.o.of.sticky.eq(0) m.d.comb += self.o.of.m0.eq(a1.m[0]) m.d.comb += self.o.out_do_z.eq(0) # normalise + with m.Else(): + m.d.comb += self.o.z.zero(a1.s) # copy the context (muxid, operator) m.d.comb += self.o.oz.eq(self.o.z.v)