Fix unnecessary Vdly variables, bug1224 partial.
This commit is contained in:
parent
c132d0e1fe
commit
77a3d683e3
1
Changes
1
Changes
|
|
@ -21,6 +21,7 @@ The contributors that suggested a given feature are shown in []. Thanks!
|
||||||
|
|
||||||
**** Fix memory leak in VerilatedVcd dumps, bug1222 partial. [Shareef Jalloq]
|
**** Fix memory leak in VerilatedVcd dumps, bug1222 partial. [Shareef Jalloq]
|
||||||
|
|
||||||
|
**** Fix unnecessary Vdly variables, bug1224 partial. [John Coiner]
|
||||||
|
|
||||||
|
|
||||||
* Verilator 3.912 2017-09-23
|
* Verilator 3.912 2017-09-23
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,6 @@ private:
|
||||||
// AstVarScope::user4p() -> AstAlwaysPost*. Post block for this variable
|
// AstVarScope::user4p() -> AstAlwaysPost*. Post block for this variable
|
||||||
// AstVarScope::user5() -> VarUsage. Tracks delayed vs non-delayed usage
|
// AstVarScope::user5() -> VarUsage. Tracks delayed vs non-delayed usage
|
||||||
// AstVar::user2() -> bool. Set true if already made warning
|
// AstVar::user2() -> bool. Set true if already made warning
|
||||||
// AstVar::user4() -> int. Vector number, for assignment creation
|
|
||||||
// AstVarRef::user2() -> bool. Set true if already processed
|
// AstVarRef::user2() -> bool. Set true if already processed
|
||||||
// AstAlwaysPost::user2() -> ActActive*. Points to activity block of signal (valid when AstAlwaysPost::user4p is valid)
|
// AstAlwaysPost::user2() -> ActActive*. Points to activity block of signal (valid when AstAlwaysPost::user4p is valid)
|
||||||
// AstAlwaysPost::user4() -> AstIf*. Last IF (__Vdlyvset__) created under this AlwaysPost
|
// AstAlwaysPost::user4() -> AstIf*. Last IF (__Vdlyvset__) created under this AlwaysPost
|
||||||
|
|
@ -102,7 +101,8 @@ private:
|
||||||
typedef std::map<pair<AstNodeModule*,string>,AstVar*> VarMap;
|
typedef std::map<pair<AstNodeModule*,string>,AstVar*> VarMap;
|
||||||
VarMap m_modVarMap; // Table of new var names created under module
|
VarMap m_modVarMap; // Table of new var names created under module
|
||||||
V3Double0 m_statSharedSet;// Statistic tracking
|
V3Double0 m_statSharedSet;// Statistic tracking
|
||||||
|
typedef std::map<AstVarScope*,int> ScopeVecMap;
|
||||||
|
ScopeVecMap m_scopeVecMap; // Next var number for each scope
|
||||||
|
|
||||||
// METHODS
|
// METHODS
|
||||||
static int debug() {
|
static int debug() {
|
||||||
|
|
@ -211,7 +211,7 @@ private:
|
||||||
if (!varrefp->varScopep()) varrefp->v3fatalSrc("Var didn't get varscoped in V3Scope.cpp");
|
if (!varrefp->varScopep()) varrefp->v3fatalSrc("Var didn't get varscoped in V3Scope.cpp");
|
||||||
varrefp->unlinkFrBack();
|
varrefp->unlinkFrBack();
|
||||||
AstVar* oldvarp = varrefp->varp();
|
AstVar* oldvarp = varrefp->varp();
|
||||||
int modVecNum = oldvarp->user4(); oldvarp->user4(modVecNum+1);
|
int modVecNum = m_scopeVecMap[varrefp->varScopep()]++;
|
||||||
//
|
//
|
||||||
deque<AstNode*> dimreadps; // Read value for each dimension of assignment
|
deque<AstNode*> dimreadps; // Read value for each dimension of assignment
|
||||||
for (unsigned dimension=0; dimension<dimvalp.size(); dimension++) {
|
for (unsigned dimension=0; dimension<dimvalp.size(); dimension++) {
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
// VAR(BLOCKTEMP...
|
// VAR(BLOCKTEMP...
|
||||||
// if only referenced in a CFUNC, make it local to that CFUNC
|
// if only referenced in a CFUNC, make it local to that CFUNC
|
||||||
// VAR(others
|
// VAR(others
|
||||||
// if non-public, set before used, and in signle CFUNC, make it local
|
// if non-public, set before used, and in single CFUNC, make it local
|
||||||
//
|
//
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue