code comments
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 25 Aug 2019 11:38:34 +0000 (12:38 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 25 Aug 2019 11:38:34 +0000 (12:38 +0100)
src/ieee754/fpmul/mul0.py
src/ieee754/fpmul/mul1.py

index 6b00762a33664eb508c8081b09aff7f5325cac2a..7f19fcfc6d566ae647565e26fccf40139ebfe811 100644 (file)
@@ -41,6 +41,7 @@ class FPMulStage0Mod(PipeModBase):
                      self.o.z.s.eq(self.i.a.s ^ self.i.b.s)
         ]
 
+        # pass through context
         comb += self.o.oz.eq(self.i.oz)
         comb += self.o.out_do_z.eq(self.i.out_do_z)
         comb += self.o.ctx.eq(self.i.ctx)
index ebae4fd5367eded67664a7bdeab1d2fb726fa5ed..45826b797d040e623fe94a6227d0553d036d7720 100644 (file)
@@ -29,8 +29,9 @@ class FPMulStage1Mod(PipeModBase):
         m = Module()
         comb = m.d.comb
 
-        # copy sign
+        # copy sign as-is
         comb += self.o.z.s.eq(self.i.z.s)
+
         # results are in the range 0.25 to 0.999999999999
         # sometimes the MSB will be zero, (0.5 * 0.5 = 0.25 which
         # in binary is 0b010000) so to compensate for that we have
@@ -53,6 +54,7 @@ class FPMulStage1Mod(PipeModBase):
             self.o.of.sticky.eq(p[0:mw].bool()) # sticky
         ]
 
+        # pass through context
         comb += self.o.out_do_z.eq(self.i.out_do_z)
         comb += self.o.oz.eq(self.i.oz)
         comb += self.o.ctx.eq(self.i.ctx)