Skip to content

Commit

Permalink
lib: tile segbits: add debug prints upon exceptions
Browse files Browse the repository at this point in the history
Signed-off-by: Alessandro Comodi <[email protected]>
  • Loading branch information
acomodi committed Mar 21, 2022
1 parent 76c23bb commit 04776b5
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions prjxray/tile_segbits.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,28 @@ def __init__(self, tile_db):

if tile_db.ppips is not None:
with OpenSafeFile(tile_db.ppips) as f:
self.ppips = read_ppips(f)
try:
self.ppips = read_ppips(f)
except Exception as e:
print(f"Error reading ppips from {tile_db.ppips}: {e}")
exit(1)

if tile_db.segbits is not None:
with OpenSafeFile(tile_db.segbits) as f:
self.segbits[BlockType.CLB_IO_CLK] = read_segbits(f)
try:
self.segbits[BlockType.CLB_IO_CLK] = read_segbits(f)
except Exception as e:
print(f"Error reading segbits from {tile_db.segbits}: {e}")
exit(1)


if tile_db.block_ram_segbits is not None:
with OpenSafeFile(tile_db.block_ram_segbits) as f:
self.segbits[BlockType.BLOCK_RAM] = read_segbits(f)
try:
self.segbits[BlockType.BLOCK_RAM] = read_segbits(f)
except Exception as e:
print(f"Error reading ram segbits from {tile_db.block_ram_segbits}: {e}")
exit(1)

for block_type in self.segbits:
for feature in self.segbits[block_type]:
Expand Down

0 comments on commit 04776b5

Please sign in to comment.