From: Luke Kenneth Casson Leighton Date: Tue, 20 Aug 2019 13:53:58 +0000 (+0100) Subject: move expanded_part_pts further up X-Git-Tag: ls180-24jan2020~456 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dbb743201e5145ebb2afaded8f1dadd068e99249;p=ieee754fpu.git move expanded_part_pts further up --- 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,