mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-15 13:28:59 +00:00
yosys-smtbmc: support -h/--help (and exit with code 0).
This commit is contained in:
parent
ef8ed21a2e
commit
4bb173e256
|
@ -59,9 +59,12 @@ detect_loops = False
|
||||||
so = SmtOpts()
|
so = SmtOpts()
|
||||||
|
|
||||||
|
|
||||||
def usage():
|
def help():
|
||||||
print(os.path.basename(sys.argv[0]) + """ [options] <yosys_smt2_output>
|
print(os.path.basename(sys.argv[0]) + """ [options] <yosys_smt2_output>
|
||||||
|
|
||||||
|
-h, --help
|
||||||
|
show this message
|
||||||
|
|
||||||
-t <num_steps>
|
-t <num_steps>
|
||||||
-t <skip_steps>:<num_steps>
|
-t <skip_steps>:<num_steps>
|
||||||
-t <skip_steps>:<step_size>:<num_steps>
|
-t <skip_steps>:<step_size>:<num_steps>
|
||||||
|
@ -181,19 +184,25 @@ def usage():
|
||||||
(this feature is experimental and incomplete)
|
(this feature is experimental and incomplete)
|
||||||
|
|
||||||
""" + so.helpmsg())
|
""" + so.helpmsg())
|
||||||
|
|
||||||
|
def usage():
|
||||||
|
help()
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
opts, args = getopt.getopt(sys.argv[1:], so.shortopts + "t:igcm:", so.longopts +
|
opts, args = getopt.getopt(sys.argv[1:], so.shortopts + "t:higcm:", so.longopts +
|
||||||
["final-only", "assume-skipped=", "smtc=", "cex=", "aig=", "aig-noheader", "yw=", "btorwit=", "presat",
|
["help", "final-only", "assume-skipped=", "smtc=", "cex=", "aig=", "aig-noheader", "yw=", "btorwit=", "presat",
|
||||||
"dump-vcd=", "dump-yw=", "dump-vlogtb=", "vlogtb-top=", "dump-smtc=", "dump-all", "noinfo", "append=",
|
"dump-vcd=", "dump-yw=", "dump-vlogtb=", "vlogtb-top=", "dump-smtc=", "dump-all", "noinfo", "append=",
|
||||||
"smtc-init", "smtc-top=", "noinit", "binary", "keep-going", "check-witness", "detect-loops"])
|
"smtc-init", "smtc-top=", "noinit", "binary", "keep-going", "check-witness", "detect-loops"])
|
||||||
except:
|
except:
|
||||||
usage()
|
usage()
|
||||||
|
|
||||||
for o, a in opts:
|
for o, a in opts:
|
||||||
if o == "-t":
|
if o in ("-h", "--help"):
|
||||||
|
help()
|
||||||
|
sys.exit(0)
|
||||||
|
elif o == "-t":
|
||||||
got_topt = True
|
got_topt = True
|
||||||
a = a.split(":")
|
a = a.split(":")
|
||||||
if len(a) == 1:
|
if len(a) == 1:
|
||||||
|
|
Loading…
Reference in a new issue