aboutsummaryrefslogtreecommitdiffstats
path: root/icefuzz/database.py
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2017-11-21 18:19:47 +0100
committerGitHub <noreply@github.com>2017-11-21 18:19:47 +0100
commit6e9a2da5c46edf00f1dc87c86053b5edbc17d5d7 (patch)
treeb94fdbf6f316b9758e8afd848d8c900343469f07 /icefuzz/database.py
parent9a2a325acb846936431c4aa5843184034be25d5c (diff)
parent9184fbdf404c0e94326919c92a27d3292994cdf1 (diff)
downloadicestorm-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/database.py')
-rw-r--r--icefuzz/database.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/icefuzz/database.py b/icefuzz/database.py
index 8cb81d8..a0caca6 100644
--- a/icefuzz/database.py
+++ b/icefuzz/database.py
@@ -28,6 +28,9 @@ def read_database(filename, tile_type):
line = re.sub(r"^Ram config bit:", "RamConfig", line)
line = re.sub(r"^PLL config bit:", "PLL", line)
line = re.sub(r"^Icegate Enable bit:", "Icegate", line)
+ line = re.sub(r"^MAC16 functional bit:", "IpConfig", line)
+ line = re.sub(r"^Hard IP config bit:", "IpConfig", line)
+
line = line.split()
if line[0] == "routing":
if line[3] == "wire_gbuf/in": line[3] = "fabout"
@@ -54,7 +57,7 @@ def read_database(filename, tile_type):
elif line[0] == "ColBufCtrl":
line[1] = re.sub(r"B?IO(LEFT|RIGHT)_", "IO_", line[1])
line[1] = re.sub(r"IO_half_column_clock_enable_", "glb_netwk_", line[1])
- line[1] = re.sub(r"(LH|MEM[BT])_colbuf_cntl_", "glb_netwk_", line[1])
+ line[1] = re.sub(r"(LH|MEM[BT]|MULT\d|IPCON)_colbuf_cntl_", "glb_netwk_", line[1])
if m.group(1) == "7":
line[1] = re.sub(r"glb_netwk_", "8k_glb_netwk_", line[1])
elif m.group(1) in ["1", "2"]:
@@ -87,6 +90,10 @@ def read_database(filename, tile_type):
raw_db.append((bit, (line[0],)))
elif line[0] == "Carry_In_Mux":
continue
+ elif line[0] == "IpConfig":
+ line[1] = re.sub(r"MULT\d_bram_cbit_", "CBIT_", line[1]) #not a typo, sometimes IP config bits are in DSP tiles and use a MULT prefix...
+ line[1] = re.sub(r"IPCON_bram_cbit_", "CBIT_", line[1])
+ raw_db.append((bit, (line[0], line[1])))
else:
print("unsupported statement: %s: %s" % (bit, line))
assert False
@@ -149,3 +156,11 @@ for device_class in ["5k", "8k"]:
with open("database_ramt_%s.txt" % (device_class, ), "w") as f:
for entry in read_database("bitdata_ramt_%s.txt" % (device_class, ), "ramt_" + device_class):
print("\t".join(entry), file=f)
+
+for dsp_idx in range(4):
+ with open("database_dsp%d_5k.txt" % (dsp_idx, ), "w") as f:
+ for entry in read_database("bitdata_dsp%d_5k.txt" % (dsp_idx, ), "dsp%d_5" % (dsp_idx, )):
+ print("\t".join(entry), file=f)
+with open("database_ipcon_5k.txt", "w") as f:
+ for entry in read_database("bitdata_ipcon_5k.txt", "ipcon"):
+ print("\t".join(entry), file=f) \ No newline at end of file