diff --git a/src/V3EmitCSyms.cpp b/src/V3EmitCSyms.cpp index f6c26cb27..8b3e75d84 100644 --- a/src/V3EmitCSyms.cpp +++ b/src/V3EmitCSyms.cpp @@ -296,10 +296,10 @@ class EmitCSyms final : EmitCBaseVisitor { const string type = (nodep->origModName() == "__BEGIN__") ? "SCOPE_OTHER" : "SCOPE_MODULE"; const string name = nodep->scopep()->shortName() + "__DOT__" + nodep->name(); - const string name_pretty = AstNode::prettyName(name); + const string name_dedot = AstNode::dedotName(name); const int timeunit = m_modp->timeunit().powerOfTen(); - m_vpiScopeCandidates.insert(std::make_pair( - name, ScopeData(scopeSymString(name), name_pretty, timeunit, type))); + m_vpiScopeCandidates.insert( + std::make_pair(name, ScopeData(scopeSymString(name), name_dedot, timeunit, type))); } } void visit(AstScope* nodep) override { @@ -310,10 +310,10 @@ class EmitCSyms final : EmitCBaseVisitor { if (v3Global.opt.vpi() && !nodep->isTop()) { const string type = VN_IS(nodep->modp(), Package) ? "SCOPE_OTHER" : "SCOPE_MODULE"; - const string name_pretty = AstNode::prettyName(nodep->shortName()); + const string name_dedot = AstNode::dedotName(nodep->shortName()); const int timeunit = m_modp->timeunit().powerOfTen(); m_vpiScopeCandidates.insert( - std::make_pair(nodep->name(), ScopeData(scopeSymString(nodep->name()), name_pretty, + std::make_pair(nodep->name(), ScopeData(scopeSymString(nodep->name()), name_dedot, timeunit, type))); } } diff --git a/test_regress/t/t_vpi_var.cpp b/test_regress/t/t_vpi_var.cpp index 2674af559..5d94e9567 100644 --- a/test_regress/t/t_vpi_var.cpp +++ b/test_regress/t/t_vpi_var.cpp @@ -605,12 +605,6 @@ int _mon_check_putget_str(p_cb_data cb_data) { = vpi_handle_by_name((PLI_BYTE8*)"verbose", data[i].scope)); } - for (int i = 1; i <= 6; i++) { - char buf[32]; - snprintf(buf, sizeof(buf), TestSimulator::rooted("subs[%d].subsub"), i); - CHECK_RESULT_NZ(data[i].scope = vpi_handle_by_name((PLI_BYTE8*)buf, NULL)); - } - static t_cb_data cb_data; static s_vpi_value v; TestVpiHandle count_h = VPI_HANDLE("count"); diff --git a/test_regress/t/t_vpi_var.v b/test_regress/t/t_vpi_var.v index 8c28f7fb1..672f987fc 100644 --- a/test_regress/t/t_vpi_var.v +++ b/test_regress/t/t_vpi_var.v @@ -95,15 +95,7 @@ extern "C" int mon_check(); generate for (i=1; i<=6; i=i+1) begin : arr arr #(.LENGTH(i)) arr(); - end - endgenerate - - genvar k; - generate - for (k=1; k<=6; k=k+1) begin : subs - sub subsub(); - end - endgenerate + end endgenerate endmodule : t