From dbb743201e5145ebb2afaded8f1dadd068e99249 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Tue, 20 Aug 2019 14:53:58 +0100 Subject: [PATCH] move expanded_part_pts further up --- src/ieee754/part_mul_add/multiply.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/ieee754/part_mul_add/multiply.py b/src/ieee754/part_mul_add/multiply.py index a0c1599e..084f7dde 100644 --- a/src/ieee754/part_mul_add/multiply.py +++ b/src/ieee754/part_mul_add/multiply.py @@ -984,6 +984,13 @@ class Mul8_16_32_64(Elaboratable): tl.append(pb) m.d.comb += pbs.eq(Cat(*tl)) + # create (doubled) PartitionPoints (output is double input width) + expanded_part_pts = PartitionPoints() + for i, v in self.part_pts.items(): + ep = Signal(name=f"expanded_part_pts_{i*2}", reset_less=True) + expanded_part_pts[i * 2] = ep + m.d.comb += ep.eq(v) + # local variables signs = [] for i in range(8): @@ -1037,12 +1044,6 @@ class Mul8_16_32_64(Elaboratable): m.d.comb += mod.orin[i].eq(l[i]) terms.append(mod.orout) - expanded_part_pts = PartitionPoints() - for i, v in self.part_pts.items(): - signal = Signal(name=f"expanded_part_pts_{i*2}", reset_less=True) - expanded_part_pts[i * 2] = signal - m.d.comb += signal.eq(v) - add_reduce = AddReduce(terms, 128, self.register_levels, -- 2.30.2