aboutsummaryrefslogtreecommitdiffstats
path: root/icefuzz
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2017-10-23 11:30:23 +0100
committerDavid Shah <davey1576@gmail.com>2017-10-23 11:30:23 +0100
commitbf21b644984656fdea6ec2609b22a74f3296115b (patch)
tree3428547c43f72eadb7f6589cde4de26ff1733a82 /icefuzz
parent5afdeee0e0a70110268b8d481e3f949f74559098 (diff)
downloadicestorm-bf21b644984656fdea6ec2609b22a74f3296115b.tar.gz
icestorm-bf21b644984656fdea6ec2609b22a74f3296115b.tar.bz2
icestorm-bf21b644984656fdea6ec2609b22a74f3296115b.zip
Fix IeRen database for up5k
Diffstat (limited to 'icefuzz')
-rw-r--r--icefuzz/tests/.gitignore2
-rw-r--r--icefuzz/tests/ioctrl_5k.py21
-rwxr-xr-xicefuzz/tests/ioctrl_5k.sh28
3 files changed, 51 insertions, 0 deletions
diff --git a/icefuzz/tests/.gitignore b/icefuzz/tests/.gitignore
new file mode 100644
index 0000000..cc0ba46
--- /dev/null
+++ b/icefuzz/tests/.gitignore
@@ -0,0 +1,2 @@
+ioctrl.work
+intosc.work
diff --git a/icefuzz/tests/ioctrl_5k.py b/icefuzz/tests/ioctrl_5k.py
new file mode 100644
index 0000000..67c0c6d
--- /dev/null
+++ b/icefuzz/tests/ioctrl_5k.py
@@ -0,0 +1,21 @@
+#!/usr/bin/env python3
+
+import fileinput
+
+for line in fileinput.input():
+ line = line.split()
+ if len(line) == 0:
+ continue
+ if line[0] == ".io_tile":
+ current_tile = (int(line[1]), int(line[2]))
+ if line[0] == "IoCtrl" and line[1] == "REN_0":
+ ren = (current_tile[0], current_tile[1], 0)
+ if line[0] == "IoCtrl" and line[1] == "REN_1":
+ ren = (current_tile[0], current_tile[1], 1)
+ if line[0] == "IOB_0":
+ iob = (current_tile[0], current_tile[1], 0)
+ if line[0] == "IOB_1":
+ iob = (current_tile[0], current_tile[1], 1)
+
+print("(%2d, %2d, %2d, %2d, %2d, %2d)," % (iob[0], iob[1], iob[2], ren[0], ren[1], ren[2]))
+
diff --git a/icefuzz/tests/ioctrl_5k.sh b/icefuzz/tests/ioctrl_5k.sh
new file mode 100755
index 0000000..339cac7
--- /dev/null
+++ b/icefuzz/tests/ioctrl_5k.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+set -ex
+
+mkdir -p ioctrl.work
+cd ioctrl.work
+
+pins="2 3 4 6 9 10 11 12
+ 13 14 15 16 17 18 19 20 21 23
+ 25 26 27 28 31 32 34 35 36
+ 37 38 42 43 44 45 46 47 48
+ "
+pins="$( echo $pins )"
+
+for pin in $pins; do
+ pf="ioctrl_$pin"
+ echo "module top (output pin); assign pin = 1; endmodule" > ${pf}.v
+ echo "set_io pin $pin" > ${pf}.pcf
+ bash ../../icecube.sh -up5k ${pf}.v > ${pf}.log 2>&1
+ ../../../icebox/icebox_explain.py ${pf}.asc > ${pf}.exp
+done
+
+set +x
+echo "--snip--"
+for pin in $pins; do
+ python3 ../ioctrl_5k.py ioctrl_${pin}.exp
+done | tee ioctrl_db.txt
+echo "--snap--"