diff options
| author | Clifford Wolf <clifford@clifford.at> | 2018-05-13 20:55:43 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-05-13 20:55:43 +0200 |
| commit | 51ae9e64f0db16ce71e32113d96a40b8915b26e7 (patch) | |
| tree | bbe706304d24b5d3e2f8adb4f3146f9868632620 /icefuzz/tests/ioctrl_lm4k.py | |
| parent | 1b22af089e2aa943daf569ad71f2261f7254ac7d (diff) | |
| parent | f967b53fe9be32fc7a169847287f227e705dbe52 (diff) | |
Merge pull request #139 from awygle/lm_icebox
Icebox support for ice40 LM
Diffstat (limited to 'icefuzz/tests/ioctrl_lm4k.py')
| -rw-r--r-- | icefuzz/tests/ioctrl_lm4k.py | 21 |
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])) + |
