| ``--dumpsmt2`` | Write the SMT2 trace to an additional output file. |
| | (Useful for benchmarking and troubleshooting.) |
+-----------------+---------------------------------------------------------+
+| ``--progress`` | Enable Yosys-SMTBMC timer display. |
++-----------------+---------------------------------------------------------+
Any SMT2 solver that is compatible with ``yosys-smtbmc`` can be passed as
argument to the ``smtbmc`` engine. The solver options are passed to the solver
from time import time
class SbyTask:
- def __init__(self, job, info, deps, cmdline, logfile=None):
+ def __init__(self, job, info, deps, cmdline, logfile=None, logstderr=True):
self.running = False
self.finished = False
self.terminated = False
self.noprintregex = None
self.notify = []
self.linebuffer = ""
+ self.logstderr = logstderr
for dep in self.deps:
dep.register_dep(self)
return
self.job.log("%s: starting process \"%s\"" % (self.info, self.cmdline))
- self.p = subprocess.Popen(self.cmdline, shell=True, stdin=subprocess.DEVNULL, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+ self.p = subprocess.Popen(self.cmdline, shell=True, stdin=subprocess.DEVNULL, stdout=subprocess.PIPE,
+ stderr=(subprocess.STDOUT if self.logstderr else None))
fl = fcntl.fcntl(self.p.stdout, fcntl.F_GETFL)
fcntl.fcntl(self.p.stdout, fcntl.F_SETFL, fl | os.O_NONBLOCK)
self.job.tasks_running.append(self)
stbv_opt = False
stdt_opt = False
dumpsmt2 = False
+ progress = False
- opts, args = getopt.getopt(engine[1:], "", ["nomem", "syn", "stbv", "stdt", "presat", "nopresat", "unroll", "nounroll", "dumpsmt2"])
+ opts, args = getopt.getopt(engine[1:], "", ["nomem", "syn", "stbv", "stdt", "presat",
+ "nopresat", "unroll", "nounroll", "dumpsmt2", "progress"])
for o, a in opts:
if o == "--nomem":
unroll_opt = False
elif o == "--dumpsmt2":
dumpsmt2 = True
+ elif o == "--progress":
+ progress = True
else:
assert False
if dumpsmt2:
smtbmc_opts += ["--dump-smt2", trace_prefix.replace("%", "") + ".smt2"]
+ if not progress:
+ smtbmc_opts.append("--noprogress")
+
task = SbyTask(job, taskname, job.model(model_name),
- "cd %s; %s --noprogress %s -t %d --append %d --dump-vcd %s.vcd --dump-vlogtb %s_tb.v --dump-smtc %s.smtc model/design_%s.smt2" %
+ "cd %s; %s %s -t %d --append %d --dump-vcd %s.vcd --dump-vlogtb %s_tb.v --dump-smtc %s.smtc model/design_%s.smt2" %
(job.workdir, job.exe_paths["smtbmc"], " ".join(smtbmc_opts), job.opt_depth, job.opt_append, trace_prefix, trace_prefix, trace_prefix, model_name),
- logfile=open(logfile_prefix + ".txt", "w"))
+ logfile=open(logfile_prefix + ".txt", "w"), logstderr=(not progress))
if mode == "prove_basecase":
job.basecase_tasks.append(task)