diff options
author | Clifford Wolf <clifford@clifford.at> | 2017-11-21 18:19:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-21 18:19:47 +0100 |
commit | 6e9a2da5c46edf00f1dc87c86053b5edbc17d5d7 (patch) | |
tree | b94fdbf6f316b9758e8afd848d8c900343469f07 /icefuzz/extract.py | |
parent | 9a2a325acb846936431c4aa5843184034be25d5c (diff) | |
parent | 9184fbdf404c0e94326919c92a27d3292994cdf1 (diff) | |
download | icestorm-6e9a2da5c46edf00f1dc87c86053b5edbc17d5d7.tar.gz icestorm-6e9a2da5c46edf00f1dc87c86053b5edbc17d5d7.tar.bz2 icestorm-6e9a2da5c46edf00f1dc87c86053b5edbc17d5d7.zip |
Merge pull request #109 from daveshah1/up5k
Support for new UltraPlus features
Diffstat (limited to 'icefuzz/extract.py')
-rw-r--r-- | icefuzz/extract.py | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/icefuzz/extract.py b/icefuzz/extract.py index 75be225..6f8b8cc 100644 --- a/icefuzz/extract.py +++ b/icefuzz/extract.py @@ -37,8 +37,24 @@ for filename in sys.argv[1:]: else: cur_text_db = text_db.setdefault("ramt_" + device_class if device_class in ["5k", "8k"] else "ramt", set()) ignore = False - elif device_class == "5k" and line.startswith(("IpCon", "DSP")): - ignore = True + elif device_class == "5k" and line.startswith("IpCon"): + cur_text_db = text_db.setdefault("ipcon_5k", set()) + ignore = False + elif device_class == "5k" and line.startswith("DSP"): + match = re.match(r"DSP_Tile_\d+_(\d+)", line) + ypos = int(match.group(1)) + dsp_idx = None + if ypos in [5, 10, 15, 23]: + dsp_idx = 0 + if ypos in [6, 11, 16, 24]: + dsp_idx = 1 + if ypos in [7, 12, 17, 25]: + dsp_idx = 2 + if ypos in [8, 13, 18, 26]: + dsp_idx = 3 + assert dsp_idx != None + cur_text_db = text_db.setdefault("dsp%d_5k" % dsp_idx, set()) + ignore = False elif not ignore: print("'" + line + "'") assert line.startswith(" ") |