aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--icebox/icebox.py137
-rw-r--r--icefuzz/tests/.gitignore2
-rw-r--r--icefuzz/tests/ioctrl_5k.py21
-rwxr-xr-xicefuzz/tests/ioctrl_5k.sh28
4 files changed, 91 insertions, 97 deletions
diff --git a/icebox/icebox.py b/icebox/icebox.py
index 327a229..cf5c4d1 100644
--- a/icebox/icebox.py
+++ b/icebox/icebox.py
@@ -2069,103 +2069,46 @@ ieren_db = {
( 7, 6, 0, 7, 6, 1),
( 7, 6, 1, 7, 6, 0),
],
- "5k": [ #TODO: is this correct?
- (1 , 0, 0, 1 , 0, 0),
- (1 , 0, 1, 1 , 0, 1),
- (1 , 31, 0, 1 , 31, 0),
- (1 , 31, 1, 1 , 31, 1),
- (2 , 0, 0, 2 , 0, 0),
- (2 , 0, 1, 2 , 0, 1),
- (2 , 31, 0, 2 , 31, 0),
- (2 , 31, 1, 2 , 31, 1),
- (3 , 0, 0, 3 , 0, 0),
- (3 , 0, 1, 3 , 0, 1),
- (3 , 31, 0, 3 , 31, 0),
- (3 , 31, 1, 3 , 31, 1),
- (4 , 0, 0, 4 , 0, 0),
- (4 , 0, 1, 4 , 0, 1),
- (4 , 31, 0, 4 , 31, 0),
- (4 , 31, 1, 4 , 31, 1),
- (5 , 0, 0, 5 , 0, 0),
- (5 , 0, 1, 5 , 0, 1),
- (5 , 31, 0, 5 , 31, 0),
- (5 , 31, 1, 5 , 31, 1),
- (6 , 0, 0, 6 , 0, 0),
- (6 , 0, 1, 6 , 0, 1),
- (6 , 31, 0, 6 , 31, 0),
- (6 , 31, 1, 6 , 31, 1),
- (7 , 0, 0, 7 , 0, 0),
- (7 , 0, 1, 7 , 0, 1),
- (7 , 31, 0, 7 , 31, 0),
- (7 , 31, 1, 7 , 31, 1),
- (8 , 0, 0, 8 , 0, 0),
- (8 , 0, 1, 8 , 0, 1),
- (8 , 31, 0, 8 , 31, 0),
- (8 , 31, 1, 8 , 31, 1),
- (9 , 0, 0, 9 , 0, 0),
- (9 , 0, 1, 9 , 0, 1),
- (9 , 31, 0, 9 , 31, 0),
- (9 , 31, 1, 9 , 31, 1),
- (10, 0, 0, 10, 0, 0),
- (10, 0, 1, 10, 0, 1),
- (10, 31, 0, 10, 31, 0),
- (10, 31, 1, 10, 31, 1),
- (11, 0, 0, 11, 0, 0),
- (11, 0, 1, 11, 0, 1),
- (11, 31, 0, 11, 31, 0),
- (11, 31, 1, 11, 31, 1),
- (12, 0, 0, 12, 0, 0),
- (12, 0, 1, 12, 0, 1),
- (12, 31, 0, 12, 31, 0),
- (12, 31, 1, 12, 31, 1),
- (13, 0, 0, 13, 0, 0),
- (13, 0, 1, 13, 0, 1),
- (13, 31, 0, 13, 31, 0),
- (13, 31, 1, 13, 31, 1),
- (14, 0, 0, 14, 0, 0),
- (14, 0, 1, 14, 0, 1),
- (14, 31, 0, 14, 31, 0),
- (14, 31, 1, 14, 31, 1),
- (15, 0, 0, 15, 0, 0),
- (15, 0, 1, 15, 0, 1),
- (15, 31, 0, 15, 31, 0),
- (15, 31, 1, 15, 31, 1),
- (16, 0, 0, 16, 0, 0),
- (16, 0, 1, 16, 0, 1),
- (16, 31, 0, 16, 31, 0),
- (16, 31, 1, 16, 31, 1),
- (17, 0, 0, 17, 0, 0),
- (17, 0, 1, 17, 0, 1),
- (17, 31, 0, 17, 31, 0),
- (17, 31, 1, 17, 31, 1),
- (18, 0, 0, 18, 0, 0),
- (18, 0, 1, 18, 0, 1),
- (18, 31, 0, 18, 31, 1),
- (18, 31, 1, 18, 31, 0),
- (19, 0, 0, 19, 0, 0),
- (19, 0, 1, 19, 0, 1),
- (19, 31, 0, 19, 31, 0),
- (19, 31, 1, 19, 31, 1),
- (20, 0, 0, 20, 0, 0),
- (20, 0, 1, 20, 0, 1),
- (20, 31, 0, 20, 31, 0),
- (20, 31, 1, 20, 31, 1),
- (21, 0, 0, 21, 0, 0),
- (21, 0, 1, 21, 0, 1),
- (21, 31, 0, 21, 31, 0),
- (21, 31, 1, 21, 31, 1),
- (22, 0, 0, 22, 0, 0),
- (22, 0, 1, 22, 0, 1),
- (22, 31, 0, 22, 31, 0),
- (22, 31, 1, 22, 31, 1),
- (23, 0, 0, 23, 0, 0),
- (23, 0, 1, 23, 0, 1),
- (23, 31, 0, 23, 31, 0),
- (23, 31, 1, 23, 31, 1),
- (24, 0, 0, 24, 0, 0),
- (24, 0, 1, 24, 0, 1),
- (24, 31, 0, 24, 31, 0),
- (24, 31, 1, 24, 31, 1)
+ "5k": [
+ ( 8, 0, 0, 8, 0, 1),
+ ( 9, 0, 1, 9, 0, 0),
+ ( 9, 0, 0, 9, 0, 1),
+ (13, 0, 1, 13, 0, 0),
+ (15, 0, 0, 15, 0, 1),
+ (16, 0, 0, 16, 0, 1),
+ (17, 0, 0, 17, 0, 1),
+ (18, 0, 0, 18, 0, 1),
+ (19, 0, 0, 19, 0, 1),
+ (23, 0, 0, 23, 0, 1),
+ (24, 0, 0, 24, 0, 1),
+ (24, 0, 1, 24, 0, 0),
+ (23, 0, 1, 23, 0, 0),
+ (22, 0, 1, 22, 0, 0),
+ (21, 0, 1, 21, 0, 0),
+ (19, 0, 1, 19, 0, 0),
+ (18, 0, 1, 18, 0, 0),
+ (19, 31, 0, 19, 31, 1),
+ (19, 31, 1, 19, 31, 0),
+ (18, 31, 0, 18, 31, 1),
+ (18, 31, 1, 18, 31, 0),
+ (17, 31, 0, 17, 31, 1),
+ (16, 31, 1, 16, 31, 0),
+ (16, 31, 0, 16, 31, 1),
+ (13, 31, 1, 13, 31, 0),
+ (12, 31, 1, 12, 31, 0),
+ ( 9, 31, 1, 9, 31, 0),
+ (13, 31, 0, 13, 31, 1),
+ ( 4, 31, 0, 4, 31, 1),
+ ( 5, 31, 0, 5, 31, 1),
+ ( 6, 31, 0, 6, 31, 1),
+ ( 8, 31, 1, 8, 31, 0),
+ ( 8, 31, 0, 8, 31, 1),
+ ( 9, 31, 0, 9, 31, 1),
+ ( 6, 0, 1, 6, 0, 0),
+ ( 7, 0, 1, 7, 0, 0),
+ ( 5, 0, 0, 5, 0, 1),
+ ( 6, 0, 0, 6, 0, 1),
+ ( 7, 0, 0, 7, 0, 1)
]
}
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--"