diff options
author | Clifford Wolf <clifford@clifford.at> | 2016-10-08 12:25:34 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2016-10-08 12:25:34 +0200 |
commit | 5f6a838823d0468cd055ca4aeaa96d5a7b79eca1 (patch) | |
tree | 4e20ea9e183d474d435972931ac1bff788b569c9 | |
parent | 1114ce9210dfb9a0db981029377dc859abc3aa34 (diff) | |
download | yosys-5f6a838823d0468cd055ca4aeaa96d5a7b79eca1.tar.gz yosys-5f6a838823d0468cd055ca4aeaa96d5a7b79eca1.tar.bz2 yosys-5f6a838823d0468cd055ca4aeaa96d5a7b79eca1.zip |
Added smtc support for top-level state with [], [N:] syntax
-rw-r--r-- | backends/smt2/smtbmc.py | 2 | ||||
-rw-r--r-- | backends/smt2/smtio.py | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/backends/smt2/smtbmc.py b/backends/smt2/smtbmc.py index eac693632..0cfb386a1 100644 --- a/backends/smt2/smtbmc.py +++ b/backends/smt2/smtbmc.py @@ -249,7 +249,7 @@ def get_constr_expr(db, state, final=False, getvalues=False): if state not in db: return ([], [], []) if getvalues else "true" - netref_regex = re.compile(r'(^|[( ])\[(-?[0-9]+:|)([^\]]+)\](?=[ )]|$)') + netref_regex = re.compile(r'(^|[( ])\[(-?[0-9]+:|)([^\]]*)\](?=[ )]|$)') def replace_netref(match): state_sel = match.group(2) diff --git a/backends/smt2/smtio.py b/backends/smt2/smtio.py index eccb65014..72bd8b178 100644 --- a/backends/smt2/smtio.py +++ b/backends/smt2/smtio.py @@ -534,6 +534,8 @@ class SmtIo: def net_expr(self, mod, base, path): if len(path) == 1: assert mod in self.modinfo + if path[0] == "": + return base if path[0] in self.modinfo[mod].cells: return "(|%s_h %s| %s)" % (mod, path[0], base) if path[0] in self.modinfo[mod].wsize: |