diff --git a/src/V3LinkCells.cpp b/src/V3LinkCells.cpp index 6b1b72617..74616e81f 100644 --- a/src/V3LinkCells.cpp +++ b/src/V3LinkCells.cpp @@ -135,7 +135,15 @@ private: AstNodeModule* modp = vvertexp->modp(); modp->level(vvertexp->rank()+1); if (vvertexp == m_topVertexp && modp->level() != 2) { - v3error("Specified --top-module '"<inBeginp()) { + if (LinkCellsVertex* eFromVertexp = dynamic_cast(edgep->fromp())) { + abovep = eFromVertexp->modp(); + } + } + v3error("Specified --top-module '"<prettyName() : "UNKNOWN")<<"'"); } } }