From: Robert Jordens Date: Mon, 2 Dec 2013 02:30:49 +0000 (-0700) Subject: examples/cordic: scripted exploration of parameters space X-Git-Tag: 24jan2021_ls180~2099^2~411 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ab48316fcd2023fdea79701cdb52a46b644c57ac;p=litex.git examples/cordic: scripted exploration of parameters space --- diff --git a/examples/cordic/cordic_impl.py b/examples/cordic/cordic_impl.py new file mode 100644 index 00000000..d7ac084f --- /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<