aboutsummaryrefslogtreecommitdiffstats
path: root/icefuzz/make_fflogic.py
diff options
context:
space:
mode:
authorScott Shawcroft <scott.shawcroft@gmail.com>2017-07-02 15:38:44 -0700
committerScott Shawcroft <scott.shawcroft@gmail.com>2017-07-02 15:38:44 -0700
commitb00ffb1c091b65ed6c741dde74a4e7d5f709efd1 (patch)
tree37504d253d295bb2487bb5753fb22f8a8ca09d17 /icefuzz/make_fflogic.py
parenta25c8679ac37df5219e1d7a8cdd932288cd596b1 (diff)
downloadicestorm-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_fflogic.py')
-rw-r--r--icefuzz/make_fflogic.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/icefuzz/make_fflogic.py b/icefuzz/make_fflogic.py
index e107ec7..bac0569 100644
--- a/icefuzz/make_fflogic.py
+++ b/icefuzz/make_fflogic.py
@@ -4,8 +4,12 @@ from fuzzconfig import *
import numpy as np
import os
-os.system("rm -rf work_fflogic")
-os.mkdir("work_fflogic")
+device_class = os.getenv("ICEDEVICE")
+
+working_dir = "work_%s_fflogic" % (device_class, )
+
+os.system("rm -rf " + working_dir)
+os.mkdir(working_dir)
w = (len(pins) - 4) // 5
@@ -38,7 +42,7 @@ def print_seq_op(dst, src1, src2, op, f):
assert False
for idx in range(num):
- with open("work_fflogic/fflogic_%02d.v" % idx, "w") as f:
+ with open(working_dir + "/fflogic_%02d.v" % idx, "w") as f:
print("module top(input clk, rst, en, input [%d:0] a, b, c, d, output [%d:0] y, output z);" % (w-1, w-1), file=f)
print(" reg [%d:0] p, q;" % (w-1,), file=f)
@@ -47,8 +51,5 @@ for idx in range(num):
print(" assign y = p %s q, z = clk ^ rst ^ en;" % random_op(), file=f)
print("endmodule", file=f)
-with open("work_fflogic/Makefile", "w") as f:
- print("all: %s" % " ".join(["fflogic_%02d.bin" % i for i in range(num)]), file=f)
- for i in range(num):
- print("fflogic_%02d.bin:" % i, file=f)
- print("\t-bash ../icecube.sh fflogic_%02d > fflogic_%02d.log 2>&1 && rm -rf fflogic_%02d.tmp || tail fflogic_%02d.log" % (i, i, i, i), file=f)
+
+output_makefile(working_dir, "fflogic")