aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/chipdb.py
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2018-08-18 14:14:27 +0200
committerClifford Wolf <clifford@clifford.at>2018-08-18 14:14:27 +0200
commit5500cf3aff5daa4d094c7c4ab46551105f0cb7cc (patch)
tree36a6cc2b1b1e7eda3680c3107700a1f2691bcf19 /ice40/chipdb.py
parent74eebc489f8df48ee526e17a69c70944658b34d4 (diff)
downloadnextpnr-5500cf3aff5daa4d094c7c4ab46551105f0cb7cc.tar.gz
nextpnr-5500cf3aff5daa4d094c7c4ab46551105f0cb7cc.tar.bz2
nextpnr-5500cf3aff5daa4d094c7c4ab46551105f0cb7cc.zip
Add ice40 wire attributes (grid position, segment list)
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Diffstat (limited to 'ice40/chipdb.py')
-rw-r--r--ice40/chipdb.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/ice40/chipdb.py b/ice40/chipdb.py
index 7bdf82f0..cffeb657 100644
--- a/ice40/chipdb.py
+++ b/ice40/chipdb.py
@@ -50,6 +50,7 @@ tiletypes = dict()
wiretypes = dict()
gfx_wire_ids = dict()
+gfx_wire_names = list()
wire_segments = dict()
fast_timings = None
@@ -93,6 +94,7 @@ with open(args.gfxh) as f:
idx = len(gfx_wire_ids)
name = line.strip().rstrip(",")
gfx_wire_ids[name] = idx
+ gfx_wire_names.append(name)
def read_timings(filename):
db = dict()
@@ -932,6 +934,10 @@ bba.post('NEXTPNR_NAMESPACE_END')
bba.push("chipdb_blob_%s" % dev_name)
bba.r("chip_info_%s" % dev_name, "chip_info")
+bba.l("tile_wire_names")
+for name in gfx_wire_names:
+ bba.s(name, name)
+
for bel in range(len(bel_name)):
bba.l("bel_wires_%d" % bel, "BelWirePOD")
for data in sorted(bel_wires[bel]):
@@ -1276,5 +1282,6 @@ bba.r("bits_info_%s" % dev_name, "bits_info")
bba.r("bel_config_%s" % dev_name if len(extra_cell_config) > 0 else None, "bel_config")
bba.r("package_info_%s" % dev_name, "packages_data")
bba.r("cell_timings_%s" % dev_name, "cell_timing")
+bba.r("tile_wire_names", "tile_wire_names")
bba.pop()