mirror of https://github.com/YosysHQ/icestorm.git
Maximized icefuzz testcases for LP384-CM49
This commit is contained in:
parent
62b7f71319
commit
f7334fcf4a
|
|
@ -109,7 +109,7 @@ ifeq ($(EIGTHK),_8k)
|
|||
else
|
||||
ifeq ($(THREEH),_384)
|
||||
ICE384PINS=1 python3 make_$(1).py
|
||||
+ICEDEV=lp384-qn32 $(MAKE) -C work_$(1)
|
||||
+ICEDEV=lp384-cm49 $(MAKE) -C work_$(1)
|
||||
python3 extract.py -3 work_$(1)/*.glb > $$@
|
||||
else
|
||||
python3 make_$(1).py
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ os.mkdir("work_fanout")
|
|||
for idx in range(num):
|
||||
with open("work_fanout/fanout_%02d.v" % idx, "w") as f:
|
||||
if os.getenv('ICE384PINS'):
|
||||
print("module top(input [1:0] a, output [15:0] y);", file=f)
|
||||
print("module top(input [1:0] a, output [33:0] y);", file=f)
|
||||
print(" assign y = {8{a}};", file=f)
|
||||
else:
|
||||
print("module top(input [1:0] a, output [63:0] y);", file=f)
|
||||
|
|
@ -18,7 +18,7 @@ for idx in range(num):
|
|||
print("endmodule", file=f)
|
||||
with open("work_fanout/fanout_%02d.pcf" % idx, "w") as f:
|
||||
p = np.random.permutation(pins)
|
||||
r = 16 if os.getenv('ICE384PINS') else 64
|
||||
r = 34 if os.getenv('ICE384PINS') else 64
|
||||
for i in range(r):
|
||||
print("set_io y[%d] %s" % (i, p[i]), file=f)
|
||||
print("set_io a[0] %s" % p[r], file=f)
|
||||
|
|
|
|||
|
|
@ -38,8 +38,8 @@ def print_seq_op(dst, src1, src2, op, f):
|
|||
for idx in range(num):
|
||||
with open("work_fflogic/fflogic_%02d.v" % idx, "w") as f:
|
||||
if os.getenv('ICE384PINS'):
|
||||
print("module top(input clk, rst, en, input [1:0] a, b, c, d, output [1:0] y, output z);", file=f)
|
||||
print(" reg [1:0] p, q;", file=f)
|
||||
print("module top(input clk, rst, en, input [4:0] a, b, c, d, output [4:0] y, output z);", file=f)
|
||||
print(" reg [4:0] p, q;", file=f)
|
||||
else:
|
||||
print("module top(input clk, rst, en, input [15:0] a, b, c, d, output [15:0] y, output z);", file=f)
|
||||
print(" reg [15:0] p, q;", file=f)
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import os
|
|||
os.system("rm -rf work_gbio")
|
||||
os.mkdir("work_gbio")
|
||||
|
||||
w = 2 if os.getenv('ICE384PINS') else 8
|
||||
w = 4 if os.getenv('ICE384PINS') else 8
|
||||
|
||||
for p in gpins:
|
||||
if p in pins: pins.remove(p)
|
||||
|
|
@ -64,11 +64,11 @@ for idx in range(num):
|
|||
np.random.choice(["oen", "globals", "din_0+din_1", "din_0^din_1"]),
|
||||
np.random.choice(["dout_1", "globals", "globals^dout_0", "din_0+din_1", "~din_0"]),
|
||||
np.random.choice(["dout_0", "globals", "globals^dout_1", "din_0+din_1", "~din_1"]),
|
||||
np.random.choice(["din_0", "{din_0[0], din_0[1]}"]) if os.getenv('ICE384PINS')
|
||||
np.random.choice(["din_0", "{din_0[2:0], din_0[3]}"]) if os.getenv('ICE384PINS')
|
||||
else np.random.choice(["din_0", "{din_0[3:0], din_0[7:4]}"]) ,
|
||||
np.random.choice(["din_1", "{din_1[0], din_1[1]}"]) if os.getenv('ICE384PINS')
|
||||
np.random.choice(["din_1", "{din_1[1:0], din_1[3:2]}"]) if os.getenv('ICE384PINS')
|
||||
else np.random.choice(["din_1", "{din_1[1:0], din_1[7:2]}"]),
|
||||
np.random.choice(["globals", "{globals[0], globals[1]}"]) if os.getenv('ICE384PINS')
|
||||
np.random.choice(["globals", "{globals[0], globals[3:1]}"]) if os.getenv('ICE384PINS')
|
||||
else np.random.choice(["globals", "{globals[0], globals[7:1]}"]),
|
||||
glbs[0], glbs[1], glbs[1], glbs[2], glbs[3]
|
||||
), file=f)
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import os
|
|||
os.system("rm -rf work_gbio2")
|
||||
os.mkdir("work_gbio2")
|
||||
|
||||
w = 2 if os.getenv('ICE384PINS') else 8
|
||||
w = 4 if os.getenv('ICE384PINS') else 8
|
||||
|
||||
for p in gpins:
|
||||
if p in pins: pins.remove(p)
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import os
|
|||
os.system("rm -rf work_io")
|
||||
os.mkdir("work_io")
|
||||
|
||||
if os.getenv('ICE384PINS'): w = 2
|
||||
if os.getenv('ICE384PINS'): w = 3
|
||||
else: w = 4
|
||||
|
||||
for idx in range(num):
|
||||
|
|
|
|||
|
|
@ -13,14 +13,14 @@ def random_op():
|
|||
for idx in range(num):
|
||||
with open("work_logic/logic_%02d.v" % idx, "w") as f:
|
||||
if os.getenv('ICE384PINS'):
|
||||
print("module top(input [3:0] a, b, c, d, output [3:0] y);", file=f)
|
||||
print("module top(input [5:0] a, b, c, d, output [5:0] y);", file=f)
|
||||
else:
|
||||
print("module top(input [15:0] a, b, c, d, output [15:0] y);", file=f)
|
||||
print(" assign y = (a %s b) %s (c %s d);" % (random_op(), random_op(), random_op()), file=f)
|
||||
print("endmodule", file=f)
|
||||
with open("work_logic/logic_%02d.pcf" % idx, "w") as f:
|
||||
p = np.random.permutation(pins)
|
||||
r = 4 if os.getenv('ICE384PINS') else 16
|
||||
r = 6 if os.getenv('ICE384PINS') else 16
|
||||
for i in range(r):
|
||||
print("set_io a[%d] %s" % (i, p[i]), file=f)
|
||||
print("set_io b[%d] %s" % (i, p[i+r]), file=f)
|
||||
|
|
|
|||
|
|
@ -10,14 +10,14 @@ os.mkdir("work_mesh")
|
|||
for idx in range(num):
|
||||
with open("work_mesh/mesh_%02d.v" % idx, "w") as f:
|
||||
if os.getenv('ICE384PINS'):
|
||||
print("module top(input [9:0] a, output [9:0] y);", file=f)
|
||||
print("module top(input [9:0] a, output [17:0] y);", file=f)
|
||||
else:
|
||||
print("module top(input [39:0] a, output [39:0] y);", file=f)
|
||||
print(" assign y = a;", file=f)
|
||||
print("endmodule", file=f)
|
||||
with open("work_mesh/mesh_%02d.pcf" % idx, "w") as f:
|
||||
p = np.random.permutation(pins)
|
||||
if os.getenv('ICE384PINS'): r = 10
|
||||
if os.getenv('ICE384PINS'): r = 18
|
||||
else: r = 40
|
||||
for i in range(r):
|
||||
print("set_io a[%d] %s" % (i, p[i]), file=f)
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import os
|
|||
os.system("rm -rf work_prim")
|
||||
os.mkdir("work_prim")
|
||||
|
||||
w = 5 if os.getenv('ICE384PINS') else 24
|
||||
w = 10 if os.getenv('ICE384PINS') else 24
|
||||
|
||||
for idx in range(num):
|
||||
with open("work_prim/prim_%02d.v" % idx, "w") as f:
|
||||
|
|
|
|||
Loading…
Reference in New Issue