From b00ffb1c091b65ed6c741dde74a4e7d5f709efd1 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Sun, 2 Jul 2017 15:38:44 -0700 Subject: Introduce device class into fuxx workign directories and have glbcheck handle unsupported 5k tiles ok. --- icefuzz/make_fflogic.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'icefuzz/make_fflogic.py') 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") -- cgit v1.2.3