From 25aa4ce322822ffd4b283f8db520f7151b626e23 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Thu, 22 Oct 2015 15:50:25 +0200 Subject: Progress in icetime --- icetime/Makefile | 1 + icetime/icetime.cc | 2 +- icetime/mktest.py | 16 +++++++++++++++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/icetime/Makefile b/icetime/Makefile index e93eaa2..9423f84 100644 --- a/icetime/Makefile +++ b/icetime/Makefile @@ -21,6 +21,7 @@ uninstall: test0 test1 test2 test3 test4 test5 test6 test7 test8 test9: icetime python3 mktest.py $@ ./icetime -P tq144 -p $@.pcf $@.txt $@_out.v + yosys $@.ys mktest: test0 test1 test2 test3 test4 test5 test6 test7 test8 test9 diff --git a/icetime/icetime.cc b/icetime/icetime.cc index 479fe64..c391cba 100644 --- a/icetime/icetime.cc +++ b/icetime/icetime.cc @@ -711,7 +711,7 @@ int main(int argc, char **argv) fprintf(fout, ");\n"); for (int net : declared_nets) - fprintf(fout, " (* keep *) wire net_%d;\n", net); + fprintf(fout, " wire net_%d;\n", net); for (auto &str : extra_vlog) fprintf(fout, "%s", str.c_str()); diff --git a/icetime/mktest.py b/icetime/mktest.py index 9cd5cd6..04a1cfd 100644 --- a/icetime/mktest.py +++ b/icetime/mktest.py @@ -22,11 +22,25 @@ with open("%s.pcf" % sys.argv[1], "w") as f: print("set_io o2 %s" % pins[3], file=f) print("set_io o3 %s" % pins[4], file=f) +with open("%s.ys" % sys.argv[1], "w") as f: + print("echo on", file=f) + print("read_verilog -lib cells.v", file=f) + print("read_verilog %s_ref.v" % sys.argv[1], file=f) + print("read_verilog %s_out.v" % sys.argv[1], file=f) + print("prep", file=f) + print("equiv_make top chip equiv", file=f) + print("hierarchy -top equiv", file=f) + print("equiv_struct", file=f) + print("equiv_purge", file=f) + print("opt_clean -purge", file=f) + print("show -format dot -prefix %s" % sys.argv[1], file=f) + os.system("bash ../icefuzz/icecube.sh %s.v" % sys.argv[1]) os.rename("%s.v" % sys.argv[1], "%s_in.v" % sys.argv[1]) -os.rename("%s.vsb" % sys.argv[1], "%s_ref.v" % sys.argv[1]) +os.system("grep -v defparam %s.vsb > %s_ref.v" % (sys.argv[1], sys.argv[1])) os.remove("%s.bin" % sys.argv[1]) +os.remove("%s.vsb" % sys.argv[1]) os.remove("%s.glb" % sys.argv[1]) os.remove("%s.psb" % sys.argv[1]) os.remove("%s.sdf" % sys.argv[1]) -- cgit v1.2.3