diff options
author | Clifford Wolf <clifford@clifford.at> | 2017-03-11 11:06:53 +0100 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2017-03-11 11:06:53 +0100 |
commit | ca19eafe7aaf881273af5f744924423b6ce3a5c0 (patch) | |
tree | 429c136200b76a4a3621e71f62c608365998b142 /icefuzz | |
parent | 1f1f10b7f08941b1fbffca51452888b8d08e56a0 (diff) | |
parent | e832acc445f64d1f9379eef8ef01576ccc0494b6 (diff) | |
download | icestorm-ca19eafe7aaf881273af5f744924423b6ce3a5c0.tar.gz icestorm-ca19eafe7aaf881273af5f744924423b6ce3a5c0.tar.bz2 icestorm-ca19eafe7aaf881273af5f744924423b6ce3a5c0.zip |
Merge branch 'master' of https://github.com/hermitsoft/icestorm
Diffstat (limited to 'icefuzz')
-rw-r--r-- | icefuzz/Makefile | 2 | ||||
-rw-r--r-- | icefuzz/cached_io.txt | 18 | ||||
-rw-r--r-- | icefuzz/make_fanout.py | 4 | ||||
-rw-r--r-- | icefuzz/make_fflogic.py | 4 | ||||
-rw-r--r-- | icefuzz/make_gbio.py | 8 | ||||
-rw-r--r-- | icefuzz/make_gbio2.py | 2 | ||||
-rw-r--r-- | icefuzz/make_io.py | 2 | ||||
-rw-r--r-- | icefuzz/make_logic.py | 4 | ||||
-rw-r--r-- | icefuzz/make_mesh.py | 4 | ||||
-rw-r--r-- | icefuzz/make_prim.py | 2 | ||||
-rw-r--r-- | icefuzz/pinloc/pinloc-384-cm36.sh | 44 | ||||
-rw-r--r-- | icefuzz/pinloc/pinloc-384-cm49.sh | 46 | ||||
-rw-r--r-- | icefuzz/pinloc/pinloc-384-qn32.sh | 2 | ||||
-rw-r--r-- | icefuzz/tests/colbuf_384.py | 29 | ||||
-rw-r--r-- | icefuzz/tests/colbuf_384.sh | 35 | ||||
-rw-r--r-- | icefuzz/tests/colbuf_io_384.sh | 41 | ||||
-rw-r--r-- | icefuzz/tests/colbuf_logic_384.sh | 29 | ||||
-rw-r--r-- | icefuzz/tests/io_latched_384.sh | 31 | ||||
-rw-r--r-- | icefuzz/tests/ioctrl_384.py | 26 | ||||
-rw-r--r-- | icefuzz/tests/ioctrl_384.sh | 33 | ||||
-rw-r--r-- | icefuzz/timings_lp384.txt | 3 |
21 files changed, 352 insertions, 17 deletions
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 |