temporary ~pbs
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 19 Aug 2019 14:28:21 +0000 (15:28 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 19 Aug 2019 14:28:21 +0000 (15:28 +0100)
src/ieee754/part_mul_add/multiply.py

index c443b629505ae85183b36b658f577ac5e1af663e..0e78bd9ddb3b54cb122b6fe916464c18b0cc9714 100644 (file)
@@ -565,13 +565,16 @@ class Part(Elaboratable):
         m = Module()
 
         pbs, parts, delayed_parts = self.pbs, self.parts, self.delayed_parts
+        # negated-temporary copy of partition bits
+        npbs = Signal.like(pbs, reset_less=True)
+        m.d.comb += npbs.eq(~pbs)
         byte_count = 8 // len(parts)
         for i in range(len(parts)):
             pbl = []
-            pbl.append(~pbs[i * byte_count - 1])
+            pbl.append(npbs[i * byte_count - 1])
             for j in range(i * byte_count, (i + 1) * byte_count - 1):
                 pbl.append(pbs[j])
-            pbl.append(~pbs[(i + 1) * byte_count - 1])
+            pbl.append(npbs[(i + 1) * byte_count - 1])
             value = Signal(len(pbl), reset_less=True)
             m.d.comb += value.eq(Cat(*pbl))
             m.d.comb += parts[i].eq(~(value).bool())