aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2019-06-26 10:58:39 +0200
committerClifford Wolf <clifford@clifford.at>2019-06-26 10:58:39 +0200
commitb3c36b444808be36a4fb35a3d78ba3f9691b3da0 (patch)
tree106ef5d16e254abebc4b1d96686b60143c11889b
parent3d4102cfa4ae3d91eb03b2795c2dc962735bb80a (diff)
downloadyosys-b3c36b444808be36a4fb35a3d78ba3f9691b3da0.tar.gz
yosys-b3c36b444808be36a4fb35a3d78ba3f9691b3da0.tar.bz2
yosys-b3c36b444808be36a4fb35a3d78ba3f9691b3da0.zip
Escape scope names starting with dollar sign in smtio.py
Signed-off-by: Clifford Wolf <clifford@clifford.at>
-rw-r--r--backends/smt2/smtio.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/backends/smt2/smtio.py b/backends/smt2/smtio.py
index cea0fc56c..ae7968a1b 100644
--- a/backends/smt2/smtio.py
+++ b/backends/smt2/smtio.py
@@ -1043,7 +1043,10 @@ class MkVcd:
scope = scope[:-1]
while uipath[:-1] != scope:
- print("$scope module %s $end" % uipath[len(scope)], file=self.f)
+ scopename = uipath[len(scope)]
+ if scopename.startswith("$"):
+ scopename = "\\" + scopename
+ print("$scope module %s $end" % scopename, file=self.f)
scope.append(uipath[len(scope)])
if path in self.clocks and self.clocks[path][1] == "event":