aboutsummaryrefslogtreecommitdiff
path: root/icefuzz/tests/ioctrl_lm4k.py
diff options
context:
space:
mode:
authorAndrew Wygle <awygle@gmail.com>2018-05-07 21:45:05 -0700
committerAndrew Wygle <awygle@gmail.com>2018-05-12 21:47:09 -0700
commitda18da271b79e13f0e9bdb43edf82433fd497df4 (patch)
treee432d82f8de444f3b4240cb0447291885e5b203c /icefuzz/tests/ioctrl_lm4k.py
parente4d502e76ce3ec6cb659368c00111afdb5b6b4e0 (diff)
[WIP] Add partial icebox support for lm4k.
Diffstat (limited to 'icefuzz/tests/ioctrl_lm4k.py')
-rw-r--r--icefuzz/tests/ioctrl_lm4k.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/icefuzz/tests/ioctrl_lm4k.py b/icefuzz/tests/ioctrl_lm4k.py
new file mode 100644
index 0000000..67c0c6d
--- /dev/null
+++ b/icefuzz/tests/ioctrl_lm4k.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]))
+