Always internal module wrapper TOP.

This commit is contained in:
Wilson Snyder 2019-06-22 13:43:22 -04:00
parent 5cb6474cc6
commit c514bb26e8

View File

@ -96,7 +96,7 @@ void V3LinkLevel::wrapTop(AstNetlist* rootp) {
// We do ONLY the top module // We do ONLY the top module
AstNodeModule* oldmodp = rootp->modulesp(); AstNodeModule* oldmodp = rootp->modulesp();
if (!oldmodp) rootp->v3fatalSrc("No module found to process"); if (!oldmodp) rootp->v3fatalSrc("No module found to process");
AstNodeModule* newmodp = new AstModule(oldmodp->fileline(), string("TOP_")+oldmodp->name()); AstNodeModule* newmodp = new AstModule(oldmodp->fileline(), string("TOP"));
// Make the new module first in the list // Make the new module first in the list
oldmodp->unlinkFrBackWithNext(); oldmodp->unlinkFrBackWithNext();
newmodp->addNext(oldmodp); newmodp->addNext(oldmodp);