width = smt.modinfo[topmod].wsize[name]
primary_inputs.append((name, width))
-
if steps_start == 0:
print("initial", file=f)
else:
for i, val in zip(addr_list, smt.get_list(expr_list)):
print("assume (= (select [%s] #b%s) %s)" % (".".join(mempath), format(i, "0%db" % abits), val), file=f)
-
for k in range(steps_start, steps_stop):
print("", file=f)
print("state %d" % k, file=f)
break
-else: # not tempind
+else: # not tempind
step = 0
retstatus = True
while step < num_steps:
if not retstatus:
break
- else: # gentrace
+ else: # gentrace
for i in range(step, last_check_step+1):
smt.write("(assert (%s_a s%d))" % (topmod, i))
smt.write("(assert %s)" % get_constr_expr(constr_asserts, i))
print("%s Status: %s" % (smt.timestamp(), "PASSED" if retstatus else "FAILED (!)"))
sys.exit(0 if retstatus else 1)
-
from select import select
from time import time
-class smtmodinfo:
+
+class SmtModInfo:
def __init__(self):
self.inputs = set()
self.outputs = set()
self.asserts = dict()
self.anyconsts = dict()
+
class SmtIo:
def __init__(self, solver=None, debug_print=None, debug_file=None, timeinfo=None, opts=None):
if opts is not None:
if fields[1] == "yosys-smt2-module":
self.curmod = fields[2]
- self.modinfo[self.curmod] = smtmodinfo()
+ self.modinfo[self.curmod] = SmtModInfo()
if fields[1] == "yosys-smt2-cell":
self.modinfo[self.curmod].cells[fields[3]] = fields[2]