Some more fixes around ignored tiles within a grid.

Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
This commit is contained in:
Keith Rothman 2020-02-20 11:33:12 -08:00
parent 22e1a8f7c3
commit 89bc2008d8
2 changed files with 18 additions and 2 deletions

View File

@ -19,9 +19,16 @@ def get_tile_grid_info(fname):
with open(fname, 'r') as f:
tile = json5.load(f)
tile_type = tile['type']
ignored = int(tile['ignored']) != 0
if ignored:
tile_type = 'NULL'
return {
tile['tile']: {
'type': tile['type'],
'type': tile_type,
'ignored': ignored,
'grid_x': tile['x'],
'grid_y': tile['y'],
'sites': dict(
@ -592,6 +599,12 @@ def main():
for tile in db_grid_keys:
for k in grid2[tile]:
if k == 'ignored':
continue
if k == 'sites' and grid2[tile]['ignored']:
continue
assert k in grid[tile], k
assert grid[tile][k] == grid2[tile][k], (
tile, k, grid[tile][k], grid2[tile][k])

View File

@ -30,7 +30,9 @@ for {set j $start } { $j < $stop } { incr j } {
# If tile is not allowed, skip it
set res [lsearch $not_allowed_tiles $tile]
if { $res != -1 } {
continue
set ignored 1
} else {
set ignored 0
}
set fname tile_$tile.json5
@ -40,6 +42,7 @@ for {set j $start } { $j < $stop } { incr j } {
set fp [open "${fname}" w]
puts $fp "\{"
puts $fp "\t\"tile\": \"$tile\","
puts $fp "\t\"ignored\": \"$ignored\","
# tile properties:
# CLASS COLUMN DEVICE_ID FIRST_SITE_ID GRID_POINT_X GRID_POINT_Y INDEX
# INT_TILE_X INT_TILE_Y IS_CENTER_TILE IS_DCM_TILE IS_GT_CLOCK_SITE_TILE