diff --git a/examples/cordic/cordic_impl.py b/examples/cordic/cordic_impl.py new file mode 100644 index 000000000..d7ac084fa --- /dev/null +++ b/examples/cordic/cordic_impl.py @@ -0,0 +1,61 @@ +import copy +import json + +from migen.fhdl.std import * +from migen.genlib.cordic import Cordic +from mibuild.generic_platform import * +from mibuild.xilinx_ise import XilinxISEPlatform, CRG_SE + + +class CordicImpl(Module): + def __init__(self, name, **kwargs): + self.name = name + json.dump(kwargs, open("build/{}.json".format(name), "w")) + self.platform = platform = Platform() + self.submodules.cordic = Cordic(**kwargs) + width = flen(self.cordic.xi) + self.comb += self.cordic.xi.eq( + int((1<