3
0
Fork 0
mirror of https://github.com/YosysHQ/sby.git synced 2025-08-07 22:01:25 +00:00

Initial support for a multi-task property status database

This adds initial support for an sqlite database that is shared across
multiple tasks of a single SBY file and that can track the status of
individual properties.

The amount of information tracked in the database is currently quite
minimal and depends on the engine and options used. This can be
incrementally extended in the future.

The ways in which the information in the database can be queries is even
more limited for this initial version, consisting of a single '--status'
option which lists all properties and their status.
This commit is contained in:
Jannis Harder 2024-02-19 21:06:26 +01:00
parent 5c649c8e75
commit 52184e5bf0
8 changed files with 462 additions and 5 deletions

View file

@ -233,6 +233,7 @@ def run(mode, task, engine_idx, engine):
cell_name = match[3] or match[2]
prop = task.design.hierarchy.find_property_by_cellname(cell_name, trans_dict=smt2_trans)
prop.status = "FAIL"
task.status_db.set_task_property_status(prop, data=dict(source="smtbmc", engine=f"engine_{engine_idx}"))
last_prop.append(prop)
return line
@ -241,6 +242,7 @@ def run(mode, task, engine_idx, engine):
cell_name = match[2] or match[1]
prop = task.design.hierarchy.find_property_by_cellname(cell_name, trans_dict=smt2_trans)
prop.status = "PASS"
task.status_db.set_task_property_status(prop, data=dict(source="smtbmc", engine=f"engine_{engine_idx}"))
last_prop.append(prop)
return line
@ -271,6 +273,7 @@ def run(mode, task, engine_idx, engine):
cell_name = match[2]
prop = task.design.hierarchy.find_property_by_cellname(cell_name, trans_dict=smt2_trans)
prop.status = "FAIL"
task.status_db.set_task_property_status(prop, data=dict(source="smtbmc", engine=f"engine_{engine_idx}"))
return line
@ -288,6 +291,8 @@ def run(mode, task, engine_idx, engine):
def last_exit_callback():
if mode == "bmc" or mode == "cover":
task.update_status(proc_status)
if proc_status == "FAIL" and mode == "bmc" and keep_going:
task.pass_unknown_asserts(dict(source="smtbmc", keep_going=True, engine=f"engine_{engine_idx}"))
proc_status_lower = proc_status.lower() if proc_status == "PASS" else proc_status
task.summary.set_engine_status(engine_idx, proc_status_lower)