Skip to content

Commit

Permalink
Remove seperate 5k RAM DB and share with 8k instead
Browse files Browse the repository at this point in the history
This should ensure that the 5k RAM routing entries are now complete,
fixing YosysHQ#115
  • Loading branch information
gatecat committed Jan 16, 2018
1 parent 02a986b commit a594728
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 10,016 deletions.
20 changes: 9 additions & 11 deletions icebox/icebox.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,8 @@ def tile_db(self, x, y):
if (x, y) in self.ramt_tiles: return ramttile_db
elif self.device == "5k":
if (x, y) in self.logic_tiles: return logictile_5k_db
if (x, y) in self.ramb_tiles: return rambtile_5k_db
if (x, y) in self.ramt_tiles: return ramttile_5k_db
if (x, y) in self.ramb_tiles: return rambtile_8k_db
if (x, y) in self.ramt_tiles: return ramttile_8k_db
if (x, y) in self.ipcon_tiles: return ipcon_5k_db
if (x, y) in self.dsp_tiles[0]: return dsp0_5k_db
if (x, y) in self.dsp_tiles[1]: return dsp1_5k_db
Expand Down Expand Up @@ -725,7 +725,7 @@ def add_seed_segments(idx, tile, db):
if self.device == "1k":
add_seed_segments(idx, tile, rambtile_db)
elif self.device == "5k":
add_seed_segments(idx, tile, rambtile_5k_db)
add_seed_segments(idx, tile, rambtile_8k_db)
elif self.device == "8k":
add_seed_segments(idx, tile, rambtile_8k_db)
else:
Expand All @@ -735,7 +735,7 @@ def add_seed_segments(idx, tile, db):
if self.device == "1k":
add_seed_segments(idx, tile, ramttile_db)
elif self.device == "5k":
add_seed_segments(idx, tile, ramttile_5k_db)
add_seed_segments(idx, tile, ramttile_8k_db)
elif self.device == "8k":
add_seed_segments(idx, tile, ramttile_8k_db)
else:
Expand Down Expand Up @@ -4991,8 +4991,6 @@ def parse_db(text, device="1k"):
logictile_384_db = parse_db(iceboxdb.database_logic_txt, "384")
rambtile_db = parse_db(iceboxdb.database_ramb_txt, "1k")
ramttile_db = parse_db(iceboxdb.database_ramt_txt, "1k")
rambtile_5k_db = parse_db(iceboxdb.database_ramb_5k_txt, "5k")
ramttile_5k_db = parse_db(iceboxdb.database_ramt_5k_txt, "5k")
rambtile_8k_db = parse_db(iceboxdb.database_ramb_8k_txt, "8k")
ramttile_8k_db = parse_db(iceboxdb.database_ramt_8k_txt, "8k")

Expand Down Expand Up @@ -5089,19 +5087,19 @@ def parse_db(text, device="1k"):
iotile_b_5k_db.append([["B12[3]"], "IpConfig", "SDA_input_delay"])
iotile_b_5k_db.append([["B15[3]"], "IpConfig", "SDA_output_delay"])

for db in [iotile_l_db, iotile_r_db, iotile_t_db, iotile_b_db, iotile_t_5k_db, iotile_b_5k_db, logictile_db, logictile_5k_db, logictile_8k_db, logictile_384_db, rambtile_db, ramttile_db, rambtile_5k_db, ramttile_5k_db, rambtile_8k_db, ramttile_8k_db, dsp0_5k_db, dsp1_5k_db, dsp2_5k_db, dsp3_5k_db, ipcon_5k_db]:
for db in [iotile_l_db, iotile_r_db, iotile_t_db, iotile_b_db, iotile_t_5k_db, iotile_b_5k_db, logictile_db, logictile_5k_db, logictile_8k_db, logictile_384_db, rambtile_db, ramttile_db, rambtile_8k_db, ramttile_8k_db, dsp0_5k_db, dsp1_5k_db, dsp2_5k_db, dsp3_5k_db, ipcon_5k_db]:
for entry in db:
if entry[1] in ("buffer", "routing"):
entry[2] = netname_normalize(entry[2],
ramb=(db == rambtile_db),
ramt=(db == ramttile_db),
ramb_8k=(db in (rambtile_8k_db, rambtile_5k_db)),
ramt_8k=(db in (ramttile_8k_db, ramttile_5k_db)))
ramb_8k=(db == rambtile_8k_db),
ramt_8k=(db == ramttile_8k_db))
entry[3] = netname_normalize(entry[3],
ramb=(db == rambtile_db),
ramt=(db == ramttile_db),
ramb_8k=(db in (rambtile_8k_db, rambtile_5k_db)),
ramt_8k=(db in (ramttile_8k_db, ramttile_5k_db)))
ramb_8k=(db == rambtile_8k_db),
ramt_8k=(db == ramttile_8k_db))
unique_entries = dict()
while db:
entry = db.pop()
Expand Down
Loading

0 comments on commit a594728

Please sign in to comment.