document guard/round/sticky and tot
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 14 Feb 2019 14:06:31 +0000 (14:06 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 14 Feb 2019 14:06:38 +0000 (14:06 +0000)
src/add/nmigen_add_experiment.py

index a4525883f4ac31c43f2621bea0f62c429d709a62..5f4642c4b8d1e2985b99d9f60256bcd885f36af4 100644 (file)
@@ -102,11 +102,11 @@ class FPADD:
         b = FPNum(self.width)
         z = FPNum(self.width, 24)
 
-        guard = Signal()
-        round_bit = Signal()
-        sticky = Signal()
+        tot = Signal(28)     # sticky/round/guard bits, 23 result, 1 overflow
 
-        tot = Signal(28)
+        guard = Signal()     # tot[2]
+        round_bit = Signal() # tot[1]
+        sticky = Signal()    # tot[0]
 
         with m.FSM() as fsm: