Fix SMT2 handling of initstate in sub-modules
authorClifford Wolf <clifford@clifford.at>
Sun, 29 Oct 2017 12:21:20 +0000 (13:21 +0100)
committerClifford Wolf <clifford@clifford.at>
Sun, 29 Oct 2017 12:21:20 +0000 (13:21 +0100)
backends/smt2/smt2.cc

index dce7c25de9b60dadf57967dfa283703ceef518eb..8daa52eb3d9cf125dd2d444713925a347ed653e5 100644 (file)
@@ -811,6 +811,9 @@ struct Smt2Worker
                                Module *m = module->design->module(cell->type);
                                log_assert(m != nullptr);
 
+                               hier.push_back(stringf("  (= (|%s_is| state) (|%s_is| %s))\n",
+                                               get_id(module), get_id(cell->type), cell_state.c_str()));
+
                                for (auto &conn : cell->connections())
                                {
                                        Wire *w = m->wire(conn.first);