mirror of
https://github.com/verilator/verilator.git
synced 2025-01-26 08:14:06 +00:00
When multiple tops, show example
This commit is contained in:
parent
fb9ca54c95
commit
b337acebcc
@ -135,7 +135,15 @@ private:
|
|||||||
AstNodeModule* modp = vvertexp->modp();
|
AstNodeModule* modp = vvertexp->modp();
|
||||||
modp->level(vvertexp->rank()+1);
|
modp->level(vvertexp->rank()+1);
|
||||||
if (vvertexp == m_topVertexp && modp->level() != 2) {
|
if (vvertexp == m_topVertexp && modp->level() != 2) {
|
||||||
v3error("Specified --top-module '"<<v3Global.opt.topModule()<<"' isn't at the top level, it's under another cell.");
|
AstNodeModule* abovep = NULL;
|
||||||
|
if (V3GraphEdge* edgep = vvertexp->inBeginp()) {
|
||||||
|
if (LinkCellsVertex* eFromVertexp = dynamic_cast<LinkCellsVertex*>(edgep->fromp())) {
|
||||||
|
abovep = eFromVertexp->modp();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
v3error("Specified --top-module '"<<v3Global.opt.topModule()
|
||||||
|
<<"' isn't at the top level, it's under another cell '"
|
||||||
|
<<(abovep ? abovep->prettyName() : "UNKNOWN")<<"'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user