diff options
author | Clifford Wolf <clifford@clifford.at> | 2017-10-31 18:24:01 +0100 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2017-10-31 18:24:01 +0100 |
commit | 3ba18d001754de563ab0baa2a1c8eecbe63ef121 (patch) | |
tree | 55369de2e9c3b4d7651961b9308b2c8893583ae1 /icefuzz/tests/ioctrl_5k.py | |
parent | d9d2a3dcaa749014f5b9a539768b8368bb529b28 (diff) | |
parent | 2ad5600b47f436752418609af19915a00e7b24f8 (diff) | |
download | icestorm-3ba18d001754de563ab0baa2a1c8eecbe63ef121.tar.gz icestorm-3ba18d001754de563ab0baa2a1c8eecbe63ef121.tar.bz2 icestorm-3ba18d001754de563ab0baa2a1c8eecbe63ef121.zip |
Merge branch 'daveshah1-u5k'
Diffstat (limited to 'icefuzz/tests/ioctrl_5k.py')
-rw-r--r-- | icefuzz/tests/ioctrl_5k.py | 21 |
1 files changed, 21 insertions, 0 deletions
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])) + |