LP384 support in icefuzz (Makefile,icebox.sh,etc)

This commit is contained in:
hermitsoft 2017-03-07 15:56:17 +01:00
parent 0a5d434009
commit d3e368828e
4 changed files with 76 additions and 2 deletions

View File

@ -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 > $$@

View File

@ -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

View File

@ -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"

View File

@ -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