aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2017-02-26 14:39:07 +0100
committerClifford Wolf <clifford@clifford.at>2017-02-26 14:39:07 +0100
commit6e152f7aa1a5752eae6e7bd8a67dfce2bd0d64f6 (patch)
tree1400a5205de6e2c2ca3efd375b0bd79ae4fb299e
parent66a1617b6973a98f62975e6bf01ab8cdda19b782 (diff)
downloadyosys-6e152f7aa1a5752eae6e7bd8a67dfce2bd0d64f6.tar.gz
yosys-6e152f7aa1a5752eae6e7bd8a67dfce2bd0d64f6.tar.bz2
yosys-6e152f7aa1a5752eae6e7bd8a67dfce2bd0d64f6.zip
Fix bug in smtio unroll code
-rw-r--r--backends/smt2/smtio.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/backends/smt2/smtio.py b/backends/smt2/smtio.py
index 93133a462..1278d00aa 100644
--- a/backends/smt2/smtio.py
+++ b/backends/smt2/smtio.py
@@ -215,9 +215,8 @@ class SmtIo:
stmt = stmt.strip()
if self.nocomments or self.unroll:
- if stmt.startswith(";"):
- return
- stmt = re.sub(r" ;.*", "", stmt)
+ stmt = re.sub(r" *;.*", "", stmt)
+ if stmt == "": return
if unroll and self.unroll:
stmt = self.unroll_buffer + stmt