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 --- icebox/icebox.py | 321 +++++++++++++++++++++++++++++++++++++- icefuzz/icecube.sh | 4 + 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 +- 12 files changed, 408 insertions(+), 14 deletions(-) create mode 100644 icefuzz/pinloc/pinloc-4k-tq144.sh diff --git a/icebox/icebox.py b/icebox/icebox.py index 97a6a65..59f47d5 100644 --- a/icebox/icebox.py +++ b/icebox/icebox.py @@ -1556,6 +1556,7 @@ ieren_db = { ( 5, 33, 1, 5, 33, 1), ( 6, 0, 0, 6, 0, 0), ( 6, 0, 1, 6, 0, 1), + ( 6, 33, 0, 6, 33, 0), ( 6, 33, 1, 6, 33, 1), ( 7, 0, 1, 7, 0, 1), ( 7, 33, 0, 7, 33, 0), @@ -1614,8 +1615,10 @@ ieren_db = { (23, 33, 0, 23, 33, 0), (23, 33, 1, 23, 33, 1), (24, 0, 0, 24, 0, 0), + (24, 0, 1, 24, 0, 1), (24, 33, 0, 24, 33, 0), (24, 33, 1, 24, 33, 1), + (25, 0, 0, 25, 0, 0), (25, 33, 0, 25, 33, 0), (25, 33, 1, 25, 33, 1), (26, 0, 0, 26, 0, 0), @@ -1689,6 +1692,7 @@ ieren_db = { (33, 27, 1, 33, 27, 1), (33, 28, 0, 33, 28, 0), (33, 28, 1, 33, 28, 1), + (33, 29, 1, 33, 29, 1), (33, 30, 0, 33, 30, 0), (33, 30, 1, 33, 30, 1), (33, 31, 0, 33, 31, 0), @@ -1696,6 +1700,103 @@ ieren_db = { } pinloc_db = { + "1k-cb132": [ + ( "A1", 1, 17, 1), + ("A10", 10, 17, 0), + ("A12", 12, 17, 0), + ( "A2", 2, 17, 1), + ( "A4", 4, 17, 0), + ( "A5", 4, 17, 1), + ( "A6", 6, 17, 1), + ( "A7", 7, 17, 0), + ( "B1", 0, 14, 1), + ("B14", 13, 15, 0), + ( "C1", 0, 14, 0), + ("C10", 11, 17, 0), + ("C11", 11, 17, 1), + ("C12", 12, 17, 1), + ("C14", 13, 14, 0), + ( "C3", 0, 13, 1), + ( "C4", 1, 17, 0), + ( "C5", 3, 17, 0), + ( "C6", 5, 17, 0), + ( "C7", 6, 17, 0), + ( "C8", 8, 17, 0), + ( "C9", 9, 17, 0), + ( "D1", 0, 11, 1), + ("D10", 9, 17, 1), + ("D11", 10, 17, 1), + ("D12", 13, 15, 1), + ("D14", 13, 13, 1), + ( "D3", 0, 13, 0), + ( "D4", 0, 12, 1), + ( "D5", 2, 17, 0), + ( "D6", 3, 17, 1), + ( "D7", 5, 17, 1), + ( "D8", 7, 17, 1), + ( "D9", 8, 17, 1), + ( "E1", 0, 11, 0), + ("E11", 13, 14, 1), + ("E12", 13, 13, 0), + ("E14", 13, 12, 0), + ( "E4", 0, 12, 0), + ("F11", 13, 12, 1), + ("F12", 13, 11, 1), + ("F14", 13, 8, 1), + ( "F3", 0, 10, 0), + ( "F4", 0, 10, 1), + ( "G1", 0, 8, 1), + ("G11", 13, 11, 0), + ("G12", 13, 9, 1), + ("G14", 13, 9, 0), + ( "G3", 0, 8, 0), + ( "G4", 0, 6, 1), + ( "H1", 0, 9, 0), + ("H11", 13, 8, 0), + ("H12", 13, 7, 1), + ( "H3", 0, 9, 1), + ( "H4", 0, 6, 0), + ( "J1", 0, 5, 1), + ("J11", 13, 7, 0), + ("J12", 13, 6, 1), + ( "J3", 0, 5, 0), + ("K11", 13, 4, 1), + ("K12", 13, 4, 0), + ("K14", 13, 6, 0), + ( "K3", 0, 3, 0), + ( "K4", 0, 3, 1), + ( "L1", 0, 2, 0), + ("L12", 13, 2, 0), + ("L14", 13, 3, 1), + ( "L4", 1, 0, 1), + ( "L5", 3, 0, 1), + ( "L6", 4, 0, 1), + ( "L7", 8, 0, 0), + ( "L8", 9, 0, 0), + ( "L9", 10, 0, 0), + ( "M1", 0, 2, 1), + ("M11", 11, 0, 0), + ("M12", 13, 1, 0), + ( "M3", 1, 0, 0), + ( "M4", 3, 0, 0), + ( "M6", 5, 0, 1), + ( "M7", 6, 0, 0), + ( "M8", 8, 0, 1), + ( "M9", 9, 0, 1), + ("N14", 13, 2, 1), + ("P10", 10, 0, 1), + ("P11", 11, 0, 1), + ("P12", 12, 0, 0), + ("P13", 12, 0, 1), + ("P14", 13, 1, 1), + ( "P2", 2, 0, 0), + ( "P3", 2, 0, 1), + ( "P4", 4, 0, 0), + ( "P5", 5, 0, 0), + ( "P7", 6, 0, 1), + ( "P8", 7, 0, 0), + ( "P9", 7, 0, 1), + ], "1k-tq144": [ ( "1", 0, 14, 1), ( "10", 0, 11, 0), @@ -1796,19 +1897,15 @@ pinloc_db = { ], "1k-vq100": [ ( "1", 0, 14, 1), - ( "2", 0, 14, 0), - ( "3", 0, 13, 1), - ( "4", 0, 13, 0), - ( "7", 0, 12, 1), - ( "8", 0, 12, 0), - ( "9", 0, 10, 1), ( "10", 0, 10, 0), + ("100", 1, 17, 1), ( "12", 0, 9, 1), ( "13", 0, 9, 0), ( "15", 0, 8, 1), ( "16", 0, 8, 0), ( "18", 0, 6, 1), ( "19", 0, 6, 0), + ( "2", 0, 14, 0), ( "20", 0, 4, 1), ( "21", 0, 4, 0), ( "24", 0, 2, 1), @@ -1817,11 +1914,13 @@ pinloc_db = { ( "27", 2, 0, 1), ( "28", 3, 0, 0), ( "29", 3, 0, 1), + ( "3", 0, 13, 1), ( "30", 4, 0, 0), ( "33", 6, 0, 1), ( "34", 7, 0, 0), ( "36", 6, 0, 0), ( "37", 7, 0, 1), + ( "4", 0, 13, 0), ( "40", 9, 0, 1), ( "41", 10, 0, 0), ( "42", 10, 0, 1), @@ -1844,12 +1943,14 @@ pinloc_db = { ( "66", 13, 12, 0), ( "68", 13, 13, 0), ( "69", 13, 13, 1), + ( "7", 0, 12, 1), ( "71", 13, 14, 0), ( "72", 13, 14, 1), ( "73", 13, 15, 0), ( "74", 13, 15, 1), ( "78", 12, 17, 1), ( "79", 12, 17, 0), + ( "8", 0, 12, 0), ( "80", 11, 17, 1), ( "81", 10, 17, 1), ( "82", 10, 17, 0), @@ -1858,6 +1959,7 @@ pinloc_db = { ( "86", 8, 17, 1), ( "87", 8, 17, 0), ( "89", 7, 17, 0), + ( "9", 0, 10, 1), ( "90", 6, 17, 1), ( "91", 6, 17, 0), ( "93", 5, 17, 1), @@ -1866,7 +1968,6 @@ pinloc_db = { ( "96", 4, 17, 0), ( "97", 3, 17, 1), ( "99", 2, 17, 1), - ("100", 1, 17, 1), ], "1k-qn84": [ ( "A1", 0, 14, 0), @@ -1937,6 +2038,115 @@ pinloc_db = { ( "B8", 0, 5, 0), ( "B9", 0, 3, 0), ], + "8k-tq144:4k": [ + ( "1", 0, 30, 1), + ( "10", 0, 25, 0), + ("101", 33, 27, 1), + ("102", 33, 28, 0), + ("104", 33, 29, 1), + ("105", 33, 30, 0), + ("106", 33, 30, 1), + ("107", 33, 31, 0), + ( "11", 0, 22, 1), + ("110", 31, 33, 1), + ("112", 31, 33, 0), + ("113", 30, 33, 1), + ("114", 30, 33, 0), + ("115", 29, 33, 1), + ("116", 29, 33, 0), + ("117", 28, 33, 1), + ("118", 27, 33, 0), + ("119", 26, 33, 1), + ( "12", 0, 22, 0), + ("120", 26, 33, 0), + ("121", 25, 33, 0), + ("122", 20, 33, 1), + ("124", 20, 33, 0), + ("125", 19, 33, 1), + ("128", 17, 33, 0), + ("129", 16, 33, 1), + ("130", 11, 33, 1), + ("134", 8, 33, 1), + ("135", 8, 33, 0), + ("136", 7, 33, 1), + ("137", 7, 33, 0), + ("138", 6, 33, 1), + ("139", 6, 33, 0), + ("141", 5, 33, 0), + ("142", 4, 33, 1), + ("143", 4, 33, 0), + ("144", 3, 33, 1), + ( "15", 0, 20, 1), + ( "16", 0, 20, 0), + ( "17", 0, 18, 1), + ( "18", 0, 18, 0), + ( "19", 0, 17, 1), + ( "2", 0, 30, 0), + ( "20", 0, 17, 0), + ( "21", 0, 16, 1), + ( "22", 0, 16, 0), + ( "23", 0, 12, 1), + ( "24", 0, 12, 0), + ( "25", 0, 11, 1), + ( "26", 0, 11, 0), + ( "28", 0, 6, 1), + ( "29", 0, 6, 0), + ( "3", 0, 28, 1), + ( "31", 0, 5, 1), + ( "32", 0, 5, 0), + ( "33", 0, 4, 1), + ( "34", 0, 4, 0), + ( "37", 4, 0, 0), + ( "38", 4, 0, 1), + ( "39", 6, 0, 1), + ( "4", 0, 28, 0), + ( "41", 7, 0, 1), + ( "42", 8, 0, 0), + ( "43", 11, 0, 1), + ( "44", 12, 0, 0), + ( "45", 12, 0, 1), + ( "47", 15, 0, 1), + ( "48", 16, 0, 0), + ( "49", 16, 0, 1), + ( "52", 17, 0, 0), + ( "55", 22, 0, 1), + ( "56", 24, 0, 0), + ( "60", 24, 0, 1), + ( "61", 25, 0, 0), + ( "62", 28, 0, 0), + ( "63", 29, 0, 0), + ( "64", 29, 0, 1), + ( "67", 30, 0, 0), + ( "68", 30, 0, 1), + ( "7", 0, 27, 1), + ( "70", 31, 0, 0), + ( "71", 31, 0, 1), + ( "73", 33, 1, 0), + ( "74", 33, 1, 1), + ( "75", 33, 2, 0), + ( "76", 33, 2, 1), + ( "78", 33, 3, 1), + ( "79", 33, 4, 0), + ( "8", 0, 27, 0), + ( "80", 33, 4, 1), + ( "81", 33, 5, 0), + ( "82", 33, 5, 1), + ( "83", 33, 6, 0), + ( "84", 33, 6, 1), + ( "85", 33, 10, 1), + ( "87", 33, 14, 1), + ( "88", 33, 15, 0), + ( "9", 0, 25, 1), + ( "90", 33, 15, 1), + ( "91", 33, 16, 0), + ( "93", 33, 16, 1), + ( "94", 33, 17, 0), + ( "95", 33, 19, 1), + ( "96", 33, 20, 1), + ( "97", 33, 21, 0), + ( "98", 33, 21, 1), + ( "99", 33, 23, 1), + ], "8k-cb132:4k": [ ( "A1", 2, 33, 0), ("A10", 25, 33, 0), @@ -2034,6 +2244,103 @@ pinloc_db = { ( "P8", 17, 0, 0), ( "P9", 21, 0, 1), ], + "8k-cb132": [ + ( "A1", 2, 33, 0), + ("A10", 25, 33, 0), + ("A11", 26, 33, 0), + ("A12", 30, 33, 1), + ( "A2", 3, 33, 0), + ( "A3", 3, 33, 1), + ( "A4", 5, 33, 0), + ( "A5", 10, 33, 1), + ( "A6", 16, 33, 1), + ( "A7", 17, 33, 0), + ( "B1", 0, 30, 1), + ("B14", 33, 28, 0), + ( "C1", 0, 30, 0), + ("C10", 22, 33, 1), + ("C11", 28, 33, 1), + ("C12", 29, 33, 1), + ("C14", 33, 24, 1), + ( "C3", 0, 27, 1), + ( "C4", 4, 33, 0), + ( "C5", 8, 33, 1), + ( "C6", 11, 33, 1), + ( "C7", 14, 33, 1), + ( "C9", 20, 33, 1), + ( "D1", 0, 25, 1), + ("D10", 27, 33, 0), + ("D11", 26, 33, 1), + ("D12", 33, 27, 1), + ("D14", 33, 23, 1), + ( "D3", 0, 27, 0), + ( "D4", 0, 22, 1), + ( "D5", 9, 33, 0), + ( "D6", 11, 33, 0), + ( "D7", 13, 33, 1), + ( "D9", 21, 33, 1), + ( "E1", 0, 25, 0), + ("E11", 33, 20, 1), + ("E12", 33, 21, 0), + ("E14", 33, 21, 1), + ( "E4", 0, 22, 0), + ("F11", 33, 19, 1), + ("F12", 33, 15, 0), + ("F14", 33, 16, 1), + ( "F3", 0, 21, 0), + ( "F4", 0, 21, 1), + ( "G1", 0, 17, 0), + ("G11", 33, 14, 1), + ("G12", 33, 11, 0), + ("G14", 33, 17, 0), + ( "G3", 0, 17, 1), + ( "G4", 0, 20, 0), + ( "H1", 0, 16, 1), + ("H11", 33, 10, 1), + ("H12", 33, 6, 1), + ( "H3", 0, 16, 0), + ( "H4", 0, 20, 1), + ( "J1", 0, 18, 0), + ("J11", 33, 6, 0), + ("J12", 33, 5, 1), + ( "J3", 0, 18, 1), + ("K11", 33, 4, 1), + ("K12", 33, 4, 0), + ("K14", 33, 5, 0), + ( "K3", 0, 11, 1), + ( "K4", 0, 11, 0), + ( "L1", 0, 6, 1), + ("L12", 33, 2, 0), + ("L14", 33, 3, 1), + ( "L4", 12, 0, 0), + ( "L5", 11, 0, 1), + ( "L6", 15, 0, 0), + ( "L8", 20, 0, 1), + ( "L9", 29, 0, 0), + ( "M1", 0, 6, 0), + ("M11", 30, 0, 0), + ("M12", 33, 1, 0), + ( "M3", 8, 0, 0), + ( "M4", 7, 0, 1), + ( "M6", 14, 0, 1), + ( "M7", 15, 0, 1), + ( "M9", 22, 0, 1), + ( "N1", 0, 4, 1), + ("N14", 33, 2, 1), + ( "P1", 0, 4, 0), + ("P10", 29, 0, 1), + ("P11", 30, 0, 1), + ("P12", 31, 0, 0), + ("P13", 31, 0, 1), + ("P14", 33, 1, 1), + ( "P2", 4, 0, 0), + ( "P3", 5, 0, 1), + ( "P4", 12, 0, 1), + ( "P5", 13, 0, 0), + ( "P7", 16, 0, 1), + ( "P8", 17, 0, 0), + ( "P9", 21, 0, 1), + ], "8k-ct256": [ ( "A1", 4, 33, 1), ("A10", 22, 33, 1), diff --git a/icefuzz/icecube.sh b/icefuzz/icecube.sh index 05257e1..2a694c4 100644 --- a/icefuzz/icecube.sh +++ b/icefuzz/icecube.sh @@ -71,6 +71,10 @@ case "${ICEDEV:-hx1k-tq144}" in iCEPACKAGE="CB132" iCE40DEV="iCE40HX4K" ;; + hx4k-tq144) + iCEPACKAGE="TQ144" + iCE40DEV="iCE40HX4K" + ;; hx8k-cm225) iCEPACKAGE="CM225" iCE40DEV="iCE40HX8K" 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