store mask in intermediary
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 17 Aug 2019 07:14:10 +0000 (08:14 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 17 Aug 2019 07:14:10 +0000 (08:14 +0100)
src/ieee754/part_mul_add/multiply.py

index f0bb95b5dc5cabae2e3def234f21a7391861cb85..be736e8e5240bb0822dd7c458990325a024f6d51 100644 (file)
@@ -323,7 +323,10 @@ class AddReduce(Elaboratable):
             intermediate_terms.append(intermediate_term)
             m.d.comb += intermediate_term.eq(value)
 
-        part_mask = self._reg_partition_points.as_mask(len(self.output))
+        # store mask in intermediary (simplifies graph)
+        part_mask = Signal(len(self.output), reset_less=True)
+        mask = self._reg_partition_points.as_mask(len(self.output))
+        m.d.comb += part_mask.eq(mask)
 
         # create full adders for this recursive level.
         # this shrinks N terms to 2 * (N // 3) plus the remainder