ripple of LSB from compare-operations, successful
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 7 Feb 2020 14:07:45 +0000 (14:07 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 7 Feb 2020 14:07:45 +0000 (14:07 +0000)
src/ieee754/part/test/test_partsig.py
src/ieee754/part_cmp/eq_gt_ge.py
src/ieee754/part_cmp/ripple.py

index 2dd76bc8f22264507b39315040fc96db26195208..0229794e4c8104e0d124bbf5d0fa682e4de459bd 100644 (file)
@@ -131,7 +131,7 @@ class TestPartitionPoints(unittest.TestCase):
                     for i, mask in enumerate(mask_list):
                         if test_fn(a, b, mask):
                             # OR y with the lowest set bit in the mask
-                            y |= (maskbit_list[i] & ~(maskbit_list[i]-1))
+                            y |= maskbit_list[i]
                     # check the result
                     outval = (yield getattr(module, "%s_output" % mod_attr))
                     msg = f"{msg_prefix}: {mod_attr} 0x{a:X} == 0x{b:X}" + \
index 077f3aef1adc17f47084913347a0e3974afc22c3..c6f15b3635ae616a6f8c2907a698d49958d662fb 100644 (file)
@@ -20,6 +20,7 @@ from nmigen.cli import main, rtlil
 from ieee754.part_mul_add.partpoints import PartitionPoints
 from ieee754.part_cmp.gt_combiner import GTCombiner
 from ieee754.part_cmp.reorder_results import ReorderResults
+from ieee754.part_cmp.ripple import RippleLSB
 
 
 class PartitionedEqGtGe(Elaboratable):
index b758c284c9088f44d61377ec542e65004623db00..a300fb03bdd83d9ee5d010d75d76d88459daef2c 100644 (file)
@@ -26,7 +26,7 @@ class RippleLSB(Elaboratable):
         comb += self.output[0].eq(current_result)
 
         for i in range(width-1):
-            cur = Signal("cur%d" % i)
+            cur = Signal(name="cur%d" % i)
             comb += cur.eq(current_result)
             current_result = Mux(self.gates[i], self.results_in[i+1], cur)
             comb += self.output[i+1].eq(current_result)