from nmigen import Module, Signal, Cat, Elaboratable
from nmigen.cli import main, verilog
-from ieee754.fpcommon.fpbase import FPNumBase
+from ieee754.fpcommon.fpbase import FPNumBaseRecord
from ieee754.fpcommon.fpbase import FPState
from ieee754.fpcommon.denorm import FPSCData
class FPMulStage0Data:
def __init__(self, width, id_wid):
- self.z = FPNumBase(width, False)
+ 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
def elaborate(self, platform):
m = Module()
- m.submodules.mul0_in_a = self.i.a
- m.submodules.mul0_in_b = self.i.b
- m.submodules.mul0_out_z = self.o.z
+ #m.submodules.mul0_in_a = self.i.a
+ #m.submodules.mul0_in_b = self.i.b
+ #m.submodules.mul0_out_z = self.o.z
# store intermediate tests (and zero-extended mantissas)
am0 = Signal(len(self.i.a.m)+1, reset_less=True)
""" links module to inputs and outputs
"""
m.submodules.mul1 = self
- m.submodules.mul1_out_overflow = self.o.of
+ #m.submodules.mul1_out_overflow = self.o.of
m.d.comb += self.i.eq(i)
def __init__(self, width, id_wid):
FPState.__init__(self, "multiply_1")
self.mod = FPMulStage1Mod(width)
- self.out_z = FPNumBase(width, False)
+ self.out_z = FPNumBaseRecord(width, False)
self.out_of = Overflow()
self.norm_stb = Signal()
from nmigen.cli import main, verilog
from math import log
-from ieee754.fpcommon.fpbase import FPNumDecode
+from ieee754.fpcommon.fpbase import FPNumDecode, FPNumBaseRecord
from nmutil.singlepipe import SimpleHandshake, StageChain
from ieee754.fpcommon.fpbase import FPState, FPID
def elaborate(self, platform):
m = Module()
- m.submodules.sc_out_z = self.o.z
+ #m.submodules.sc_out_z = self.o.z
# decode: XXX really should move to separate stage
- a1 = FPNumDecode(None, self.width, False)
- b1 = FPNumDecode(None, self.width, False)
- m.submodules.sc_decode_a = a1
- m.submodules.sc_decode_b = b1
+ a1 = FPNumBaseRecord(self.width, False)
+ b1 = FPNumBaseRecord(self.width, False)
+ m.submodules.sc_decode_a = a1 = FPNumDecode(None, a1)
+ m.submodules.sc_decode_b = b1 = FPNumDecode(None, b1)
m.d.comb += [a1.v.eq(self.i.a),
b1.v.eq(self.i.b),
self.o.a.eq(a1),
"""
from math import log
-from nmigen import Module
+from nmigen import Module, Elaboratable
from nmigen.cli import main, verilog
from nmutil.singlepipe import PassThroughStage
CombMuxOutPipe.__init__(self, stage, n_len=self.num_rows)
-class ReservationStations:
+class ReservationStations(Elaboratable):
""" Reservation-Station pipeline
Input: num_rows - number of input and output Reservation Stations