mirror of
https://github.com/YosysHQ/sby.git
synced 2025-08-16 09:55:30 +00:00
Re-order status evaluation
Always add the current row to the status map if there's a key error instead of trying to be clever with `.get()` and `None`s.
This commit is contained in:
parent
990d8db9a2
commit
9cb368b9c8
1 changed files with 13 additions and 11 deletions
|
@ -465,24 +465,26 @@ class SbyStatusDb:
|
|||
except KeyError:
|
||||
prop_map[key] = prop_status_map = {}
|
||||
|
||||
current_depth, _, current_kind = prop_status_map.get(status, (None, None, None))
|
||||
try:
|
||||
current_depth, _, current_kind = prop_status_map[status]
|
||||
except KeyError:
|
||||
prop_status_map[status] = (this_depth, row, this_kind)
|
||||
continue
|
||||
|
||||
update_map = False
|
||||
if current_depth is None:
|
||||
if current_kind is None:
|
||||
update_map = True
|
||||
elif this_kind in ['fst', 'vcd']:
|
||||
# prefer traces over witness files
|
||||
update_map = True
|
||||
elif this_depth is not None:
|
||||
if current_depth is None and current_kind is None:
|
||||
# no depth or kind to compare, just take latest data
|
||||
update_map = True
|
||||
elif this_depth is not None and this_depth != current_depth:
|
||||
if status == 'FAIL' and this_depth < current_depth:
|
||||
# earliest fail
|
||||
update_map = True
|
||||
elif status != 'FAIL' and this_depth > current_depth:
|
||||
# latest non-FAIL
|
||||
update_map = True
|
||||
elif this_depth == current_depth and this_kind in ['fst', 'vcd']:
|
||||
# prefer traces over witness files
|
||||
update_map = True
|
||||
elif this_kind in ['fst', 'vcd']:
|
||||
# prefer traces over witness files
|
||||
update_map = True
|
||||
if update_map:
|
||||
prop_status_map[status] = (this_depth, row, this_kind)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue