* http://bugs.libre-riscv.org/show_bug.cgi?id=171
"""
-from nmigen import Signal, Module, Elaboratable, Cat, C, Mux, Repl
-from nmigen.back.pysim import Simulator, Delay, Settle
-from nmigen.cli import main, rtlil
+from nmigen import Signal, Module, Elaboratable, Cat, C
+from nmigen.back.pysim import Simulator, Delay
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):
self.mwidth = len(self.partition_points)+1
self.output = Signal(self.mwidth, reset_less=True)
assert self.partition_points.fits_in_width(width), \
- "partition_points doesn't fit in width"
+ "partition_points doesn't fit in width"
def elaborate(self, platform):
m = Module()
self.partition_points.as_sig(),
self.output]
+
if __name__ == "__main__":
from ieee754.part_mul_add.partpoints import make_partition
m = Module()
from nmigen import Signal, Module, Elaboratable, Mux
-from ieee754.part_mul_add.partpoints import PartitionPoints
+
class Combiner(Elaboratable):
# equal flag is set AND the previous partition's greater than output
# is true
+
class GTCombiner(Elaboratable):
def __init__(self, width):
self.aux_input = Signal(reset_less=True) # right hand side mux input
self.gt_en = Signal(reset_less=True) # enable or disable gt signal
- self.eqs = Signal(width, reset_less=True) # the flags for EQ
- self.gts = Signal(width, reset_less=True) # the flags for GT
+ self.eqs = Signal(width, reset_less=True) # the flags for EQ
+ self.gts = Signal(width, reset_less=True) # the flags for GT
self.gates = Signal(width-1, reset_less=True)
self.outputs = Signal(width, reset_less=True)
# bits need to be reversed through the width of the partition. This
# module does that
from nmigen import Signal, Module, Elaboratable, Mux
-from ieee754.part_mul_add.partpoints import PartitionPoints
+
class ReorderResults(Elaboratable):
def __init__(self, width):