From: Luke Kenneth Casson Leighton Date: Mon, 19 Aug 2019 14:28:21 +0000 (+0100) Subject: temporary ~pbs X-Git-Tag: ls180-24jan2020~475 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0b0541a7b8f3baca8af3d269831ce5619aa537e5;p=ieee754fpu.git temporary ~pbs --- diff --git a/src/ieee754/part_mul_add/multiply.py b/src/ieee754/part_mul_add/multiply.py index c443b629..0e78bd9d 100644 --- a/src/ieee754/part_mul_add/multiply.py +++ b/src/ieee754/part_mul_add/multiply.py @@ -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())