From: Luke Kenneth Casson Leighton Date: Thu, 13 Feb 2020 15:27:17 +0000 (+0000) Subject: OR element in after the MUX because its an invariant X-Git-Tag: ls180-24jan2020~179 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7ecdd0f649958eea4d31a8135d58e99d18ccacc4;p=ieee754fpu.git OR element in after the MUX because its an invariant --- diff --git a/src/ieee754/part_shift/part_shift_dynamic.py b/src/ieee754/part_shift/part_shift_dynamic.py index 1e76a188..b82fc467 100644 --- a/src/ieee754/part_shift/part_shift_dynamic.py +++ b/src/ieee754/part_shift/part_shift_dynamic.py @@ -110,7 +110,14 @@ class PartitionedDynamicShift(Elaboratable): print(keys[i-1]) temp = Signal(e-s+1, name="intermed%d" % i) print(intermed[keys[0]:]) - intermed = Mux(gates[i-1], element, element | intermed[keys[0]:]) + # XXX bit of a mess here, but rather than select + # element or (element | intermed), select between 0 or intermed + # then unconditionally "|" element on top (once copied into + # a named Signal) + intermed = Mux(gates[i-1], 0, intermed[keys[0]:]) + intermed2 = Signal(intermed.shape()) + comb += intermed2.eq(intermed | element) + intermed = intermed2 comb += temp.eq(intermed) out.append(temp[:e-s])