The combiner was built to give inverted outputs, since it was designed
for ORing "not equals" signals, instead of ANDing equals signals.
Use 4-bit partitions when checking, 8-bit takes a long time for some
reason.
def op_xor(obj):
return obj.xor()
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)
self.assertFormal(module, mode="bmc", depth=1)
from nmigen import Signal, Module, Elaboratable, Cat, C, Mux, Repl
from nmigen.cli import main
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
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)
# 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)