From e832acc445f64d1f9379eef8ef01576ccc0494b6 Mon Sep 17 00:00:00 2001 From: hermitsoft Date: Fri, 10 Mar 2017 02:09:46 +0100 Subject: icefuzz data and test scripts for LP384-CM49 --- icebox/icebox.py | 2 +- icefuzz/cached_io.txt | 18 +++++++++++++++++ icefuzz/tests/colbuf_384.py | 29 +++++++++++++++++++++++++++ icefuzz/tests/colbuf_384.sh | 35 +++++++++++++++++++++++++++++++++ icefuzz/tests/colbuf_io_384.sh | 41 +++++++++++++++++++++++++++++++++++++++ icefuzz/tests/colbuf_logic_384.sh | 29 +++++++++++++++++++++++++++ icefuzz/tests/io_latched_384.sh | 31 +++++++++++++++++++++++++++++ icefuzz/tests/ioctrl_384.py | 26 +++++++++++++++++++++++++ icefuzz/tests/ioctrl_384.sh | 33 +++++++++++++++++++++++++++++++ icefuzz/timings_lp384.txt | 3 +++ 10 files changed, 246 insertions(+), 1 deletion(-) create mode 100644 icefuzz/tests/colbuf_384.py create mode 100644 icefuzz/tests/colbuf_384.sh create mode 100644 icefuzz/tests/colbuf_io_384.sh create mode 100644 icefuzz/tests/colbuf_logic_384.sh create mode 100644 icefuzz/tests/io_latched_384.sh create mode 100644 icefuzz/tests/ioctrl_384.py create mode 100644 icefuzz/tests/ioctrl_384.sh diff --git a/icebox/icebox.py b/icebox/icebox.py index 791a5a7..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? 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 lc_trk_g0_0 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 "" + for x in {1..7}; do + echo "" + done + for y in {1..9}; do + echo "" + done + for x in {0..7}; do + echo "$x" + done + for y in {0..9}; do + echo "$y" + done + while read x1 y1 x2 y2; do + echo "" + done < <( get_colbuf_data; ) + while read x1 y1 x2 y2; do + echo "" + done < <( get_colbuf_data; ) + echo "" +} > 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 -- cgit v1.2.3