From 852e2193258054d5511b941beeadc80f328980b3 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Fri, 24 Jan 2020 16:51:51 +0000 Subject: [PATCH] trying to get recursive output working from partitioned eq --- src/ieee754/part_cmp/equal.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/ieee754/part_cmp/equal.py b/src/ieee754/part_cmp/equal.py index 7728d4c3..2eb46043 100644 --- a/src/ieee754/part_cmp/equal.py +++ b/src/ieee754/part_cmp/equal.py @@ -44,14 +44,17 @@ class PartitionedEq(Elaboratable): # now, based on the partition points, create the (multi-)boolean result eqsigs = [] - for i in range(self.mwidth): + idxs = list(range(self.mwidth)) + #idxs.reverse() + for i in idxs: eqsig = Signal(name="eqsig%d"%i, reset_less=True) + eqsigs.append(eqsig) + for i in idxs: if i == 0: - comb += eqsig.eq(eqs[i]) + comb += eqsigs[i].eq(eqs[i]) else: - ppt = self.partition_points[keys[i-1]] - comb += eqsig.eq(eqs[i] & ppt & eqsigs[i-1]) - eqsigs.append(eqsig) + ppt = ~self.partition_points[keys[i-1]] + comb += eqsigs[i].eq((eqsigs[i-1] & ppt) | ~eqs[i]) print ("eqsigs", eqsigs, self.output.shape()) # assign cascade-SIMD-compares to output -- 2.30.2