aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2017-03-11 11:06:53 +0100
committerClifford Wolf <clifford@clifford.at>2017-03-11 11:06:53 +0100
commitca19eafe7aaf881273af5f744924423b6ce3a5c0 (patch)
tree429c136200b76a4a3621e71f62c608365998b142
parent1f1f10b7f08941b1fbffca51452888b8d08e56a0 (diff)
parente832acc445f64d1f9379eef8ef01576ccc0494b6 (diff)
downloadicestorm-ca19eafe7aaf881273af5f744924423b6ce3a5c0.tar.gz
icestorm-ca19eafe7aaf881273af5f744924423b6ce3a5c0.tar.bz2
icestorm-ca19eafe7aaf881273af5f744924423b6ce3a5c0.zip
Merge branch 'master' of https://github.com/hermitsoft/icestorm
-rw-r--r--icebox/icebox.py147
-rw-r--r--icefuzz/Makefile2
-rw-r--r--icefuzz/cached_io.txt18
-rw-r--r--icefuzz/make_fanout.py4
-rw-r--r--icefuzz/make_fflogic.py4
-rw-r--r--icefuzz/make_gbio.py8
-rw-r--r--icefuzz/make_gbio2.py2
-rw-r--r--icefuzz/make_io.py2
-rw-r--r--icefuzz/make_logic.py4
-rw-r--r--icefuzz/make_mesh.py4
-rw-r--r--icefuzz/make_prim.py2
-rw-r--r--icefuzz/pinloc/pinloc-384-cm36.sh44
-rw-r--r--icefuzz/pinloc/pinloc-384-cm49.sh46
-rw-r--r--icefuzz/pinloc/pinloc-384-qn32.sh2
-rw-r--r--icefuzz/tests/colbuf_384.py29
-rw-r--r--icefuzz/tests/colbuf_384.sh35
-rw-r--r--icefuzz/tests/colbuf_io_384.sh41
-rw-r--r--icefuzz/tests/colbuf_logic_384.sh29
-rw-r--r--icefuzz/tests/io_latched_384.sh31
-rw-r--r--icefuzz/tests/ioctrl_384.py26
-rw-r--r--icefuzz/tests/ioctrl_384.sh33
-rw-r--r--icefuzz/timings_lp384.txt3
22 files changed, 458 insertions, 58 deletions
diff --git a/icebox/icebox.py b/icebox/icebox.py
index a39fa53..289f070 100644
--- a/icebox/icebox.py
+++ b/icebox/icebox.py
@@ -174,7 +174,7 @@ class iceconfig:
entries = list()
for x in range(self.max_x+1):
for y in range(self.max_y+1):
- src_y = None
+ src_y = None #Is ColBufCtrl relevant?
if 0 <= y <= 2: src_y = 2 #384?
if 3 <= y <= 4: src_y = 3 #384?
if 5 <= y <= 6: src_y = 6 #384?
@@ -250,7 +250,7 @@ class iceconfig:
if x == 0: return True
return False
-
+
if not 0 <= x <= self.max_x: return False
if not 0 <= y <= self.max_y: return False
return pos_has_net(self.tile_pos(x, y), netname)
@@ -1807,44 +1807,43 @@ ieren_db = {
(33, 31, 0, 33, 31, 0),
],
"384": [
- # IO-block (X, Y, Z) <-> IeRen-block (X, Y, Z)
- ( 0, 1, 0, 0, 0, 0), #384?
- ( 0, 1, 1, 0, 1, 0), #384?
- ( 0, 2, 0, 0, 2, 0), #384?
- ( 0, 2, 1, 0, 2, 0), #384?
- ( 0, 4, 0, 0, 4, 0), #384?
- ( 0, 4, 1, 0, 4, 0), #384?
- ( 0, 5, 0, 0, 5, 0), #384?
- ( 0, 5, 1, 0, 5, 0), #384?
- ( 0, 6, 0, 0, 6, 0), #384?
- ( 0, 6, 1, 0, 6, 0), #384?
- ( 0, 7, 0, 0, 7, 0), #384?
- ( 0, 7, 1, 0, 7, 0), #384?
- ( 2, 9, 0, 2, 9, 0), #384?
- ( 2, 9, 1, 2, 9, 0), #384?
- ( 3, 0, 0, 3, 0, 0), #384?
- ( 3, 0, 1, 3, 0, 0), #384?
- ( 3, 9, 0, 3, 9, 0), #384?
- ( 3, 9, 1, 3, 9, 0), #384?
- ( 4, 0, 0, 4, 0, 0), #384?
- ( 4, 0, 1, 4, 0, 0), #384?
- ( 4, 9, 0, 4, 9, 0), #384?
- ( 4, 9, 1, 4, 9, 0), #384?
- ( 5, 0, 0, 5, 0, 0), #384?
- ( 5, 0, 1, 5, 0, 0), #384?
- ( 5, 9, 0, 5, 9, 0), #384?
- ( 5, 9, 1, 5, 9, 0), #384?
- ( 6, 0, 0, 6, 0, 0), #384?
- ( 6, 0, 1, 6, 0, 0), #384?
- ( 6, 9, 0, 6, 9, 0), #384?
- ( 6, 9, 1, 6, 9, 0), #384?
- ( 7, 3, 1, 7, 3, 0), #384?
- ( 7, 4, 0, 7, 4, 0), #384?
- ( 7, 4, 1, 7, 4, 0), #384?
- ( 7, 5, 0, 7, 5, 0), #384?
- ( 7, 5, 1, 7, 5, 0), #384?
- ( 7, 6, 0, 7, 6, 0), #384?
- ( 7, 6, 1, 7, 6, 0), #384?
+ ( 0, 1, 0, 0, 1, 1),
+ ( 0, 1, 1, 0, 1, 0),
+ ( 0, 2, 0, 0, 2, 1),
+ ( 0, 2, 1, 0, 2, 0),
+ ( 0, 4, 0, 0, 4, 1),
+ ( 0, 4, 1, 0, 4, 0),
+ ( 0, 5, 0, 0, 5, 1),
+ ( 0, 5, 1, 0, 5, 0),
+ ( 0, 6, 0, 0, 6, 1),
+ ( 0, 6, 1, 0, 6, 0),
+ ( 0, 7, 0, 0, 7, 1),
+ ( 0, 7, 1, 0, 7, 0),
+ ( 2, 9, 0, 2, 9, 1),
+ ( 2, 9, 1, 2, 9, 0),
+ ( 3, 0, 0, 3, 0, 1),
+ ( 3, 0, 1, 3, 0, 0),
+ ( 3, 9, 0, 3, 9, 1),
+ ( 3, 9, 1, 3, 9, 0),
+ ( 4, 0, 0, 4, 0, 1),
+ ( 4, 0, 1, 4, 0, 0),
+ ( 4, 9, 0, 4, 9, 1),
+ ( 4, 9, 1, 4, 9, 0),
+ ( 5, 0, 0, 5, 0, 1),
+ ( 5, 0, 1, 5, 0, 0),
+ ( 5, 9, 0, 5, 9, 1),
+ ( 5, 9, 1, 5, 9, 0),
+ ( 6, 0, 0, 6, 0, 1),
+ ( 6, 0, 1, 6, 0, 0),
+ ( 6, 9, 0, 6, 9, 1),
+ ( 6, 9, 1, 6, 9, 0),
+ ( 7, 3, 1, 7, 3, 0),
+ ( 7, 4, 0, 7, 4, 1),
+ ( 7, 4, 1, 7, 4, 0),
+ ( 7, 5, 0, 7, 5, 1),
+ ( 7, 5, 1, 7, 5, 0),
+ ( 7, 6, 0, 7, 6, 1),
+ ( 7, 6, 1, 7, 6, 0),
],
}
@@ -3785,6 +3784,72 @@ pinloc_db = {
( "30", 3, 9, 1),
( "31", 2, 9, 0),
( "32", 2, 9, 1),
+ ],
+ "384-cm36": [
+ ( "A1", 0, 7, 0),
+ ( "A2", 2, 9, 1),
+ ( "A3", 3, 9, 1),
+ ( "B1", 0, 7, 1),
+ ( "B3", 4, 9, 0),
+ ( "B4", 7, 5, 0),
+ ( "B5", 7, 5, 1),
+ ( "B6", 7, 6, 0),
+ ( "C1", 0, 5, 0),
+ ( "C2", 0, 5, 1),
+ ( "C3", 2, 9, 0),
+ ( "C5", 7, 4, 1),
+ ( "C6", 7, 6, 1),
+ ( "D1", 0, 4, 1),
+ ( "D5", 6, 0, 1),
+ ( "D6", 7, 4, 0),
+ ( "E1", 0, 4, 0),
+ ( "E2", 3, 0, 1),
+ ( "E3", 4, 0, 0),
+ ( "E4", 5, 0, 0),
+ ( "E5", 6, 0, 0),
+ ( "E6", 7, 3, 1),
+ ( "F2", 3, 0, 0),
+ ( "F3", 4, 0, 1),
+ ( "F5", 5, 0, 1),
+ ],
+ "384-cm49": [
+ ( "A1", 0, 7, 1),
+ ( "A2", 2, 9, 1),
+ ( "A3", 3, 9, 0),
+ ( "A4", 4, 9, 1),
+ ( "A5", 5, 9, 0),
+ ( "A6", 6, 9, 0),
+ ( "A7", 6, 9, 1),
+ ( "B1", 0, 7, 0),
+ ( "B2", 0, 6, 0),
+ ( "B3", 2, 9, 0),
+ ( "B4", 4, 9, 0),
+ ( "C1", 0, 5, 1),
+ ( "C2", 0, 6, 1),
+ ( "C4", 3, 9, 1),
+ ( "C5", 7, 6, 1),
+ ( "C6", 7, 5, 1),
+ ( "C7", 7, 6, 0),
+ ( "D1", 0, 4, 0),
+ ( "D2", 0, 5, 0),
+ ( "D3", 0, 2, 0),
+ ( "D4", 5, 9, 1),
+ ( "D6", 7, 4, 1),
+ ( "D7", 7, 5, 0),
+ ( "E2", 0, 4, 1),
+ ( "E6", 6, 0, 1),
+ ( "E7", 7, 4, 0),
+ ( "F1", 0, 2, 1),
+ ( "F2", 0, 1, 0),
+ ( "F3", 3, 0, 1),
+ ( "F4", 4, 0, 0),
+ ( "F5", 5, 0, 0),
+ ( "F6", 6, 0, 0),
+ ( "F7", 7, 3, 1),
+ ( "G1", 0, 1, 1),
+ ( "G3", 3, 0, 0),
+ ( "G4", 4, 0, 1),
+ ( "G6", 5, 0, 1),
]
}
@@ -3831,7 +3896,7 @@ logictile_db.append([["B1[50]"], "CarryInSet"])
logictile_8k_db.append([["B1[49]"], "buffer", "carry_in", "carry_in_mux"])
logictile_8k_db.append([["B1[50]"], "CarryInSet"])
-logictile_384_db.append([["B1[49]"], "buffer", "carry_in", "carry_in_mux"]) #384?
+logictile_384_db.append([["B1[49]"], "buffer", "carry_in", "carry_in_mux"])
logictile_384_db.append([["B1[50]"], "CarryInSet"])
for db in [iotile_l_db, iotile_r_db, iotile_t_db, iotile_b_db, logictile_db, logictile_8k_db, logictile_384_db, rambtile_db, ramttile_db, rambtile_8k_db, ramttile_8k_db]:
diff --git a/icefuzz/Makefile b/icefuzz/Makefile
index ff576d1..ca1c583 100644
--- a/icefuzz/Makefile
+++ b/icefuzz/Makefile
@@ -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
diff --git a/icefuzz/cached_io.txt b/icefuzz/cached_io.txt
index 82343c6..9d7355e 100644
--- a/icefuzz/cached_io.txt
+++ b/icefuzz/cached_io.txt
@@ -529,16 +529,21 @@
(2 6) IO control bit: BIORIGHT_REN_0
(2 6) IO control bit: BIORIGHT_REN_1
(2 6) IO control bit: BIOUP_REN_0
+(2 6) IO control bit: BIOUP_REN_1
(2 6) IO control bit: GIODOWN0_REN_0
+(2 6) IO control bit: GIODOWN0_REN_1
(2 6) IO control bit: GIODOWN1_REN_0
+(2 6) IO control bit: GIODOWN1_REN_1
(2 6) IO control bit: GIOLEFT0_REN_0
(2 6) IO control bit: GIOLEFT0_REN_1
(2 6) IO control bit: GIOLEFT1_REN_0
(2 6) IO control bit: GIOLEFT1_REN_1
(2 6) IO control bit: GIORIGHT0_REN_0
+(2 6) IO control bit: GIORIGHT0_REN_1
(2 6) IO control bit: GIORIGHT1_REN_0
(2 6) IO control bit: GIORIGHT1_REN_1
(2 6) IO control bit: GIOUP0_REN_0
+(2 6) IO control bit: GIOUP0_REN_1
(2 6) IO control bit: GIOUP1_REN_0
(2 6) IO control bit: GIOUP1_REN_1
(2 6) IO control bit: IODOWN_REN_0
@@ -546,6 +551,7 @@
(2 6) IO control bit: IOLEFT_REN_0
(2 6) IO control bit: IOLEFT_REN_1
(2 6) IO control bit: IORIGHT_REN_0
+(2 6) IO control bit: IORIGHT_REN_1
(2 6) IO control bit: IOUP_REN_0
(2 6) IO control bit: IOUP_REN_1
(2 7) Enable bit of Mux _out_links/OutMux9_1 => wire_io_cluster/io_0/D_IN_1 span4_horz_r_13
@@ -569,7 +575,9 @@
(3 1) IO control bit: BIORIGHT_REN_1
(3 1) IO control bit: BIOUP_REN_0
(3 1) IO control bit: BIOUP_REN_1
+(3 1) IO control bit: GIODOWN0_REN_0
(3 1) IO control bit: GIODOWN0_REN_1
+(3 1) IO control bit: GIODOWN1_REN_0
(3 1) IO control bit: GIODOWN1_REN_1
(3 1) IO control bit: GIOLEFT0_REN_0
(3 1) IO control bit: GIOLEFT0_REN_1
@@ -581,6 +589,7 @@
(3 1) IO control bit: GIORIGHT1_REN_1
(3 1) IO control bit: GIOUP0_REN_0
(3 1) IO control bit: GIOUP0_REN_1
+(3 1) IO control bit: GIOUP1_REN_0
(3 1) IO control bit: GIOUP1_REN_1
(3 1) IO control bit: IODOWN_REN_0
(3 1) IO control bit: IODOWN_REN_1
@@ -638,7 +647,9 @@
(3 6) IO control bit: BIORIGHT_IE_1
(3 6) IO control bit: BIOUP_IE_0
(3 6) IO control bit: BIOUP_IE_1
+(3 6) IO control bit: GIODOWN0_IE_0
(3 6) IO control bit: GIODOWN0_IE_1
+(3 6) IO control bit: GIODOWN1_IE_0
(3 6) IO control bit: GIODOWN1_IE_1
(3 6) IO control bit: GIOLEFT0_IE_0
(3 6) IO control bit: GIOLEFT0_IE_1
@@ -650,6 +661,7 @@
(3 6) IO control bit: GIORIGHT1_IE_1
(3 6) IO control bit: GIOUP0_IE_0
(3 6) IO control bit: GIOUP0_IE_1
+(3 6) IO control bit: GIOUP1_IE_0
(3 6) IO control bit: GIOUP1_IE_1
(3 6) IO control bit: IODOWN_IE_0
(3 6) IO control bit: IODOWN_IE_1
@@ -671,16 +683,21 @@
(3 9) IO control bit: BIORIGHT_IE_0
(3 9) IO control bit: BIORIGHT_IE_1
(3 9) IO control bit: BIOUP_IE_0
+(3 9) IO control bit: BIOUP_IE_1
(3 9) IO control bit: GIODOWN0_IE_0
+(3 9) IO control bit: GIODOWN0_IE_1
(3 9) IO control bit: GIODOWN1_IE_0
+(3 9) IO control bit: GIODOWN1_IE_1
(3 9) IO control bit: GIOLEFT0_IE_0
(3 9) IO control bit: GIOLEFT0_IE_1
(3 9) IO control bit: GIOLEFT1_IE_0
(3 9) IO control bit: GIOLEFT1_IE_1
(3 9) IO control bit: GIORIGHT0_IE_0
+(3 9) IO control bit: GIORIGHT0_IE_1
(3 9) IO control bit: GIORIGHT1_IE_0
(3 9) IO control bit: GIORIGHT1_IE_1
(3 9) IO control bit: GIOUP0_IE_0
+(3 9) IO control bit: GIOUP0_IE_1
(3 9) IO control bit: GIOUP1_IE_0
(3 9) IO control bit: GIOUP1_IE_1
(3 9) IO control bit: IODOWN_IE_0
@@ -688,6 +705,7 @@
(3 9) IO control bit: IOLEFT_IE_0
(3 9) IO control bit: IOLEFT_IE_1
(3 9) IO control bit: IORIGHT_IE_0
+(3 9) IO control bit: IORIGHT_IE_1
(3 9) IO control bit: IOUP_IE_0
(3 9) IO control bit: IOUP_IE_1
(4 0) routing IO_B.logic_op_tnl_0 <X> lc_trk_g0_0
diff --git a/icefuzz/make_fanout.py b/icefuzz/make_fanout.py
index 1102cc0..510fa00 100644
--- a/icefuzz/make_fanout.py
+++ b/icefuzz/make_fanout.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)
diff --git a/icefuzz/make_fflogic.py b/icefuzz/make_fflogic.py
index ecca7ca..91a5d05 100644
--- a/icefuzz/make_fflogic.py
+++ b/icefuzz/make_fflogic.py
@@ -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)
diff --git a/icefuzz/make_gbio.py b/icefuzz/make_gbio.py
index 9d740d1..555d37d 100644
--- a/icefuzz/make_gbio.py
+++ b/icefuzz/make_gbio.py
@@ -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)
diff --git a/icefuzz/make_gbio2.py b/icefuzz/make_gbio2.py
index 8e44756..2b62ba4 100644
--- a/icefuzz/make_gbio2.py
+++ b/icefuzz/make_gbio2.py
@@ -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)
diff --git a/icefuzz/make_io.py b/icefuzz/make_io.py
index aefabae..9fe5bb0 100644
--- a/icefuzz/make_io.py
+++ b/icefuzz/make_io.py
@@ -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):
diff --git a/icefuzz/make_logic.py b/icefuzz/make_logic.py
index 37aa16c..0d45a03 100644
--- a/icefuzz/make_logic.py
+++ b/icefuzz/make_logic.py
@@ -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)
diff --git a/icefuzz/make_mesh.py b/icefuzz/make_mesh.py
index 1a69ca4..a2a7d55 100644
--- a/icefuzz/make_mesh.py
+++ b/icefuzz/make_mesh.py
@@ -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 [13:0] a, output [13: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 = 14
else: r = 40
for i in range(r):
print("set_io a[%d] %s" % (i, p[i]), file=f)
diff --git a/icefuzz/make_prim.py b/icefuzz/make_prim.py
index 02a6534..8ced57e 100644
--- a/icefuzz/make_prim.py
+++ b/icefuzz/make_prim.py
@@ -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:
diff --git a/icefuzz/pinloc/pinloc-384-cm36.sh b/icefuzz/pinloc/pinloc-384-cm36.sh
new file mode 100644
index 0000000..b950e28
--- /dev/null
+++ b/icefuzz/pinloc/pinloc-384-cm36.sh
@@ -0,0 +1,44 @@
+#!/bin/bash
+
+mkdir -p pinloc-384-cm36
+cd pinloc-384-cm36
+
+pins="
+ A1 A2 A3
+ B1 B3 B4 B5 B6
+ C1 C2 C3 C5 C6
+ D1 D5 D6
+ E1 E2 E3 E4 E5 E6
+ F2 F3 F5
+"
+
+if [ $(echo $pins | wc -w) -ne 25 ]; then
+ echo "Incorrect number of pins:" $(echo $pins | wc -w)
+ exit 1
+fi
+
+{
+ echo -n "all:"
+ for pin in $pins; do
+ id="pinloc-384-cm36_${pin}"
+ echo -n " ${id}.exp"
+ done
+ echo
+
+ for pin in $pins; do
+ id="pinloc-384-cm36_${pin}"
+ echo "module top(output y); assign y = 0; endmodule" > ${id}.v
+ echo "set_io y ${pin}" >> ${id}.pcf
+ echo; echo "${id}.exp:"
+ echo " ICEDEV=lp384-cm36 bash ../../icecube.sh ${id} > ${id}.log 2>&1"
+ echo " ../../../icebox/icebox_explain.py ${id}.asc > ${id}.exp.new"
+ echo " ! grep '^Warning: pin' ${id}.log"
+ echo " rm -rf ${id}.tmp"
+ echo " mv ${id}.exp.new ${id}.exp"
+ done
+} > pinloc-384-cm36.mk
+
+set -ex
+make -f pinloc-384-cm36.mk -j4
+python3 ../pinlocdb.py pinloc-384-cm36_*.exp > ../pinloc-384-cm36.txt
+
diff --git a/icefuzz/pinloc/pinloc-384-cm49.sh b/icefuzz/pinloc/pinloc-384-cm49.sh
new file mode 100644
index 0000000..ea81bd0
--- /dev/null
+++ b/icefuzz/pinloc/pinloc-384-cm49.sh
@@ -0,0 +1,46 @@
+#!/bin/bash
+
+mkdir -p pinloc-384-cm49
+cd pinloc-384-cm49
+
+pins="
+ A1 A2 A3 A4 A5 A6 A7
+ B1 B2 B3 B4
+ C1 C2 C4 C5 C6 C7
+ D1 D2 D3 D4 D6 D7
+ E2 E6 E7
+ F1 F2 F3 F4 F5 F6 F7
+ G1 G3 G4 G6
+"
+
+
+if [ $(echo $pins | wc -w) -ne 37 ]; then
+ echo "Incorrect number of pins:" $(echo $pins | wc -w)
+ exit 1
+fi
+
+{
+ echo -n "all:"
+ for pin in $pins; do
+ id="pinloc-384-cm49_${pin}"
+ echo -n " ${id}.exp"
+ done
+ echo
+
+ for pin in $pins; do
+ id="pinloc-384-cm49_${pin}"
+ echo "module top(output y); assign y = 0; endmodule" > ${id}.v
+ echo "set_io y ${pin}" >> ${id}.pcf
+ echo; echo "${id}.exp:"
+ echo " ICEDEV=lp384-cm49 bash ../../icecube.sh ${id} > ${id}.log 2>&1"
+ echo " ../../../icebox/icebox_explain.py ${id}.asc > ${id}.exp.new"
+ echo " ! grep '^Warning: pin' ${id}.log"
+ echo " rm -rf ${id}.tmp"
+ echo " mv ${id}.exp.new ${id}.exp"
+ done
+} > pinloc-384-cm49.mk
+
+set -ex
+make -f pinloc-384-cm49.mk -j4
+python3 ../pinlocdb.py pinloc-384-cm49_*.exp > ../pinloc-384-cm49.txt
+
diff --git a/icefuzz/pinloc/pinloc-384-qn32.sh b/icefuzz/pinloc/pinloc-384-qn32.sh
index a3d91e4..da8c63d 100644
--- a/icefuzz/pinloc/pinloc-384-qn32.sh
+++ b/icefuzz/pinloc/pinloc-384-qn32.sh
@@ -28,7 +28,7 @@ fi
echo "module top(output y); assign y = 0; endmodule" > ${id}.v
echo "set_io y ${pin}" >> ${id}.pcf
echo; echo "${id}.exp:"
- echo " ICEDEV=384-qn32 bash ../../icecube.sh ${id} > ${id}.log 2>&1"
+ echo " ICEDEV=lp384-qn32 bash ../../icecube.sh ${id} > ${id}.log 2>&1"
echo " ../../../icebox/icebox_explain.py ${id}.asc > ${id}.exp.new"
echo " ! grep '^Warning: pin' ${id}.log"
echo " rm -rf ${id}.tmp"
diff --git a/icefuzz/tests/colbuf_384.py b/icefuzz/tests/colbuf_384.py
new file mode 100644
index 0000000..e9f5332
--- /dev/null
+++ b/icefuzz/tests/colbuf_384.py
@@ -0,0 +1,29 @@
+#!/usr/bin/env python3
+
+import fileinput
+
+colbuf_tile = None
+glbnet_tile = None
+
+for line in fileinput.input():
+ line = line.split()
+ if len(line) == 0:
+ continue
+ if line[0] in [".io_tile", ".logic_tile"]:
+ current_tile = (int(line[1]), int(line[2]))
+ if line[0] == "ColBufCtrl":
+ assert colbuf_tile is None
+ colbuf_tile = current_tile
+ if line[0] == "buffer" and line[1].startswith("glb_netwk_"):
+ assert glbnet_tile is None
+ glbnet_tile = current_tile
+
+if colbuf_tile is None:
+ if glbnet_tile is None: print("( ? , ? , ? , ? ),")
+ else: print("( ? , ? , %2d, %2d)," % (glbnet_tile[0], glbnet_tile[1]))
+elif glbnet_tile is None:
+ if colbuf_tile is None: print("( ? , ? , ? , ? ),")
+ else: print("(%2d, %2d, ? , ? )," % (colbuf_tile[0], colbuf_tile[1]))
+else:
+ print("(%2d, %2d, %2d, %2d)," % (colbuf_tile[0], colbuf_tile[1], glbnet_tile[0], glbnet_tile[1]))
+
diff --git a/icefuzz/tests/colbuf_384.sh b/icefuzz/tests/colbuf_384.sh
new file mode 100644
index 0000000..4820f8f
--- /dev/null
+++ b/icefuzz/tests/colbuf_384.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+for f in colbuf_io_384.work/*.exp colbuf_logic_384.work/*.exp; do
+ echo $f >&2
+ python3 colbuf_384.py $f
+done | sort -u > colbuf_384.txt
+
+get_colbuf_data()
+{
+ tr -d '(,)' < colbuf_384.txt
+}
+
+{
+ echo "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"580\" width=\"460\">"
+ for x in {1..7}; do
+ echo "<line x1=\"$((10+x*30))\" y1=\"10\" x2=\"$((10+x*30))\" y2=\"$((10+18*30))\" style=\"stroke:rgb(0,0,0);stroke-width:3\" />"
+ done
+ for y in {1..9}; do
+ echo "<line x1=\"10\" y1=\"$((10+y*30))\" x2=\"$((10+14*30))\" y2=\"$((10+y*30))\" style=\"stroke:rgb(0,0,0);stroke-width:3\" />"
+ done
+ for x in {0..7}; do
+ echo "<text x=\"$((10+$x*30+7))\" y=\"$((10+18*30+15))\" fill=\"black\">$x</text>"
+ done
+ for y in {0..9}; do
+ echo "<text x=\"$((10+14*30+5))\" y=\"$((10+(17-y)*30+20))\" fill=\"black\">$y</text>"
+ done
+ while read x1 y1 x2 y2; do
+ echo "<line x1=\"$((10+x1*30+15))\" y1=\"$((10+(17-y1)*30+15))\" x2=\"$((10+x2*30+15))\" y2=\"$((10+(17-y2)*30+15))\" style=\"stroke:rgb(255,0,0);stroke-width:5\" />"
+ done < <( get_colbuf_data; )
+ while read x1 y1 x2 y2; do
+ echo "<circle cx=\"$((10+x1*30+15))\" cy=\"$((10+(17-y1)*30+15))\" r=\"5\" fill=\"gray\" />"
+ done < <( get_colbuf_data; )
+ echo "</svg>"
+} > colbuf_384.svg
+
diff --git a/icefuzz/tests/colbuf_io_384.sh b/icefuzz/tests/colbuf_io_384.sh
new file mode 100644
index 0000000..655afbb
--- /dev/null
+++ b/icefuzz/tests/colbuf_io_384.sh
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+set -ex
+
+mkdir -p colbuf_io_384.work
+cd colbuf_io_384.work
+
+glb_pins="B4 C4 D2 D6 D7 E2 F3 F4"
+
+pins="
+ A1 A2 A3 A4 A5 A6 A7
+ B1 B2 B3 B4
+ C1 C2 C4 C5 C6 C7
+ D1 D2 D3 D4 D6 D7
+ E2 E6 E7
+ F1 F2 F3 F4 F5 F6 F7
+ G1 G3 G4 G6
+"
+pins="$( echo $pins )"
+
+for pin in $pins; do
+ pf="colbuf_io_384_$pin"
+ gpin=$( echo $glb_pins | tr ' ' '\n' | grep -v $pin | sort -R | head -n1; )
+ cat > ${pf}.v <<- EOT
+ module top (input clk, data, output pin);
+ SB_IO #(
+ .PIN_TYPE(6'b 0101_00)
+ ) pin_obuf (
+ .PACKAGE_PIN(pin),
+ .OUTPUT_CLK(clk),
+ .D_OUT_0(data)
+ );
+ endmodule
+ EOT
+ echo "set_io pin $pin" > ${pf}.pcf
+ echo "set_io clk $gpin" >> ${pf}.pcf
+ ICEDEV=lp384-cm49 bash ../../icecube.sh ${pf}.v > ${pf}.log 2>&1
+ ../../../icebox/icebox_explain.py ${pf}.asc > ${pf}.exp
+ rm -rf ${pf}.tmp
+done
+
diff --git a/icefuzz/tests/colbuf_logic_384.sh b/icefuzz/tests/colbuf_logic_384.sh
new file mode 100644
index 0000000..2b455d5
--- /dev/null
+++ b/icefuzz/tests/colbuf_logic_384.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+set -ex
+
+mkdir -p colbuf_logic_384.work
+cd colbuf_logic_384.work
+
+glb_pins="B4 C4 D2 D6 D7 E2 F3 F4"
+
+for x in 1 2 3 4 5 6; do
+for y in 1 2 3 4 5 6 7 8; do
+ pf="colbuf_logic_384_${x}_${y}"
+ gpin=$( echo $glb_pins | tr ' ' '\n' | sort -R | head -n1; )
+ cat > ${pf}.v <<- EOT
+ module top (input c, d, output q);
+ SB_DFF dff (
+ .C(c),
+ .D(d),
+ .Q(q)
+ );
+ endmodule
+ EOT
+ echo "set_location dff $x $y 0" > ${pf}.pcf
+ echo "set_io c $gpin" >> ${pf}.pcf
+ ICEDEV=lp384-cm49 bash ../../icecube.sh ${pf}.v > ${pf}.log 2>&1
+ ../../../icebox/icebox_explain.py ${pf}.asc > ${pf}.exp
+ rm -rf ${pf}.tmp
+done; done
+
diff --git a/icefuzz/tests/io_latched_384.sh b/icefuzz/tests/io_latched_384.sh
new file mode 100644
index 0000000..04ea00f
--- /dev/null
+++ b/icefuzz/tests/io_latched_384.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+set -ex
+
+mkdir -p io_latched_384.work
+cd io_latched_384.work
+
+pins="
+ A1 A2 A3 A4 A5 A6 A7
+ B1 B2 B3 B4
+ C1 C2 C4 C5 C6 C7
+ D1 D2 D3 D4 D6 D7
+ E2 E6 E7
+ F1 F2 F3 F4 F5 F6 F7
+ G1 G3 G4 G6
+"
+pins="$( echo $pins )"
+
+for pin in $pins; do
+ pf="io_latched_384_$pin"
+ cp ../io_latched.v ${pf}.v
+ read pin_latch pin_data < <( echo $pins | tr ' ' '\n' | grep -v $pin | sort -R; )
+ {
+ echo "set_io pin $pin"
+ echo "set_io latch_in $pin_latch"
+ echo "set_io data_out $pin_data"
+ } > ${pf}.pcf
+ ICEDEV=lp384-cm49 bash ../../icecube.sh ${pf}.v
+ ../../../icebox/icebox_vlog.py -SP ${pf}.psb ${pf}.asc > ${pf}.ve
+done
+
diff --git a/icefuzz/tests/ioctrl_384.py b/icefuzz/tests/ioctrl_384.py
new file mode 100644
index 0000000..ec8ddb8
--- /dev/null
+++ b/icefuzz/tests/ioctrl_384.py
@@ -0,0 +1,26 @@
+#!/usr/bin/env python3
+
+import fileinput
+
+ren = None
+
+for line in fileinput.input():
+ line = line.split()
+ if len(line) == 0:
+ continue
+ if line[0] == ".io_tile":
+ current_tile = (int(line[1]), int(line[2]))
+ if line[0] == "IoCtrl" and line[1] == "REN_0":
+ ren = (current_tile[0], current_tile[1], 0)
+ if line[0] == "IoCtrl" and line[1] == "REN_1":
+ ren = (current_tile[0], current_tile[1], 1)
+ if line[0] == "IOB_0":
+ iob = (current_tile[0], current_tile[1], 0)
+ if line[0] == "IOB_1":
+ iob = (current_tile[0], current_tile[1], 1)
+
+if ren is None:
+ print("(%2d, %2d, %2d, ? , ? , ? )," % (iob[0], iob[1], iob[2]))
+else:
+ print("(%2d, %2d, %2d, %2d, %2d, %2d)," % (iob[0], iob[1], iob[2], ren[0], ren[1], ren[2]))
+
diff --git a/icefuzz/tests/ioctrl_384.sh b/icefuzz/tests/ioctrl_384.sh
new file mode 100644
index 0000000..b75b864
--- /dev/null
+++ b/icefuzz/tests/ioctrl_384.sh
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+set -ex
+
+mkdir -p ioctrl_384.work
+cd ioctrl_384.work
+
+pins="
+ A1 A2 A3 A4 A5 A6 A7
+ B1 B2 B3 B4
+ C1 C2 C4 C5 C6 C7
+ D1 D2 D3 D4 D6 D7
+ E2 E6 E7
+ F1 F2 F3 F4 F5 F6 F7
+ G1 G3 G4 G6
+"
+pins="$( echo $pins )"
+
+for pin in $pins; do
+ pf="ioctrl_384_$pin"
+ echo "module top (output pin); assign pin = 1; endmodule" > ${pf}.v
+ echo "set_io pin $pin" > ${pf}.pcf
+ ICEDEV=lp384-cm49 bash ../../icecube.sh ${pf}.v > ${pf}.log 2>&1
+ ../../../icebox/icebox_explain.py ${pf}.asc > ${pf}.exp
+done
+
+set +x
+echo "--snip--"
+for pin in $pins; do
+ python3 ../ioctrl_384.py ioctrl_384_${pin}.exp
+done | tee ioctrl_384_db.txt
+echo "--snap--"
+
diff --git a/icefuzz/timings_lp384.txt b/icefuzz/timings_lp384.txt
index 50e98fa..643fe24 100644
--- a/icefuzz/timings_lp384.txt
+++ b/icefuzz/timings_lp384.txt
@@ -19,6 +19,9 @@ IOPATH I O 418.748:544:661.563 333.689:433.5:527.183
CELL GlobalMux
IOPATH I O 143.944:187:227.412 71.9722:93.5:113.706
+CELL ICE_CARRY_IN_MUX
+IOPATH carryinitin carryinitout 183.202:238:289.434 163.573:212.5:258.423
+
CELL ICE_GB
IOPATH USERSIGNALTOGLOBALBUFFER GLOBALBUFFEROUTPUT 575.778:748:909.649 523.434:680:826.954