mirror of https://github.com/YosysHQ/icestorm.git
icetime progress
This commit is contained in:
parent
6d2087c9a1
commit
f4b7aca520
|
|
@ -28,14 +28,14 @@ run0 run1 run2 run3 run4 run5 run6 run7 run8 run9: icetime
|
|||
./icetime -P tq144 -p $(subst run,test,$@).pcf $(subst run,test,$@).txt $(subst run,test,$@)_out.v
|
||||
|
||||
show0 show1 show2 show3 show4 show5 show6 show7 show8 show9:
|
||||
yosys -p ':equiv_purge; opt_clean -purge; show' $(subst show,test,$@).il
|
||||
# yosys -p 'equiv_purge; opt_clean -purge; show' $(subst show,test,$@).il
|
||||
yosys -p 'equiv_mark; opt_clean -purge; show -color orange a:equiv_region!=0' $(subst show,test,$@).il
|
||||
|
||||
test: test0 test1 test2 test3 test4 test5 test6 test7 test8 test9
|
||||
|
||||
clean:
|
||||
rm -f icetime
|
||||
rm -f test[0-9]*
|
||||
rm -f *.o *.d
|
||||
rm -f icetime *.o *.d
|
||||
rm -rf test[0-9]*
|
||||
|
||||
-include *.d
|
||||
|
||||
|
|
|
|||
|
|
@ -507,7 +507,15 @@ void make_seg_cell(int net, const net_segment_t &seg)
|
|||
|
||||
if (sscanf(seg.name.c_str(), "lutff_%d/in_%d", &a, &b) == 2) {
|
||||
auto cell = make_lc40(seg.x, seg.y, a);
|
||||
netlist_cells[cell][stringf("in%d", b)] = net_name(net);
|
||||
if (b == 2) {
|
||||
// Lattice tools always put a CascadeMux on in2
|
||||
extra_wires.insert(net_name(net) + "_cascademuxed");
|
||||
extra_vlog.push_back(stringf(" CascadeMux conn_%d (.I(%s), .O(%s));\n",
|
||||
iconn_cell_cnt++, net_name(net).c_str(), (net_name(net) + "_cascademuxed").c_str()));
|
||||
netlist_cells[cell][stringf("in%d", b)] = net_name(net) + "_cascademuxed";
|
||||
} else {
|
||||
netlist_cells[cell][stringf("in%d", b)] = net_name(net);
|
||||
}
|
||||
make_inmux(seg.x, seg.y, net);
|
||||
return;
|
||||
}
|
||||
|
|
@ -681,6 +689,8 @@ struct make_interconn_worker_t
|
|||
goto continue_at_cursor;
|
||||
}
|
||||
|
||||
// Span12Mux
|
||||
|
||||
if (trg.name.substr(0, 7) == "span12_" || trg.name.substr(0, 5) == "sp12_")
|
||||
{
|
||||
bool horiz = trg.name.substr(0, 7) == "sp12_h_";
|
||||
|
|
|
|||
|
|
@ -11,16 +11,22 @@ pins = np.random.permutation("""
|
|||
""".split())
|
||||
|
||||
with open("%s.v" % sys.argv[1], "w") as f:
|
||||
print("module top(input i0, output o0, o1, o2, o3);", file=f)
|
||||
print(" assign {o0, o1, o2, o3} = {i0, i0, !i0, !i0};", file=f)
|
||||
print("module top(input i0, i1, i2, i3, output o0, o1, o2, o3);", file=f)
|
||||
print(" assign o0 = i0 || i1 && i2;", file=f)
|
||||
print(" assign o1 = i1 || i2 && i3;", file=f)
|
||||
print(" assign o2 = i0 || i2 && i3;", file=f)
|
||||
print(" assign o3 = i0 || i1 && i3;", file=f)
|
||||
print("endmodule", file=f)
|
||||
|
||||
with open("%s.pcf" % sys.argv[1], "w") as f:
|
||||
print("set_io i0 %s" % pins[0], file=f)
|
||||
print("set_io o0 %s" % pins[1], file=f)
|
||||
print("set_io o1 %s" % pins[2], file=f)
|
||||
print("set_io o2 %s" % pins[3], file=f)
|
||||
print("set_io o3 %s" % pins[4], file=f)
|
||||
print("set_io i1 %s" % pins[1], file=f)
|
||||
print("set_io i2 %s" % pins[2], file=f)
|
||||
print("set_io i3 %s" % pins[3], file=f)
|
||||
print("set_io o0 %s" % pins[4], file=f)
|
||||
print("set_io o1 %s" % pins[5], file=f)
|
||||
print("set_io o2 %s" % pins[6], file=f)
|
||||
print("set_io o3 %s" % pins[7], file=f)
|
||||
|
||||
with open("%s.ys" % sys.argv[1], "w") as f:
|
||||
print("echo on", file=f)
|
||||
|
|
@ -36,7 +42,7 @@ with open("%s.ys" % sys.argv[1], "w") as f:
|
|||
print("write_ilang %s.il" % sys.argv[1], file=f)
|
||||
print("equiv_status -assert", file=f)
|
||||
|
||||
os.system("bash ../icefuzz/icecube.sh %s.v" % sys.argv[1])
|
||||
assert os.system("bash ../icefuzz/icecube.sh %s.v" % sys.argv[1]) == 0
|
||||
os.rename("%s.v" % sys.argv[1], "%s_in.v" % sys.argv[1])
|
||||
|
||||
with open("%s_ref.v" % sys.argv[1], "w") as f:
|
||||
|
|
|
|||
Loading…
Reference in New Issue