From ab48316fcd2023fdea79701cdb52a46b644c57ac Mon Sep 17 00:00:00 2001 From: Robert Jordens Date: Sun, 1 Dec 2013 19:30:49 -0700 Subject: [PATCH] examples/cordic: scripted exploration of parameters space --- examples/cordic/cordic_impl.py | 61 +++++++++++++++++++++++++ examples/cordic/cordic_impl_eval.py | 71 +++++++++++++++++++++++++++++ 2 files changed, 132 insertions(+) create mode 100644 examples/cordic/cordic_impl.py create mode 100644 examples/cordic/cordic_impl_eval.py 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<