# Copyright (C) Jonathan P Dawson 2013
# 2013-12-12
-from nmigen import Module, Signal
+from nmigen import Module, Signal, Elaboratable
from nmigen.cli import main, verilog
from ieee754.fpcommon.fpbase import FPNumOut, FPNumIn, FPNumBase
m.next = "add_0"
-class FPAddAlignSingleMod:
+class FPAddAlignSingleMod(Elaboratable):
def __init__(self, width, id_wid):
self.width = width
# Copyright (C) Jonathan P Dawson 2013
# 2013-12-12
-from nmigen import Module, Signal, Cat, Const
+from nmigen import Module, Signal, Cat, Const, Elaboratable
from nmigen.cli import main, verilog
from math import log
from ieee754.fpcommon.denorm import (FPSCData, FPAddDeNormMod)
-class FPAddSpecialCasesMod:
+class FPAddSpecialCasesMod(Elaboratable):
""" special cases: NaNs, infs, zeros, denormalised
NOTE: some of these are unique to add. see "Special Operations"
https://steve.hollasch.net/cgindex/coding/ieeefloat.html
yield
def test_sr():
- dut = SRLatch()
+ dut = SRLatch(llen=4)
vl = rtlil.convert(dut, ports=dut.ports())
with open("test_srlatch.il", "w") as f:
f.write(vl)
run_simulation(dut, sr_sim(dut), vcd_name='test_srlatch.vcd')
- dut = SRLatch(sync=False)
+ dut = SRLatch(sync=False, llen=4)
vl = rtlil.convert(dut, ports=dut.ports())
with open("test_srlatch_async.il", "w") as f:
f.write(vl)