From: Luke Kenneth Casson Leighton Date: Fri, 7 Feb 2020 14:54:26 +0000 (+0000) Subject: fix part_mux to actually use Mux (duh) X-Git-Tag: ls180-24jan2020~238 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6242cd21222e4b6011aefc2173e2120139b5ef95;p=ieee754fpu.git fix part_mux to actually use Mux (duh) --- diff --git a/src/ieee754/part_mux/part_mux.py b/src/ieee754/part_mux/part_mux.py index b0cd90b4..c354e6c8 100644 --- a/src/ieee754/part_mux/part_mux.py +++ b/src/ieee754/part_mux/part_mux.py @@ -57,12 +57,12 @@ class PartitionedMux(Elaboratable): # loop across all partition ranges. # drop the selection directly into the output. keys = list(self.partition_points.keys()) + [self.width] - start = 0 + stt = 0 for i in range(len(keys)): end = keys[i] - mux = self.output[start:end] - comb += mux.eq(self.a[start:end] == self.b[start:end]) - start = end # for next time round loop + mux = self.output[stt:end] + comb += mux.eq(Mux(self.sel[i], self.a[stt:end], self.b[stt:end])) + stt = end # for next time round loop return m