From 188ccba7e8667b2b13f35a54b047c4d7816aa19c Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 15 Feb 2020 12:56:32 +0000 Subject: [PATCH] make things a little clearer, do the select and the OR separately --- src/ieee754/part_shift/part_shift_dynamic.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/ieee754/part_shift/part_shift_dynamic.py b/src/ieee754/part_shift/part_shift_dynamic.py index cf83f1ac..fd2ecaf9 100644 --- a/src/ieee754/part_shift/part_shift_dynamic.py +++ b/src/ieee754/part_shift/part_shift_dynamic.py @@ -143,11 +143,10 @@ class PartitionedDynamicShift(Elaboratable): for i in range(1, len(keys)): start, end = (intervals[i][0], width) reswid = width - start - result = partial_results[i] | \ - 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) - comb += res.eq(result) + comb += res.eq(partial_results[i] | sel) result = res s,e = intervals[0] out.append(res[s:e]) -- 2.30.2