diff options
author | Clifford Wolf <clifford@clifford.at> | 2019-02-23 08:35:26 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-23 08:35:26 -0800 |
commit | 3a2bfee5cbc0558641668114260d3f644d6b7c83 (patch) | |
tree | c52eaf3de8d20ab4f198720ab3863c17448e6f13 /icefuzz/extract.py | |
parent | a2c8be79487ad448198357d63e7b9f0f946066f1 (diff) | |
parent | be0bca0230d6fe1102e0a360b953fbb0d273a39f (diff) | |
download | icestorm-3a2bfee5cbc0558641668114260d3f644d6b7c83.tar.gz icestorm-3a2bfee5cbc0558641668114260d3f644d6b7c83.tar.bz2 icestorm-3a2bfee5cbc0558641668114260d3f644d6b7c83.zip |
Merge pull request #202 from corecode/u4k
iCE40 Ultra = iCE5LP = u4k port
Diffstat (limited to 'icefuzz/extract.py')
-rw-r--r-- | icefuzz/extract.py | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/icefuzz/extract.py b/icefuzz/extract.py index 6f8b8cc..32bf289 100644 --- a/icefuzz/extract.py +++ b/icefuzz/extract.py @@ -40,6 +40,9 @@ for filename in sys.argv[1:]: elif device_class == "5k" and line.startswith("IpCon"): cur_text_db = text_db.setdefault("ipcon_5k", set()) ignore = False + elif device_class == "u4k" and line.startswith("IpCon"): + cur_text_db = text_db.setdefault("ipcon_u4k", 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)) @@ -55,9 +58,24 @@ for filename in sys.argv[1:]: assert dsp_idx != None cur_text_db = text_db.setdefault("dsp%d_5k" % dsp_idx, set()) ignore = False + elif device_class == "u4k" 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, 13]: + dsp_idx = 0 + if ypos in [6, 14]: + dsp_idx = 1 + if ypos in [7, 15]: + dsp_idx = 2 + if ypos in [8, 16]: + dsp_idx = 3 + assert dsp_idx != None + cur_text_db = text_db.setdefault("dsp%d_u4k" % dsp_idx, set()) + ignore = False elif not ignore: print("'" + line + "'") - assert line.startswith(" ") + assert line.startswith(" "), line cur_text_db.add(line) def logic_op_prefix(match): |