aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaire Wolf <clifford@clifford.at>2020-01-27 17:59:58 +0100
committerGitHub <noreply@github.com>2020-01-27 17:59:58 +0100
commit07a12ebd4ff12c8016809eacad4551246fa4b316 (patch)
tree92fefc3d0b161cf167026bedf0a7146609584bf3
parentde6006fbc82406d2942d0740bcfc7a4418070c9b (diff)
parent485f31f6818e21974fac9030aa3976bb6107dfaa (diff)
downloadyosys-07a12ebd4ff12c8016809eacad4551246fa4b316.tar.gz
yosys-07a12ebd4ff12c8016809eacad4551246fa4b316.tar.bz2
yosys-07a12ebd4ff12c8016809eacad4551246fa4b316.zip
Merge pull request #1658 from YosysHQ/clifford/smtbmcsolvernotfound
Improve yosys-smtbmc "solver not found" handling
-rw-r--r--backends/smt2/smtio.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/backends/smt2/smtio.py b/backends/smt2/smtio.py
index 1df996aa7..34bf7ef38 100644
--- a/backends/smt2/smtio.py
+++ b/backends/smt2/smtio.py
@@ -304,7 +304,11 @@ class SmtIo:
def p_open(self):
assert self.p is None
- self.p = subprocess.Popen(self.popen_vargs, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+ try:
+ self.p = subprocess.Popen(self.popen_vargs, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+ except FileNotFoundError:
+ print("%s SMT Solver '%s' not found in path." % (self.timestamp(), self.popen_vargs[0]), flush=True)
+ sys.exit(1)
running_solvers[self.p_index] = self.p
self.p_running = True
self.p_next = None