self.z0 = Signal(range(-ZMAX, ZMAX), name="z") # denormed result
def __iter__(self):
- yield from self.z
+ yield self.z0
def eq(self, i):
return [self.z0.eq(i.z0)]
self.z = Signal(range(-ZMAX, ZMAX), name="z") # denormed result
def __iter__(self):
- yield from self.x
- yield from self.y
- yield from self.z
+ yield self.x
+ yield self.y
+ yield self.z
def eq(self, i):
ret = [self.z.eq(i.z), self.x.eq(i.x), self.y.eq(i.y)]
from nmigen import Module, Signal
from nmigen.back.pysim import Simulator, Passive
from nmigen.test.utils import FHDLTestCase
+from nmigen.cli import rtlil
from ieee754.cordic.sin_cos_pipeline import CordicBasePipe
from ieee754.cordic.pipe_data import CordicPipeSpec
pspec = CordicPipeSpec(fracbits=fracbits, rounds_per_stage=4)
m.submodules.dut = dut = CordicBasePipe(pspec)
+ for port in dut.ports():
+ print ("port", port)
+
+ vl = rtlil.convert(dut, ports=dut.ports())
+ with open("test_cordic_pipe_sin_cos.il", "w") as f:
+ f.write(vl)
+
z = Signal(dut.p.data_i.z0.shape())
z_valid = Signal()
ready = Signal()