From 496f4563ba4b0884ff257521f055fae574141e0a Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Mon, 1 Feb 2016 18:48:56 +0100 Subject: Improvements in icefuzz/pinloc --- icefuzz/pinloc/.gitignore | 2 ++ icefuzz/pinloc/pinloc-1k-cb132.sh | 6 ++++++ icefuzz/pinloc/pinloc-1k-qn84.sh | 6 ++++++ icefuzz/pinloc/pinloc-1k-tq144.sh | 6 ++++++ icefuzz/pinloc/pinloc-1k-vq100.sh | 14 ++++++++++---- icefuzz/pinloc/pinloc-4k-cb132.sh | 6 ++++++ icefuzz/pinloc/pinloc-4k-tq144.sh | 39 +++++++++++++++++++++++++++++++++++++++ icefuzz/pinloc/pinloc-8k-cb132.sh | 6 ++++++ icefuzz/pinloc/pinloc-8k-ct256.sh | 6 ++++++ icefuzz/pinloc/pinlocdb.py | 6 +++--- 10 files changed, 90 insertions(+), 7 deletions(-) create mode 100644 icefuzz/pinloc/pinloc-4k-tq144.sh (limited to 'icefuzz/pinloc') diff --git a/icefuzz/pinloc/.gitignore b/icefuzz/pinloc/.gitignore index 02fa5b5..e80f14d 100644 --- a/icefuzz/pinloc/.gitignore +++ b/icefuzz/pinloc/.gitignore @@ -1,5 +1,7 @@ pinloc-*.mk pinloc-*.exp +pinloc-*.exp.new pinloc-*.log pinloc-*.pcf +pinloc-*.rpt pinloc-*.v diff --git a/icefuzz/pinloc/pinloc-1k-cb132.sh b/icefuzz/pinloc/pinloc-1k-cb132.sh index fabcd66..14d7d62 100644 --- a/icefuzz/pinloc/pinloc-1k-cb132.sh +++ b/icefuzz/pinloc/pinloc-1k-cb132.sh @@ -12,6 +12,11 @@ pins=" P2 P3 P4 P5 P7 P8 P9 P10 P11 P12 P13 P14 " +if [ $(echo $pins | wc -w) -ne 95 ]; then + echo "Incorrect number of pins:" $(echo $pins | wc -w) + exit 1 +fi + { echo -n "all:" for pin in $pins; do @@ -27,6 +32,7 @@ pins=" echo; echo "${id}.exp:" echo " ICEDEV=hx1k-cb132 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 diff --git a/icefuzz/pinloc/pinloc-1k-qn84.sh b/icefuzz/pinloc/pinloc-1k-qn84.sh index 308fd5d..cb5beca 100644 --- a/icefuzz/pinloc/pinloc-1k-qn84.sh +++ b/icefuzz/pinloc/pinloc-1k-qn84.sh @@ -8,6 +8,11 @@ pins=" " +if [ $(echo $pins | wc -w) -ne 67 ]; then + echo "Incorrect number of pins:" $(echo $pins | wc -w) + exit 1 +fi + { echo -n "all:" for pin in $pins; do @@ -23,6 +28,7 @@ pins=" echo; echo "${id}.exp:" echo " ICEDEV=lp1k-qn84 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 diff --git a/icefuzz/pinloc/pinloc-1k-tq144.sh b/icefuzz/pinloc/pinloc-1k-tq144.sh index a2f8819..3b6005b 100644 --- a/icefuzz/pinloc/pinloc-1k-tq144.sh +++ b/icefuzz/pinloc/pinloc-1k-tq144.sh @@ -7,6 +7,11 @@ pins=" 112 113 114 115 116 117 118 119 120 121 122 128 129 134 135 136 137 138 139 141 142 143 144 " +if [ $(echo $pins | wc -w) -ne 96 ]; then + echo "Incorrect number of pins:" $(echo $pins | wc -w) + exit 1 +fi + { echo -n "all:" for pin in $pins; do @@ -22,6 +27,7 @@ pins=" echo; echo "${id}.exp:" echo " ICEDEV=hx1k-tq144 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 diff --git a/icefuzz/pinloc/pinloc-1k-vq100.sh b/icefuzz/pinloc/pinloc-1k-vq100.sh index 403d8e3..161151a 100644 --- a/icefuzz/pinloc/pinloc-1k-vq100.sh +++ b/icefuzz/pinloc/pinloc-1k-vq100.sh @@ -1,12 +1,17 @@ #!/bin/bash pins=" - 1 2 3 4 7 8 9 10 12 13 15 16 18 19 20 21 24 25 26 27 28 29 30 33 34 36 37 - 40 41 42 43 44 45 46 48 49 50 51 52 53 54 56 57 59 60 62 63 64 65 66 68 - 69 71 72 73 74 75 76 78 79 80 81 82 83 85 86 87 89 90 91 93 94 95 96 97 - 99 100 5 32 39 47 55 70 98 17 23 84 11 35 61 77 92 88 58 67 31 38 6 14 22 + 1 2 3 4 7 8 9 10 12 13 15 16 18 19 20 21 24 25 + 26 27 28 29 30 33 34 36 37 40 41 42 45 46 48 49 + 51 52 53 54 56 57 59 60 62 63 64 65 66 68 69 71 72 73 74 + 78 79 80 81 82 83 85 86 87 89 90 91 93 94 95 96 97 99 100 " +if [ $(echo $pins | wc -w) -ne 72 ]; then + echo "Incorrect number of pins:" $(echo $pins | wc -w) + exit 1 +fi + { echo -n "all:" for pin in $pins; do @@ -22,6 +27,7 @@ pins=" echo; echo "${id}.exp:" echo " ICEDEV=hx1k-vq100 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 diff --git a/icefuzz/pinloc/pinloc-4k-cb132.sh b/icefuzz/pinloc/pinloc-4k-cb132.sh index bc20c86..1e6510f 100644 --- a/icefuzz/pinloc/pinloc-4k-cb132.sh +++ b/icefuzz/pinloc/pinloc-4k-cb132.sh @@ -12,6 +12,11 @@ pins=" P1 P2 P3 P4 P5 P7 P8 P9 P10 P11 P12 P13 P14 " +if [ $(echo $pins | wc -w) -ne 95 ]; then + echo "Incorrect number of pins:" $(echo $pins | wc -w) + exit 1 +fi + { echo -n "all:" for pin in $pins; do @@ -27,6 +32,7 @@ pins=" echo; echo "${id}.exp:" echo " ICEDEV=hx4k-cb132 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 diff --git a/icefuzz/pinloc/pinloc-4k-tq144.sh b/icefuzz/pinloc/pinloc-4k-tq144.sh new file mode 100644 index 0000000..7530e1a --- /dev/null +++ b/icefuzz/pinloc/pinloc-4k-tq144.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +pins=" + 1 2 3 4 7 8 9 10 11 12 15 16 17 18 19 20 21 22 23 24 25 26 28 29 31 32 33 34 + 37 38 39 41 42 43 44 45 47 48 49 52 55 56 60 61 62 63 64 67 68 70 71 + 73 74 75 76 78 79 80 81 82 83 84 85 87 88 90 91 93 94 95 96 97 98 99 101 102 104 105 106 107 + 110 112 113 114 115 116 117 118 119 120 121 122 124 125 128 129 130 134 135 136 137 138 139 141 142 143 144 +" + +if [ $(echo $pins | wc -w) -ne 107 ]; then + echo "Incorrect number of pins:" $(echo $pins | wc -w) + exit 1 +fi + +{ + echo -n "all:" + for pin in $pins; do + id="pinloc-4k-tq144_${pin}" + echo -n " ${id}.exp" + done + echo + + for pin in $pins; do + id="pinloc-4k-tq144_${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=hx4k-tq144 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-4k-tq144.mk + +set -ex +make -f pinloc-4k-tq144.mk -j4 +python3 pinlocdb.py pinloc-4k-tq144_*.exp > pinloc-4k-tq144.txt + diff --git a/icefuzz/pinloc/pinloc-8k-cb132.sh b/icefuzz/pinloc/pinloc-8k-cb132.sh index 655fefc..c9c5a6f 100644 --- a/icefuzz/pinloc/pinloc-8k-cb132.sh +++ b/icefuzz/pinloc/pinloc-8k-cb132.sh @@ -12,6 +12,11 @@ pins=" P1 P2 P3 P4 P5 P7 P8 P9 P10 P11 P12 P13 P14 " +if [ $(echo $pins | wc -w) -ne 95 ]; then + echo "Incorrect number of pins:" $(echo $pins | wc -w) + exit 1 +fi + { echo -n "all:" for pin in $pins; do @@ -27,6 +32,7 @@ pins=" echo; echo "${id}.exp:" echo " ICEDEV=hx8k-cb132 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 diff --git a/icefuzz/pinloc/pinloc-8k-ct256.sh b/icefuzz/pinloc/pinloc-8k-ct256.sh index 69baaec..c831ca9 100644 --- a/icefuzz/pinloc/pinloc-8k-ct256.sh +++ b/icefuzz/pinloc/pinloc-8k-ct256.sh @@ -19,6 +19,11 @@ pins=" T1 T2 T3 T5 T6 T7 T8 T9 T10 T11 T13 T14 T15 T16 " +if [ $(echo $pins | wc -w) -ne 206 ]; then + echo "Incorrect number of pins:" $(echo $pins | wc -w) + exit 1 +fi + { echo -n "all:" for pin in $pins; do @@ -34,6 +39,7 @@ pins=" echo; echo "${id}.exp:" echo " ICEDEV=hx8k-ct256 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 diff --git a/icefuzz/pinloc/pinlocdb.py b/icefuzz/pinloc/pinlocdb.py index 9a3fc1e..f32c3f6 100644 --- a/icefuzz/pinloc/pinlocdb.py +++ b/icefuzz/pinloc/pinlocdb.py @@ -32,12 +32,12 @@ for arg in argv[1:]: print() print("# ieren_db") for entry in sorted(ieren_db): - print("(%2d, %2d, %d, %2d, %2d, %d)," % entry) + print(" (%2d, %2d, %d, %2d, %2d, %d)," % entry) print() print("# pinloc_db") -for entry in sorted(pinloc_db): - print("(%5s, %2d, %2d, %d)," % entry) +for entry in sorted(pinloc_db, key=lambda n: re.sub(r"[0-9]+", lambda d: "%03d" % int(d.group(0)), n[0])): + print(" (%5s, %2d, %2d, %d)," % entry) print() -- cgit v1.2.3