3
0
Fork 0
mirror of https://github.com/YosysHQ/sby.git synced 2025-07-31 10:23:19 +00:00

start btorsim as soon as a witness is ready, print summary when multiple traces are produced

This commit is contained in:
N. Engelhardt 2020-05-12 16:48:58 +02:00
parent cb01f8469c
commit b3d766bf89
2 changed files with 119 additions and 96 deletions

View file

@ -180,6 +180,19 @@ def run(mode, job, engine_idx, engine):
if task_status == "FAIL" and mode != "cover":
if os.path.exists("{}/engine_{}/trace.vcd".format(job.workdir, engine_idx)):
job.summary.append("counterexample trace: {}/engine_{}/trace.vcd".format(job.workdir, engine_idx))
elif task_status == "PASS" and mode == "cover":
print_traces_max = 5
for i in range(print_traces_max):
if os.path.exists("{}/engine_{}/trace{}.vcd".format(job.workdir, engine_idx, i)):
job.summary.append("trace: {}/engine_{}/trace{}.vcd".format(job.workdir, engine_idx, i))
else:
break
else:
excess_traces = 0
while os.path.exists("{}/engine_{}/trace{}.vcd".format(job.workdir, engine_idx, print_traces_max + excess_traces)):
excess_traces += 1
if excess_traces > 0:
job.summary.append("and {} further trace{}".format(excess_traces, "s" if excess_traces > 1 else {}))
job.terminate()