From: Luke Kenneth Casson Leighton Date: Thu, 30 Jan 2020 18:24:27 +0000 (+0000) Subject: working partitioned eqs function X-Git-Tag: ls180-24jan2020~304 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4977861f9fbf1f48c4e5aa4362a56aff58efe7a8;p=ieee754fpu.git working partitioned eqs function --- diff --git a/src/ieee754/part/test/test_partsig.py b/src/ieee754/part/test/test_partsig.py index 2327f462..c312917f 100644 --- a/src/ieee754/part/test/test_partsig.py +++ b/src/ieee754/part/test/test_partsig.py @@ -107,6 +107,7 @@ class TestPartitionPoints(unittest.TestCase): outval = (yield module.eq_output) msg = f"{msg_prefix}: 0x{a:X} + 0x{b:X}" + \ f" => 0x{y:X} != 0x{outval:X}, masklist %s" + #print ((msg % str(maskbit_list)).format(locals())) self.assertEqual(y, outval, msg % str(maskbit_list)) yield part_mask.eq(0) yield from test_eq("16-bit", 0b1111) diff --git a/src/ieee754/part_cmp/equal.py b/src/ieee754/part_cmp/equal.py index 9bb0239c..2fdaabf4 100644 --- a/src/ieee754/part_cmp/equal.py +++ b/src/ieee754/part_cmp/equal.py @@ -43,7 +43,7 @@ class PartitionedEq(Elaboratable): start = 0 for i in range(len(keys)): end = keys[i] - eql.append(self.a[start:end] == self.b[start:end]) + eql.append(self.a[start:end] != self.b[start:end]) # see bool below start = end # for next time round loop comb += eqs.eq(Cat(*eql)) @@ -72,13 +72,8 @@ class PartitionedEq(Elaboratable): start = 0 count = 1 idx = [0] * self.mwidth - psigs = [] for ipdx in range((self.mwidth-1)): - pt = ppoints[ipdx] - if pval & (1<