Fix no-module include files on command line. [Stefan Thiede]

git-svn-id: file://localhost/svn/verilator/trunk/verilator@1009 77ca24e4-aefa-0310-84f0-b9a241c72d87
This commit is contained in:
Wilson Snyder
2008-03-25 13:42:48 +00:00
parent 7c3c2af90b
commit aa2db8fdde
5 changed files with 50 additions and 13 deletions
+13 -10
View File
@@ -379,17 +379,20 @@ private:
// This may not be the module with isTop() set, as early in the steps,
// wrapTop may have not been created yet.
AstModule* topmodp = nodep->modulesp();
if (!topmodp) nodep->v3fatalSrc("No top level module");
UINFO(8,"Top Module: "<<topmodp<<endl);
m_scope = "TOP";
m_cellVxp = m_statep->insertTopCell(topmodp, m_scope);
m_inlineVxp = m_cellVxp;
{
topmodp->accept(*this);
if (!topmodp) {
nodep->v3error("No top level module found");
} else {
UINFO(8,"Top Module: "<<topmodp<<endl);
m_scope = "TOP";
m_cellVxp = m_statep->insertTopCell(topmodp, m_scope);
m_inlineVxp = m_cellVxp;
{
topmodp->accept(*this);
}
m_scope = "";
m_cellVxp = NULL;
m_inlineVxp = m_cellVxp;
}
m_scope = "";
m_cellVxp = NULL;
m_inlineVxp = m_cellVxp;
}
virtual void visit(AstModule* nodep, AstNUser*) {
UINFO(8," "<<nodep<<endl);