Fix tracing_{on,off} in the presence of non-inlined modules (#5346)

Previously "*.foo.*" failed to match non-inlined instances called 'foo'.
This commit is contained in:
Geza Lore
2024-08-08 17:16:54 +01:00
committed by GitHub
parent 3e5859e5da
commit 004865a8b2
5 changed files with 153 additions and 1 deletions
+1 -1
View File
@@ -173,7 +173,7 @@ class TraceDeclVisitor final : public VNVisitor {
} else if (!nodep->isTrace()) {
return "Verilator instance trace_off";
} else {
const string prettyName = varp->prettyName();
const string prettyName = nodep->prettyName();
if (!v3Global.opt.traceUnderscore()) {
if (!prettyName.empty() && prettyName[0] == '_') return "Leading underscore";
if (prettyName.find("._") != string::npos) return "Inlined leading underscore";