From: Luke Kenneth Casson Leighton Date: Sat, 15 Feb 2020 13:01:39 +0000 (+0000) Subject: truncate partial result intermediate to width of partition X-Git-Tag: ls180-24jan2020~158 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8a0617064f2a5e5b2b8e4a023106941360a2e590;p=ieee754fpu.git truncate partial result intermediate to width of partition --- diff --git a/src/ieee754/part_shift/part_shift_dynamic.py b/src/ieee754/part_shift/part_shift_dynamic.py index fd2ecaf9..75e3fe49 100644 --- a/src/ieee754/part_shift/part_shift_dynamic.py +++ b/src/ieee754/part_shift/part_shift_dynamic.py @@ -143,9 +143,9 @@ class PartitionedDynamicShift(Elaboratable): for i in range(1, len(keys)): start, end = (intervals[i][0], width) reswid = width - start - sel = Mux(gates[i-1], 0, result[intervals[0][1]:])[:end-start] + sel = Mux(gates[i-1], 0, result[intervals[0][1]:][:end-start]) print("select: [%d:%d]" % (start, end)) - res = Signal(reswid, name="res%d" % i, reset_less=True) + res = Signal(end-start+1, name="res%d" % i, reset_less=True) comb += res.eq(partial_results[i] | sel) result = res s,e = intervals[0]