diff options
author | Scott Shawcroft <scott.shawcroft@gmail.com> | 2017-07-02 15:38:44 -0700 |
---|---|---|
committer | Scott Shawcroft <scott.shawcroft@gmail.com> | 2017-07-02 15:38:44 -0700 |
commit | b00ffb1c091b65ed6c741dde74a4e7d5f709efd1 (patch) | |
tree | 37504d253d295bb2487bb5753fb22f8a8ca09d17 /icefuzz/make_pll.py | |
parent | a25c8679ac37df5219e1d7a8cdd932288cd596b1 (diff) | |
download | icestorm-b00ffb1c091b65ed6c741dde74a4e7d5f709efd1.tar.gz icestorm-b00ffb1c091b65ed6c741dde74a4e7d5f709efd1.tar.bz2 icestorm-b00ffb1c091b65ed6c741dde74a4e7d5f709efd1.zip |
Introduce device class into fuxx workign directories and have glbcheck handle unsupported 5k tiles ok.
Diffstat (limited to 'icefuzz/make_pll.py')
-rw-r--r-- | icefuzz/make_pll.py | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/icefuzz/make_pll.py b/icefuzz/make_pll.py index d438b5e..757a222 100644 --- a/icefuzz/make_pll.py +++ b/icefuzz/make_pll.py @@ -11,9 +11,14 @@ def randbin(n): for p in gpins: if p in pins: pins.remove(p) + -os.system("rm -rf work_pll") -os.mkdir("work_pll") +device_class = os.getenv("ICEDEVICE") + +working_dir = "work_%s_pll" % (device_class, ) + +os.system("rm -rf " + working_dir) +os.mkdir(working_dir) for idx in range(num): pin_names = list() @@ -110,20 +115,17 @@ for idx in range(num): pll_inst.append("defparam uut.TEST_MODE = 1'b0;") - with open("work_pll/pll_%02d.v" % idx, "w") as f: + with open(working_dir + "/pll_%02d.v" % idx, "w") as f: print("module top(%s);" % ", ".join(pin_names), file=f) print("\n".join(vlog_body), file=f) print("\n".join(pll_inst), file=f) print("endmodule", file=f) - with open("work_pll/pll_%02d.pcf" % idx, "w") as f: + with open(working_dir + "/pll_%02d.pcf" % idx, "w") as f: for pll_pin, package_pin in zip(pin_names, list(permutation(pins))[0:len(pin_names)]): if pll_pin == "packagepin": package_pin = "49" print("set_io %s %s" % (pll_pin, package_pin), file=f) -with open("work_pll/Makefile", "w") as f: - print("all: %s" % " ".join(["pll_%02d.bin" % i for i in range(num)]), file=f) - for i in range(num): - print("pll_%02d.bin:" % i, file=f) - print("\t-bash ../icecube.sh pll_%02d > pll_%02d.log 2>&1 && rm -rf pll_%02d.tmp || tail pll_%02d.log" % (i, i, i, i), file=f) + +output_makefile(working_dir, "pll") |