diff options
author | Simon Schubert <2@0x2c.org> | 2019-02-20 11:06:01 +0100 |
---|---|---|
committer | Simon Schubert <2@0x2c.org> | 2019-02-22 22:35:55 +0100 |
commit | d76ac32ec939e421190d8e41ee0ad5e5eacbddd5 (patch) | |
tree | 278fbc981bb8c34a70adcf96a15b67709118103a /icefuzz/extract.py | |
parent | c0cbae88ab47a3879aacf80d53b6a85710682a6b (diff) | |
download | icestorm-d76ac32ec939e421190d8e41ee0ad5e5eacbddd5.tar.gz icestorm-d76ac32ec939e421190d8e41ee0ad5e5eacbddd5.tar.bz2 icestorm-d76ac32ec939e421190d8e41ee0ad5e5eacbddd5.zip |
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): |