class FPNorm1Data:
- def __init__(self, width, pspec):
+ def __init__(self, pspec):
+ width = pspec['width']
self.roundz = Signal(reset_less=True, name="norm1_roundz")
self.z = FPNumBaseRecord(width, False)
self.out_do_z = Signal(reset_less=True)
self.oz = Signal(width, reset_less=True)
- self.ctx = FPPipeContext(width, pspec)
+ self.ctx = FPPipeContext(pspec)
self.muxid = self.ctx.muxid
def eq(self, i):
class FPNorm1ModSingle(Elaboratable):
- def __init__(self, width, pspec):
- self.width = width
+ def __init__(self, pspec):
self.pspec = pspec
self.i = self.ispec()
self.o = self.ospec()
def ispec(self):
- return FPAddStage1Data(self.width, self.pspec)
+ return FPAddStage1Data(self.pspec)
def ospec(self):
- return FPNorm1Data(self.width, self.pspec)
+ return FPNorm1Data(self.pspec)
def setup(self, m, i):
""" links module to inputs and outputs
class FPNorm1ModMulti:
- def __init__(self, width, single_cycle=True):
+ def __init__(self, pspec, single_cycle=True):
self.width = width
self.in_select = Signal(reset_less=True)
self.in_z = FPNumBase(width, False)