From f0e1d204fab3e3b6aa3cfe1e31264bc10b5cd06b Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Wed, 15 Aug 2012 21:28:30 -0400 Subject: [PATCH] Fix triangle symbol resolution error broke in 3.840, bug550. This requires the parse symbol table persist across all parse runs. This is probably more correct than before, but may result in some fallout if people relied on data types not being persistant across separately parsed cells. --- Changes | 2 ++ src/V3LinkCells.cpp | 11 +++++++---- src/V3LinkCells.h | 3 ++- src/V3Parse.h | 3 ++- src/V3ParseImp.cpp | 4 ++-- src/V3ParseImp.h | 11 ++++++----- src/V3SymTable.h | 15 +++++++++++++-- src/Verilator.cpp | 6 ++++-- 8 files changed, 38 insertions(+), 17 deletions(-) diff --git a/Changes b/Changes index db95bdbfc..75d435268 100644 --- a/Changes +++ b/Changes @@ -15,6 +15,8 @@ indicates the contributor was also the author of the fix; Thanks! **** Fix duplicate begin error broke in 3.840, bug548. [Alex Solomatnikov] +**** Fix triangle symbol resolution error broke in 3.840, bug550. [Ted Campbell] + * Verilator 3.840 2012/07/31 Beta diff --git a/src/V3LinkCells.cpp b/src/V3LinkCells.cpp index af5a9731e..ddd0cb6e4 100644 --- a/src/V3LinkCells.cpp +++ b/src/V3LinkCells.cpp @@ -96,6 +96,7 @@ private: // STATE V3InFilter* m_filterp; // Parser filter + V3ParseSym* m_parseSymp; // Parser symbol table // Below state needs to be preserved between each module call. AstNodeModule* m_modp; // Current module @@ -202,7 +203,7 @@ private: // Read-subfile // If file not found, make AstNotFoundModule, rather than error out. // We'll throw the error when we know the module will really be needed. - V3Parse parser (v3Global.rootp(), m_filterp); + V3Parse parser (v3Global.rootp(), m_filterp, m_parseSymp); parser.parseFile(nodep->fileline(), nodep->modName(), false, ""); V3Error::abortIfErrors(); // We've read new modules, grab new pointers to their names @@ -284,6 +285,7 @@ private: if (nodep->modp()) { nodep->iterateChildren(*this); } + UINFO(4," Link Cell done: "<