From 8a0617064f2a5e5b2b8e4a023106941360a2e590 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 15 Feb 2020 13:01:39 +0000 Subject: [PATCH] truncate partial result intermediate to width of partition --- src/ieee754/part_shift/part_shift_dynamic.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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] -- 2.30.2