From 1f6bb85359149a016811e7e7fef980c3d45211e7 Mon Sep 17 00:00:00 2001 From: Ruben Undheim Date: Fri, 18 Oct 2019 19:56:51 +0000 Subject: New upstream version 0.9 --- backends/smt2/smt2.cc | 2 +- backends/smt2/smtio.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'backends/smt2') diff --git a/backends/smt2/smt2.cc b/backends/smt2/smt2.cc index 688535f3..e318a405 100644 --- a/backends/smt2/smt2.cc +++ b/backends/smt2/smt2.cc @@ -1543,7 +1543,7 @@ struct Smt2Backend : public Backend { for (auto module : sorted_modules) { - if (module->get_bool_attribute("\\blackbox") || module->has_memories_warn() || module->has_processes_warn()) + if (module->get_blackbox_attribute() || module->has_memories_warn() || module->has_processes_warn()) continue; log("Creating SMT-LIBv2 representation of module %s.\n", log_id(module)); diff --git a/backends/smt2/smtio.py b/backends/smt2/smtio.py index ab20a4af..ae7968a1 100644 --- a/backends/smt2/smtio.py +++ b/backends/smt2/smtio.py @@ -1023,6 +1023,8 @@ class MkVcd: assert t >= self.t if t != self.t: if self.t == -1: + print("$version Generated by Yosys-SMTBMC $end", file=self.f) + print("$timescale 1ns $end", file=self.f) print("$var integer 32 t smt_step $end", file=self.f) print("$var event 1 ! smt_clock $end", file=self.f) @@ -1041,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": -- cgit v1.2.3