aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhermitsoft <hermisu@mail.com>2017-03-07 15:56:17 +0100
committerhermitsoft <hermisu@mail.com>2017-03-07 15:56:17 +0100
commitd3e368828ef62f36589e7b85d5a26b911d33a5c6 (patch)
treec4cc651f32ef278d237e925bf83f08c9a3ea4c89
parent0a5d4340098c0d5dff5adfa6c6feaafe201889a3 (diff)
downloadicestorm-d3e368828ef62f36589e7b85d5a26b911d33a5c6.tar.gz
icestorm-d3e368828ef62f36589e7b85d5a26b911d33a5c6.tar.bz2
icestorm-d3e368828ef62f36589e7b85d5a26b911d33a5c6.zip
LP384 support in icefuzz (Makefile,icebox.sh,etc)
-rw-r--r--icefuzz/Makefile8
-rw-r--r--icefuzz/fuzzconfig.py12
-rw-r--r--icefuzz/icecube.sh16
-rw-r--r--icefuzz/pinloc/pinloc-384-qn32.sh42
4 files changed, 76 insertions, 2 deletions
diff --git a/icefuzz/Makefile b/icefuzz/Makefile
index a90a0bb..54483b7 100644
--- a/icefuzz/Makefile
+++ b/icefuzz/Makefile
@@ -20,7 +20,8 @@ TESTS += mem
TESTS += pll
TESTS += aig
-EIGTHK = _8k
+#EIGTHK = _8k
+THREEH = _384
database: bitdata_io.txt bitdata_logic.txt bitdata_ramb$(EIGTHK).txt bitdata_ramt$(EIGTHK).txt
ifeq ($(EIGTHK),_8k)
@@ -95,6 +96,11 @@ ifeq ($(EIGTHK),_8k)
+ICEDEV=hx8k-ct256 $(MAKE) -C work_$(1)
python3 extract.py -8 work_$(1)/*.glb > $$@
else
+ ifeq ($(THREEH),_384)
+ ICE384PINS=1 python3 make_$(1).py
+ +ICEDEV=lp384-qn32 $(MAKE) -C work_$(1)
+ python3 extract.py -3 work_$(1)/*.glb > $$@
+ endif
python3 make_$(1).py
+$(MAKE) -C work_$(1)
python3 extract.py work_$(1)/*.glb > $$@
diff --git a/icefuzz/fuzzconfig.py b/icefuzz/fuzzconfig.py
index bcd4e5d..6bb1338 100644
--- a/icefuzz/fuzzconfig.py
+++ b/icefuzz/fuzzconfig.py
@@ -26,6 +26,18 @@ if os.getenv('ICE8KPINS'):
gpins = "C8 F7 G1 H11 H16 I3 K9 R9".split()
+elif os.getenv('ICE384PINS'):
+ num_ramb40 = 0
+
+ pins = """
+ 1 2 5 6 7 8
+ 12 13 14 15
+ 18 19 20 22 23
+ 26 27 29 30 31 32
+ """.split()
+
+ gpins = "6 8 19 20 29 30".split()
+
else:
num_ramb40 = 16
diff --git a/icefuzz/icecube.sh b/icefuzz/icecube.sh
index 2154b87..d098b66 100644
--- a/icefuzz/icecube.sh
+++ b/icefuzz/icecube.sh
@@ -10,7 +10,7 @@
# - <project_name>.pcf ## physical constraint file
#
# Running iCEcube2:
-# - bash icecube.sh [-1k|-8k] <project_name> ## creates <project_name>.bin
+# - bash icecube.sh [-1k|-8k|-384] <project_name> ## creates <project_name>.bin
#
#
#
@@ -41,6 +41,11 @@ if [ "$1" == "-8k" ]; then
shift
fi
+if [ "$1" == "-384" ]; then
+ ICEDEV=384-qn32
+ shift
+fi
+
if [ "$1" == "-ul1k" ]; then
ICEDEV=ul1k-cm36a
shift
@@ -92,6 +97,10 @@ case "${ICEDEV:-hx1k-tq144}" in
iCEPACKAGE="CB132"
iCE40DEV="iCE40HX8K"
;;
+ lp384-qn32)
+ iCEPACKAGE="QN32"
+ iCE40DEV="iCE40LP384"
+ ;;
lp1k-swg16tr)
iCEPACKAGE="SWG16TR"
iCE40DEV="iCE40LP1K"
@@ -177,6 +186,11 @@ case "$iCE40DEV" in
libfile="ice40HX8K.lib"
devfile="ICE40P08.dev"
;;
+ iCE40LP384)
+ icetech="SBTiCE40"
+ libfile="ice40LP384.lib"
+ devfile="ICE40P03.dev"
+ ;;
iCE40LP1K)
icetech="SBTiCE40"
libfile="ice40LP1K.lib"
diff --git a/icefuzz/pinloc/pinloc-384-qn32.sh b/icefuzz/pinloc/pinloc-384-qn32.sh
new file mode 100644
index 0000000..a3d91e4
--- /dev/null
+++ b/icefuzz/pinloc/pinloc-384-qn32.sh
@@ -0,0 +1,42 @@
+#!/bin/bash
+
+mkdir -p pinloc-384-qn32
+cd pinloc-384-qn32
+
+pins="
+ 1 2 5 6 7 8
+ 12 13 14 15
+ 18 19 20 22 23
+ 26 27 29 30 31 32
+"
+
+if [ $(echo $pins | wc -w) -ne 21 ]; then
+ echo "Incorrect number of pins:" $(echo $pins | wc -w)
+ exit 1
+fi
+
+{
+ echo -n "all:"
+ for pin in $pins; do
+ id="pinloc-384-qn32_${pin}"
+ echo -n " ${id}.exp"
+ done
+ echo
+
+ for pin in $pins; do
+ id="pinloc-384-qn32_${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=384-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"
+ echo " mv ${id}.exp.new ${id}.exp"
+ done
+} > pinloc-384-qn32.mk
+
+set -ex
+make -f pinloc-384-qn32.mk -j4
+python3 ../pinlocdb.py pinloc-384-qn32_*.exp > ../pinloc-384-qn32.txt
+