from nmigen import Module, Signal, Cat
-from ieee754.fpcommon.modbase import FPModBase
+from nmutil.pipemodbase import FPModBase
from ieee754.fpcommon.getop import FPADDBaseData
from ieee754.fpcommon.pack import FPPackData
from ieee754.fpcommon.fpbase import FPNumDecode, FPNumBaseRecord
from nmigen import Module, Signal, Const
from nmigen.cli import main, verilog
-from ieee754.fpcommon.modbase import FPModBase
+from nmutil.pipemodbase import FPModBase
from ieee754.fpcommon.getop import FPADDBaseData
from ieee754.fpcommon.postcalc import FPAddStage1Data
from ieee754.fpcommon.msbhigh import FPMSBHigh
from nmigen import Module, Signal, Cat
from nmigen.cli import main, verilog
-from ieee754.fpcommon.modbase import FPModBase
+from nmutil.pipemodbase import FPModBase
from ieee754.fpcommon.getop import FPADDBaseData
from ieee754.fpcommon.postcalc import FPAddStage1Data
from ieee754.fpcommon.msbhigh import FPMSBHigh
from nmigen import Module, Signal, Cat
from nmigen.cli import main, verilog
-from ieee754.fpcommon.modbase import FPModBase
+from nmutil.pipemodbase import FPModBase
from ieee754.fpcommon.getop import FPADDBaseData
from ieee754.fpcommon.postcalc import FPAddStage1Data
from ieee754.fpcommon.fpbase import FPNumDecode, FPNumBaseRecord
from nmigen import Module, Signal, Cat
from nmigen.cli import main, verilog
-from ieee754.fpcommon.modbase import FPModBase
+from nmutil.pipemodbase import FPModBase
from ieee754.fpcommon.fpbase import FPNumBase, FPNumBaseRecord
from ieee754.fpcommon.denorm import FPSCData
from nmigen.cli import main, verilog
from math import log
-from ieee754.fpcommon.modbase import FPModBase
+from nmutil.pipemodbase import FPModBase
from ieee754.fpcommon.postcalc import FPAddStage1Data
from ieee754.fpadd.add0 import FPAddStage0Data
"""
-from ieee754.fpcommon.modbase import FPModBaseChain
+from nmutil.pipemodbase import FPModBaseChain
from ieee754.fpadd.align import FPAddAlignSingleMod
from ieee754.fpadd.add0 import FPAddStage0Mod
from nmigen import Module, Signal
from nmigen.cli import main, verilog
-from ieee754.fpcommon.modbase import FPModBase
+from nmutil.pipemodbase import FPModBase
from ieee754.fpcommon.fpbase import FPNumBaseRecord
from ieee754.fpcommon.fpbase import MultiShiftRMerge
from ieee754.fpcommon.denorm import FPSCData
from nmigen.cli import main, verilog
from math import log
-from ieee754.fpcommon.modbase import FPModBase, FPModBaseChain
+from nmutil.pipemodbase import FPModBase, FPModBaseChain
from ieee754.fpcommon.fpbase import FPNumDecode
from ieee754.fpcommon.fpbase import FPNumBaseRecord
from nmigen import Module
from nmigen.cli import main, verilog
-from ieee754.fpcommon.modbase import FPModBase
+from nmutil.pipemodbase import FPModBase
from ieee754.fpcommon.fpbase import FPNumBase
from ieee754.fpcommon.roundz import FPRoundData
from nmigen.cli import main, verilog
from math import log
-from ieee754.fpcommon.modbase import FPModBase
+from nmutil.pipemodbase import FPModBase
from ieee754.fpcommon.fpbase import FPNumBaseRecord
from ieee754.fpcommon.fpbase import FPNumBase
from ieee754.fpcommon.getop import FPPipeContext
+++ /dev/null
-from nmigen import Elaboratable
-from ieee754.pipeline import DynamicPipe
-from nmutil.singlepipe import StageChain
-
-
-class FPModBase(Elaboratable):
- """FPModBase: common code between nearly every pipeline module
- """
- def __init__(self, pspec, modname):
- self.modname = modname # use this to give a name to this module
- self.pspec = pspec
- self.i = self.ispec()
- self.o = self.ospec()
-
- def process(self, i):
- return self.o
-
- def setup(self, m, i):
- """ links module to inputs and outputs
- """
- setattr(m.submodules, self.modname, self)
- m.d.comb += self.i.eq(i)
-
-
-class FPModBaseChain(DynamicPipe):
- """FPModBaseChain: common code between stage-chained pipes
-
- Links a set of combinatorial modules (get_chain) together
- and uses pspec.pipekls to dynamically select the pipeline type
- Also conforms to the Pipeline Stage API
- """
- def __init__(self, pspec):
- self.pspec = pspec
- self.chain = self.get_chain()
- super().__init__(pspec)
-
- def ispec(self):
- """ returns the input spec of the first module in the chain
- """
- return self.chain[0].ispec()
-
- def ospec(self):
- """ returns the output spec of the last module in the chain
- """
- return self.chain[-1].ospec()
-
- def process(self, i):
- return self.o # ... returned here (see setup comment below)
-
- def setup(self, m, i):
- """ links module to inputs and outputs
- """
- StageChain(self.chain).setup(m, i) # input linked here, through chain
- self.o = self.chain[-1].o # output is the last thing in the chain...
"""
-from ieee754.fpcommon.modbase import FPModBaseChain
+from nmutil.pipemodbase import FPModBaseChain
from ieee754.fpcommon.postnormalise import FPNorm1ModSingle
from ieee754.fpcommon.roundz import FPRoundMod
from ieee754.fpcommon.corrections import FPCorrectionsMod
from nmigen import Module, Signal
from nmigen.cli import main, verilog
-from ieee754.fpcommon.modbase import FPModBase
+from nmutil.pipemodbase import FPModBase
from ieee754.fpcommon.fpbase import FPNumBaseRecord, FPNumBase
from ieee754.fpcommon.roundz import FPRoundData
from ieee754.fpcommon.getop import FPPipeContext
from nmigen.cli import main, verilog
from math import log
-from ieee754.fpcommon.modbase import FPModBase
+from nmutil.pipemodbase import FPModBase
from ieee754.fpcommon.fpbase import (Overflow, OverflowMod,
FPNumBase, FPNumBaseRecord)
from ieee754.fpcommon.fpbase import FPState
from nmigen import Module, Signal
from nmigen.cli import main, verilog
-from ieee754.fpcommon.modbase import FPModBase
+from nmutil.pipemodbase import FPModBase
from ieee754.fpcommon.fpbase import FPNumBase, FPNumBaseRecord
from ieee754.fpcommon.getop import FPPipeContext
from ieee754.fpcommon.postnormalise import FPNorm1Data
from nmigen import Module, Signal, Cat, Elaboratable, Const, Mux
from nmigen.cli import main, verilog
-from ieee754.fpcommon.modbase import FPModBase
+from nmutil.pipemodbase import FPModBase
from ieee754.fpcommon.fpbase import FPNumBaseRecord
from ieee754.fpcommon.denorm import FPSCData
from ieee754.fpcommon.getop import FPPipeContext
from nmigen import Module, Signal, Cat
from nmigen.cli import main, verilog
-from ieee754.fpcommon.modbase import FPModBase
+from nmutil.pipemodbase import FPModBase
from ieee754.fpcommon.postcalc import FPAddStage1Data
from ieee754.div_rem_sqrt_rsqrt.div_pipe import DivPipeOutputData
"""
-from ieee754.fpcommon.modbase import FPModBaseChain
+from nmutil.pipemodbase import FPModBaseChain
from ieee754.div_rem_sqrt_rsqrt.div_pipe import (DivPipeInterstageData,
DivPipeSetupStage,
DivPipeCalculateStage,
from nmigen.cli import main, verilog
from math import log
-from ieee754.fpcommon.modbase import FPModBase, FPModBaseChain
+from nmutil.pipemodbase import FPModBase, FPModBaseChain
from ieee754.fpcommon.fpbase import FPNumDecode, FPNumBaseRecord
from ieee754.fpcommon.getop import FPADDBaseData
from ieee754.fpcommon.denorm import (FPSCData, FPAddDeNormMod)
from nmigen.cli import main, verilog
from math import log
-from ieee754.fpcommon.modbase import FPModBase
+from nmutil.pipemodbase import FPModBase
from ieee754.fpcommon.fpbase import FPNumBase
from ieee754.fpcommon.getop import FPPipeContext
from ieee754.fpcommon.msbhigh import FPMSBHigh
from nmigen import Module, Signal, Cat, Elaboratable
from nmigen.cli import main, verilog
-from ieee754.fpcommon.modbase import FPModBase
+from nmutil.pipemodbase import FPModBase
from ieee754.fpcommon.fpbase import FPNumBaseRecord
from ieee754.fpcommon.denorm import FPSCData
from ieee754.fpcommon.getop import FPPipeContext
from nmigen import Module, Signal, Elaboratable
from nmigen.cli import main, verilog
-from ieee754.fpcommon.modbase import FPModBase
+from nmutil.pipemodbase import FPModBase
from ieee754.fpcommon.postcalc import FPAddStage1Data
from ieee754.fpmul.mul0 import FPMulStage0Data
from nmutil.singlepipe import StageChain
-from ieee754.fpcommon.modbase import FPModBaseChain
+from nmutil.pipemodbase import FPModBaseChain
from ieee754.fpcommon.denorm import FPSCData
from ieee754.fpcommon.postcalc import FPAddStage1Data
from ieee754.fpmul.mul0 import FPMulStage0Mod
from ieee754.fpcommon.fpbase import FPNumDecode, FPNumBaseRecord
-from ieee754.fpcommon.modbase import FPModBase, FPModBaseChain
+from nmutil.pipemodbase import FPModBase, FPModBaseChain
from ieee754.fpcommon.getop import FPADDBaseData
from ieee754.fpcommon.denorm import (FPSCData, FPAddDeNormMod)
from ieee754.fpmul.align import FPAlignModSingle
--- /dev/null
+from nmigen import Elaboratable
+from ieee754.pipeline import DynamicPipe
+from nmutil.singlepipe import StageChain
+
+
+class FPModBase(Elaboratable):
+ """FPModBase: common code between nearly every pipeline module
+ """
+ def __init__(self, pspec, modname):
+ self.modname = modname # use this to give a name to this module
+ self.pspec = pspec
+ self.i = self.ispec()
+ self.o = self.ospec()
+
+ def process(self, i):
+ return self.o
+
+ def setup(self, m, i):
+ """ links module to inputs and outputs
+ """
+ setattr(m.submodules, self.modname, self)
+ m.d.comb += self.i.eq(i)
+
+
+class FPModBaseChain(DynamicPipe):
+ """FPModBaseChain: common code between stage-chained pipes
+
+ Links a set of combinatorial modules (get_chain) together
+ and uses pspec.pipekls to dynamically select the pipeline type
+ Also conforms to the Pipeline Stage API
+ """
+ def __init__(self, pspec):
+ self.pspec = pspec
+ self.chain = self.get_chain()
+ super().__init__(pspec)
+
+ def ispec(self):
+ """ returns the input spec of the first module in the chain
+ """
+ return self.chain[0].ispec()
+
+ def ospec(self):
+ """ returns the output spec of the last module in the chain
+ """
+ return self.chain[-1].ospec()
+
+ def process(self, i):
+ return self.o # ... returned here (see setup comment below)
+
+ def setup(self, m, i):
+ """ links module to inputs and outputs
+ """
+ StageChain(self.chain).setup(m, i) # input linked here, through chain
+ self.o = self.chain[-1].o # output is the last thing in the chain...