hilarious: fp upconvert of zero was wrong
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 15 Jul 2019 16:45:56 +0000 (17:45 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 15 Jul 2019 16:45:56 +0000 (17:45 +0100)
src/ieee754/fcvt/pipeline.py

index 865b036bb6f218711237bfc137339125e49a980b..16f602b97b41f4dbd4a02fd2df1c1fdffe5e634d 100644 (file)
@@ -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)