remove need to pass register_levels to AddReduceSingle
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 23 Aug 2019 10:17:55 +0000 (11:17 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 23 Aug 2019 10:17:55 +0000 (11:17 +0100)
src/ieee754/part_mul_add/multiply.py

index 672bbfd33acdef4510167e6ec1d8c78e0bf3603f..92afc2bbd85f18e6305a7f85576af793d2d8e2af 100644 (file)
@@ -616,7 +616,7 @@ class AddReduce(Elaboratable):
         m.d.comb += i.eq_from(partition_points, inputs, part_ops)
         for idx in range(len(self.levels)):
             mcur = self.levels[idx]
-            if 0 in mcur.register_levels:
+            if idx in self.register_levels:
                 m.d.sync += mcur.i.eq(i)
             else:
                 m.d.comb += mcur.i.eq(i)