def op_xor(obj):
return obj.xor()
- module = ComparisonOpDriver(op_xor, nops=1)
+ # 8-bit partitions take a long time, for some reason
+ module = ComparisonOpDriver(op_xor, nops=1, width=32, mwidth=4)
self.assertFormal(module, mode="bmc", depth=1)
from nmigen import Signal, Module, Elaboratable, Cat, C, Mux, Repl
from nmigen.cli import main
+from nmutil.ripple import RippleLSB
from ieee754.part_mul_add.partpoints import PartitionPoints
from ieee754.part_cmp.experiments.eq_combiner import XORCombiner
# put the partial results through the combiner
comb += xorc.gates.eq(self.partition_points.as_sig())
comb += xorc.neqs.eq(xors)
- comb += self.output.eq(xorc.outputs)
+
+ m.submodules.ripple = ripple = RippleLSB(self.mwidth)
+ comb += ripple.results_in.eq(xorc.outputs)
+ comb += ripple.gates.eq(self.partition_points.as_sig())
+ comb += self.output.eq(~ripple.output)
return m