diff options
author | Simon Schubert <2@0x2c.org> | 2019-02-20 11:06:01 +0100 |
---|---|---|
committer | Simon Schubert <2@0x2c.org> | 2019-02-22 22:35:55 +0100 |
commit | d76ac32ec939e421190d8e41ee0ad5e5eacbddd5 (patch) | |
tree | 278fbc981bb8c34a70adcf96a15b67709118103a /icefuzz/tests/colbuf_logic_u4k.sh | |
parent | c0cbae88ab47a3879aacf80d53b6a85710682a6b (diff) | |
download | icestorm-d76ac32ec939e421190d8e41ee0ad5e5eacbddd5.tar.gz icestorm-d76ac32ec939e421190d8e41ee0ad5e5eacbddd5.tar.bz2 icestorm-d76ac32ec939e421190d8e41ee0ad5e5eacbddd5.zip |
iCE40 Ultra = iCE5LP = u4k port
Diffstat (limited to 'icefuzz/tests/colbuf_logic_u4k.sh')
-rwxr-xr-x | icefuzz/tests/colbuf_logic_u4k.sh | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/icefuzz/tests/colbuf_logic_u4k.sh b/icefuzz/tests/colbuf_logic_u4k.sh new file mode 100755 index 0000000..2eaaf75 --- /dev/null +++ b/icefuzz/tests/colbuf_logic_u4k.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +set -ex + +mkdir -p colbuf_logic_u4k.work +cd colbuf_logic_u4k.work + +glb_pins="20 35 37 44" + +for x in {1..5} {7..18} {20..24}; do +for y in {1..20}; do + pf="colbuf_logic_u4k_${x}_${y}" + [ -f ${pf}.exp ] && continue + 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 + [ $x = 7 -a $y = 20 ] && continue + ICEDEV=u4k-sg48 bash ../../icecube.sh ${pf}.v > ${pf}.log 2>&1 + ../../../icebox/icebox_explain.py ${pf}.asc > ${pf}.exp + rm -rf ${pf}.tmp +done; done |