--- /dev/null
+"""IEEE754 Floating Point Multiplier Pipeline
+
+Copyright (C) 2019 Luke Kenneth Casson Leighton <lkcl@lkcl.net>
+
+"""
+
+from nmigen import Signal
+
+from ieee754.fpcommon.fpbase import FPNumBaseRecord
+from ieee754.fpcommon.getop import FPPipeContext
+
+
+class FPMulStage0Data:
+
+ def __init__(self, pspec):
+ width = pspec.width
+ self.z = FPNumBaseRecord(width, False)
+ self.out_do_z = Signal(reset_less=True)
+ self.oz = Signal(width, reset_less=True)
+ mw = (self.z.m_width)*2 - 1 + 3 # sticky/round/guard bits + (2*mant) - 1
+ self.product = Signal(mw, reset_less=True)
+ self.ctx = FPPipeContext(pspec)
+ self.muxid = self.ctx.muxid
+
+ def eq(self, i):
+ return [self.z.eq(i.z), self.out_do_z.eq(i.out_do_z), self.oz.eq(i.oz),
+ self.product.eq(i.product), self.ctx.eq(i.ctx)]
+
"""
-from nmigen import Module, Signal, Cat, Elaboratable
+from nmigen import Module, Signal, Cat
from nmigen.cli import main, verilog
from nmutil.pipemodbase import PipeModBase
from ieee754.fpcommon.fpbase import FPNumBaseRecord
from ieee754.fpcommon.denorm import FPSCData
from ieee754.fpcommon.getop import FPPipeContext
-
-
-class FPMulStage0Data:
-
- def __init__(self, pspec):
- width = pspec.width
- self.z = FPNumBaseRecord(width, False)
- self.out_do_z = Signal(reset_less=True)
- self.oz = Signal(width, reset_less=True)
- mw = (self.z.m_width)*2 - 1 + 3 # sticky/round/guard bits + (2*mant) - 1
- self.product = Signal(mw, reset_less=True)
- self.ctx = FPPipeContext(pspec)
- self.muxid = self.ctx.muxid
-
- def eq(self, i):
- return [self.z.eq(i.z), self.out_do_z.eq(i.out_do_z), self.oz.eq(i.oz),
- self.product.eq(i.product), self.ctx.eq(i.ctx)]
+from ieee754.fpmul.datastructs import FPMulStage0Data
class FPMulStage0Mod(PipeModBase):
"""
-from nmigen import Module, Signal, Elaboratable
+from nmigen import Module, Signal
from nmigen.cli import main, verilog
from nmutil.pipemodbase import PipeModBase