Fix package reported as vpiModule (#2885)

This commit is contained in:
Todd Strader 2021-04-12 15:00:36 -04:00 committed by GitHub
parent ac26d5889f
commit 70c1eda174
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -298,11 +298,12 @@ class EmitCSyms final : EmitCBaseVisitor {
m_scopes.emplace_back(std::make_pair(nodep, m_modp));
if (v3Global.opt.vpi() && !nodep->isTop()) {
string type = VN_IS(nodep->modp(), Package) ? "SCOPE_OTHER" : "SCOPE_MODULE";
string name_dedot = AstNode::dedotName(nodep->shortName());
int timeunit = m_modp->timeunit().powerOfTen();
m_vpiScopeCandidates.insert(
std::make_pair(nodep->name(), ScopeData(scopeSymString(nodep->name()), name_dedot,
timeunit, "SCOPE_MODULE")));
timeunit, type)));
}
}
virtual void visit(AstScopeName* nodep) override {

View File

@ -12,6 +12,10 @@
import "DPI-C" context function int mon_check();
`endif
package somepackage;
int someint /*verilator public_flat_rw*/;
endpackage
module t (/*AUTOARG*/
// Inputs
clk