aboutsummaryrefslogtreecommitdiffstats
path: root/backends
diff options
context:
space:
mode:
authorAlberto Gonzalez <boqwxp@airmail.cc>2020-03-26 01:19:47 +0000
committerAlberto Gonzalez <boqwxp@airmail.cc>2020-03-26 01:21:01 +0000
commit5accf08ef9f226b78cbd47c83522cce6afffb280 (patch)
treed55fe591a9c1408647404561ee659dff7963fe2f /backends
parentc9555c9adeba886a308c60615ac794ec20d9276e (diff)
downloadyosys-5accf08ef9f226b78cbd47c83522cce6afffb280.tar.gz
yosys-5accf08ef9f226b78cbd47c83522cce6afffb280.tar.bz2
yosys-5accf08ef9f226b78cbd47c83522cce6afffb280.zip
Skip reading stdout from the solver that if it isn't a line reading only "sat", "unsat", or "unknown".
Diffstat (limited to 'backends')
-rw-r--r--backends/smt2/smtio.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/backends/smt2/smtio.py b/backends/smt2/smtio.py
index 3559781ec..f7b2ec647 100644
--- a/backends/smt2/smtio.py
+++ b/backends/smt2/smtio.py
@@ -704,7 +704,9 @@ class SmtIo:
if msg is not None:
print("%s waiting for solver (%s)" % (self.timestamp(), msg), flush=True)
- result = self.read()
+ result = ""
+ while result not in ["sat", "unsat", "unknown"]:
+ result = self.read()
if self.debug_file:
print("(set-info :status %s)" % result, file=self.debug_file)