From 0a6aa3c3746d80b533f68bd918554154e2ea2f14 Mon Sep 17 00:00:00 2001 From: John McMaster Date: Tue, 16 Oct 2018 17:45:03 -0700 Subject: [PATCH] tilegrid: always add bits field Signed-off-by: John McMaster --- fuzzers/005-tilegrid/generate.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fuzzers/005-tilegrid/generate.py b/fuzzers/005-tilegrid/generate.py index 81fcfdfd..4eb09f44 100644 --- a/fuzzers/005-tilegrid/generate.py +++ b/fuzzers/005-tilegrid/generate.py @@ -100,6 +100,7 @@ def make_database(tiles): "sites": tile["sites"], "grid_x": tile["grid_x"], "grid_y": tile["grid_y"], + "bits": {}, } return database @@ -436,7 +437,7 @@ def add_tile_bits(tile_db, baseaddr, offset, frames, words, height=None): https://github.com/SymbiFlow/prjxray/issues/145 ''' - bits = tile_db.setdefault('bits', {}) + bits = tile_db['bits'] block_type = addr2btype(baseaddr) assert 0 <= offset <= 100, offset @@ -484,9 +485,11 @@ def add_bits(database, segments): ("BRAM_INT_INTERFACE", "CLB_IO_CLK"): (28, 2, None), }.get((nolr(tile_type), block_type), None) if entry is None: + # Other types are rare, not expected to have these if block_type == "CLB_IO_CLK": raise ValueError("Unknown tile type %s" % tile_type) continue + frames, words, height = entry if frames: # if we have a width, we should have a height