aboutsummaryrefslogtreecommitdiffstats
path: root/backends/smt2/smtbmc.py
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2015-10-15 15:08:41 +0200
committerClifford Wolf <clifford@clifford.at>2015-10-15 15:10:33 +0200
commit302166dd59d8f04aacec30223868fce13a3094dd (patch)
tree380cfbd7bdbfdb41f6bf25c92f5f6bcb18d51d80 /backends/smt2/smtbmc.py
parent1d83854d84b7a0a23ee14b72c1a289b50becdeca (diff)
downloadyosys-302166dd59d8f04aacec30223868fce13a3094dd.tar.gz
yosys-302166dd59d8f04aacec30223868fce13a3094dd.tar.bz2
yosys-302166dd59d8f04aacec30223868fce13a3094dd.zip
Improvements in yosys-smtbmc
Diffstat (limited to 'backends/smt2/smtbmc.py')
-rw-r--r--backends/smt2/smtbmc.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/backends/smt2/smtbmc.py b/backends/smt2/smtbmc.py
index 65729efa9..60cd9775e 100644
--- a/backends/smt2/smtbmc.py
+++ b/backends/smt2/smtbmc.py
@@ -26,7 +26,7 @@ num_steps = 20
vcdfile = None
tempind = False
assume_skipped = None
-topmod = "main"
+topmod = None
so = smtopts()
@@ -49,7 +49,7 @@ yosys-smtbmc [options] <yosys_smt2_output>
instead of BMC run temporal induction
-m <module_name>
- name of the top module, default: main
+ name of the top module
""" + so.helpmsg())
sys.exit(1)
@@ -97,8 +97,12 @@ with open(args[0], "r") as f:
match = debug_nets_re.match(line)
if match:
debug_nets.add(match.group(2))
+ if line.startswith("; yosys-smt2-module") and topmod is None:
+ topmod = line.split()[2]
smt.write(line)
+assert topmod is not None
+
def write_vcd_model(steps):
print("%s Writing model to VCD file." % smt.timestamp())