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

Add traces to database

Setting task property status accepts an optional trace id for associating a prop status with a trace.
Where relevant, delays adding prop status(es) to the database until the corresponding tracefile is known, similar to how tracefiles and prop statuses are linked during the summary.
This commit is contained in:
Krystine Sherwin 2025-07-08 15:47:33 +12:00
parent 1d233405bf
commit f0aca6c75e
No known key found for this signature in database
4 changed files with 59 additions and 12 deletions

View file

@ -118,9 +118,12 @@ def run(mode, task, engine_idx, engine):
def make_exit_callback(suffix):
def exit_callback2(retcode):
vcdpath = f"engine_{engine_idx}/trace{suffix}.vcd"
if os.path.exists(f"{task.workdir}/{vcdpath}"):
task.summary.add_event(engine_idx=engine_idx, trace=f'trace{suffix}', path=vcdpath, type="$cover" if mode == "cover" else "$assert")
trace = f"trace{suffix}"
vcdpath = f"engine_{engine_idx}/{trace}.vcd"
trace_path = f"{task.workdir}/{vcdpath}"
if os.path.exists(trace_path):
task.summary.add_event(engine_idx=engine_idx, trace=trace, path=vcdpath, type="$cover" if mode == "cover" else "$assert")
task.status_db.add_task_trace(trace, trace_path)
common_state.running_procs -= 1
if (common_state.running_procs == 0):