mirror of
https://github.com/verilator/verilator.git
synced 2025-04-05 20:22:41 +00:00
Fix package reported as vpiModule (#2885)
This commit is contained in:
parent
ac26d5889f
commit
70c1eda174
@ -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 {
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user