mirror of
https://github.com/verilator/verilator.git
synced 2026-09-07 01:52:17 +02:00
C++11: Use member declaration initalizations. No functional change intended.
This commit is contained in:
+2
-2
@@ -202,8 +202,8 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
ActiveDlyVisitor(AstNode* nodep, CheckType check)
|
||||
: m_check(check)
|
||||
, m_alwaysp(nodep) {
|
||||
: m_check{check}
|
||||
, m_alwaysp{nodep} {
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~ActiveDlyVisitor() override {}
|
||||
|
||||
+4
-10
@@ -34,9 +34,9 @@ private:
|
||||
AstUser1InUse m_inuser1;
|
||||
|
||||
// STATE
|
||||
AstNodeModule* m_modp; // Last module
|
||||
AstBegin* m_beginp; // Last begin
|
||||
unsigned m_modPastNum; // Module past numbering
|
||||
AstNodeModule* m_modp = nullptr; // Last module
|
||||
AstBegin* m_beginp = nullptr; // Last begin
|
||||
unsigned m_modPastNum = 0; // Module past numbering
|
||||
VDouble0 m_statCover; // Statistic tracking
|
||||
VDouble0 m_statAsNotImm; // Statistic tracking
|
||||
VDouble0 m_statAsImm; // Statistic tracking
|
||||
@@ -385,13 +385,7 @@ private:
|
||||
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit AssertVisitor(AstNetlist* nodep) {
|
||||
m_beginp = nullptr;
|
||||
m_modp = nullptr;
|
||||
m_modPastNum = 0;
|
||||
// Process
|
||||
iterate(nodep);
|
||||
}
|
||||
explicit AssertVisitor(AstNetlist* nodep) { iterate(nodep); }
|
||||
virtual ~AssertVisitor() override {
|
||||
V3Stats::addStat("Assertions, assert non-immediate statements", m_statAsNotImm);
|
||||
V3Stats::addStat("Assertions, assert immediate statements", m_statAsImm);
|
||||
|
||||
+3
-5
@@ -34,11 +34,11 @@ private:
|
||||
// NODE STATE/TYPES
|
||||
// STATE
|
||||
// Reset each module:
|
||||
AstSenItem* m_seniDefaultp; // Default sensitivity (from AstDefClock)
|
||||
AstSenItem* m_seniDefaultp = nullptr; // Default sensitivity (from AstDefClock)
|
||||
// Reset each assertion:
|
||||
AstSenItem* m_senip; // Last sensitivity
|
||||
AstSenItem* m_senip = nullptr; // Last sensitivity
|
||||
// Reset each always:
|
||||
AstSenItem* m_seniAlwaysp; // Last sensitivity in always
|
||||
AstSenItem* m_seniAlwaysp = nullptr; // Last sensitivity in always
|
||||
|
||||
// METHODS
|
||||
VL_DEBUG_FUNC; // Declare debug()
|
||||
@@ -170,8 +170,6 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit AssertPreVisitor(AstNetlist* nodep) {
|
||||
m_seniDefaultp = nullptr;
|
||||
m_seniAlwaysp = nullptr;
|
||||
clearAssertInfo();
|
||||
// Process
|
||||
iterate(nodep);
|
||||
|
||||
+1
-1
@@ -212,7 +212,7 @@ AstNodeBiop* AstEqWild::newTyped(FileLine* fl, AstNode* lhsp, AstNode* rhsp) {
|
||||
}
|
||||
|
||||
AstExecGraph::AstExecGraph(FileLine* fileline)
|
||||
: AstNode(AstType::atExecGraph, fileline) {
|
||||
: AstNode{AstType::atExecGraph, fileline} {
|
||||
m_depGraphp = new V3Graph;
|
||||
}
|
||||
AstExecGraph::~AstExecGraph() { VL_DO_DANGLING(delete m_depGraphp, m_depGraphp); }
|
||||
|
||||
+1
-1
@@ -250,7 +250,7 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
BeginVisitor(AstNetlist* nodep, BeginState* statep)
|
||||
: m_statep(statep) {
|
||||
: m_statep{statep} {
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~BeginVisitor() override {}
|
||||
|
||||
+3
-3
@@ -67,7 +67,7 @@ public:
|
||||
|
||||
// CONSTRUCTORS
|
||||
explicit CUseState(AstNodeModule* nodep)
|
||||
: m_modInsertp(nodep) {}
|
||||
: m_modInsertp{nodep} {}
|
||||
virtual ~CUseState() {}
|
||||
VL_UNCOPYABLE(CUseState);
|
||||
};
|
||||
@@ -107,7 +107,7 @@ class CUseDTypeVisitor : public AstNVisitor {
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit CUseDTypeVisitor(AstNodeModule* nodep, CUseState& stater)
|
||||
: m_stater(stater) {
|
||||
: m_stater{stater} {
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~CUseDTypeVisitor() override {}
|
||||
@@ -208,7 +208,7 @@ class CUseVisitor : public AstNVisitor {
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit CUseVisitor(AstNodeModule* nodep)
|
||||
: m_state(nodep) {
|
||||
: m_state{nodep} {
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~CUseVisitor() override {}
|
||||
|
||||
+6
-11
@@ -52,7 +52,8 @@
|
||||
|
||||
class CaseLintVisitor : public AstNVisitor {
|
||||
private:
|
||||
AstNodeCase* m_caseExprp; // Under a CASE value node, if so the relevant case statement
|
||||
AstNodeCase* m_caseExprp
|
||||
= nullptr; // Under a CASE value node, if so the relevant case statement
|
||||
|
||||
// METHODS
|
||||
VL_DEBUG_FUNC; // Declare debug()
|
||||
@@ -109,10 +110,7 @@ private:
|
||||
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit CaseLintVisitor(AstNodeCase* nodep) {
|
||||
m_caseExprp = nullptr;
|
||||
iterate(nodep);
|
||||
}
|
||||
explicit CaseLintVisitor(AstNodeCase* nodep) { iterate(nodep); }
|
||||
virtual ~CaseLintVisitor() override {}
|
||||
};
|
||||
|
||||
@@ -131,9 +129,9 @@ private:
|
||||
VDouble0 m_statCaseSlow; // Statistic tracking
|
||||
|
||||
// Per-CASE
|
||||
int m_caseWidth; // Width of valueItems
|
||||
int m_caseItems; // Number of caseItem unique values
|
||||
bool m_caseNoOverlapsAllCovered; // Proven to be synopsys parallel_case compliant
|
||||
int m_caseWidth = 0; // Width of valueItems
|
||||
int m_caseItems = 0; // Number of caseItem unique values
|
||||
bool m_caseNoOverlapsAllCovered = false; // Proven to be synopsys parallel_case compliant
|
||||
// For each possible value, the case branch we need
|
||||
AstNode* m_valueItem[1 << CASE_OVERLAP_WIDTH];
|
||||
|
||||
@@ -488,9 +486,6 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit CaseVisitor(AstNetlist* nodep) {
|
||||
m_caseWidth = 0;
|
||||
m_caseItems = 0;
|
||||
m_caseNoOverlapsAllCovered = false;
|
||||
for (uint32_t i = 0; i < (1UL << CASE_OVERLAP_WIDTH); ++i) m_valueItem[i] = nullptr;
|
||||
iterate(nodep);
|
||||
}
|
||||
|
||||
+24
-37
@@ -60,12 +60,12 @@ class CdcEitherVertex : public V3GraphVertex {
|
||||
|
||||
public:
|
||||
CdcEitherVertex(V3Graph* graphp, AstScope* scopep, AstNode* nodep)
|
||||
: V3GraphVertex(graphp)
|
||||
, m_scopep(scopep)
|
||||
, m_nodep(nodep)
|
||||
, m_srcDomainSet(false)
|
||||
, m_dstDomainSet(false)
|
||||
, m_asyncPath(false) {}
|
||||
: V3GraphVertex{graphp}
|
||||
, m_scopep{scopep}
|
||||
, m_nodep{nodep}
|
||||
, m_srcDomainSet{false}
|
||||
, m_dstDomainSet{false}
|
||||
, m_asyncPath{false} {}
|
||||
virtual ~CdcEitherVertex() override {}
|
||||
// ACCESSORS
|
||||
virtual FileLine* fileline() const override { return nodep()->fileline(); }
|
||||
@@ -90,8 +90,8 @@ class CdcVarVertex : public CdcEitherVertex {
|
||||
|
||||
public:
|
||||
CdcVarVertex(V3Graph* graphp, AstScope* scopep, AstVarScope* varScp)
|
||||
: CdcEitherVertex(graphp, scopep, varScp)
|
||||
, m_varScp(varScp) {}
|
||||
: CdcEitherVertex{graphp, scopep, varScp}
|
||||
, m_varScp{varScp} {}
|
||||
virtual ~CdcVarVertex() override {}
|
||||
// ACCESSORS
|
||||
AstVarScope* varScp() const { return m_varScp; }
|
||||
@@ -111,9 +111,9 @@ class CdcLogicVertex : public CdcEitherVertex {
|
||||
|
||||
public:
|
||||
CdcLogicVertex(V3Graph* graphp, AstScope* scopep, AstNode* nodep, AstSenTree* sensenodep)
|
||||
: CdcEitherVertex(graphp, scopep, nodep)
|
||||
, m_hazard(false)
|
||||
, m_isFlop(false) {
|
||||
: CdcEitherVertex{graphp, scopep, nodep}
|
||||
, m_hazard{false}
|
||||
, m_isFlop{false} {
|
||||
srcDomainp(sensenodep);
|
||||
dstDomainp(sensenodep);
|
||||
}
|
||||
@@ -166,8 +166,8 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
CdcDumpVisitor(AstNode* nodep, std::ofstream* ofp, const string& prefix)
|
||||
: m_ofp(ofp)
|
||||
, m_prefix(prefix) {
|
||||
: m_ofp{ofp}
|
||||
, m_prefix{prefix} {
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~CdcDumpVisitor() override {}
|
||||
@@ -177,8 +177,8 @@ public:
|
||||
|
||||
class CdcWidthVisitor : public CdcBaseVisitor {
|
||||
private:
|
||||
int m_maxLineno;
|
||||
size_t m_maxFilenameLen;
|
||||
int m_maxLineno = 0;
|
||||
size_t m_maxFilenameLen = 0;
|
||||
|
||||
virtual void visit(AstNode* nodep) override {
|
||||
iterateChildren(nodep);
|
||||
@@ -193,11 +193,7 @@ private:
|
||||
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit CdcWidthVisitor(AstNode* nodep) {
|
||||
m_maxLineno = 0;
|
||||
m_maxFilenameLen = 0;
|
||||
iterate(nodep);
|
||||
}
|
||||
explicit CdcWidthVisitor(AstNode* nodep) { iterate(nodep); }
|
||||
virtual ~CdcWidthVisitor() override {}
|
||||
// ACCESSORS
|
||||
int maxWidth() {
|
||||
@@ -227,16 +223,16 @@ private:
|
||||
|
||||
// STATE
|
||||
V3Graph m_graph; // Scoreboard of var usages/dependencies
|
||||
CdcLogicVertex* m_logicVertexp; // Current statement being tracked, nullptr=ignored
|
||||
AstScope* m_scopep; // Current scope being processed
|
||||
AstNodeModule* m_modp; // Current module
|
||||
AstSenTree* m_domainp; // Current sentree
|
||||
bool m_inDly; // In delayed assign
|
||||
int m_inSenItem; // Number of senitems
|
||||
CdcLogicVertex* m_logicVertexp = nullptr; // Current statement being tracked, nullptr=ignored
|
||||
AstScope* m_scopep = nullptr; // Current scope being processed
|
||||
AstNodeModule* m_modp = nullptr; // Current module
|
||||
AstSenTree* m_domainp = nullptr; // Current sentree
|
||||
bool m_inDly = false; // In delayed assign
|
||||
int m_inSenItem = 0; // Number of senitems
|
||||
string m_ofFilename; // Output filename
|
||||
std::ofstream* m_ofp; // Output file
|
||||
uint32_t m_userGeneration; // Generation count to avoid slow userClearVertices
|
||||
int m_filelineWidth; // Characters in longest fileline
|
||||
uint32_t m_userGeneration = 0; // Generation count to avoid slow userClearVertices
|
||||
int m_filelineWidth = 0; // Characters in longest fileline
|
||||
|
||||
// METHODS
|
||||
void iterateNewStmt(AstNode* nodep) {
|
||||
@@ -735,15 +731,6 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit CdcVisitor(AstNode* nodep) {
|
||||
m_logicVertexp = nullptr;
|
||||
m_scopep = nullptr;
|
||||
m_modp = nullptr;
|
||||
m_domainp = nullptr;
|
||||
m_inDly = false;
|
||||
m_inSenItem = 0;
|
||||
m_userGeneration = 0;
|
||||
m_filelineWidth = 0;
|
||||
|
||||
// Make report of all signal names and what clock edges they have
|
||||
string filename = v3Global.opt.makeDir() + "/" + v3Global.opt.prefix() + "__cdc.txt";
|
||||
m_ofp = V3File::new_ofstream(filename);
|
||||
|
||||
+1
-1
@@ -278,7 +278,7 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
ChangedVisitor(AstNetlist* nodep, ChangedState* statep)
|
||||
: m_statep(statep) {
|
||||
: m_statep{statep} {
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~ChangedVisitor() override {}
|
||||
|
||||
+2
-5
@@ -50,7 +50,7 @@ private:
|
||||
enum CleanState { CS_UNKNOWN, CS_CLEAN, CS_DIRTY };
|
||||
|
||||
// STATE
|
||||
AstNodeModule* m_modp;
|
||||
AstNodeModule* m_modp = nullptr;
|
||||
|
||||
// METHODS
|
||||
VL_DEBUG_FUNC; // Declare debug()
|
||||
@@ -300,10 +300,7 @@ private:
|
||||
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit CleanVisitor(AstNetlist* nodep) {
|
||||
m_modp = nullptr;
|
||||
iterate(nodep);
|
||||
}
|
||||
explicit CleanVisitor(AstNetlist* nodep) { iterate(nodep); }
|
||||
virtual ~CleanVisitor() override {}
|
||||
};
|
||||
|
||||
|
||||
+10
-21
@@ -48,16 +48,16 @@ private:
|
||||
AstUser1InUse m_inuser1;
|
||||
|
||||
// STATE
|
||||
AstNodeModule* m_modp; // Current module
|
||||
AstTopScope* m_topScopep; // Current top scope
|
||||
AstScope* m_scopep; // Current scope
|
||||
AstCFunc* m_evalFuncp; // Top eval function we are creating
|
||||
AstCFunc* m_initFuncp; // Top initial function we are creating
|
||||
AstCFunc* m_finalFuncp; // Top final function we are creating
|
||||
AstCFunc* m_settleFuncp; // Top settlement function we are creating
|
||||
AstSenTree* m_lastSenp; // Last sensitivity match, so we can detect duplicates.
|
||||
AstIf* m_lastIfp; // Last sensitivity if active to add more under
|
||||
AstMTaskBody* m_mtaskBodyp; // Current mtask body
|
||||
AstNodeModule* m_modp = nullptr; // Current module
|
||||
AstTopScope* m_topScopep = nullptr; // Current top scope
|
||||
AstScope* m_scopep = nullptr; // Current scope
|
||||
AstCFunc* m_evalFuncp = nullptr; // Top eval function we are creating
|
||||
AstCFunc* m_initFuncp = nullptr; // Top initial function we are creating
|
||||
AstCFunc* m_finalFuncp = nullptr; // Top final function we are creating
|
||||
AstCFunc* m_settleFuncp = nullptr; // Top settlement function we are creating
|
||||
AstSenTree* m_lastSenp = nullptr; // Last sensitivity match, so we can detect duplicates.
|
||||
AstIf* m_lastIfp = nullptr; // Last sensitivity if active to add more under
|
||||
AstMTaskBody* m_mtaskBodyp = nullptr; // Current mtask body
|
||||
|
||||
// METHODS
|
||||
VL_DEBUG_FUNC; // Declare debug()
|
||||
@@ -402,17 +402,6 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit ClockVisitor(AstNetlist* nodep) {
|
||||
m_modp = nullptr;
|
||||
m_evalFuncp = nullptr;
|
||||
m_initFuncp = nullptr;
|
||||
m_finalFuncp = nullptr;
|
||||
m_settleFuncp = nullptr;
|
||||
m_topScopep = nullptr;
|
||||
m_lastSenp = nullptr;
|
||||
m_lastIfp = nullptr;
|
||||
m_scopep = nullptr;
|
||||
m_mtaskBodyp = nullptr;
|
||||
//
|
||||
iterate(nodep);
|
||||
// Allow downstream modules to find _eval()
|
||||
// easily without iterating through the tree.
|
||||
|
||||
+9
-15
@@ -173,13 +173,15 @@ private:
|
||||
// STATE
|
||||
typedef enum { STATE_IDLE, STATE_HASH, STATE_DUP } CombineState;
|
||||
VDouble0 m_statCombs; // Statistic tracking
|
||||
CombineState m_state; // Major state
|
||||
AstNodeModule* m_modp; // Current module
|
||||
AstCFunc* m_funcp; // Current function
|
||||
CombineState m_state = STATE_IDLE; // Major state
|
||||
AstNodeModule* m_modp = nullptr; // Current module
|
||||
AstCFunc* m_funcp = nullptr; // Current function
|
||||
CombCallVisitor m_call; // Tracking of function call users
|
||||
int m_modNFuncs; // Number of functions made
|
||||
AstNode* m_walkLast1p; // Final node that is the same in duplicate list
|
||||
AstNode* m_walkLast2p; // Final node that is the same in duplicate list
|
||||
int m_modNFuncs = 0; // Number of functions made
|
||||
#ifdef VL_COMBINE_STATEMENTS
|
||||
AstNode* m_walkLast1p = nullptr; // Final node that is the same in duplicate list
|
||||
#endif
|
||||
AstNode* m_walkLast2p = nullptr; // Final node that is the same in duplicate list
|
||||
V3Hashed m_hashed; // Hash for every node in module
|
||||
|
||||
// METHODS
|
||||
@@ -457,15 +459,7 @@ private:
|
||||
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit CombineVisitor(AstNetlist* nodep) {
|
||||
m_state = STATE_IDLE;
|
||||
m_modp = nullptr;
|
||||
m_funcp = nullptr;
|
||||
m_modNFuncs = 0;
|
||||
m_walkLast1p = nullptr;
|
||||
m_walkLast2p = nullptr;
|
||||
iterate(nodep);
|
||||
}
|
||||
explicit CombineVisitor(AstNetlist* nodep) { iterate(nodep); }
|
||||
virtual ~CombineVisitor() override { //
|
||||
V3Stats::addStat("Optimizations, Combined CFuncs", m_statCombs);
|
||||
}
|
||||
|
||||
+5
-5
@@ -87,8 +87,8 @@ public:
|
||||
AstAttrType m_type; // Type of attribute
|
||||
AstSenTree* m_sentreep; // Sensitivity tree for public_flat_rw
|
||||
V3ConfigVarAttr(AstAttrType type, AstSenTree* sentreep)
|
||||
: m_type(type)
|
||||
, m_sentreep(sentreep) {}
|
||||
: m_type{type}
|
||||
, m_sentreep{sentreep} {}
|
||||
};
|
||||
|
||||
// Overload vector with the required update function and to apply all entries
|
||||
@@ -234,9 +234,9 @@ public:
|
||||
V3ErrorCode m_code; // Error code
|
||||
bool m_on; // True to enable message
|
||||
V3ConfigIgnoresLine(V3ErrorCode code, int lineno, bool on)
|
||||
: m_lineno(lineno)
|
||||
, m_code(code)
|
||||
, m_on(on) {}
|
||||
: m_lineno{lineno}
|
||||
, m_code{code}
|
||||
, m_on{on} {}
|
||||
~V3ConfigIgnoresLine() {}
|
||||
inline bool operator<(const V3ConfigIgnoresLine& rh) const {
|
||||
if (m_lineno < rh.m_lineno) return true;
|
||||
|
||||
+16
-34
@@ -59,7 +59,7 @@ class ConstVarFindVisitor : public AstNVisitor {
|
||||
// NODE STATE
|
||||
// AstVar::user4p -> bool, input from ConstVarMarkVisitor
|
||||
// MEMBERS
|
||||
bool m_found;
|
||||
bool m_found = false;
|
||||
|
||||
private:
|
||||
// VISITORS
|
||||
@@ -70,10 +70,7 @@ private:
|
||||
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit ConstVarFindVisitor(AstNode* nodep) {
|
||||
m_found = false;
|
||||
iterateAndNextNull(nodep);
|
||||
}
|
||||
explicit ConstVarFindVisitor(AstNode* nodep) { iterateAndNextNull(nodep); }
|
||||
virtual ~ConstVarFindVisitor() override {}
|
||||
// METHODS
|
||||
bool found() const { return m_found; }
|
||||
@@ -92,20 +89,20 @@ private:
|
||||
// AstEnum::user4 -> bool. Recursing.
|
||||
|
||||
// STATE
|
||||
bool m_params; // If true, propagate parameterized and true numbers only
|
||||
bool m_required; // If true, must become a constant
|
||||
bool m_wremove; // Inside scope, no assignw removal
|
||||
bool m_warn; // Output warnings
|
||||
bool m_doExpensive; // Enable computationally expensive optimizations
|
||||
bool m_doNConst; // Enable non-constant-child simplifications
|
||||
bool m_doShort; // Remove expressions that short circuit
|
||||
bool m_doV; // Verilog, not C++ conversion
|
||||
bool m_doGenerate; // Postpone width checking inside generate
|
||||
bool m_hasJumpDelay; // JumpGo or Delay under this while
|
||||
AstNodeModule* m_modp; // Current module
|
||||
AstArraySel* m_selp; // Current select
|
||||
AstNode* m_scopep; // Current scope
|
||||
AstAttrOf* m_attrp; // Current attribute
|
||||
bool m_params = false; // If true, propagate parameterized and true numbers only
|
||||
bool m_required = false; // If true, must become a constant
|
||||
bool m_wremove = true; // Inside scope, no assignw removal
|
||||
bool m_warn = false; // Output warnings
|
||||
bool m_doExpensive = false; // Enable computationally expensive optimizations
|
||||
bool m_doNConst = false; // Enable non-constant-child simplifications
|
||||
bool m_doShort = true; // Remove expressions that short circuit
|
||||
bool m_doV = false; // Verilog, not C++ conversion
|
||||
bool m_doGenerate = false; // Postpone width checking inside generate
|
||||
bool m_hasJumpDelay = false; // JumpGo or Delay under this while
|
||||
AstNodeModule* m_modp = nullptr; // Current module
|
||||
AstArraySel* m_selp = nullptr; // Current select
|
||||
AstNode* m_scopep = nullptr; // Current scope
|
||||
AstAttrOf* m_attrp = nullptr; // Current attribute
|
||||
|
||||
// METHODS
|
||||
VL_DEBUG_FUNC; // Declare debug()
|
||||
@@ -2549,21 +2546,6 @@ public:
|
||||
|
||||
// CONSTRUCTORS
|
||||
explicit ConstVisitor(ProcMode pmode) {
|
||||
m_params = false;
|
||||
m_required = false;
|
||||
m_doExpensive = false;
|
||||
m_doNConst = false;
|
||||
m_doShort = true; // Presently always done
|
||||
m_doV = false;
|
||||
m_doGenerate = false; // Inside generate conditionals
|
||||
m_hasJumpDelay = false;
|
||||
m_warn = false;
|
||||
m_wremove = true; // Overridden in visitors
|
||||
m_modp = nullptr;
|
||||
m_selp = nullptr;
|
||||
m_scopep = nullptr;
|
||||
m_attrp = nullptr;
|
||||
//
|
||||
// clang-format off
|
||||
switch (pmode) {
|
||||
case PROC_PARAMS: m_doV = true; m_doNConst = true; m_params = true;
|
||||
|
||||
+7
-14
@@ -49,9 +49,9 @@ private:
|
||||
AstNode* m_varRefp; // How to get to this element
|
||||
AstNode* m_chgRefp; // How to get to this element
|
||||
ToggleEnt(const string& comment, AstNode* vp, AstNode* cp)
|
||||
: m_comment(comment)
|
||||
, m_varRefp(vp)
|
||||
, m_chgRefp(cp) {}
|
||||
: m_comment{comment}
|
||||
, m_varRefp{vp}
|
||||
, m_chgRefp{cp} {}
|
||||
~ToggleEnt() {}
|
||||
void cleanup() {
|
||||
VL_DO_CLEAR(m_varRefp->deleteTree(), m_varRefp = nullptr);
|
||||
@@ -70,7 +70,7 @@ private:
|
||||
&& v3Global.opt.coverageLine();
|
||||
}
|
||||
};
|
||||
int m_nextHandle;
|
||||
int m_nextHandle = 0;
|
||||
|
||||
// NODE STATE
|
||||
// Entire netlist:
|
||||
@@ -79,8 +79,8 @@ private:
|
||||
|
||||
// STATE
|
||||
CheckState m_state; // State save-restored on each new coverage scope/block
|
||||
AstNodeModule* m_modp; // Current module to add statement to
|
||||
bool m_inToggleOff; // In function/task etc
|
||||
AstNodeModule* m_modp = nullptr; // Current module to add statement to
|
||||
bool m_inToggleOff = false; // In function/task etc
|
||||
VarNameMap m_varnames; // Uniquification of inserted variable names
|
||||
string m_beginHier; // AstBegin hier name for user coverage points
|
||||
HandleLines m_handleLines; // All line numbers for a given m_stateHandle
|
||||
@@ -539,14 +539,7 @@ private:
|
||||
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit CoverageVisitor(AstNetlist* rootp) {
|
||||
// Operate on all modules
|
||||
m_nextHandle = 0;
|
||||
m_modp = nullptr;
|
||||
m_beginHier = "";
|
||||
m_inToggleOff = false;
|
||||
iterateChildren(rootp);
|
||||
}
|
||||
explicit CoverageVisitor(AstNetlist* rootp) { iterateChildren(rootp); }
|
||||
virtual ~CoverageVisitor() override {}
|
||||
};
|
||||
|
||||
|
||||
+7
-16
@@ -89,12 +89,12 @@ private:
|
||||
enum VarUsage { VU_NONE = 0, VU_DLY = 1, VU_NONDLY = 2 };
|
||||
|
||||
// STATE
|
||||
AstActive* m_activep; // Current activate
|
||||
AstCFunc* m_cfuncp; // Current public C Function
|
||||
AstAssignDly* m_nextDlyp; // Next delayed assignment in a list of assignments
|
||||
bool m_inDly; // True in delayed assignments
|
||||
bool m_inLoop; // True in for loops
|
||||
bool m_inInitial; // True in initial blocks
|
||||
AstActive* m_activep = nullptr; // Current activate
|
||||
AstCFunc* m_cfuncp = nullptr; // Current public C Function
|
||||
AstAssignDly* m_nextDlyp = nullptr; // Next delayed assignment in a list of assignments
|
||||
bool m_inDly = false; // True in delayed assignments
|
||||
bool m_inLoop = false; // True in for loops
|
||||
bool m_inInitial = false; // True in initial blocks
|
||||
typedef std::map<std::pair<AstNodeModule*, string>, AstVar*> VarMap;
|
||||
VarMap m_modVarMap; // Table of new var names created under module
|
||||
VDouble0 m_statSharedSet; // Statistic tracking
|
||||
@@ -476,16 +476,7 @@ private:
|
||||
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit DelayedVisitor(AstNetlist* nodep) {
|
||||
m_inDly = false;
|
||||
m_activep = nullptr;
|
||||
m_cfuncp = nullptr;
|
||||
m_nextDlyp = nullptr;
|
||||
m_inLoop = false;
|
||||
m_inInitial = false;
|
||||
|
||||
iterate(nodep);
|
||||
}
|
||||
explicit DelayedVisitor(AstNetlist* nodep) { iterate(nodep); }
|
||||
virtual ~DelayedVisitor() override {
|
||||
V3Stats::addStat("Optimizations, Delayed shared-sets", m_statSharedSet);
|
||||
}
|
||||
|
||||
+6
-14
@@ -39,11 +39,11 @@ private:
|
||||
// NODE STATE
|
||||
|
||||
// STATE
|
||||
AstNodeModule* m_modp; // Current module
|
||||
AstCFunc* m_funcp; // Current block
|
||||
AstNode* m_stmtp; // Current statement
|
||||
int m_depth; // How deep in an expression
|
||||
int m_maxdepth; // Maximum depth in an expression
|
||||
AstNodeModule* m_modp = nullptr; // Current module
|
||||
AstCFunc* m_funcp = nullptr; // Current block
|
||||
AstNode* m_stmtp = nullptr; // Current statement
|
||||
int m_depth = 0; // How deep in an expression
|
||||
int m_maxdepth = 0; // Maximum depth in an expression
|
||||
|
||||
// METHODS
|
||||
VL_DEBUG_FUNC; // Declare debug()
|
||||
@@ -151,15 +151,7 @@ private:
|
||||
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit DepthVisitor(AstNetlist* nodep) {
|
||||
m_modp = nullptr;
|
||||
m_funcp = nullptr;
|
||||
m_stmtp = nullptr;
|
||||
m_depth = 0;
|
||||
m_maxdepth = 0;
|
||||
//
|
||||
iterate(nodep);
|
||||
}
|
||||
explicit DepthVisitor(AstNetlist* nodep) { iterate(nodep); }
|
||||
virtual ~DepthVisitor() override {}
|
||||
};
|
||||
|
||||
|
||||
+5
-12
@@ -37,10 +37,10 @@ private:
|
||||
// NODE STATE
|
||||
|
||||
// STATE
|
||||
AstNodeModule* m_modp; // Current module
|
||||
AstCFunc* m_funcp; // Current function
|
||||
int m_depth; // How deep in an expression
|
||||
int m_deepNum; // How many functions made
|
||||
AstNodeModule* m_modp = nullptr; // Current module
|
||||
AstCFunc* m_funcp = nullptr; // Current function
|
||||
int m_depth = 0; // How deep in an expression
|
||||
int m_deepNum = 0; // How many functions made
|
||||
|
||||
// METHODS
|
||||
VL_DEBUG_FUNC; // Declare debug()
|
||||
@@ -119,14 +119,7 @@ private:
|
||||
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit DepthBlockVisitor(AstNetlist* nodep) {
|
||||
m_modp = nullptr;
|
||||
m_funcp = nullptr;
|
||||
m_depth = 0;
|
||||
m_deepNum = 0;
|
||||
//
|
||||
iterate(nodep);
|
||||
}
|
||||
explicit DepthBlockVisitor(AstNetlist* nodep) { iterate(nodep); }
|
||||
virtual ~DepthBlockVisitor() override {}
|
||||
};
|
||||
|
||||
|
||||
+7
-10
@@ -1253,8 +1253,8 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit EmitVarTspSorter(const MTaskIdSet& mtaskIds)
|
||||
: m_mtaskIds(mtaskIds)
|
||||
, m_serial(++m_serialNext) {}
|
||||
: m_mtaskIds{mtaskIds}
|
||||
, m_serial{++m_serialNext} {}
|
||||
virtual ~EmitVarTspSorter() {}
|
||||
// METHODS
|
||||
virtual bool operator<(const TspStateBase& other) const override {
|
||||
@@ -3330,10 +3330,10 @@ class EmitCTrace : EmitCStmts {
|
||||
AstUser1InUse m_inuser1;
|
||||
|
||||
// MEMBERS
|
||||
AstCFunc* m_funcp; // Function we're in now
|
||||
AstCFunc* m_funcp = nullptr; // Function we're in now
|
||||
bool m_slow; // Making slow file
|
||||
int m_enumNum; // Enumeration number (whole netlist)
|
||||
int m_baseCode; // Code of first AstTraceInc in this function
|
||||
int m_enumNum = 0; // Enumeration number (whole netlist)
|
||||
int m_baseCode = -1; // Code of first AstTraceInc in this function
|
||||
|
||||
// METHODS
|
||||
void newOutCFile(int filenum) {
|
||||
@@ -3760,11 +3760,8 @@ class EmitCTrace : EmitCStmts {
|
||||
virtual void visit(AstCoverInc* nodep) override {}
|
||||
|
||||
public:
|
||||
explicit EmitCTrace(bool slow) {
|
||||
m_funcp = nullptr;
|
||||
m_slow = slow;
|
||||
m_enumNum = 0;
|
||||
}
|
||||
explicit EmitCTrace(bool slow)
|
||||
: m_slow{slow} {}
|
||||
virtual ~EmitCTrace() override {}
|
||||
void main() {
|
||||
// Put out the file
|
||||
|
||||
+2
-5
@@ -116,7 +116,7 @@ public:
|
||||
class EmitCBaseCounterVisitor : public AstNVisitor {
|
||||
private:
|
||||
// MEMBERS
|
||||
int m_count; // Number of statements
|
||||
int m_count = 0; // Number of statements
|
||||
// VISITORS
|
||||
virtual void visit(AstNode* nodep) override {
|
||||
m_count++;
|
||||
@@ -125,10 +125,7 @@ private:
|
||||
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit EmitCBaseCounterVisitor(AstNode* nodep) {
|
||||
m_count = 0;
|
||||
iterate(nodep);
|
||||
}
|
||||
explicit EmitCBaseCounterVisitor(AstNode* nodep) { iterate(nodep); }
|
||||
virtual ~EmitCBaseCounterVisitor() override {}
|
||||
int count() const { return m_count; }
|
||||
};
|
||||
|
||||
+19
-25
@@ -43,19 +43,19 @@ class EmitCSyms : EmitCBaseVisitor {
|
||||
string m_type;
|
||||
ScopeData(const string& symName, const string& prettyName, int timeunit,
|
||||
const string& type)
|
||||
: m_symName(symName)
|
||||
, m_prettyName(prettyName)
|
||||
, m_timeunit(timeunit)
|
||||
, m_type(type) {}
|
||||
: m_symName{symName}
|
||||
, m_prettyName{prettyName}
|
||||
, m_timeunit{timeunit}
|
||||
, m_type{type} {}
|
||||
};
|
||||
struct ScopeFuncData {
|
||||
AstScopeName* m_scopep;
|
||||
AstCFunc* m_funcp;
|
||||
AstNodeModule* m_modp;
|
||||
ScopeFuncData(AstScopeName* scopep, AstCFunc* funcp, AstNodeModule* modp)
|
||||
: m_scopep(scopep)
|
||||
, m_funcp(funcp)
|
||||
, m_modp(modp) {}
|
||||
: m_scopep{scopep}
|
||||
, m_funcp{funcp}
|
||||
, m_modp{modp} {}
|
||||
};
|
||||
struct ScopeVarData {
|
||||
string m_scopeName;
|
||||
@@ -65,11 +65,11 @@ class EmitCSyms : EmitCBaseVisitor {
|
||||
AstScope* m_scopep;
|
||||
ScopeVarData(const string& scopeName, const string& varBasePretty, AstVar* varp,
|
||||
AstNodeModule* modp, AstScope* scopep)
|
||||
: m_scopeName(scopeName)
|
||||
, m_varBasePretty(varBasePretty)
|
||||
, m_varp(varp)
|
||||
, m_modp(modp)
|
||||
, m_scopep(scopep) {}
|
||||
: m_scopeName{scopeName}
|
||||
, m_varBasePretty{varBasePretty}
|
||||
, m_varp{varp}
|
||||
, m_modp{modp}
|
||||
, m_scopep{scopep} {}
|
||||
};
|
||||
typedef std::map<string, ScopeFuncData> ScopeFuncs;
|
||||
typedef std::map<string, ScopeVarData> ScopeVars;
|
||||
@@ -94,8 +94,8 @@ class EmitCSyms : EmitCBaseVisitor {
|
||||
};
|
||||
|
||||
// STATE
|
||||
AstCFunc* m_funcp; // Current function
|
||||
AstNodeModule* m_modp; // Current module
|
||||
AstCFunc* m_funcp = nullptr; // Current function
|
||||
AstNodeModule* m_modp = nullptr; // Current module
|
||||
std::vector<ScopeModPair> m_scopes; // Every scope by module
|
||||
std::vector<AstCFunc*> m_dpis; // DPI functions
|
||||
std::vector<ModVarPair> m_modVars; // Each public {mod,var}
|
||||
@@ -104,11 +104,11 @@ class EmitCSyms : EmitCBaseVisitor {
|
||||
ScopeVars m_scopeVars; // Each {scope,public-var}
|
||||
ScopeNames m_vpiScopeCandidates; // All scopes for VPI
|
||||
ScopeNameHierarchy m_vpiScopeHierarchy; // The actual hierarchy of scopes
|
||||
int m_coverBins; // Coverage bin number
|
||||
int m_coverBins = 0; // Coverage bin number
|
||||
bool m_dpiHdrOnly; // Only emit the DPI header
|
||||
int m_numStmts; // Number of statements output
|
||||
int m_funcNum; // CFunc split function number
|
||||
V3OutCFile* m_ofpBase; // Base (not split) C file
|
||||
int m_numStmts = 0; // Number of statements output
|
||||
int m_funcNum = 0; // CFunc split function number
|
||||
V3OutCFile* m_ofpBase = nullptr; // Base (not split) C file
|
||||
std::map<int, bool> m_usesVfinal; // Split method uses __Vfinal
|
||||
|
||||
// METHODS
|
||||
@@ -354,13 +354,7 @@ class EmitCSyms : EmitCBaseVisitor {
|
||||
|
||||
public:
|
||||
explicit EmitCSyms(AstNetlist* nodep, bool dpiHdrOnly)
|
||||
: m_dpiHdrOnly(dpiHdrOnly) {
|
||||
m_funcp = nullptr;
|
||||
m_modp = nullptr;
|
||||
m_coverBins = 0;
|
||||
m_numStmts = 0;
|
||||
m_funcNum = 0;
|
||||
m_ofpBase = nullptr;
|
||||
: m_dpiHdrOnly{dpiHdrOnly} {
|
||||
iterate(nodep);
|
||||
}
|
||||
};
|
||||
|
||||
+2
-2
@@ -400,8 +400,8 @@ class EmitMkHierVerilation {
|
||||
|
||||
public:
|
||||
explicit EmitMkHierVerilation(const V3HierBlockPlan* planp)
|
||||
: m_planp(planp)
|
||||
, m_makefile(v3Global.opt.makeDir() + "/" + v3Global.opt.prefix() + "_hier.mk") {
|
||||
: m_planp{planp}
|
||||
, m_makefile{v3Global.opt.makeDir() + "/" + v3Global.opt.prefix() + "_hier.mk"} {
|
||||
V3OutMkFile of(m_makefile);
|
||||
emit(of);
|
||||
}
|
||||
|
||||
+12
-16
@@ -30,8 +30,8 @@
|
||||
|
||||
class EmitVBaseVisitor : public EmitCBaseVisitor {
|
||||
// MEMBERS
|
||||
bool m_suppressSemi;
|
||||
AstSenTree* m_sensesp;
|
||||
bool m_suppressSemi = false;
|
||||
AstSenTree* m_sensesp; // Domain for printing one a ALWAYS under a ACTIVE
|
||||
|
||||
// METHODS
|
||||
VL_DEBUG_FUNC; // Declare debug()
|
||||
@@ -658,13 +658,9 @@ class EmitVBaseVisitor : public EmitCBaseVisitor {
|
||||
}
|
||||
|
||||
public:
|
||||
bool m_suppressVarSemi; // Suppress emitting semicolon for AstVars
|
||||
explicit EmitVBaseVisitor(AstSenTree* domainp = nullptr) {
|
||||
// Domain for printing one a ALWAYS under a ACTIVE
|
||||
m_suppressSemi = false;
|
||||
m_suppressVarSemi = false;
|
||||
m_sensesp = domainp;
|
||||
}
|
||||
bool m_suppressVarSemi = false; // Suppress emitting semicolon for AstVars
|
||||
explicit EmitVBaseVisitor(AstSenTree* domainp = nullptr)
|
||||
: m_sensesp{domainp} {}
|
||||
virtual ~EmitVBaseVisitor() override {}
|
||||
};
|
||||
|
||||
@@ -708,7 +704,7 @@ class EmitVStreamVisitor : public EmitVBaseVisitor {
|
||||
|
||||
public:
|
||||
EmitVStreamVisitor(AstNode* nodep, std::ostream& os)
|
||||
: m_os(os) {
|
||||
: m_os{os} {
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~EmitVStreamVisitor() override {}
|
||||
@@ -746,10 +742,10 @@ public:
|
||||
FileLine* prefixFl() const { return m_prefixFl; }
|
||||
int column() const { return m_column; }
|
||||
EmitVPrefixedFormatter(std::ostream& os, const string& prefix, int flWidth)
|
||||
: V3OutFormatter("__STREAM", V3OutFormatter::LA_VERILOG)
|
||||
, m_os(os)
|
||||
, m_prefix(prefix)
|
||||
, m_flWidth(flWidth) {
|
||||
: V3OutFormatter{"__STREAM", V3OutFormatter::LA_VERILOG}
|
||||
, m_os{os}
|
||||
, m_prefix{prefix}
|
||||
, m_flWidth{flWidth} {
|
||||
m_column = 0;
|
||||
m_prefixFl
|
||||
= v3Global.rootp()
|
||||
@@ -784,8 +780,8 @@ class EmitVPrefixedVisitor : public EmitVBaseVisitor {
|
||||
public:
|
||||
EmitVPrefixedVisitor(AstNode* nodep, std::ostream& os, const string& prefix, int flWidth,
|
||||
AstSenTree* domainp, bool user3mark)
|
||||
: EmitVBaseVisitor(domainp)
|
||||
, m_formatter(os, prefix, flWidth) {
|
||||
: EmitVBaseVisitor{domainp}
|
||||
, m_formatter{os, prefix, flWidth} {
|
||||
if (user3mark) { AstUser3InUse::check(); }
|
||||
iterate(nodep);
|
||||
}
|
||||
|
||||
+5
-5
@@ -246,7 +246,7 @@ class EmitXmlFileVisitor : public AstNVisitor {
|
||||
|
||||
public:
|
||||
EmitXmlFileVisitor(AstNode* nodep, V3OutFile* ofp)
|
||||
: m_ofp(ofp) {
|
||||
: m_ofp{ofp} {
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~EmitXmlFileVisitor() override {}
|
||||
@@ -286,9 +286,9 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
ModuleFilesXmlVisitor(AstNetlist* nodep, std::ostream& os)
|
||||
: m_os(os)
|
||||
, m_modulesCovered()
|
||||
, m_nodeModules() {
|
||||
: m_os{os}
|
||||
, m_modulesCovered{}
|
||||
, m_nodeModules{} {
|
||||
// Operate on whole netlist
|
||||
nodep->accept(*this);
|
||||
// Xml output
|
||||
@@ -361,7 +361,7 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
HierCellsXmlVisitor(AstNetlist* nodep, std::ostream& os)
|
||||
: m_os(os) {
|
||||
: m_os{os} {
|
||||
// Operate on whole netlist
|
||||
nodep->accept(*this);
|
||||
}
|
||||
|
||||
+2
-5
@@ -44,7 +44,7 @@ private:
|
||||
AstUser1InUse m_inuser1;
|
||||
|
||||
// STATE
|
||||
AstNode* m_stmtp; // Current statement
|
||||
AstNode* m_stmtp = nullptr; // Current statement
|
||||
|
||||
// METHODS
|
||||
VL_DEBUG_FUNC; // Declare debug()
|
||||
@@ -878,10 +878,7 @@ private:
|
||||
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit ExpandVisitor(AstNetlist* nodep) {
|
||||
m_stmtp = nullptr;
|
||||
iterate(nodep);
|
||||
}
|
||||
explicit ExpandVisitor(AstNetlist* nodep) { iterate(nodep); }
|
||||
virtual ~ExpandVisitor() override {}
|
||||
};
|
||||
|
||||
|
||||
+14
-28
@@ -72,9 +72,9 @@ class V3FileDependImp {
|
||||
struct stat m_stat; // Stat information
|
||||
public:
|
||||
DependFile(const string& filename, bool target)
|
||||
: m_target(target)
|
||||
, m_exists(true)
|
||||
, m_filename(filename) {
|
||||
: m_target{target}
|
||||
, m_exists{true}
|
||||
, m_filename{filename} {
|
||||
m_stat.st_ctime = 0;
|
||||
m_stat.st_mtime = 0;
|
||||
}
|
||||
@@ -338,16 +338,16 @@ class VInFilterImp {
|
||||
typedef VInFilter::StrList StrList;
|
||||
|
||||
FileContentsMap m_contentsMap; // Cache of file contents
|
||||
bool m_readEof; // Received EOF on read
|
||||
bool m_readEof = false; // Received EOF on read
|
||||
#ifdef INFILTER_PIPE
|
||||
pid_t m_pid; // fork() process id
|
||||
pid_t m_pid = 0; // fork() process id
|
||||
#else
|
||||
int m_pid; // fork() process id - always zero as disabled
|
||||
int m_pid = 0; // fork() process id - always zero as disabled
|
||||
#endif
|
||||
bool m_pidExited;
|
||||
int m_pidStatus;
|
||||
int m_writeFd; // File descriptor TO filter
|
||||
int m_readFd; // File descriptor FROM filter
|
||||
bool m_pidExited = false;
|
||||
int m_pidStatus = 0;
|
||||
int m_writeFd = 0; // File descriptor TO filter
|
||||
int m_readFd = 0; // File descriptor FROM filter
|
||||
|
||||
private:
|
||||
// METHODS
|
||||
@@ -601,15 +601,7 @@ protected:
|
||||
return out;
|
||||
}
|
||||
// CONSTRUCTORS
|
||||
explicit VInFilterImp(const string& command) {
|
||||
m_readEof = false;
|
||||
m_pid = 0;
|
||||
m_pidExited = false;
|
||||
m_pidStatus = 0;
|
||||
m_writeFd = 0;
|
||||
m_readFd = 0;
|
||||
start(command);
|
||||
}
|
||||
explicit VInFilterImp(const string& command) { start(command); }
|
||||
~VInFilterImp() { stop(); }
|
||||
};
|
||||
|
||||
@@ -631,14 +623,8 @@ bool VInFilter::readWholefile(const string& filename, VInFilter::StrList& outl)
|
||||
// V3OutFormatter: A class for printing to a file, with automatic indentation of C++ code.
|
||||
|
||||
V3OutFormatter::V3OutFormatter(const string& filename, V3OutFormatter::Language lang)
|
||||
: m_filename(filename)
|
||||
, m_lang(lang)
|
||||
, m_lineno(1)
|
||||
, m_column(0)
|
||||
, m_nobreak(false)
|
||||
, m_prependIndent(true)
|
||||
, m_indentLevel(0)
|
||||
, m_bracketLevel(0) {
|
||||
: m_filename{filename}
|
||||
, m_lang{lang} {
|
||||
m_blockIndent = v3Global.opt.decoration() ? 4 : 1;
|
||||
m_commaWidth = v3Global.opt.decoration() ? 50 : 150;
|
||||
}
|
||||
@@ -941,7 +927,7 @@ void V3OutFormatter::printf(const char* fmt...) {
|
||||
// V3OutFormatter: A class for printing to a file, with automatic indentation of C++ code.
|
||||
|
||||
V3OutFile::V3OutFile(const string& filename, V3OutFormatter::Language lang)
|
||||
: V3OutFormatter(filename, lang) {
|
||||
: V3OutFormatter{filename, lang} {
|
||||
if ((m_fp = V3File::new_fopen_w(filename)) == nullptr) {
|
||||
v3fatal("Cannot write " << filename);
|
||||
}
|
||||
|
||||
+11
-11
@@ -117,13 +117,13 @@ private:
|
||||
Language m_lang; // Indenting Verilog code
|
||||
int m_blockIndent; // Characters per block indent
|
||||
int m_commaWidth; // Width after which to break at ,'s
|
||||
int m_lineno;
|
||||
int m_column;
|
||||
int m_nobreak; // Basic operator or begin paren, don't break next
|
||||
bool m_prependIndent;
|
||||
int m_indentLevel; // Current {} indentation
|
||||
int m_lineno = 1;
|
||||
int m_column = 0;
|
||||
int m_nobreak = false; // Basic operator or begin paren, don't break next
|
||||
bool m_prependIndent = true;
|
||||
int m_indentLevel = 0; // Current {} indentation
|
||||
std::stack<int> m_parenVec; // Stack of columns where last ( was
|
||||
int m_bracketLevel; // Intenting = { block, indicates number of {'s seen.
|
||||
int m_bracketLevel = 0; // Intenting = { block, indicates number of {'s seen.
|
||||
|
||||
int endLevels(const char* strg);
|
||||
void putcNoTracking(char chr);
|
||||
@@ -195,7 +195,7 @@ class V3OutCFile : public V3OutFile {
|
||||
int m_private; // 1 = Most recently emitted private:, 2 = public:
|
||||
public:
|
||||
explicit V3OutCFile(const string& filename)
|
||||
: V3OutFile(filename, V3OutFormatter::LA_C) {
|
||||
: V3OutFile{filename, V3OutFormatter::LA_C} {
|
||||
resetPrivate();
|
||||
}
|
||||
virtual ~V3OutCFile() override {}
|
||||
@@ -221,7 +221,7 @@ public:
|
||||
class V3OutScFile : public V3OutCFile {
|
||||
public:
|
||||
explicit V3OutScFile(const string& filename)
|
||||
: V3OutCFile(filename) {}
|
||||
: V3OutCFile{filename} {}
|
||||
virtual ~V3OutScFile() override {}
|
||||
virtual void putsHeader() override { puts("// Verilated -*- SystemC -*-\n"); }
|
||||
virtual void putsIntTopInclude() override {
|
||||
@@ -234,7 +234,7 @@ public:
|
||||
class V3OutVFile : public V3OutFile {
|
||||
public:
|
||||
explicit V3OutVFile(const string& filename)
|
||||
: V3OutFile(filename, V3OutFormatter::LA_VERILOG) {}
|
||||
: V3OutFile{filename, V3OutFormatter::LA_VERILOG} {}
|
||||
virtual ~V3OutVFile() override {}
|
||||
virtual void putsHeader() { puts("// Verilated -*- Verilog -*-\n"); }
|
||||
};
|
||||
@@ -242,7 +242,7 @@ public:
|
||||
class V3OutXmlFile : public V3OutFile {
|
||||
public:
|
||||
explicit V3OutXmlFile(const string& filename)
|
||||
: V3OutFile(filename, V3OutFormatter::LA_XML) {
|
||||
: V3OutFile{filename, V3OutFormatter::LA_XML} {
|
||||
blockIndent(2);
|
||||
}
|
||||
virtual ~V3OutXmlFile() override {}
|
||||
@@ -252,7 +252,7 @@ public:
|
||||
class V3OutMkFile : public V3OutFile {
|
||||
public:
|
||||
explicit V3OutMkFile(const string& filename)
|
||||
: V3OutFile(filename, V3OutFormatter::LA_MK) {}
|
||||
: V3OutFile{filename, V3OutFormatter::LA_MK} {}
|
||||
virtual ~V3OutMkFile() override {}
|
||||
virtual void putsHeader() { puts("# Verilated -*- Makefile -*-\n"); }
|
||||
// No automatic indentation yet.
|
||||
|
||||
+9
-9
@@ -142,16 +142,16 @@ std::ostream& operator<<(std::ostream& os, VFileContent* contentp) {
|
||||
//######################################################################
|
||||
// FileLine class functions
|
||||
|
||||
FileLine::FileLine(FileLine::EmptySecret) {
|
||||
// Sort of a singleton
|
||||
m_firstLineno = 0;
|
||||
m_lastLineno = 0;
|
||||
m_firstColumn = 0;
|
||||
m_lastColumn = 0;
|
||||
// Sort of a singleton
|
||||
FileLine::FileLine(FileLine::EmptySecret)
|
||||
: m_firstLineno{0}
|
||||
, m_firstColumn{0}
|
||||
, m_lastLineno{0}
|
||||
, m_lastColumn{0}
|
||||
, m_contentLineno{0}
|
||||
, m_contentp{nullptr}
|
||||
, m_parent{nullptr} {
|
||||
m_filenameno = singleton().nameToNumber(FileLine::builtInFilename());
|
||||
m_contentp = nullptr;
|
||||
m_contentLineno = 0;
|
||||
m_parent = nullptr;
|
||||
|
||||
m_warnOn = 0;
|
||||
for (int codei = V3ErrorCode::EC_MIN; codei < V3ErrorCode::_ENUM_MAX; codei++) {
|
||||
|
||||
+20
-20
@@ -126,27 +126,27 @@ private:
|
||||
|
||||
public:
|
||||
explicit FileLine(const string& filename)
|
||||
: m_firstLineno(0)
|
||||
, m_firstColumn(0)
|
||||
, m_lastLineno(0)
|
||||
, m_lastColumn(0)
|
||||
, m_filenameno(singleton().nameToNumber(filename))
|
||||
, m_contentLineno(0)
|
||||
, m_contentp(nullptr)
|
||||
, m_parent(nullptr)
|
||||
, m_warnOn(defaultFileLine().m_warnOn)
|
||||
, m_waive(false) {}
|
||||
: m_firstLineno{0}
|
||||
, m_firstColumn{0}
|
||||
, m_lastLineno{0}
|
||||
, m_lastColumn{0}
|
||||
, m_filenameno{singleton().nameToNumber(filename)}
|
||||
, m_contentLineno{0}
|
||||
, m_contentp{nullptr}
|
||||
, m_parent{nullptr}
|
||||
, m_warnOn{defaultFileLine().m_warnOn}
|
||||
, m_waive{false} {}
|
||||
explicit FileLine(FileLine* fromp)
|
||||
: m_firstLineno(fromp->m_firstLineno)
|
||||
, m_firstColumn(fromp->m_firstColumn)
|
||||
, m_lastLineno(fromp->m_lastLineno)
|
||||
, m_lastColumn(fromp->m_lastColumn)
|
||||
, m_filenameno(fromp->m_filenameno)
|
||||
, m_contentLineno(fromp->m_contentLineno)
|
||||
, m_contentp(fromp->m_contentp)
|
||||
, m_parent(fromp->m_parent)
|
||||
, m_warnOn(fromp->m_warnOn)
|
||||
, m_waive(fromp->m_waive) {}
|
||||
: m_firstLineno{fromp->m_firstLineno}
|
||||
, m_firstColumn{fromp->m_firstColumn}
|
||||
, m_lastLineno{fromp->m_lastLineno}
|
||||
, m_lastColumn{fromp->m_lastColumn}
|
||||
, m_filenameno{fromp->m_filenameno}
|
||||
, m_contentLineno{fromp->m_contentLineno}
|
||||
, m_contentp{fromp->m_contentp}
|
||||
, m_parent{fromp->m_parent}
|
||||
, m_warnOn{fromp->m_warnOn}
|
||||
, m_waive{fromp->m_waive} {}
|
||||
struct EmptySecret {}; // Constructor selection
|
||||
explicit FileLine(EmptySecret);
|
||||
FileLine* copyOrSameFileLine();
|
||||
|
||||
+30
-47
@@ -56,7 +56,7 @@ class GateGraphBaseVisitor {
|
||||
public:
|
||||
V3Graph* m_graphp; // Graph this class is visiting
|
||||
explicit GateGraphBaseVisitor(V3Graph* graphp)
|
||||
: m_graphp(graphp) {}
|
||||
: m_graphp{graphp} {}
|
||||
virtual ~GateGraphBaseVisitor() {}
|
||||
virtual VNUser visit(GateLogicVertex* vertexp, VNUser vu = VNUser(0)) = 0;
|
||||
virtual VNUser visit(GateVarVertex* vertexp, VNUser vu = VNUser(0)) = 0;
|
||||
@@ -73,8 +73,8 @@ class GateEitherVertex : public V3GraphVertex {
|
||||
bool m_consumed = false; // Output goes to something meaningful
|
||||
public:
|
||||
GateEitherVertex(V3Graph* graphp, AstScope* scopep)
|
||||
: V3GraphVertex(graphp)
|
||||
, m_scopep(scopep) {}
|
||||
: V3GraphVertex{graphp}
|
||||
, m_scopep{scopep} {}
|
||||
virtual ~GateEitherVertex() override {}
|
||||
// ACCESSORS
|
||||
virtual string dotStyle() const override { return m_consumed ? "" : "dotted"; }
|
||||
@@ -131,8 +131,8 @@ class GateVarVertex : public GateEitherVertex {
|
||||
AstNode* m_rstAsyncNodep = nullptr; // Used as reset and in SenItem, in clocked always
|
||||
public:
|
||||
GateVarVertex(V3Graph* graphp, AstScope* scopep, AstVarScope* varScp)
|
||||
: GateEitherVertex(graphp, scopep)
|
||||
, m_varScp(varScp) {}
|
||||
: GateEitherVertex{graphp, scopep}
|
||||
, m_varScp{varScp} {}
|
||||
virtual ~GateVarVertex() override {}
|
||||
// ACCESSORS
|
||||
AstVarScope* varScp() const { return m_varScp; }
|
||||
@@ -170,10 +170,10 @@ class GateLogicVertex : public GateEitherVertex {
|
||||
public:
|
||||
GateLogicVertex(V3Graph* graphp, AstScope* scopep, AstNode* nodep, AstActive* activep,
|
||||
bool slow)
|
||||
: GateEitherVertex(graphp, scopep)
|
||||
, m_nodep(nodep)
|
||||
, m_activep(activep)
|
||||
, m_slow(slow) {}
|
||||
: GateEitherVertex{graphp, scopep}
|
||||
, m_nodep{nodep}
|
||||
, m_activep{activep}
|
||||
, m_slow{slow} {}
|
||||
virtual ~GateLogicVertex() override {}
|
||||
// ACCESSORS
|
||||
virtual string name() const override {
|
||||
@@ -313,13 +313,13 @@ private:
|
||||
|
||||
// STATE
|
||||
V3Graph m_graph; // Scoreboard of var usages/dependencies
|
||||
GateLogicVertex* m_logicVertexp; // Current statement being tracked, nullptr=ignored
|
||||
AstScope* m_scopep; // Current scope being processed
|
||||
AstNodeModule* m_modp; // Current module
|
||||
AstActive* m_activep; // Current active
|
||||
bool m_activeReducible; // Is activation block reducible?
|
||||
bool m_inSenItem; // Underneath AstSenItem; any varrefs are clocks
|
||||
bool m_inSlow; // Inside a slow structure
|
||||
GateLogicVertex* m_logicVertexp = nullptr; // Current statement being tracked, nullptr=ignored
|
||||
AstScope* m_scopep = nullptr; // Current scope being processed
|
||||
AstNodeModule* m_modp = nullptr; // Current module
|
||||
AstActive* m_activep = nullptr; // Current active
|
||||
bool m_activeReducible = true; // Is activation block reducible?
|
||||
bool m_inSenItem = false; // Underneath AstSenItem; any varrefs are clocks
|
||||
bool m_inSlow = false; // Inside a slow structure
|
||||
VDouble0 m_statSigs; // Statistic tracking
|
||||
VDouble0 m_statRefs; // Statistic tracking
|
||||
VDouble0 m_statDedupLogic; // Statistic tracking
|
||||
@@ -524,13 +524,6 @@ public:
|
||||
// CONSTRUCTORS
|
||||
explicit GateVisitor(AstNode* nodep) {
|
||||
AstNode::user1ClearTree();
|
||||
m_logicVertexp = nullptr;
|
||||
m_scopep = nullptr;
|
||||
m_modp = nullptr;
|
||||
m_activep = nullptr;
|
||||
m_activeReducible = true;
|
||||
m_inSenItem = false;
|
||||
m_inSlow = false;
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~GateVisitor() override {
|
||||
@@ -1219,7 +1212,7 @@ private:
|
||||
|
||||
public:
|
||||
explicit GateDedupeGraphVisitor(V3Graph* graphp)
|
||||
: GateGraphBaseVisitor(graphp) {}
|
||||
: GateGraphBaseVisitor{graphp} {}
|
||||
void dedupeTree(GateVarVertex* vvertexp) { vvertexp->accept(*this); }
|
||||
VDouble0 numDeduped() { return m_numDeduped; }
|
||||
};
|
||||
@@ -1254,9 +1247,9 @@ void GateVisitor::dedupe() {
|
||||
class GateMergeAssignsGraphVisitor : public GateGraphBaseVisitor {
|
||||
private:
|
||||
// NODE STATE
|
||||
AstNodeAssign* m_assignp;
|
||||
AstActive* m_activep;
|
||||
GateLogicVertex* m_logicvp;
|
||||
AstNodeAssign* m_assignp = nullptr;
|
||||
AstActive* m_activep = nullptr;
|
||||
GateLogicVertex* m_logicvp = nullptr;
|
||||
VDouble0 m_numMergedAssigns; // Statistic tracking
|
||||
|
||||
// assemble two Sel into one if possible
|
||||
@@ -1358,12 +1351,8 @@ private:
|
||||
|
||||
public:
|
||||
explicit GateMergeAssignsGraphVisitor(V3Graph* graphp)
|
||||
: GateGraphBaseVisitor(graphp) {
|
||||
m_assignp = nullptr;
|
||||
m_activep = nullptr;
|
||||
m_logicvp = nullptr;
|
||||
m_numMergedAssigns = 0;
|
||||
m_graphp = graphp;
|
||||
: GateGraphBaseVisitor{graphp} {
|
||||
m_graphp = graphp; // In base
|
||||
}
|
||||
void mergeAssignsTree(GateVarVertex* vvertexp) { vvertexp->accept(*this); }
|
||||
VDouble0 numMergedAssigns() { return m_numMergedAssigns; }
|
||||
@@ -1441,8 +1430,8 @@ public:
|
||||
int m_offset;
|
||||
AstVarScope* m_last_vsp;
|
||||
GateClkDecompState(int offset, AstVarScope* vsp)
|
||||
: m_offset(offset)
|
||||
, m_last_vsp(vsp) {}
|
||||
: m_offset{offset}
|
||||
, m_last_vsp{vsp} {}
|
||||
virtual ~GateClkDecompState() {}
|
||||
};
|
||||
|
||||
@@ -1450,12 +1439,12 @@ class GateClkDecompGraphVisitor : public GateGraphBaseVisitor {
|
||||
private:
|
||||
// NODE STATE
|
||||
// AstVarScope::user2p -> bool: already visited
|
||||
int m_seen_clk_vectors;
|
||||
AstVarScope* m_clk_vsp;
|
||||
GateVarVertex* m_clk_vvertexp;
|
||||
int m_seen_clk_vectors = 0;
|
||||
AstVarScope* m_clk_vsp = nullptr;
|
||||
GateVarVertex* m_clk_vvertexp = nullptr;
|
||||
GateConcatVisitor m_concat_visitor;
|
||||
int m_total_seen_clk_vectors;
|
||||
int m_total_decomposed_clk_vectors;
|
||||
int m_total_seen_clk_vectors = 0;
|
||||
int m_total_decomposed_clk_vectors = 0;
|
||||
|
||||
virtual VNUser visit(GateVarVertex* vvertexp, VNUser vu) override {
|
||||
// Check that we haven't been here before
|
||||
@@ -1540,13 +1529,7 @@ private:
|
||||
|
||||
public:
|
||||
explicit GateClkDecompGraphVisitor(V3Graph* graphp)
|
||||
: GateGraphBaseVisitor(graphp) {
|
||||
m_seen_clk_vectors = 0;
|
||||
m_clk_vsp = nullptr;
|
||||
m_clk_vvertexp = nullptr;
|
||||
m_total_seen_clk_vectors = 0;
|
||||
m_total_decomposed_clk_vectors = 0;
|
||||
}
|
||||
: GateGraphBaseVisitor{graphp} {}
|
||||
virtual ~GateClkDecompGraphVisitor() override {
|
||||
V3Stats::addStat("Optimizations, Clocker seen vectors", m_total_seen_clk_vectors);
|
||||
V3Stats::addStat("Optimizations, Clocker decomposed vectors",
|
||||
|
||||
+1
-1
@@ -119,7 +119,7 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
GenClkRenameVisitor(AstTopScope* nodep, AstNodeModule* topModp)
|
||||
: m_topModp(topModp) {
|
||||
: m_topModp{topModp} {
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~GenClkRenameVisitor() override {}
|
||||
|
||||
+3
-3
@@ -92,9 +92,9 @@ public:
|
||||
|
||||
// CONSTRUCTORS
|
||||
V3Global()
|
||||
: m_rootp(nullptr) // created by makeInitNetlist() so static constructors run first
|
||||
, m_hierPlanp(nullptr) // Set via hierPlanp(V3HierBlockPlan*) when use hier_block
|
||||
, m_widthMinUsage(VWidthMinUsage::LINT_WIDTH) {}
|
||||
: m_rootp{nullptr} // created by makeInitNetlist(} so static constructors run first
|
||||
, m_hierPlanp{nullptr} // Set via hierPlanp(V3HierBlockPlan*} when use hier_block
|
||||
, m_widthMinUsage{VWidthMinUsage::LINT_WIDTH} {}
|
||||
AstNetlist* makeNetlist();
|
||||
void boot() {
|
||||
UASSERT(!m_rootp, "call once");
|
||||
|
||||
+6
-6
@@ -33,17 +33,17 @@ int V3Graph::debug() { return std::max(V3Error::debugDefault(), s_debug); }
|
||||
// Vertices
|
||||
|
||||
V3GraphVertex::V3GraphVertex(V3Graph* graphp, const V3GraphVertex& old)
|
||||
: m_fanout(old.m_fanout)
|
||||
, m_color(old.m_color)
|
||||
, m_rank(old.m_rank) {
|
||||
: m_fanout{old.m_fanout}
|
||||
, m_color{old.m_color}
|
||||
, m_rank{old.m_rank} {
|
||||
m_userp = nullptr;
|
||||
verticesPushBack(graphp);
|
||||
}
|
||||
|
||||
V3GraphVertex::V3GraphVertex(V3Graph* graphp)
|
||||
: m_fanout(0)
|
||||
, m_color(0)
|
||||
, m_rank(0) {
|
||||
: m_fanout{0}
|
||||
, m_color{0}
|
||||
, m_rank{0} {
|
||||
m_userp = nullptr;
|
||||
verticesPushBack(graphp);
|
||||
}
|
||||
|
||||
+5
-5
@@ -40,8 +40,8 @@ protected:
|
||||
bool m_deleted = false; // True if deleted
|
||||
public:
|
||||
GraphAcycVertex(V3Graph* graphp, V3GraphVertex* origVertexp)
|
||||
: V3GraphVertex(graphp)
|
||||
, m_origVertexp(origVertexp) {}
|
||||
: V3GraphVertex{graphp}
|
||||
, m_origVertexp{origVertexp} {}
|
||||
virtual ~GraphAcycVertex() override {}
|
||||
V3GraphVertex* origVertexp() const { return m_origVertexp; }
|
||||
void setDelete() { m_deleted = true; }
|
||||
@@ -66,7 +66,7 @@ private:
|
||||
public:
|
||||
GraphAcycEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top, int weight,
|
||||
bool cutable = false)
|
||||
: V3GraphEdge(graphp, fromp, top, weight, cutable) {}
|
||||
: V3GraphEdge{graphp, fromp, top, weight, cutable} {}
|
||||
virtual ~GraphAcycEdge() override {}
|
||||
// yellow=we might still cut it, else oldEdge: yellowGreen=made uncutable, red=uncutable
|
||||
virtual string dotColor() const override {
|
||||
@@ -186,8 +186,8 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
GraphAcyc(V3Graph* origGraphp, V3EdgeFuncP edgeFuncp)
|
||||
: m_origGraphp(origGraphp)
|
||||
, m_origEdgeFuncp(edgeFuncp) {}
|
||||
: m_origGraphp{origGraphp}
|
||||
, m_origEdgeFuncp{edgeFuncp} {}
|
||||
~GraphAcyc() {
|
||||
for (std::vector<OrigEdgeList*>::iterator it = m_origEdgeDelp.begin();
|
||||
it != m_origEdgeDelp.end(); ++it) {
|
||||
|
||||
+7
-7
@@ -119,8 +119,8 @@ private:
|
||||
|
||||
public:
|
||||
GraphRemoveRedundant(V3Graph* graphp, V3EdgeFuncP edgeFuncp, bool sumWeights)
|
||||
: GraphAlg<>(graphp, edgeFuncp)
|
||||
, m_sumWeights(sumWeights) {
|
||||
: GraphAlg<>{graphp, edgeFuncp}
|
||||
, m_sumWeights{sumWeights} {
|
||||
main();
|
||||
}
|
||||
~GraphRemoveRedundant() {}
|
||||
@@ -284,7 +284,7 @@ private:
|
||||
|
||||
public:
|
||||
GraphAlgStrongly(V3Graph* graphp, V3EdgeFuncP edgeFuncp)
|
||||
: GraphAlg<>(graphp, edgeFuncp) {
|
||||
: GraphAlg<>{graphp, edgeFuncp} {
|
||||
m_currentDfs = 0;
|
||||
main();
|
||||
}
|
||||
@@ -336,7 +336,7 @@ private:
|
||||
|
||||
public:
|
||||
GraphAlgRank(V3Graph* graphp, V3EdgeFuncP edgeFuncp)
|
||||
: GraphAlg<>(graphp, edgeFuncp) {
|
||||
: GraphAlg<>{graphp, edgeFuncp} {
|
||||
main();
|
||||
}
|
||||
~GraphAlgRank() {}
|
||||
@@ -389,7 +389,7 @@ private:
|
||||
|
||||
public:
|
||||
GraphAlgRLoops(V3Graph* graphp, V3EdgeFuncP edgeFuncp, V3GraphVertex* vertexp)
|
||||
: GraphAlg<>(graphp, edgeFuncp) {
|
||||
: GraphAlg<>{graphp, edgeFuncp} {
|
||||
m_done = false;
|
||||
main(vertexp);
|
||||
}
|
||||
@@ -433,8 +433,8 @@ private:
|
||||
public:
|
||||
GraphAlgSubtrees(V3Graph* graphp, V3Graph* loopGraphp, V3EdgeFuncP edgeFuncp,
|
||||
V3GraphVertex* vertexp)
|
||||
: GraphAlg<>(graphp, edgeFuncp)
|
||||
, m_loopGraphp(loopGraphp) {
|
||||
: GraphAlg<>{graphp, edgeFuncp}
|
||||
, m_loopGraphp{loopGraphp} {
|
||||
// Vertex::m_userp - New vertex if we have seen this vertex already
|
||||
// Edge::m_userp - New edge if we have seen this edge already
|
||||
m_graphp->userClearVertices();
|
||||
|
||||
+2
-2
@@ -34,8 +34,8 @@ protected:
|
||||
V3EdgeFuncP m_edgeFuncp; // Function that says we follow this edge
|
||||
// CONSTRUCTORS
|
||||
GraphAlg(T_Graph* graphp, V3EdgeFuncP edgeFuncp)
|
||||
: m_graphp(graphp)
|
||||
, m_edgeFuncp(edgeFuncp) {}
|
||||
: m_graphp{graphp}
|
||||
, m_edgeFuncp{edgeFuncp} {}
|
||||
~GraphAlg() {}
|
||||
// METHODS
|
||||
inline bool followEdge(V3GraphEdge* edgep) {
|
||||
|
||||
+3
-3
@@ -371,7 +371,7 @@ private:
|
||||
|
||||
public:
|
||||
GraphNfaToDfa(V3Graph* graphp, V3EdgeFuncP edgeFuncp)
|
||||
: GraphAlg<>(graphp, edgeFuncp) {
|
||||
: GraphAlg<>{graphp, edgeFuncp} {
|
||||
m_step = 0;
|
||||
main();
|
||||
}
|
||||
@@ -500,7 +500,7 @@ private:
|
||||
|
||||
public:
|
||||
DfaGraphReduce(V3Graph* graphp, V3EdgeFuncP edgeFuncp)
|
||||
: GraphAlg<>(graphp, edgeFuncp) {
|
||||
: GraphAlg<>{graphp, edgeFuncp} {
|
||||
if (debug() >= 6) m_graphp->dumpDotFilePrefixed("opt_in");
|
||||
optimize_accepting_out();
|
||||
if (debug() >= 6) m_graphp->dumpDotFilePrefixed("opt_acc");
|
||||
@@ -592,7 +592,7 @@ private:
|
||||
|
||||
public:
|
||||
DfaGraphComplement(V3Graph* dfagraphp, V3EdgeFuncP edgeFuncp)
|
||||
: GraphAlg<>(dfagraphp, edgeFuncp) {
|
||||
: GraphAlg<>{dfagraphp, edgeFuncp} {
|
||||
if (debug() >= 6) m_graphp->dumpDotFilePrefixed("comp_in");
|
||||
|
||||
// Vertex::m_user begin: 1 indicates new edge, no more processing
|
||||
|
||||
+7
-7
@@ -86,9 +86,9 @@ class DfaVertex : public V3GraphVertex {
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit DfaVertex(DfaGraph* graphp, bool start = false, bool accepting = false)
|
||||
: V3GraphVertex(graphp)
|
||||
, m_start(start)
|
||||
, m_accepting(accepting) {}
|
||||
: V3GraphVertex{graphp}
|
||||
, m_start{start}
|
||||
, m_accepting{accepting} {}
|
||||
using V3GraphVertex::clone; // We are overriding, not overloading clone(V3Graph*)
|
||||
virtual DfaVertex* clone(DfaGraph* graphp) {
|
||||
return new DfaVertex(graphp, start(), accepting());
|
||||
@@ -121,13 +121,13 @@ public:
|
||||
static DfaInput NA() { return VNUser::fromInt(1); } // as in not-applicable
|
||||
// CONSTRUCTORS
|
||||
DfaEdge(DfaGraph* graphp, DfaVertex* fromp, DfaVertex* top, const DfaInput& input)
|
||||
: V3GraphEdge(graphp, fromp, top, 1)
|
||||
: V3GraphEdge{graphp, fromp, top, 1}
|
||||
, m_input(input)
|
||||
, m_complement(false) {}
|
||||
DfaEdge(DfaGraph* graphp, DfaVertex* fromp, DfaVertex* top, const DfaEdge* copyfrom)
|
||||
: V3GraphEdge(graphp, fromp, top, copyfrom->weight())
|
||||
, m_input(copyfrom->input())
|
||||
, m_complement(copyfrom->complement()) {}
|
||||
: V3GraphEdge{graphp, fromp, top, copyfrom->weight()}
|
||||
, m_input{copyfrom->input()}
|
||||
, m_complement{copyfrom->complement()} {}
|
||||
virtual ~DfaEdge() override {}
|
||||
// METHODS
|
||||
virtual string dotColor() const override {
|
||||
|
||||
@@ -51,8 +51,8 @@ struct GraphPCNode {
|
||||
// GraphPathChecker implementation
|
||||
|
||||
GraphPathChecker::GraphPathChecker(const V3Graph* graphp, V3EdgeFuncP edgeFuncp)
|
||||
: GraphAlg<const V3Graph>(graphp, edgeFuncp)
|
||||
, m_generation(0) {
|
||||
: GraphAlg<const V3Graph>{graphp, edgeFuncp}
|
||||
, m_generation{0} {
|
||||
for (V3GraphVertex* vxp = graphp->verticesBeginp(); vxp; vxp = vxp->verticesNextp()) {
|
||||
// Setup tracking structure for each node. If delete a vertex
|
||||
// there would be a leak, but ok as accept only const V3Graph*'s.
|
||||
|
||||
+8
-8
@@ -48,9 +48,9 @@ private:
|
||||
uint32_t m_numBlockingEdges; // Number of blocking edges
|
||||
// CONSTRUCTORS
|
||||
VxHolder(const V3GraphVertex* vxp, uint32_t pos, uint32_t numBlockingEdges)
|
||||
: m_vxp(vxp)
|
||||
, m_pos(pos)
|
||||
, m_numBlockingEdges(numBlockingEdges) {}
|
||||
: m_vxp{vxp}
|
||||
, m_pos{pos}
|
||||
, m_numBlockingEdges{numBlockingEdges} {}
|
||||
// METHODS
|
||||
const V3GraphVertex* vertexp() const { return m_vxp; }
|
||||
// Decrement blocking edges count, return true if the vertex is
|
||||
@@ -68,7 +68,7 @@ private:
|
||||
T_Compare m_lessThan; // Sorting functor
|
||||
// CONSTRUCTORS
|
||||
explicit VxHolderCmp(const T_Compare& lessThan)
|
||||
: m_lessThan(lessThan) {}
|
||||
: m_lessThan{lessThan} {}
|
||||
// METHODS
|
||||
bool operator()(const VxHolder& a, const VxHolder& b) const {
|
||||
if (m_lessThan.operator()(a.vertexp(), b.vertexp())) return true;
|
||||
@@ -97,10 +97,10 @@ public:
|
||||
// NOTE: Perhaps REVERSE way should also reverse the sense of the
|
||||
// lessThan function? For now the only usage of REVERSE is not
|
||||
// sensitive to its lessThan at all, so it doesn't matter.
|
||||
: m_vxHolderCmp(lessThan)
|
||||
, m_readyVertices(m_vxHolderCmp)
|
||||
, m_last(m_readyVertices.end())
|
||||
, m_way(way) {
|
||||
: m_vxHolderCmp{lessThan}
|
||||
, m_readyVertices{m_vxHolderCmp}
|
||||
, m_last{m_readyVertices.end()}
|
||||
, m_way{way} {
|
||||
uint32_t pos = 0;
|
||||
for (const V3GraphVertex* vxp = graphp->verticesBeginp(); vxp;
|
||||
vxp = vxp->verticesNextp()) {
|
||||
|
||||
+5
-5
@@ -55,8 +55,8 @@ class V3GraphTestVertex : public V3GraphVertex {
|
||||
|
||||
public:
|
||||
V3GraphTestVertex(V3Graph* graphp, const string& name)
|
||||
: V3GraphVertex(graphp)
|
||||
, m_name(name) {}
|
||||
: V3GraphVertex{graphp}
|
||||
, m_name{name} {}
|
||||
virtual ~V3GraphTestVertex() override {}
|
||||
// ACCESSORS
|
||||
virtual string name() const override { return m_name; }
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
class V3GraphTestVarVertex : public V3GraphTestVertex {
|
||||
public:
|
||||
V3GraphTestVarVertex(V3Graph* graphp, const string& name)
|
||||
: V3GraphTestVertex(graphp, name) {}
|
||||
: V3GraphTestVertex{graphp, name} {}
|
||||
virtual ~V3GraphTestVarVertex() override {}
|
||||
// ACCESSORS
|
||||
virtual string dotColor() const override { return "blue"; }
|
||||
@@ -265,8 +265,8 @@ class DfaTestVertex : public DfaVertex {
|
||||
|
||||
public:
|
||||
DfaTestVertex(DfaGraph* graphp, const string& name)
|
||||
: DfaVertex(graphp)
|
||||
, m_name(name) {}
|
||||
: DfaVertex{graphp}
|
||||
, m_name{name} {}
|
||||
virtual ~DfaTestVertex() override {}
|
||||
// ACCESSORS
|
||||
virtual string name() const override { return m_name; }
|
||||
|
||||
+2
-2
@@ -94,12 +94,12 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit HashedVisitor(AstNode* nodep)
|
||||
: m_cacheInUser4(true) {
|
||||
: m_cacheInUser4{true} {
|
||||
nodeHashIterate(nodep);
|
||||
// UINFO(9," stmthash "<<hex<<V3Hashed::nodeHash(nodep)<<" "<<nodep<<endl);
|
||||
}
|
||||
explicit HashedVisitor(const AstNode* nodep)
|
||||
: m_cacheInUser4(false) {
|
||||
: m_cacheInUser4{false} {
|
||||
nodeHashIterate(const_cast<AstNode*>(nodep));
|
||||
}
|
||||
V3Hash finalHash() const { return m_lowerHash; }
|
||||
|
||||
+1
-1
@@ -293,7 +293,7 @@ class HierBlockUsageCollectVisitor : public AstNVisitor {
|
||||
|
||||
public:
|
||||
HierBlockUsageCollectVisitor(V3HierBlockPlan* planp, AstNetlist* netlist)
|
||||
: m_planp(planp) {
|
||||
: m_planp{planp} {
|
||||
iterateChildren(netlist);
|
||||
}
|
||||
VL_DEBUG_FUNC; // Declare debug()
|
||||
|
||||
+2
-2
@@ -63,8 +63,8 @@ private:
|
||||
|
||||
public:
|
||||
V3HierBlock(const AstNodeModule* modp, const GParams& gparams)
|
||||
: m_modp(modp)
|
||||
, m_gparams(gparams) {}
|
||||
: m_modp{modp}
|
||||
, m_gparams{gparams} {}
|
||||
~V3HierBlock();
|
||||
VL_DEBUG_FUNC; // Declare debug()
|
||||
|
||||
|
||||
+6
-12
@@ -66,7 +66,7 @@ private:
|
||||
}; // Pragma suggests inlining
|
||||
|
||||
// STATE
|
||||
AstNodeModule* m_modp; // Current module
|
||||
AstNodeModule* m_modp = nullptr; // Current module
|
||||
VDouble0 m_statUnsup; // Statistic tracking
|
||||
|
||||
typedef std::vector<AstNodeModule*> ModVec;
|
||||
@@ -219,10 +219,7 @@ private:
|
||||
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit InlineMarkVisitor(AstNode* nodep) {
|
||||
m_modp = nullptr;
|
||||
iterate(nodep);
|
||||
}
|
||||
explicit InlineMarkVisitor(AstNode* nodep) { iterate(nodep); }
|
||||
virtual ~InlineMarkVisitor() override {
|
||||
V3Stats::addStat("Optimizations, Inline unsupported", m_statUnsup);
|
||||
// Done with these, are not outputs
|
||||
@@ -471,8 +468,8 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
InlineRelinkVisitor(AstNodeModule* cloneModp, AstNodeModule* oldModp, AstCell* cellp)
|
||||
: m_modp(oldModp)
|
||||
, m_cellp(cellp) {
|
||||
: m_modp{oldModp}
|
||||
, m_cellp{cellp} {
|
||||
iterate(cloneModp);
|
||||
}
|
||||
virtual ~InlineRelinkVisitor() override {}
|
||||
@@ -501,7 +498,7 @@ private:
|
||||
AstUser5InUse m_inuser5;
|
||||
|
||||
// STATE
|
||||
AstNodeModule* m_modp; // Current module
|
||||
AstNodeModule* m_modp = nullptr; // Current module
|
||||
VDouble0 m_statCells; // Statistic tracking
|
||||
|
||||
// METHODS
|
||||
@@ -614,10 +611,7 @@ private:
|
||||
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit InlineVisitor(AstNode* nodep) {
|
||||
m_modp = nullptr;
|
||||
iterate(nodep);
|
||||
}
|
||||
explicit InlineVisitor(AstNode* nodep) { iterate(nodep); }
|
||||
virtual ~InlineVisitor() override { //
|
||||
V3Stats::addStat("Optimizations, Inlined cells", m_statCells);
|
||||
}
|
||||
|
||||
+6
-14
@@ -42,7 +42,7 @@ private:
|
||||
AstUser1InUse m_inuser1;
|
||||
|
||||
// STATE
|
||||
AstCell* m_cellp; // Current cell
|
||||
AstCell* m_cellp = nullptr; // Current cell
|
||||
|
||||
// METHODS
|
||||
VL_DEBUG_FUNC; // Declare debug()
|
||||
@@ -131,11 +131,7 @@ private:
|
||||
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit InstVisitor(AstNetlist* nodep) {
|
||||
m_cellp = nullptr;
|
||||
//
|
||||
iterate(nodep);
|
||||
}
|
||||
explicit InstVisitor(AstNetlist* nodep) { iterate(nodep); }
|
||||
virtual ~InstVisitor() override {}
|
||||
};
|
||||
|
||||
@@ -199,8 +195,9 @@ class InstDeVisitor : public AstNVisitor {
|
||||
// Find all cells with arrays, and convert to non-arrayed
|
||||
private:
|
||||
// STATE
|
||||
AstRange* m_cellRangep; // Range for arrayed instantiations, nullptr for normal instantiations
|
||||
int m_instSelNum; // Current instantiation count 0..N-1
|
||||
AstRange* m_cellRangep
|
||||
= nullptr; // Range for arrayed instantiations, nullptr for normal instantiations
|
||||
int m_instSelNum = 0; // Current instantiation count 0..N-1
|
||||
InstDeModVarVisitor m_deModVars; // State of variables for current cell module
|
||||
|
||||
VL_DEBUG_FUNC; // Declare debug()
|
||||
@@ -466,12 +463,7 @@ private:
|
||||
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit InstDeVisitor(AstNetlist* nodep) {
|
||||
m_cellRangep = nullptr;
|
||||
m_instSelNum = 0;
|
||||
//
|
||||
iterate(nodep);
|
||||
}
|
||||
explicit InstDeVisitor(AstNetlist* nodep) { iterate(nodep); }
|
||||
virtual ~InstDeVisitor() override {}
|
||||
};
|
||||
|
||||
|
||||
@@ -56,8 +56,8 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
VisitBase(InstrCountVisitor* visitor, AstNode* nodep)
|
||||
: m_nodep(nodep)
|
||||
, m_visitor(visitor) {
|
||||
: m_nodep{nodep}
|
||||
, m_visitor{visitor} {
|
||||
m_savedCount = m_visitor->startVisitBase(nodep);
|
||||
}
|
||||
~VisitBase() { m_visitor->endVisitBase(m_savedCount, m_nodep); }
|
||||
@@ -69,9 +69,9 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
InstrCountVisitor(AstNode* nodep, bool assertNoDups, std::ostream* osp)
|
||||
: m_startNodep(nodep)
|
||||
, m_assertNoDups(assertNoDups)
|
||||
, m_osp(osp) {
|
||||
: m_startNodep{nodep}
|
||||
, m_assertNoDups{assertNoDups}
|
||||
, m_osp{osp} {
|
||||
if (nodep) iterate(nodep);
|
||||
}
|
||||
virtual ~InstrCountVisitor() override {}
|
||||
@@ -271,7 +271,7 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
InstrCountDumpVisitor(AstNode* nodep, std::ostream* osp)
|
||||
: m_osp(osp) {
|
||||
: m_osp{osp} {
|
||||
// No check for nullptr output, so...
|
||||
UASSERT_OBJ(osp, nodep, "Don't call if not dumping");
|
||||
if (nodep) iterate(nodep);
|
||||
|
||||
+1
-1
@@ -484,7 +484,7 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
LifeTopVisitor(AstNetlist* nodep, LifeState* statep)
|
||||
: m_statep(statep) {
|
||||
: m_statep{statep} {
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~LifeTopVisitor() override {}
|
||||
|
||||
+7
-7
@@ -104,11 +104,11 @@ struct LifeLocation {
|
||||
|
||||
public:
|
||||
LifeLocation()
|
||||
: mtaskp(nullptr)
|
||||
, sequence(0) {}
|
||||
: mtaskp{nullptr}
|
||||
, sequence{0} {}
|
||||
LifeLocation(const ExecMTask* mtaskp_, uint32_t sequence_)
|
||||
: mtaskp(mtaskp_)
|
||||
, sequence(sequence_) {}
|
||||
: mtaskp{mtaskp_}
|
||||
, sequence{sequence_} {}
|
||||
bool operator<(const LifeLocation& b) const {
|
||||
unsigned a_id = mtaskp ? mtaskp->id() : 0;
|
||||
unsigned b_id = b.mtaskp ? b.mtaskp->id() : 0;
|
||||
@@ -122,10 +122,10 @@ struct LifePostLocation {
|
||||
LifeLocation loc;
|
||||
AstAssignPost* nodep;
|
||||
LifePostLocation()
|
||||
: nodep(nullptr) {}
|
||||
: nodep{nullptr} {}
|
||||
LifePostLocation(LifeLocation loc_, AstAssignPost* nodep_)
|
||||
: loc(loc_)
|
||||
, nodep(nodep_) {}
|
||||
: loc{loc_}
|
||||
, nodep{nodep_} {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
|
||||
+7
-10
@@ -53,8 +53,8 @@ class LinkCellsVertex : public V3GraphVertex {
|
||||
|
||||
public:
|
||||
LinkCellsVertex(V3Graph* graphp, AstNodeModule* modp)
|
||||
: V3GraphVertex(graphp)
|
||||
, m_modp(modp) {}
|
||||
: V3GraphVertex{graphp}
|
||||
, m_modp{modp} {}
|
||||
virtual ~LinkCellsVertex() override {}
|
||||
AstNodeModule* modp() const { return m_modp; }
|
||||
virtual string name() const override { return modp()->name(); }
|
||||
@@ -68,7 +68,7 @@ public:
|
||||
class LibraryVertex : public V3GraphVertex {
|
||||
public:
|
||||
explicit LibraryVertex(V3Graph* graphp)
|
||||
: V3GraphVertex(graphp) {}
|
||||
: V3GraphVertex{graphp} {}
|
||||
virtual ~LibraryVertex() override {}
|
||||
virtual string name() const override { return "*LIBRARY*"; }
|
||||
};
|
||||
@@ -109,11 +109,11 @@ private:
|
||||
V3ParseSym* m_parseSymp; // Parser symbol table
|
||||
|
||||
// Below state needs to be preserved between each module call.
|
||||
AstNodeModule* m_modp; // Current module
|
||||
AstNodeModule* m_modp = nullptr; // Current module
|
||||
VSymGraph m_mods; // Symbol table of all module names
|
||||
LinkCellsGraph m_graph; // Linked graph of all cell interconnects
|
||||
LibraryVertex* m_libVertexp; // Vertex at root of all libraries
|
||||
V3GraphVertex* m_topVertexp; // Vertex of top module
|
||||
LibraryVertex* m_libVertexp = nullptr; // Vertex at root of all libraries
|
||||
V3GraphVertex* m_topVertexp = nullptr; // Vertex of top module
|
||||
std::unordered_set<string> m_declfnWarned; // Files we issued DECLFILENAME on
|
||||
string m_origTopModuleName; // original name of the top module
|
||||
|
||||
@@ -501,12 +501,9 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
LinkCellsVisitor(AstNetlist* nodep, VInFilter* filterp, V3ParseSym* parseSymp)
|
||||
: m_mods(nodep) {
|
||||
: m_mods{nodep} {
|
||||
m_filterp = filterp;
|
||||
m_parseSymp = parseSymp;
|
||||
m_modp = nullptr;
|
||||
m_libVertexp = nullptr;
|
||||
m_topVertexp = nullptr;
|
||||
if (v3Global.opt.hierChild()) {
|
||||
const V3HierBlockOptSet& hierBlocks = v3Global.opt.hierBlocks();
|
||||
UASSERT(!v3Global.opt.topModule().empty(),
|
||||
|
||||
+5
-5
@@ -198,7 +198,7 @@ public:
|
||||
|
||||
// CONSTRUCTORS
|
||||
LinkDotState(AstNetlist* rootp, VLinkDotStep step)
|
||||
: m_syms(rootp) {
|
||||
: m_syms{rootp} {
|
||||
UINFO(4, __FUNCTION__ << ": " << endl);
|
||||
m_forPrimary = (step == LDS_PRIMARY);
|
||||
m_forPrearray = (step == LDS_PARAMED || step == LDS_PRIMARY);
|
||||
@@ -1253,7 +1253,7 @@ class LinkDotFindVisitor : public AstNVisitor {
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
LinkDotFindVisitor(AstNetlist* rootp, LinkDotState* statep)
|
||||
: m_statep(statep) {
|
||||
: m_statep{statep} {
|
||||
UINFO(4, __FUNCTION__ << ": " << endl);
|
||||
|
||||
iterate(rootp);
|
||||
@@ -1419,7 +1419,7 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
LinkDotParamVisitor(AstNetlist* rootp, LinkDotState* statep)
|
||||
: m_statep(statep) {
|
||||
: m_statep{statep} {
|
||||
UINFO(4, __FUNCTION__ << ": " << endl);
|
||||
iterate(rootp);
|
||||
}
|
||||
@@ -1572,7 +1572,7 @@ class LinkDotScopeVisitor : public AstNVisitor {
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
LinkDotScopeVisitor(AstNetlist* rootp, LinkDotState* statep)
|
||||
: m_statep(statep) {
|
||||
: m_statep{statep} {
|
||||
UINFO(4, __FUNCTION__ << ": " << endl);
|
||||
iterate(rootp);
|
||||
}
|
||||
@@ -2799,7 +2799,7 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
LinkDotResolveVisitor(AstNetlist* rootp, LinkDotState* statep)
|
||||
: m_statep(statep) {
|
||||
: m_statep{statep} {
|
||||
UINFO(4, __FUNCTION__ << ": " << endl);
|
||||
iterate(rootp);
|
||||
}
|
||||
|
||||
+5
-11
@@ -57,10 +57,10 @@ private:
|
||||
};
|
||||
|
||||
// STATE
|
||||
int m_modIncrementsNum; // Var name counter
|
||||
InsertMode m_insMode; // How to insert
|
||||
AstNode* m_insStmtp; // Where to insert statement
|
||||
bool m_unsupportedHere; // Used to detect where it's not supported yet
|
||||
int m_modIncrementsNum = 0; // Var name counter
|
||||
InsertMode m_insMode = IM_BEFORE; // How to insert
|
||||
AstNode* m_insStmtp = nullptr; // Where to insert statement
|
||||
bool m_unsupportedHere = false; // Used to detect where it's not supported yet
|
||||
|
||||
private:
|
||||
void insertBeforeStmt(AstNode* nodep, AstNode* newp) {
|
||||
@@ -234,13 +234,7 @@ private:
|
||||
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit LinkIncVisitor(AstNetlist* nodep) {
|
||||
m_modIncrementsNum = 0;
|
||||
m_insMode = IM_BEFORE;
|
||||
m_insStmtp = nullptr;
|
||||
m_unsupportedHere = false;
|
||||
iterate(nodep);
|
||||
}
|
||||
explicit LinkIncVisitor(AstNetlist* nodep) { iterate(nodep); }
|
||||
virtual ~LinkIncVisitor() override {}
|
||||
};
|
||||
|
||||
|
||||
+7
-15
@@ -47,12 +47,12 @@ private:
|
||||
typedef std::vector<AstNodeBlock*> BlockStack;
|
||||
|
||||
// STATE
|
||||
AstNodeModule* m_modp; // Current module
|
||||
AstNodeFTask* m_ftaskp; // Current function/task
|
||||
AstWhile* m_loopp; // Current loop
|
||||
bool m_loopInc; // In loop increment
|
||||
bool m_inFork; // Under fork
|
||||
int m_modRepeatNum; // Repeat counter
|
||||
AstNodeModule* m_modp = nullptr; // Current module
|
||||
AstNodeFTask* m_ftaskp = nullptr; // Current function/task
|
||||
AstWhile* m_loopp = nullptr; // Current loop
|
||||
bool m_loopInc = false; // In loop increment
|
||||
bool m_inFork = false; // Under fork
|
||||
int m_modRepeatNum = 0; // Repeat counter
|
||||
BlockStack m_blockStack; // All begin blocks above current node
|
||||
|
||||
// METHODS
|
||||
@@ -285,15 +285,7 @@ private:
|
||||
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit LinkJumpVisitor(AstNetlist* nodep) {
|
||||
m_modp = nullptr;
|
||||
m_ftaskp = nullptr;
|
||||
m_inFork = false;
|
||||
m_loopp = nullptr;
|
||||
m_loopInc = false;
|
||||
m_modRepeatNum = 0;
|
||||
iterate(nodep);
|
||||
}
|
||||
explicit LinkJumpVisitor(AstNetlist* nodep) { iterate(nodep); }
|
||||
virtual ~LinkJumpVisitor() override {}
|
||||
};
|
||||
|
||||
|
||||
@@ -299,7 +299,7 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
LinkLValueVisitor(AstNode* nodep, bool start)
|
||||
: m_setRefLvalue(start) {
|
||||
: m_setRefLvalue{start} {
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~LinkLValueVisitor() override {}
|
||||
|
||||
+8
-15
@@ -48,14 +48,15 @@ private:
|
||||
typedef std::set<FileLine*> FileLineSet;
|
||||
|
||||
// STATE
|
||||
AstVar* m_varp; // Variable we're under
|
||||
AstVar* m_varp = nullptr; // Variable we're under
|
||||
ImplTypedefMap m_implTypedef; // Created typedefs for each <container,name>
|
||||
FileLineSet m_filelines; // Filelines that have been seen
|
||||
bool m_inAlways; // Inside an always
|
||||
AstNodeModule* m_valueModp; // If set, move AstVar->valuep() initial values to this module
|
||||
AstNodeModule* m_modp; // Current module
|
||||
AstNodeFTask* m_ftaskp; // Current task
|
||||
AstNodeDType* m_dtypep; // Current data type
|
||||
bool m_inAlways = false; // Inside an always
|
||||
AstNodeModule* m_valueModp
|
||||
= nullptr; // If set, move AstVar->valuep() initial values to this module
|
||||
AstNodeModule* m_modp = nullptr; // Current module
|
||||
AstNodeFTask* m_ftaskp = nullptr; // Current task
|
||||
AstNodeDType* m_dtypep = nullptr; // Current data type
|
||||
|
||||
// METHODS
|
||||
VL_DEBUG_FUNC; // Declare debug()
|
||||
@@ -595,15 +596,7 @@ private:
|
||||
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit LinkParseVisitor(AstNetlist* rootp) {
|
||||
m_varp = nullptr;
|
||||
m_modp = nullptr;
|
||||
m_ftaskp = nullptr;
|
||||
m_dtypep = nullptr;
|
||||
m_inAlways = false;
|
||||
m_valueModp = nullptr;
|
||||
iterate(rootp);
|
||||
}
|
||||
explicit LinkParseVisitor(AstNetlist* rootp) { iterate(rootp); }
|
||||
virtual ~LinkParseVisitor() override {}
|
||||
};
|
||||
|
||||
|
||||
+9
-21
@@ -47,12 +47,12 @@ private:
|
||||
|
||||
// STATE
|
||||
// Below state needs to be preserved between each module call.
|
||||
AstNodeModule* m_modp; // Current module
|
||||
AstClass* m_classp; // Class we're inside
|
||||
AstNodeFTask* m_ftaskp; // Function or task we're inside
|
||||
AstNodeCoverOrAssert* m_assertp; // Current assertion
|
||||
VLifetime m_lifetime; // Propagating lifetime
|
||||
int m_senitemCvtNum; // Temporary signal counter
|
||||
AstNodeModule* m_modp = nullptr; // Current module
|
||||
AstClass* m_classp = nullptr; // Class we're inside
|
||||
AstNodeFTask* m_ftaskp = nullptr; // Function or task we're inside
|
||||
AstNodeCoverOrAssert* m_assertp = nullptr; // Current assertion
|
||||
VLifetime m_lifetime = VLifetime::STATIC; // Propagating lifetime
|
||||
int m_senitemCvtNum = 0; // Temporary signal counter
|
||||
|
||||
// METHODS
|
||||
VL_DEBUG_FUNC; // Declare debug()
|
||||
@@ -521,15 +521,7 @@ private:
|
||||
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit LinkResolveVisitor(AstNetlist* rootp)
|
||||
: m_lifetime(VLifetime::STATIC) { // Static outside a module/class
|
||||
m_classp = nullptr;
|
||||
m_ftaskp = nullptr;
|
||||
m_modp = nullptr;
|
||||
m_assertp = nullptr;
|
||||
m_senitemCvtNum = 0;
|
||||
iterate(rootp);
|
||||
}
|
||||
explicit LinkResolveVisitor(AstNetlist* rootp) { iterate(rootp); }
|
||||
virtual ~LinkResolveVisitor() override {}
|
||||
};
|
||||
|
||||
@@ -541,7 +533,7 @@ public:
|
||||
class LinkBotupVisitor : public AstNVisitor {
|
||||
private:
|
||||
// STATE
|
||||
AstNodeModule* m_modp; // Current module
|
||||
AstNodeModule* m_modp = nullptr; // Current module
|
||||
|
||||
// METHODS
|
||||
VL_DEBUG_FUNC; // Declare debug()
|
||||
@@ -569,11 +561,7 @@ private:
|
||||
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit LinkBotupVisitor(AstNetlist* rootp) {
|
||||
m_modp = nullptr;
|
||||
//
|
||||
iterate(rootp);
|
||||
}
|
||||
explicit LinkBotupVisitor(AstNetlist* rootp) { iterate(rootp); }
|
||||
virtual ~LinkBotupVisitor() override {}
|
||||
};
|
||||
|
||||
|
||||
+2
-5
@@ -101,7 +101,7 @@ private:
|
||||
|
||||
// STATE
|
||||
VDouble0 m_statLocVars; // Statistic tracking
|
||||
AstCFunc* m_cfuncp; // Current active function
|
||||
AstCFunc* m_cfuncp = nullptr; // Current active function
|
||||
std::vector<AstVar*> m_varps; // List of variables to consider for deletion
|
||||
|
||||
// METHODS
|
||||
@@ -221,10 +221,7 @@ private:
|
||||
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit LocalizeVisitor(AstNetlist* nodep) {
|
||||
m_cfuncp = nullptr;
|
||||
iterate(nodep);
|
||||
}
|
||||
explicit LocalizeVisitor(AstNetlist* nodep) { iterate(nodep); }
|
||||
virtual ~LocalizeVisitor() override {
|
||||
V3Stats::addStat("Optimizations, Vars localized", m_statLocVars);
|
||||
}
|
||||
|
||||
+5
-10
@@ -126,11 +126,11 @@ private:
|
||||
VDouble0 m_statMergedItems; // Statistic tracking
|
||||
VDouble0 m_statLongestList; // Statistic tracking
|
||||
|
||||
AstNode* m_mgFirstp; // First node in merged sequence
|
||||
AstNode* m_mgCondp; // The condition of the first node
|
||||
AstNode* m_mgLastp; // Last node in merged sequence
|
||||
const AstNode* m_mgNextp; // Next node in list being examined
|
||||
uint32_t m_listLenght; // Length of current list
|
||||
AstNode* m_mgFirstp = nullptr; // First node in merged sequence
|
||||
AstNode* m_mgCondp = nullptr; // The condition of the first node
|
||||
AstNode* m_mgLastp = nullptr; // Last node in merged sequence
|
||||
const AstNode* m_mgNextp = nullptr; // Next node in list being examined
|
||||
uint32_t m_listLenght = 0; // Length of current list
|
||||
|
||||
CheckMergeableVisitor m_checkMergeable; // Sub visitor for encapsulation & speed
|
||||
MarkVarsVisitor m_markVars; // Sub visitor for encapsulation & speed
|
||||
@@ -321,11 +321,6 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit MergeCondVisitor(AstNetlist* nodep) {
|
||||
m_mgFirstp = nullptr;
|
||||
m_mgCondp = nullptr;
|
||||
m_mgLastp = nullptr;
|
||||
m_mgNextp = nullptr;
|
||||
m_listLenght = 0;
|
||||
m_markVars.clear();
|
||||
iterate(nodep);
|
||||
}
|
||||
|
||||
+2
-5
@@ -40,7 +40,7 @@ private:
|
||||
AstUser1InUse m_inuser1;
|
||||
|
||||
// STATE
|
||||
AstNodeModule* m_modp;
|
||||
AstNodeModule* m_modp = nullptr;
|
||||
|
||||
// METHODS
|
||||
VL_DEBUG_FUNC; // Declare debug()
|
||||
@@ -136,10 +136,7 @@ private:
|
||||
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit NameVisitor(AstNetlist* nodep) {
|
||||
m_modp = nullptr;
|
||||
iterate(nodep);
|
||||
}
|
||||
explicit NameVisitor(AstNetlist* nodep) { iterate(nodep); }
|
||||
virtual ~NameVisitor() override {}
|
||||
};
|
||||
|
||||
|
||||
+1
-100
@@ -122,7 +122,7 @@ V3LangCode::V3LangCode(const char* textp) {
|
||||
// VTimescale class functions
|
||||
|
||||
VTimescale::VTimescale(const string& value, bool& badr)
|
||||
: m_e(VTimescale::NONE) {
|
||||
: m_e{VTimescale::NONE} {
|
||||
badr = true;
|
||||
string spaceless = VString::removeWhitespace(value);
|
||||
for (int i = TS_100S; i < _ENUM_END; ++i) {
|
||||
@@ -1786,108 +1786,9 @@ void V3Options::showVersion(bool verbose) {
|
||||
V3Options::V3Options() {
|
||||
m_impp = new V3OptionsImp;
|
||||
|
||||
m_assert = false;
|
||||
m_autoflush = false;
|
||||
m_bboxSys = false;
|
||||
m_bboxUnsup = false;
|
||||
m_build = false;
|
||||
m_cdc = false;
|
||||
m_cmake = false;
|
||||
m_context = true;
|
||||
m_coverageLine = false;
|
||||
m_coverageToggle = false;
|
||||
m_coverageUnderscore = false;
|
||||
m_coverageUser = false;
|
||||
m_debugCheck = false;
|
||||
m_debugCollision = false;
|
||||
m_debugExitParse = false;
|
||||
m_debugLeak = true;
|
||||
m_debugNondeterminism = false;
|
||||
m_debugPartition = false;
|
||||
m_debugProtect = false;
|
||||
m_debugSelfTest = false;
|
||||
m_decoration = true;
|
||||
m_dpiHdrOnly = false;
|
||||
m_dumpDefines = false;
|
||||
m_exe = false;
|
||||
m_flatten = false;
|
||||
m_gmake = false;
|
||||
m_hierarchical = false;
|
||||
m_hierChild = false;
|
||||
m_ignc = false;
|
||||
m_inhibitSim = false;
|
||||
m_lintOnly = false;
|
||||
m_makePhony = false;
|
||||
m_main = false;
|
||||
m_orderClockDly = true;
|
||||
m_outFormatOk = false;
|
||||
m_pedantic = false;
|
||||
m_pinsBv = 65;
|
||||
m_pinsScUint = false;
|
||||
m_pinsScBigUint = false;
|
||||
m_pinsUint8 = false;
|
||||
m_ppComments = false;
|
||||
m_profCFuncs = false;
|
||||
m_profThreads = false;
|
||||
m_protectIds = false;
|
||||
m_preprocOnly = false;
|
||||
m_preprocNoLine = false;
|
||||
m_public = false;
|
||||
m_publicFlatRW = false;
|
||||
m_quietExit = false;
|
||||
m_relativeCFuncs = true;
|
||||
m_relativeIncludes = false;
|
||||
m_reportUnoptflat = false;
|
||||
m_savable = false;
|
||||
m_stats = false;
|
||||
m_statsVars = false;
|
||||
m_structsPacked = true;
|
||||
m_systemC = false;
|
||||
m_threads = 0;
|
||||
m_threadsDpiPure = true;
|
||||
m_threadsDpiUnpure = false;
|
||||
m_threadsCoarsen = true;
|
||||
m_threadsMaxMTasks = 0;
|
||||
m_trace = false;
|
||||
m_traceCoverage = false;
|
||||
m_traceFormat = TraceFormat::VCD;
|
||||
m_traceParams = true;
|
||||
m_traceStructs = false;
|
||||
m_traceUnderscore = false;
|
||||
m_traceThreads = 0;
|
||||
m_underlineZero = false;
|
||||
m_verilate = true;
|
||||
m_vpi = false;
|
||||
m_xInitialEdge = false;
|
||||
m_xmlOnly = false;
|
||||
|
||||
m_buildJobs = 1;
|
||||
m_convergeLimit = 100;
|
||||
m_dumpTree = 0;
|
||||
m_dumpTreeAddrids = false;
|
||||
m_gateStmts = 100;
|
||||
m_ifDepth = 0;
|
||||
m_inlineMult = 2000;
|
||||
m_maxNumWidth = 65536;
|
||||
m_moduleRecursion = 100;
|
||||
m_outputSplit = 20000;
|
||||
m_outputSplitCFuncs = -1;
|
||||
m_outputSplitCTrace = -1;
|
||||
m_traceDepth = 0;
|
||||
m_traceMaxArray = 32;
|
||||
m_traceMaxWidth = 256;
|
||||
m_unrollCount = 64;
|
||||
m_unrollStmts = 30000;
|
||||
|
||||
m_compLimitBlocks = 0;
|
||||
m_compLimitMembers = 64;
|
||||
m_compLimitParens = 0;
|
||||
|
||||
m_makeDir = "obj_dir";
|
||||
m_bin = "";
|
||||
m_flags = "";
|
||||
m_waiverOutput = "";
|
||||
m_l2Name = "";
|
||||
m_unusedRegexp = "*unused*";
|
||||
m_xAssign = "fast";
|
||||
|
||||
|
||||
+93
-93
@@ -248,108 +248,108 @@ private:
|
||||
std::map<string,string> m_parameters; // Parameters
|
||||
std::map<string, V3HierarchicalBlockOption> m_hierBlocks; // main switch: --hierarchical-block
|
||||
|
||||
bool m_preprocOnly; // main switch: -E
|
||||
bool m_makePhony; // main switch: -MP
|
||||
bool m_preprocNoLine;// main switch: -P
|
||||
bool m_assert; // main switch: --assert
|
||||
bool m_autoflush; // main switch: --autoflush
|
||||
bool m_bboxSys; // main switch: --bbox-sys
|
||||
bool m_bboxUnsup; // main switch: --bbox-unsup
|
||||
bool m_build; // main switch: --build
|
||||
bool m_cdc; // main switch: --cdc
|
||||
bool m_cmake; // main switch: --make cmake
|
||||
bool m_context; // main switch: --Wcontext
|
||||
bool m_coverageLine; // main switch: --coverage-block
|
||||
bool m_coverageToggle;// main switch: --coverage-toggle
|
||||
bool m_coverageUnderscore;// main switch: --coverage-underscore
|
||||
bool m_coverageUser; // main switch: --coverage-func
|
||||
bool m_debugCheck; // main switch: --debug-check
|
||||
bool m_debugCollision; // main switch: --debug-collision
|
||||
bool m_debugExitParse; // main switch: --debug-exit-parse
|
||||
bool m_debugLeak; // main switch: --debug-leak
|
||||
bool m_debugNondeterminism; // main switch: --debug-nondeterminism
|
||||
bool m_debugPartition; // main switch: --debug-partition
|
||||
bool m_debugProtect; // main switch: --debug-protect
|
||||
bool m_debugSelfTest; // main switch: --debug-self-test
|
||||
bool m_decoration; // main switch: --decoration
|
||||
bool m_dpiHdrOnly; // main switch: --dpi-hdr-only
|
||||
bool m_dumpDefines; // main switch: --dump-defines
|
||||
bool m_exe; // main switch: --exe
|
||||
bool m_flatten; // main switch: --flatten
|
||||
bool m_ignc; // main switch: --ignc
|
||||
bool m_inhibitSim; // main switch: --inhibit-sim
|
||||
bool m_lintOnly; // main switch: --lint-only
|
||||
bool m_gmake; // main switch: --make gmake
|
||||
bool m_main; // main swithc: --main
|
||||
bool m_orderClockDly;// main switch: --order-clock-delay
|
||||
bool m_outFormatOk; // main switch: --cc, --sc or --sp was specified
|
||||
bool m_pedantic; // main switch: --Wpedantic
|
||||
bool m_pinsScUint; // main switch: --pins-sc-uint
|
||||
bool m_pinsScBigUint;// main switch: --pins-sc-biguint
|
||||
bool m_pinsUint8; // main switch: --pins-uint8
|
||||
bool m_ppComments; // main switch: --pp-comments
|
||||
bool m_profCFuncs; // main switch: --prof-cfuncs
|
||||
bool m_profThreads; // main switch: --prof-threads
|
||||
bool m_protectIds; // main switch: --protect-ids
|
||||
bool m_public; // main switch: --public
|
||||
bool m_publicFlatRW; // main switch: --public-flat-rw
|
||||
bool m_quietExit; // main switch: --quiet-exit
|
||||
bool m_relativeCFuncs; // main switch: --relative-cfuncs
|
||||
bool m_relativeIncludes; // main switch: --relative-includes
|
||||
bool m_reportUnoptflat; // main switch: --report-unoptflat
|
||||
bool m_savable; // main switch: --savable
|
||||
bool m_structsPacked; // main switch: --structs-packed
|
||||
bool m_systemC; // main switch: --sc: System C instead of simple C++
|
||||
bool m_stats; // main switch: --stats
|
||||
bool m_statsVars; // main switch: --stats-vars
|
||||
bool m_threadsCoarsen; // main switch: --threads-coarsen
|
||||
bool m_threadsDpiPure; // main switch: --threads-dpi all/pure
|
||||
bool m_threadsDpiUnpure; // main switch: --threads-dpi all
|
||||
bool m_trace; // main switch: --trace
|
||||
bool m_traceCoverage; // main switch: --trace-coverage
|
||||
bool m_traceParams; // main switch: --trace-params
|
||||
bool m_traceStructs; // main switch: --trace-structs
|
||||
bool m_traceUnderscore;// main switch: --trace-underscore
|
||||
bool m_underlineZero;// main switch: --underline-zero; undocumented old Verilator 2
|
||||
bool m_verilate; // main swith: --verilate
|
||||
bool m_vpi; // main switch: --vpi
|
||||
bool m_xInitialEdge; // main switch: --x-initial-edge
|
||||
bool m_xmlOnly; // main switch: --xml-only
|
||||
bool m_preprocOnly = false; // main switch: -E
|
||||
bool m_makePhony = false; // main switch: -MP
|
||||
bool m_preprocNoLine = false; // main switch: -P
|
||||
bool m_assert = false; // main switch: --assert
|
||||
bool m_autoflush = false; // main switch: --autoflush
|
||||
bool m_bboxSys = false; // main switch: --bbox-sys
|
||||
bool m_bboxUnsup = false; // main switch: --bbox-unsup
|
||||
bool m_build = false; // main switch: --build
|
||||
bool m_cdc = false; // main switch: --cdc
|
||||
bool m_cmake = false; // main switch: --make cmake
|
||||
bool m_context = true; // main switch: --Wcontext
|
||||
bool m_coverageLine = false; // main switch: --coverage-block
|
||||
bool m_coverageToggle = false; // main switch: --coverage-toggle
|
||||
bool m_coverageUnderscore = false; // main switch: --coverage-underscore
|
||||
bool m_coverageUser = false; // main switch: --coverage-func
|
||||
bool m_debugCheck = false; // main switch: --debug-check
|
||||
bool m_debugCollision = false; // main switch: --debug-collision
|
||||
bool m_debugExitParse = false; // main switch: --debug-exit-parse
|
||||
bool m_debugLeak = true; // main switch: --debug-leak
|
||||
bool m_debugNondeterminism = false; // main switch: --debug-nondeterminism
|
||||
bool m_debugPartition = false; // main switch: --debug-partition
|
||||
bool m_debugProtect = false; // main switch: --debug-protect
|
||||
bool m_debugSelfTest = false; // main switch: --debug-self-test
|
||||
bool m_decoration = true; // main switch: --decoration
|
||||
bool m_dpiHdrOnly = false; // main switch: --dpi-hdr-only
|
||||
bool m_dumpDefines = false; // main switch: --dump-defines
|
||||
bool m_dumpTreeAddrids = false; // main switch: --dump-tree-addrids
|
||||
bool m_exe = false; // main switch: --exe
|
||||
bool m_flatten = false; // main switch: --flatten
|
||||
bool m_hierarchical = false; // main switch: --hierarchical
|
||||
bool m_hierChild = false; // main switch: --hierarchical-child
|
||||
bool m_ignc = false; // main switch: --ignc
|
||||
bool m_inhibitSim = false; // main switch: --inhibit-sim
|
||||
bool m_lintOnly = false; // main switch: --lint-only
|
||||
bool m_gmake = false; // main switch: --make gmake
|
||||
bool m_main = false; // main swithc: --main
|
||||
bool m_orderClockDly = true; // main switch: --order-clock-delay
|
||||
bool m_outFormatOk = false; // main switch: --cc, --sc or --sp was specified
|
||||
bool m_pedantic = false; // main switch: --Wpedantic
|
||||
bool m_pinsScUint = false; // main switch: --pins-sc-uint
|
||||
bool m_pinsScBigUint = false; // main switch: --pins-sc-biguint
|
||||
bool m_pinsUint8 = false; // main switch: --pins-uint8
|
||||
bool m_ppComments = false; // main switch: --pp-comments
|
||||
bool m_profCFuncs = false; // main switch: --prof-cfuncs
|
||||
bool m_profThreads = false; // main switch: --prof-threads
|
||||
bool m_protectIds = false; // main switch: --protect-ids
|
||||
bool m_public = false; // main switch: --public
|
||||
bool m_publicFlatRW = false; // main switch: --public-flat-rw
|
||||
bool m_quietExit = false; // main switch: --quiet-exit
|
||||
bool m_relativeCFuncs = true; // main switch: --relative-cfuncs
|
||||
bool m_relativeIncludes = false; // main switch: --relative-includes
|
||||
bool m_reportUnoptflat = false; // main switch: --report-unoptflat
|
||||
bool m_savable = false; // main switch: --savable
|
||||
bool m_structsPacked = true; // main switch: --structs-packed
|
||||
bool m_systemC = false; // main switch: --sc: System C instead of simple C++
|
||||
bool m_stats = false; // main switch: --stats
|
||||
bool m_statsVars = false; // main switch: --stats-vars
|
||||
bool m_threadsCoarsen = true; // main switch: --threads-coarsen
|
||||
bool m_threadsDpiPure = true; // main switch: --threads-dpi all/pure
|
||||
bool m_threadsDpiUnpure = false; // main switch: --threads-dpi all
|
||||
bool m_trace = false; // main switch: --trace
|
||||
bool m_traceCoverage = false; // main switch: --trace-coverage
|
||||
bool m_traceParams = true; // main switch: --trace-params
|
||||
bool m_traceStructs = false; // main switch: --trace-structs
|
||||
bool m_traceUnderscore = false; // main switch: --trace-underscore
|
||||
bool m_underlineZero = false; // main switch: --underline-zero; undocumented old Verilator 2
|
||||
bool m_verilate = true; // main swith: --verilate
|
||||
bool m_vpi = false; // main switch: --vpi
|
||||
bool m_xInitialEdge = false; // main switch: --x-initial-edge
|
||||
bool m_xmlOnly = false; // main switch: --xml-only
|
||||
|
||||
int m_buildJobs; // main switch: -j
|
||||
int m_convergeLimit;// main switch: --converge-limit
|
||||
int m_dumpTree; // main switch: --dump-tree
|
||||
bool m_dumpTreeAddrids;// main switch: --dump-tree-addrids
|
||||
int m_gateStmts; // main switch: --gate-stmts
|
||||
bool m_hierarchical; // main switch: --hierarchical
|
||||
bool m_hierChild; // main switch: --hierarchical-child
|
||||
int m_ifDepth; // main switch: --if-depth
|
||||
int m_inlineMult; // main switch: --inline-mult
|
||||
int m_buildJobs = 1; // main switch: -j
|
||||
int m_convergeLimit = 100; // main switch: --converge-limit
|
||||
int m_dumpTree = 0; // main switch: --dump-tree
|
||||
int m_gateStmts = 100; // main switch: --gate-stmts
|
||||
int m_ifDepth = 0; // main switch: --if-depth
|
||||
int m_inlineMult = 2000; // main switch: --inline-mult
|
||||
VOptionBool m_makeDepend; // main switch: -MMD
|
||||
int m_maxNumWidth; // main switch: --max-num-width
|
||||
int m_moduleRecursion;// main switch: --module-recursion-depth
|
||||
int m_outputSplit; // main switch: --output-split
|
||||
int m_outputSplitCFuncs;// main switch: --output-split-cfuncs
|
||||
int m_outputSplitCTrace;// main switch: --output-split-ctrace
|
||||
int m_pinsBv; // main switch: --pins-bv
|
||||
int m_maxNumWidth = 65536; // main switch: --max-num-width
|
||||
int m_moduleRecursion = 100; // main switch: --module-recursion-depth
|
||||
int m_outputSplit = 20000; // main switch: --output-split
|
||||
int m_outputSplitCFuncs = -1; // main switch: --output-split-cfuncs
|
||||
int m_outputSplitCTrace = -1; // main switch: --output-split-ctrace
|
||||
int m_pinsBv = 65; // main switch: --pins-bv
|
||||
VOptionBool m_skipIdentical; // main switch: --skip-identical
|
||||
int m_threads; // main switch: --threads (0 == --no-threads)
|
||||
int m_threadsMaxMTasks; // main switch: --threads-max-mtasks
|
||||
int m_threads = 0; // main switch: --threads (0 == --no-threads)
|
||||
int m_threadsMaxMTasks = 0; // main switch: --threads-max-mtasks
|
||||
VTimescale m_timeDefaultPrec; // main switch: --timescale
|
||||
VTimescale m_timeDefaultUnit; // main switch: --timescale
|
||||
VTimescale m_timeOverridePrec; // main switch: --timescale-override
|
||||
VTimescale m_timeOverrideUnit; // main switch: --timescale-override
|
||||
int m_traceDepth; // main switch: --trace-depth
|
||||
int m_traceDepth = 0; // main switch: --trace-depth
|
||||
TraceFormat m_traceFormat; // main switch: --trace or --trace-fst
|
||||
int m_traceMaxArray;// main switch: --trace-max-array
|
||||
int m_traceMaxWidth;// main switch: --trace-max-width
|
||||
int m_traceThreads; // main switch: --trace-threads
|
||||
int m_unrollCount; // main switch: --unroll-count
|
||||
int m_unrollStmts; // main switch: --unroll-stmts
|
||||
int m_traceMaxArray = 32; // main switch: --trace-max-array
|
||||
int m_traceMaxWidth = 256; // main switch: --trace-max-width
|
||||
int m_traceThreads = 0; // main switch: --trace-threads
|
||||
int m_unrollCount = 64; // main switch: --unroll-count
|
||||
int m_unrollStmts = 30000; // main switch: --unroll-stmts
|
||||
|
||||
int m_compLimitBlocks; // compiler selection; number of nested blocks
|
||||
int m_compLimitMembers; // compiler selection; number of members in struct before make anon array
|
||||
int m_compLimitParens; // compiler selection; number of nested parens
|
||||
int m_compLimitBlocks = 0; // compiler selection; number of nested blocks
|
||||
int m_compLimitMembers = 64; // compiler selection; number of members in struct before make anon array
|
||||
int m_compLimitParens = 0; // compiler selection; number of nested parens
|
||||
|
||||
string m_bin; // main switch: --bin {binary}
|
||||
string m_exeName; // main switch: -o {name}
|
||||
|
||||
+15
-23
@@ -138,8 +138,8 @@ private:
|
||||
|
||||
public:
|
||||
OrderMoveDomScope(const AstSenTree* domainp, const AstScope* scopep)
|
||||
: m_domainp(domainp)
|
||||
, m_scopep(scopep) {}
|
||||
: m_domainp{domainp}
|
||||
, m_scopep{scopep} {}
|
||||
OrderMoveDomScope* readyDomScopeNextp() const { return m_readyDomScopeE.nextp(); }
|
||||
const AstSenTree* domainp() const { return m_domainp; }
|
||||
const AstScope* scopep() const { return m_scopep; }
|
||||
@@ -253,12 +253,12 @@ struct OrderVarFanoutCmp {
|
||||
//
|
||||
class OrderClkMarkVisitor : public AstNVisitor {
|
||||
private:
|
||||
bool m_hasClk; // flag indicating whether there is clock signal on rhs
|
||||
bool m_inClocked; // Currently inside a sequential block
|
||||
bool m_hasClk = false; // flag indicating whether there is clock signal on rhs
|
||||
bool m_inClocked = false; // Currently inside a sequential block
|
||||
bool m_newClkMarked; // Flag for deciding whether a new run is needed
|
||||
bool m_inAss; // Currently inside of a assignment
|
||||
int m_childClkWidth; // If in hasClk, width of clock signal in child
|
||||
int m_rightClkWidth; // Clk width on the RHS
|
||||
bool m_inAss = false; // Currently inside of a assignment
|
||||
int m_childClkWidth = 0; // If in hasClk, width of clock signal in child
|
||||
int m_rightClkWidth = 0; // Clk width on the RHS
|
||||
|
||||
// METHODS
|
||||
VL_DEBUG_FUNC; // Declare debug()
|
||||
@@ -360,11 +360,6 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit OrderClkMarkVisitor(AstNode* nodep) {
|
||||
m_hasClk = false;
|
||||
m_inClocked = false;
|
||||
m_inAss = false;
|
||||
m_childClkWidth = 0;
|
||||
m_rightClkWidth = 0;
|
||||
do {
|
||||
m_newClkMarked = false;
|
||||
iterate(nodep);
|
||||
@@ -378,7 +373,7 @@ public:
|
||||
|
||||
class OrderClkAssVisitor : public AstNVisitor {
|
||||
private:
|
||||
bool m_clkAss; // There is signals marked as clocker in the assignment
|
||||
bool m_clkAss = false; // There is signals marked as clocker in the assignment
|
||||
// METHODS
|
||||
VL_DEBUG_FUNC; // Declare debug()
|
||||
virtual void visit(AstNodeAssign* nodep) override {
|
||||
@@ -400,10 +395,7 @@ private:
|
||||
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit OrderClkAssVisitor(AstNode* nodep) {
|
||||
m_clkAss = false;
|
||||
iterate(nodep);
|
||||
}
|
||||
explicit OrderClkAssVisitor(AstNode* nodep) { iterate(nodep); }
|
||||
virtual ~OrderClkAssVisitor() override {}
|
||||
// METHODS
|
||||
bool isClkAss() { return m_clkAss; }
|
||||
@@ -461,9 +453,9 @@ public:
|
||||
ProcessMoveBuildGraph(const V3Graph* logicGraphp, // Input graph of OrderLogicVertex etc.
|
||||
V3Graph* outGraphp, // Output graph of T_MoveVertex's
|
||||
MoveVertexMaker* vxMakerp)
|
||||
: m_graphp(logicGraphp)
|
||||
, m_outGraphp(outGraphp)
|
||||
, m_vxMakerp(vxMakerp) {}
|
||||
: m_graphp{logicGraphp}
|
||||
, m_outGraphp{outGraphp}
|
||||
, m_vxMakerp{vxMakerp} {}
|
||||
virtual ~ProcessMoveBuildGraph() {}
|
||||
|
||||
// METHODS
|
||||
@@ -566,8 +558,8 @@ class OrderMoveVertexMaker : public ProcessMoveBuildGraph<OrderMoveVertex>::Move
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
OrderMoveVertexMaker(V3Graph* pomGraphp, V3List<OrderMoveVertex*>* pomWaitingp)
|
||||
: m_pomGraphp(pomGraphp)
|
||||
, m_pomWaitingp(pomWaitingp) {}
|
||||
: m_pomGraphp{pomGraphp}
|
||||
, m_pomWaitingp{pomWaitingp} {}
|
||||
// METHODS
|
||||
OrderMoveVertex* makeVertexp(OrderLogicVertex* lvertexp, const OrderEitherVertex*,
|
||||
const AstScope* scopep, const AstSenTree* domainp) {
|
||||
@@ -590,7 +582,7 @@ class OrderMTaskMoveVertexMaker : public ProcessMoveBuildGraph<MTaskMoveVertex>:
|
||||
|
||||
public:
|
||||
explicit OrderMTaskMoveVertexMaker(V3Graph* pomGraphp)
|
||||
: m_pomGraphp(pomGraphp) {}
|
||||
: m_pomGraphp{pomGraphp} {}
|
||||
MTaskMoveVertex* makeVertexp(OrderLogicVertex* lvertexp, const OrderEitherVertex* varVertexp,
|
||||
const AstScope* scopep, const AstSenTree* domainp) {
|
||||
// Exclude initial/settle logic from the mtasks graph.
|
||||
|
||||
+49
-49
@@ -127,17 +127,17 @@ class OrderEitherVertex : public V3GraphVertex {
|
||||
bool m_isFromInput; // From input, or derived therefrom (conservatively false)
|
||||
protected:
|
||||
OrderEitherVertex(V3Graph* graphp, const OrderEitherVertex& old)
|
||||
: V3GraphVertex(graphp, old)
|
||||
, m_scopep(old.m_scopep)
|
||||
, m_domainp(old.m_domainp)
|
||||
, m_isFromInput(old.m_isFromInput) {}
|
||||
: V3GraphVertex{graphp, old}
|
||||
, m_scopep{old.m_scopep}
|
||||
, m_domainp{old.m_domainp}
|
||||
, m_isFromInput{old.m_isFromInput} {}
|
||||
|
||||
public:
|
||||
OrderEitherVertex(V3Graph* graphp, AstScope* scopep, AstSenTree* domainp)
|
||||
: V3GraphVertex(graphp)
|
||||
, m_scopep(scopep)
|
||||
, m_domainp(domainp)
|
||||
, m_isFromInput(false) {}
|
||||
: V3GraphVertex{graphp}
|
||||
, m_scopep{scopep}
|
||||
, m_domainp{domainp}
|
||||
, m_isFromInput{false} {}
|
||||
virtual ~OrderEitherVertex() override {}
|
||||
virtual OrderEitherVertex* clone(V3Graph* graphp) const override = 0;
|
||||
// Methods
|
||||
@@ -154,11 +154,11 @@ public:
|
||||
|
||||
class OrderInputsVertex : public OrderEitherVertex {
|
||||
OrderInputsVertex(V3Graph* graphp, const OrderInputsVertex& old)
|
||||
: OrderEitherVertex(graphp, old) {}
|
||||
: OrderEitherVertex{graphp, old} {}
|
||||
|
||||
public:
|
||||
OrderInputsVertex(V3Graph* graphp, AstSenTree* domainp)
|
||||
: OrderEitherVertex(graphp, nullptr, domainp) {
|
||||
: OrderEitherVertex{graphp, nullptr, domainp} {
|
||||
isFromInput(true); // By definition
|
||||
}
|
||||
virtual ~OrderInputsVertex() override {}
|
||||
@@ -177,13 +177,13 @@ class OrderLogicVertex : public OrderEitherVertex {
|
||||
|
||||
protected:
|
||||
OrderLogicVertex(V3Graph* graphp, const OrderLogicVertex& old)
|
||||
: OrderEitherVertex(graphp, old)
|
||||
, m_nodep(old.m_nodep) {}
|
||||
: OrderEitherVertex{graphp, old}
|
||||
, m_nodep{old.m_nodep} {}
|
||||
|
||||
public:
|
||||
OrderLogicVertex(V3Graph* graphp, AstScope* scopep, AstSenTree* domainp, AstNode* nodep)
|
||||
: OrderEitherVertex(graphp, scopep, domainp)
|
||||
, m_nodep(nodep) {}
|
||||
: OrderEitherVertex{graphp, scopep, domainp}
|
||||
, m_nodep{nodep} {}
|
||||
virtual ~OrderLogicVertex() override {}
|
||||
virtual OrderLogicVertex* clone(V3Graph* graphp) const override {
|
||||
return new OrderLogicVertex(graphp, *this);
|
||||
@@ -204,17 +204,17 @@ class OrderVarVertex : public OrderEitherVertex {
|
||||
bool m_isDelayed; // Set in a delayed assignment
|
||||
protected:
|
||||
OrderVarVertex(V3Graph* graphp, const OrderVarVertex& old)
|
||||
: OrderEitherVertex(graphp, old)
|
||||
, m_varScp(old.m_varScp)
|
||||
, m_isClock(old.m_isClock)
|
||||
, m_isDelayed(old.m_isDelayed) {}
|
||||
: OrderEitherVertex{graphp, old}
|
||||
, m_varScp{old.m_varScp}
|
||||
, m_isClock{old.m_isClock}
|
||||
, m_isDelayed{old.m_isDelayed} {}
|
||||
|
||||
public:
|
||||
OrderVarVertex(V3Graph* graphp, AstScope* scopep, AstVarScope* varScp)
|
||||
: OrderEitherVertex(graphp, scopep, nullptr)
|
||||
, m_varScp(varScp)
|
||||
, m_isClock(false)
|
||||
, m_isDelayed(false) {}
|
||||
: OrderEitherVertex{graphp, scopep, nullptr}
|
||||
, m_varScp{varScp}
|
||||
, m_isClock{false}
|
||||
, m_isDelayed{false} {}
|
||||
virtual ~OrderVarVertex() override {}
|
||||
virtual OrderVarVertex* clone(V3Graph* graphp) const override = 0;
|
||||
virtual OrderVEdgeType type() const override = 0;
|
||||
@@ -229,11 +229,11 @@ public:
|
||||
|
||||
class OrderVarStdVertex : public OrderVarVertex {
|
||||
OrderVarStdVertex(V3Graph* graphp, const OrderVarStdVertex& old)
|
||||
: OrderVarVertex(graphp, old) {}
|
||||
: OrderVarVertex{graphp, old} {}
|
||||
|
||||
public:
|
||||
OrderVarStdVertex(V3Graph* graphp, AstScope* scopep, AstVarScope* varScp)
|
||||
: OrderVarVertex(graphp, scopep, varScp) {}
|
||||
: OrderVarVertex{graphp, scopep, varScp} {}
|
||||
virtual ~OrderVarStdVertex() override {}
|
||||
virtual OrderVarStdVertex* clone(V3Graph* graphp) const override {
|
||||
return new OrderVarStdVertex(graphp, *this);
|
||||
@@ -247,11 +247,11 @@ public:
|
||||
};
|
||||
class OrderVarPreVertex : public OrderVarVertex {
|
||||
OrderVarPreVertex(V3Graph* graphp, const OrderVarPreVertex& old)
|
||||
: OrderVarVertex(graphp, old) {}
|
||||
: OrderVarVertex{graphp, old} {}
|
||||
|
||||
public:
|
||||
OrderVarPreVertex(V3Graph* graphp, AstScope* scopep, AstVarScope* varScp)
|
||||
: OrderVarVertex(graphp, scopep, varScp) {}
|
||||
: OrderVarVertex{graphp, scopep, varScp} {}
|
||||
virtual ~OrderVarPreVertex() override {}
|
||||
virtual OrderVarPreVertex* clone(V3Graph* graphp) const override {
|
||||
return new OrderVarPreVertex(graphp, *this);
|
||||
@@ -265,11 +265,11 @@ public:
|
||||
};
|
||||
class OrderVarPostVertex : public OrderVarVertex {
|
||||
OrderVarPostVertex(V3Graph* graphp, const OrderVarPostVertex& old)
|
||||
: OrderVarVertex(graphp, old) {}
|
||||
: OrderVarVertex{graphp, old} {}
|
||||
|
||||
public:
|
||||
OrderVarPostVertex(V3Graph* graphp, AstScope* scopep, AstVarScope* varScp)
|
||||
: OrderVarVertex(graphp, scopep, varScp) {}
|
||||
: OrderVarVertex{graphp, scopep, varScp} {}
|
||||
virtual OrderVarPostVertex* clone(V3Graph* graphp) const override {
|
||||
return new OrderVarPostVertex(graphp, *this);
|
||||
}
|
||||
@@ -283,11 +283,11 @@ public:
|
||||
};
|
||||
class OrderVarPordVertex : public OrderVarVertex {
|
||||
OrderVarPordVertex(V3Graph* graphp, const OrderVarPordVertex& old)
|
||||
: OrderVarVertex(graphp, old) {}
|
||||
: OrderVarVertex{graphp, old} {}
|
||||
|
||||
public:
|
||||
OrderVarPordVertex(V3Graph* graphp, AstScope* scopep, AstVarScope* varScp)
|
||||
: OrderVarVertex(graphp, scopep, varScp) {}
|
||||
: OrderVarVertex{graphp, scopep, varScp} {}
|
||||
virtual ~OrderVarPordVertex() override {}
|
||||
virtual OrderVarPordVertex* clone(V3Graph* graphp) const override {
|
||||
return new OrderVarPordVertex(graphp, *this);
|
||||
@@ -301,11 +301,11 @@ public:
|
||||
};
|
||||
class OrderVarSettleVertex : public OrderVarVertex {
|
||||
OrderVarSettleVertex(V3Graph* graphp, const OrderVarSettleVertex& old)
|
||||
: OrderVarVertex(graphp, old) {}
|
||||
: OrderVarVertex{graphp, old} {}
|
||||
|
||||
public:
|
||||
OrderVarSettleVertex(V3Graph* graphp, AstScope* scopep, AstVarScope* varScp)
|
||||
: OrderVarVertex(graphp, scopep, varScp) {}
|
||||
: OrderVarVertex{graphp, scopep, varScp} {}
|
||||
virtual ~OrderVarSettleVertex() override {}
|
||||
virtual OrderVarSettleVertex* clone(V3Graph* graphp) const override {
|
||||
return new OrderVarSettleVertex(graphp, *this);
|
||||
@@ -338,10 +338,10 @@ protected:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
OrderMoveVertex(V3Graph* graphp, OrderLogicVertex* logicp)
|
||||
: V3GraphVertex(graphp)
|
||||
, m_logicp(logicp)
|
||||
, m_state(POM_WAIT)
|
||||
, m_domScopep(nullptr) {}
|
||||
: V3GraphVertex{graphp}
|
||||
, m_logicp{logicp}
|
||||
, m_state{POM_WAIT}
|
||||
, m_domScopep{nullptr} {}
|
||||
virtual ~OrderMoveVertex() override {}
|
||||
virtual OrderMoveVertex* clone(V3Graph* graphp) const override {
|
||||
v3fatalSrc("Unsupported");
|
||||
@@ -405,11 +405,11 @@ protected:
|
||||
public:
|
||||
MTaskMoveVertex(V3Graph* graphp, OrderLogicVertex* logicp, const OrderEitherVertex* varp,
|
||||
const AstScope* scopep, const AstSenTree* domainp)
|
||||
: V3GraphVertex(graphp)
|
||||
, m_logicp(logicp)
|
||||
, m_varp(varp)
|
||||
, m_scopep(scopep)
|
||||
, m_domainp(domainp) {
|
||||
: V3GraphVertex{graphp}
|
||||
, m_logicp{logicp}
|
||||
, m_varp{varp}
|
||||
, m_scopep{scopep}
|
||||
, m_domainp{domainp} {
|
||||
UASSERT(!(logicp && varp), "MTaskMoveVertex: logicp and varp may not both be set!\n");
|
||||
}
|
||||
virtual ~MTaskMoveVertex() override {}
|
||||
@@ -451,12 +451,12 @@ public:
|
||||
class OrderEdge : public V3GraphEdge {
|
||||
protected:
|
||||
OrderEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top, const OrderEdge& old)
|
||||
: V3GraphEdge(graphp, fromp, top, old) {}
|
||||
: V3GraphEdge{graphp, fromp, top, old} {}
|
||||
|
||||
public:
|
||||
OrderEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top, int weight,
|
||||
bool cutable = false)
|
||||
: V3GraphEdge(graphp, fromp, top, weight, cutable) {}
|
||||
: V3GraphEdge{graphp, fromp, top, weight, cutable} {}
|
||||
virtual ~OrderEdge() override {}
|
||||
virtual OrderVEdgeType type() const { return OrderVEdgeType::EDGE_STD; }
|
||||
virtual OrderEdge* clone(V3Graph* graphp, V3GraphVertex* fromp,
|
||||
@@ -479,11 +479,11 @@ class OrderComboCutEdge : public OrderEdge {
|
||||
// in which case we'll need a change detect loop around this var.
|
||||
OrderComboCutEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top,
|
||||
const OrderComboCutEdge& old)
|
||||
: OrderEdge(graphp, fromp, top, old) {}
|
||||
: OrderEdge{graphp, fromp, top, old} {}
|
||||
|
||||
public:
|
||||
OrderComboCutEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top)
|
||||
: OrderEdge(graphp, fromp, top, WEIGHT_COMBO, CUTABLE) {}
|
||||
: OrderEdge{graphp, fromp, top, WEIGHT_COMBO, CUTABLE} {}
|
||||
virtual OrderVEdgeType type() const override { return OrderVEdgeType::EDGE_COMBOCUT; }
|
||||
virtual ~OrderComboCutEdge() override {}
|
||||
virtual OrderComboCutEdge* clone(V3Graph* graphp, V3GraphVertex* fromp,
|
||||
@@ -500,11 +500,11 @@ class OrderPostCutEdge : public OrderEdge {
|
||||
// in which case we'll need a change detect loop around this var.
|
||||
OrderPostCutEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top,
|
||||
const OrderPostCutEdge& old)
|
||||
: OrderEdge(graphp, fromp, top, old) {}
|
||||
: OrderEdge{graphp, fromp, top, old} {}
|
||||
|
||||
public:
|
||||
OrderPostCutEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top)
|
||||
: OrderEdge(graphp, fromp, top, WEIGHT_COMBO, CUTABLE) {}
|
||||
: OrderEdge{graphp, fromp, top, WEIGHT_COMBO, CUTABLE} {}
|
||||
virtual OrderVEdgeType type() const override { return OrderVEdgeType::EDGE_POSTCUT; }
|
||||
virtual ~OrderPostCutEdge() override {}
|
||||
virtual OrderPostCutEdge* clone(V3Graph* graphp, V3GraphVertex* fromp,
|
||||
@@ -521,11 +521,11 @@ class OrderPreCutEdge : public OrderEdge {
|
||||
// in which case we can't optimize away the pre/post delayed assignments
|
||||
OrderPreCutEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top,
|
||||
const OrderPreCutEdge& old)
|
||||
: OrderEdge(graphp, fromp, top, old) {}
|
||||
: OrderEdge{graphp, fromp, top, old} {}
|
||||
|
||||
public:
|
||||
OrderPreCutEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top)
|
||||
: OrderEdge(graphp, fromp, top, WEIGHT_PRE, CUTABLE) {}
|
||||
: OrderEdge{graphp, fromp, top, WEIGHT_PRE, CUTABLE} {}
|
||||
virtual OrderVEdgeType type() const override { return OrderVEdgeType::EDGE_PRECUT; }
|
||||
virtual OrderPreCutEdge* clone(V3Graph* graphp, V3GraphVertex* fromp,
|
||||
V3GraphVertex* top) const override {
|
||||
|
||||
+7
-14
@@ -222,14 +222,15 @@ private:
|
||||
struct ModInfo {
|
||||
AstNodeModule* m_modp; // Module with specified name
|
||||
CloneMap m_cloneMap; // Map of old-varp -> new cloned varp
|
||||
explicit ModInfo(AstNodeModule* modp) { m_modp = modp; }
|
||||
explicit ModInfo(AstNodeModule* modp)
|
||||
: m_modp{modp} {}
|
||||
};
|
||||
typedef std::map<string, ModInfo> ModNameMap;
|
||||
ModNameMap m_modNameMap; // Hash of created module flavors by name
|
||||
|
||||
typedef std::map<string, string> LongMap;
|
||||
LongMap m_longMap; // Hash of very long names to unique identity number
|
||||
int m_longId;
|
||||
int m_longId = 0;
|
||||
|
||||
// All module names that are loaded from source code
|
||||
// Generated modules by this visitor is not included
|
||||
@@ -238,7 +239,7 @@ private:
|
||||
typedef std::pair<int, string> ValueMapValue;
|
||||
typedef std::map<V3Hash, ValueMapValue> ValueMap;
|
||||
ValueMap m_valueMap; // Hash of node hash to (param value, name)
|
||||
int m_nextValue; // Next value to use in m_valueMap
|
||||
int m_nextValue = 1; // Next value to use in m_valueMap
|
||||
|
||||
typedef std::multimap<int, AstNodeModule*> LevelModMap;
|
||||
LevelModMap m_todoModps; // Modules left to process
|
||||
@@ -246,14 +247,10 @@ private:
|
||||
typedef std::deque<AstCell*> CellList;
|
||||
CellList m_cellps; // Cells left to process (in this module)
|
||||
|
||||
AstNodeFTask* m_ftaskp; // Function/task reference
|
||||
|
||||
AstNodeModule* m_modp; // Current module being processed
|
||||
|
||||
AstNodeFTask* m_ftaskp = nullptr; // Function/task reference
|
||||
AstNodeModule* m_modp = nullptr; // Current module being processed
|
||||
string m_unlinkedTxt; // Text for AstUnlinkedRef
|
||||
|
||||
UnrollStateful m_unroller; // Loop unroller
|
||||
|
||||
string m_generateHierName; // Generate portion of hierarchy name
|
||||
|
||||
// Database to get protect-lib wrapper that matches parameters in hierarchical Verilation
|
||||
@@ -784,11 +781,7 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit ParamVisitor(AstNetlist* nodep)
|
||||
: m_hierBlocks(v3Global.opt.hierBlocks(), nodep) {
|
||||
m_longId = 0;
|
||||
m_ftaskp = nullptr;
|
||||
m_modp = nullptr;
|
||||
m_nextValue = 1;
|
||||
: m_hierBlocks{v3Global.opt.hierBlocks(), nodep} {
|
||||
for (AstNodeModule* modp = nodep->modulesp(); modp;
|
||||
modp = VN_CAST(modp->nextp(), NodeModule)) {
|
||||
m_allModuleNames.insert(modp->name());
|
||||
|
||||
+3
-3
@@ -301,9 +301,9 @@ public:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
V3ParseImp(AstNetlist* rootp, VInFilter* filterp, V3ParseSym* parserSymp)
|
||||
: m_rootp(rootp)
|
||||
, m_filterp(filterp)
|
||||
, m_symp(parserSymp) {
|
||||
: m_rootp{rootp}
|
||||
, m_filterp{filterp}
|
||||
, m_symp{parserSymp} {
|
||||
m_lexFileline = nullptr;
|
||||
m_lexerp = nullptr;
|
||||
m_inLibrary = false;
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ class V3Lexer : public V3LexerBase {
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
V3Lexer()
|
||||
: V3LexerBase(nullptr) {}
|
||||
: V3LexerBase{nullptr} {}
|
||||
~V3Lexer() {}
|
||||
// METHODS
|
||||
void unputString(const char* textp, size_t length) {
|
||||
|
||||
+2
-3
@@ -38,17 +38,16 @@ private:
|
||||
// MEMBERS
|
||||
static int s_anonNum; // Number of next anonymous object (parser use only)
|
||||
VSymGraph m_syms; // Graph of symbol tree
|
||||
VSymEnt* m_symTableNextId; // Symbol table for next lexer lookup (parser use only)
|
||||
VSymEnt* m_symTableNextId = nullptr; // Symbol table for next lexer lookup (parser use only)
|
||||
VSymEnt* m_symCurrentp; // Active symbol table for additions/lookups
|
||||
SymStack m_sympStack; // Stack of upper nodes with pending symbol tables
|
||||
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit V3ParseSym(AstNetlist* rootp)
|
||||
: m_syms(rootp) {
|
||||
: m_syms{rootp} {
|
||||
s_anonNum = 0; // Number of next anonymous object
|
||||
pushScope(findNewTable(rootp));
|
||||
m_symTableNextId = nullptr;
|
||||
m_symCurrentp = symCurrentp();
|
||||
}
|
||||
~V3ParseSym() {}
|
||||
|
||||
+18
-19
@@ -195,10 +195,10 @@ public:
|
||||
// CONSTRUCTORS
|
||||
PartPropagateCp(V3Graph* graphp, GraphWay way, T_CostAccessor* accessp, bool slowAsserts,
|
||||
V3EdgeFuncP edgeFuncp = &V3GraphEdge::followAlwaysTrue)
|
||||
: GraphAlg<>(graphp, edgeFuncp)
|
||||
, m_way(way)
|
||||
, m_accessp(accessp)
|
||||
, m_slowAsserts(slowAsserts) {}
|
||||
: GraphAlg<>{graphp, edgeFuncp}
|
||||
, m_way{way}
|
||||
, m_accessp{accessp}
|
||||
, m_slowAsserts{slowAsserts} {}
|
||||
|
||||
// METHODS
|
||||
void cpHasIncreased(V3GraphVertex* vxp, uint32_t newInclusiveCp) {
|
||||
@@ -472,7 +472,7 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
LogicMTask(V3Graph* graphp, MTaskMoveVertex* mtmvVxp)
|
||||
: AbstractLogicMTask(graphp) {
|
||||
: AbstractLogicMTask{graphp} {
|
||||
for (int i = 0; i < GraphWay::NUM_WAYS; ++i) m_critPathCost[i] = 0;
|
||||
if (mtmvVxp) { // Else null for test
|
||||
m_vertices.push_back(mtmvVxp);
|
||||
@@ -784,7 +784,7 @@ class MTaskEdge : public V3GraphEdge, public MergeCandidate {
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
MTaskEdge(V3Graph* graphp, LogicMTask* fromp, LogicMTask* top, int weight)
|
||||
: V3GraphEdge(graphp, fromp, top, weight) {
|
||||
: V3GraphEdge{graphp, fromp, top, weight} {
|
||||
fromp->addRelative(GraphWay::FORWARD, top);
|
||||
top->addRelative(GraphWay::REVERSE, fromp);
|
||||
}
|
||||
@@ -860,7 +860,7 @@ class PartParallelismEst {
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit PartParallelismEst(const V3Graph* graphp)
|
||||
: m_graphp(graphp) {}
|
||||
: m_graphp{graphp} {}
|
||||
|
||||
// METHODS
|
||||
uint32_t totalGraphCost() const { return m_totalGraphCost; }
|
||||
@@ -1084,10 +1084,10 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
PartContraction(V3Graph* mtasksp, uint32_t scoreLimit, bool slowAsserts)
|
||||
: m_mtasksp(mtasksp)
|
||||
, m_scoreLimit(scoreLimit)
|
||||
, m_slowAsserts(slowAsserts)
|
||||
, m_sb(&mergeCandidateScore, slowAsserts) {}
|
||||
: m_mtasksp{mtasksp}
|
||||
, m_scoreLimit{scoreLimit}
|
||||
, m_slowAsserts{slowAsserts}
|
||||
, m_sb{&mergeCandidateScore, slowAsserts} {}
|
||||
|
||||
// METHODS
|
||||
void go() {
|
||||
@@ -1789,12 +1789,11 @@ private:
|
||||
// MEMBERS
|
||||
V3Graph* m_mtasksp; // Mtask graph
|
||||
Olv2MTaskMap m_olv2mtask; // Map OrderLogicVertex to LogicMTask who wraps it
|
||||
unsigned m_mergesDone; // Number of MTasks merged. For stats only.
|
||||
unsigned m_mergesDone = 0; // Number of MTasks merged. For stats only.
|
||||
public:
|
||||
// CONSTRUCTORs
|
||||
explicit PartFixDataHazards(V3Graph* mtasksp)
|
||||
: m_mtasksp(mtasksp)
|
||||
, m_mergesDone(0) {}
|
||||
: m_mtasksp{mtasksp} {}
|
||||
// METHODS
|
||||
private:
|
||||
void findAdjacentTasks(OvvSet::iterator ovvIt, TasksByRank* tasksByRankp) {
|
||||
@@ -2073,11 +2072,11 @@ public:
|
||||
// CONSTRUCTORS
|
||||
explicit PartPackMTasks(V3Graph* mtasksp, uint32_t nThreads = v3Global.opt.threads(),
|
||||
unsigned sandbagNumerator = 30, unsigned sandbagDenom = 100)
|
||||
: m_mtasksp(mtasksp)
|
||||
, m_nThreads(nThreads)
|
||||
, m_sandbagNumerator(sandbagNumerator)
|
||||
, m_sandbagDenom(sandbagDenom)
|
||||
, m_ready(m_mtaskCmp) {}
|
||||
: m_mtasksp{mtasksp}
|
||||
, m_nThreads{nThreads}
|
||||
, m_sandbagNumerator{sandbagNumerator}
|
||||
, m_sandbagDenom{sandbagDenom}
|
||||
, m_ready{m_mtaskCmp} {}
|
||||
~PartPackMTasks() {}
|
||||
|
||||
// METHODS
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ class V3Partition {
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit V3Partition(V3Graph* fineDepsGraphp)
|
||||
: m_fineDepsGraphp(fineDepsGraphp) {}
|
||||
: m_fineDepsGraphp{fineDepsGraphp} {}
|
||||
~V3Partition() {}
|
||||
|
||||
// METHODS
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
class AbstractMTask : public V3GraphVertex {
|
||||
public:
|
||||
AbstractMTask(V3Graph* graphp)
|
||||
: V3GraphVertex(graphp) {}
|
||||
: V3GraphVertex{graphp} {}
|
||||
virtual ~AbstractMTask() override {}
|
||||
virtual uint32_t id() const = 0;
|
||||
virtual uint32_t cost() const = 0;
|
||||
@@ -43,7 +43,7 @@ public:
|
||||
typedef std::list<MTaskMoveVertex*> VxList;
|
||||
// CONSTRUCTORS
|
||||
AbstractLogicMTask(V3Graph* graphp)
|
||||
: AbstractMTask(graphp) {}
|
||||
: AbstractMTask{graphp} {}
|
||||
virtual ~AbstractLogicMTask() override {}
|
||||
// METHODS
|
||||
// Set of logic vertices in this mtask. Order is not significant.
|
||||
@@ -69,9 +69,9 @@ private:
|
||||
|
||||
public:
|
||||
ExecMTask(V3Graph* graphp, AstMTaskBody* bodyp, uint32_t id)
|
||||
: AbstractMTask(graphp)
|
||||
, m_bodyp(bodyp)
|
||||
, m_id(id) {}
|
||||
: AbstractMTask{graphp}
|
||||
, m_bodyp{bodyp}
|
||||
, m_id{id} {}
|
||||
AstMTaskBody* bodyp() const { return m_bodyp; }
|
||||
virtual uint32_t id() const override { return m_id; }
|
||||
uint32_t priority() const { return m_priority; }
|
||||
|
||||
+4
-4
@@ -136,8 +136,8 @@ public:
|
||||
bool m_file = false; // Buffer is start of new file
|
||||
int m_termState = 0; // Termination fsm
|
||||
VPreStream(FileLine* fl, V3PreLex* lexp)
|
||||
: m_curFilelinep(fl)
|
||||
, m_lexp(lexp) {
|
||||
: m_curFilelinep{fl}
|
||||
, m_lexp{lexp} {
|
||||
lexStreamDepthAdd(1);
|
||||
}
|
||||
~VPreStream() { lexStreamDepthAdd(-1); }
|
||||
@@ -173,8 +173,8 @@ public: // Used only by V3PreLex.cpp and V3PreProc.cpp
|
||||
|
||||
// CONSTRUCTORS
|
||||
V3PreLex(V3PreProcImp* preimpp, FileLine* filelinep)
|
||||
: m_preimpp(preimpp)
|
||||
, m_tokFilelinep(filelinep) {
|
||||
: m_preimpp{preimpp}
|
||||
, m_tokFilelinep{filelinep} {
|
||||
initFirstBuffer(filelinep);
|
||||
}
|
||||
~V3PreLex() {
|
||||
|
||||
+8
-8
@@ -51,10 +51,10 @@ class VDefine {
|
||||
bool m_cmdline; // Set on command line, don't `undefineall
|
||||
public:
|
||||
VDefine(FileLine* fl, const string& value, const string& params, bool cmdline)
|
||||
: m_fileline(fl)
|
||||
, m_value(value)
|
||||
, m_params(params)
|
||||
, m_cmdline(cmdline) {}
|
||||
: m_fileline{fl}
|
||||
, m_value{value}
|
||||
, m_params{params}
|
||||
, m_cmdline{cmdline} {}
|
||||
FileLine* fileline() const { return m_fileline; }
|
||||
string value() const { return m_value; }
|
||||
string params() const { return m_params; }
|
||||
@@ -80,8 +80,8 @@ public:
|
||||
void parenLevel(int value) { m_parenLevel = value; }
|
||||
std::vector<string>& args() { return m_args; }
|
||||
VDefineRef(const string& name, const string& params)
|
||||
: m_name(name)
|
||||
, m_params(params) {}
|
||||
: m_name{name}
|
||||
, m_params{params} {}
|
||||
~VDefineRef() {}
|
||||
};
|
||||
|
||||
@@ -96,8 +96,8 @@ public:
|
||||
bool on() const { return m_on; }
|
||||
bool everOn() const { return m_everOn; }
|
||||
VPreIfEntry(bool on, bool everOn)
|
||||
: m_on(on)
|
||||
, m_everOn(everOn || on) {} // Note everOn includes new state
|
||||
: m_on{on}
|
||||
, m_everOn{everOn || on} {} // Note everOn includes new state
|
||||
~VPreIfEntry() {}
|
||||
};
|
||||
|
||||
|
||||
+8
-17
@@ -43,7 +43,7 @@ private:
|
||||
AstUser4InUse m_inuser4;
|
||||
|
||||
// STATE
|
||||
bool m_noopt; // Disable optimization of variables in this block
|
||||
bool m_noopt = false; // Disable optimization of variables in this block
|
||||
|
||||
// METHODS
|
||||
VL_DEBUG_FUNC; // Declare debug()
|
||||
@@ -73,7 +73,6 @@ public:
|
||||
// CONSTRUCTORS
|
||||
explicit PremitAssignVisitor(AstNodeAssign* nodep) {
|
||||
UINFO(4, " PremitAssignVisitor on " << nodep << endl);
|
||||
m_noopt = false;
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~PremitAssignVisitor() override {}
|
||||
@@ -94,12 +93,12 @@ private:
|
||||
AstUser2InUse m_inuser2;
|
||||
|
||||
// STATE
|
||||
AstNodeModule* m_modp; // Current module
|
||||
AstCFunc* m_funcp; // Current block
|
||||
AstNode* m_stmtp; // Current statement
|
||||
AstWhile* m_inWhilep; // Inside while loop, special statement additions
|
||||
AstTraceInc* m_inTracep; // Inside while loop, special statement additions
|
||||
bool m_assignLhs; // Inside assignment lhs, don't breakup extracts
|
||||
AstNodeModule* m_modp = nullptr; // Current module
|
||||
AstCFunc* m_funcp = nullptr; // Current block
|
||||
AstNode* m_stmtp = nullptr; // Current statement
|
||||
AstWhile* m_inWhilep = nullptr; // Inside while loop, special statement additions
|
||||
AstTraceInc* m_inTracep = nullptr; // Inside while loop, special statement additions
|
||||
bool m_assignLhs = false; // Inside assignment lhs, don't breakup extracts
|
||||
|
||||
// METHODS
|
||||
VL_DEBUG_FUNC; // Declare debug()
|
||||
@@ -399,15 +398,7 @@ private:
|
||||
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit PremitVisitor(AstNetlist* nodep) {
|
||||
m_modp = nullptr;
|
||||
m_funcp = nullptr;
|
||||
m_stmtp = nullptr;
|
||||
m_inWhilep = nullptr;
|
||||
m_inTracep = nullptr;
|
||||
m_assignLhs = false;
|
||||
iterate(nodep);
|
||||
}
|
||||
explicit PremitVisitor(AstNetlist* nodep) { iterate(nodep); }
|
||||
virtual ~PremitVisitor() override {}
|
||||
};
|
||||
|
||||
|
||||
@@ -486,8 +486,8 @@ private:
|
||||
|
||||
public:
|
||||
explicit ProtectVisitor(AstNode* nodep)
|
||||
: m_libName(v3Global.opt.protectLib())
|
||||
, m_topName(v3Global.opt.prefix()) {
|
||||
: m_libName{v3Global.opt.protectLib()}
|
||||
, m_topName{v3Global.opt.prefix()} {
|
||||
iterate(nodep);
|
||||
}
|
||||
};
|
||||
|
||||
+11
-23
@@ -55,18 +55,18 @@ private:
|
||||
// STATE
|
||||
VDouble0 m_statReloops; // Statistic tracking
|
||||
VDouble0 m_statReItems; // Statistic tracking
|
||||
AstCFunc* m_cfuncp; // Current block
|
||||
AstCFunc* m_cfuncp = nullptr; // Current block
|
||||
|
||||
AssVec m_mgAssignps; // List of assignments merging
|
||||
AstCFunc* m_mgCfuncp; // Parent C function
|
||||
AstNode* m_mgNextp; // Next node
|
||||
AstNodeSel* m_mgSelLp; // Parent select, nullptr = idle
|
||||
AstNodeSel* m_mgSelRp; // Parent select, nullptr = constant
|
||||
AstNodeVarRef* m_mgVarrefLp; // Parent varref
|
||||
AstNodeVarRef* m_mgVarrefRp; // Parent varref, nullptr = constant
|
||||
AstConst* m_mgConstRp; // Parent RHS constant, nullptr = sel
|
||||
uint32_t m_mgIndexLo; // Merge range
|
||||
uint32_t m_mgIndexHi; // Merge range
|
||||
AstCFunc* m_mgCfuncp = nullptr; // Parent C function
|
||||
AstNode* m_mgNextp = nullptr; // Next node
|
||||
AstNodeSel* m_mgSelLp = nullptr; // Parent select, nullptr = idle
|
||||
AstNodeSel* m_mgSelRp = nullptr; // Parent select, nullptr = constant
|
||||
AstNodeVarRef* m_mgVarrefLp = nullptr; // Parent varref
|
||||
AstNodeVarRef* m_mgVarrefRp = nullptr; // Parent varref, nullptr = constant
|
||||
AstConst* m_mgConstRp = nullptr; // Parent RHS constant, nullptr = sel
|
||||
uint32_t m_mgIndexLo = 0; // Merge range
|
||||
uint32_t m_mgIndexHi = 0; // Merge range
|
||||
|
||||
// METHODS
|
||||
VL_DEBUG_FUNC; // Declare debug()
|
||||
@@ -238,19 +238,7 @@ private:
|
||||
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit ReloopVisitor(AstNetlist* nodep) {
|
||||
m_cfuncp = nullptr;
|
||||
m_mgCfuncp = nullptr;
|
||||
m_mgNextp = nullptr;
|
||||
m_mgSelLp = nullptr;
|
||||
m_mgSelRp = nullptr;
|
||||
m_mgVarrefLp = nullptr;
|
||||
m_mgVarrefRp = nullptr;
|
||||
m_mgConstRp = nullptr;
|
||||
m_mgIndexLo = 0;
|
||||
m_mgIndexHi = 0;
|
||||
iterate(nodep);
|
||||
}
|
||||
explicit ReloopVisitor(AstNetlist* nodep) { iterate(nodep); }
|
||||
virtual ~ReloopVisitor() override {
|
||||
V3Stats::addStat("Optimizations, Reloops", m_statReloops);
|
||||
V3Stats::addStat("Optimizations, Reloop iterations", m_statReItems);
|
||||
|
||||
+7
-17
@@ -51,11 +51,11 @@ private:
|
||||
typedef std::set<std::pair<AstVarRef*, AstScope*>> VarRefScopeSet;
|
||||
|
||||
// STATE, inside processing a single module
|
||||
AstNodeModule* m_modp; // Current module
|
||||
AstScope* m_scopep; // Current scope we are building
|
||||
AstNodeModule* m_modp = nullptr; // Current module
|
||||
AstScope* m_scopep = nullptr; // Current scope we are building
|
||||
// STATE, for passing down one level of hierarchy (may need save/restore)
|
||||
AstCell* m_aboveCellp; // Cell that instantiates this module
|
||||
AstScope* m_aboveScopep; // Scope that instantiates this scope
|
||||
AstCell* m_aboveCellp = nullptr; // Cell that instantiates this module
|
||||
AstScope* m_aboveScopep = nullptr; // Scope that instantiates this scope
|
||||
|
||||
PackageScopeMap m_packageScopes; // Scopes for each package
|
||||
VarScopeMap m_varScopes; // Varscopes created for each scope and var
|
||||
@@ -320,14 +320,7 @@ private:
|
||||
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit ScopeVisitor(AstNetlist* nodep) {
|
||||
m_aboveCellp = nullptr;
|
||||
m_aboveScopep = nullptr;
|
||||
m_modp = nullptr;
|
||||
m_scopep = nullptr;
|
||||
//
|
||||
iterate(nodep);
|
||||
}
|
||||
explicit ScopeVisitor(AstNetlist* nodep) { iterate(nodep); }
|
||||
virtual ~ScopeVisitor() override {}
|
||||
};
|
||||
|
||||
@@ -337,7 +330,7 @@ public:
|
||||
class ScopeCleanupVisitor : public AstNVisitor {
|
||||
private:
|
||||
// STATE
|
||||
AstScope* m_scopep; // Current scope we are building
|
||||
AstScope* m_scopep = nullptr; // Current scope we are building
|
||||
|
||||
// METHODS
|
||||
VL_DEBUG_FUNC; // Declare debug()
|
||||
@@ -402,10 +395,7 @@ private:
|
||||
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit ScopeCleanupVisitor(AstNetlist* nodep) {
|
||||
m_scopep = nullptr;
|
||||
iterate(nodep);
|
||||
}
|
||||
explicit ScopeCleanupVisitor(AstNetlist* nodep) { iterate(nodep); }
|
||||
virtual ~ScopeCleanupVisitor() override {}
|
||||
};
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ public:
|
||||
uint32_t m_id;
|
||||
// CONSTRUCTORS
|
||||
explicit ScoreboardTestElem(uint32_t score)
|
||||
: m_score(score) {
|
||||
: m_score{score} {
|
||||
static uint32_t s_serial = 0;
|
||||
m_id = ++s_serial;
|
||||
}
|
||||
|
||||
+10
-11
@@ -72,18 +72,17 @@ public:
|
||||
typename KeySet::iterator m_keyIt;
|
||||
typename Val2Keys::iterator m_valIt;
|
||||
SortByValueMap* m_sbvmp;
|
||||
bool m_end; // At the end()
|
||||
bool m_end = true; // At the end()
|
||||
|
||||
// CONSTRUCTORS
|
||||
explicit const_iterator(SortByValueMap* sbmvp) // for end()
|
||||
: m_sbvmp(sbmvp)
|
||||
, m_end(true) {}
|
||||
: m_sbvmp{sbmvp} {}
|
||||
const_iterator(typename Val2Keys::iterator valIt, typename KeySet::iterator keyIt,
|
||||
SortByValueMap* sbvmp)
|
||||
: m_keyIt(keyIt)
|
||||
, m_valIt(valIt)
|
||||
, m_sbvmp(sbvmp)
|
||||
, m_end(false) {}
|
||||
: m_keyIt{keyIt}
|
||||
, m_valIt{valIt}
|
||||
, m_sbvmp{sbvmp}
|
||||
, m_end{false} {}
|
||||
|
||||
// METHODS
|
||||
void advanceUntilValid() {
|
||||
@@ -204,10 +203,10 @@ public:
|
||||
|
||||
// CONSTRUCTORS
|
||||
explicit iterator(SortByValueMap* sbvmp)
|
||||
: const_iterator(sbvmp) {}
|
||||
: const_iterator{sbvmp} {}
|
||||
iterator(typename Val2Keys::iterator valIt, typename KeySet::iterator keyIt,
|
||||
SortByValueMap* sbvmp)
|
||||
: const_iterator(valIt, keyIt, sbvmp) {}
|
||||
: const_iterator{valIt, keyIt, sbvmp} {}
|
||||
|
||||
// METHODS
|
||||
iterator& operator++() {
|
||||
@@ -374,8 +373,8 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit V3Scoreboard(UserScoreFnp scoreFnp, bool slowAsserts)
|
||||
: m_scoreFnp(scoreFnp)
|
||||
, m_slowAsserts(slowAsserts) {}
|
||||
: m_scoreFnp{scoreFnp}
|
||||
, m_slowAsserts{slowAsserts} {}
|
||||
~V3Scoreboard() {}
|
||||
|
||||
// METHODS
|
||||
|
||||
+2
-2
@@ -55,8 +55,8 @@ public:
|
||||
V3TaskConnects* m_tconnects;
|
||||
// CONSTRUCTORS
|
||||
SimStackNode(AstFuncRef* funcp, V3TaskConnects* tconnects)
|
||||
: m_funcp(funcp)
|
||||
, m_tconnects(tconnects) {}
|
||||
: m_funcp{funcp}
|
||||
, m_tconnects{tconnects} {}
|
||||
~SimStackNode() {}
|
||||
};
|
||||
|
||||
|
||||
+3
-7
@@ -53,8 +53,8 @@ class SliceVisitor : public AstNVisitor {
|
||||
AstUser1InUse m_inuser1;
|
||||
|
||||
// STATE
|
||||
AstNode* m_assignp; // Assignment we are under
|
||||
bool m_assignError; // True if the current assign already has an error
|
||||
AstNode* m_assignp = nullptr; // Assignment we are under
|
||||
bool m_assignError = false; // True if the current assign already has an error
|
||||
|
||||
// METHODS
|
||||
VL_DEBUG_FUNC; // Declare debug()
|
||||
@@ -224,11 +224,7 @@ class SliceVisitor : public AstNVisitor {
|
||||
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit SliceVisitor(AstNetlist* nodep) {
|
||||
m_assignp = nullptr;
|
||||
m_assignError = false;
|
||||
iterate(nodep);
|
||||
}
|
||||
explicit SliceVisitor(AstNetlist* nodep) { iterate(nodep); }
|
||||
virtual ~SliceVisitor() override {}
|
||||
};
|
||||
|
||||
|
||||
+17
-18
@@ -100,8 +100,8 @@ class SplitNodeVertex : public V3GraphVertex {
|
||||
|
||||
protected:
|
||||
SplitNodeVertex(V3Graph* graphp, AstNode* nodep)
|
||||
: V3GraphVertex(graphp)
|
||||
, m_nodep(nodep) {}
|
||||
: V3GraphVertex{graphp}
|
||||
, m_nodep{nodep} {}
|
||||
virtual ~SplitNodeVertex() override {}
|
||||
// ACCESSORS
|
||||
// Do not make accessor for nodep(), It may change due to
|
||||
@@ -118,7 +118,7 @@ public:
|
||||
class SplitPliVertex : public SplitNodeVertex {
|
||||
public:
|
||||
explicit SplitPliVertex(V3Graph* graphp, AstNode* nodep)
|
||||
: SplitNodeVertex(graphp, nodep) {}
|
||||
: SplitNodeVertex{graphp, nodep} {}
|
||||
virtual ~SplitPliVertex() override {}
|
||||
virtual string name() const override { return "*PLI*"; }
|
||||
virtual string dotColor() const override { return "green"; }
|
||||
@@ -127,7 +127,7 @@ public:
|
||||
class SplitLogicVertex : public SplitNodeVertex {
|
||||
public:
|
||||
SplitLogicVertex(V3Graph* graphp, AstNode* nodep)
|
||||
: SplitNodeVertex(graphp, nodep) {}
|
||||
: SplitNodeVertex{graphp, nodep} {}
|
||||
virtual ~SplitLogicVertex() override {}
|
||||
virtual string dotColor() const override { return "yellow"; }
|
||||
};
|
||||
@@ -135,7 +135,7 @@ public:
|
||||
class SplitVarStdVertex : public SplitNodeVertex {
|
||||
public:
|
||||
SplitVarStdVertex(V3Graph* graphp, AstNode* nodep)
|
||||
: SplitNodeVertex(graphp, nodep) {}
|
||||
: SplitNodeVertex{graphp, nodep} {}
|
||||
virtual ~SplitVarStdVertex() override {}
|
||||
virtual string dotColor() const override { return "skyblue"; }
|
||||
};
|
||||
@@ -143,7 +143,7 @@ public:
|
||||
class SplitVarPostVertex : public SplitNodeVertex {
|
||||
public:
|
||||
SplitVarPostVertex(V3Graph* graphp, AstNode* nodep)
|
||||
: SplitNodeVertex(graphp, nodep) {}
|
||||
: SplitNodeVertex{graphp, nodep} {}
|
||||
virtual ~SplitVarPostVertex() override {}
|
||||
virtual string name() const override { return string("POST ") + SplitNodeVertex::name(); }
|
||||
virtual string dotColor() const override { return "CadetBlue"; }
|
||||
@@ -159,7 +159,7 @@ protected:
|
||||
enum { WEIGHT_NORMAL = 10 };
|
||||
SplitEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top, int weight,
|
||||
bool cutable = CUTABLE)
|
||||
: V3GraphEdge(graphp, fromp, top, weight, cutable) {}
|
||||
: V3GraphEdge{graphp, fromp, top, weight, cutable} {}
|
||||
virtual ~SplitEdge() override {}
|
||||
|
||||
public:
|
||||
@@ -188,7 +188,7 @@ uint32_t SplitEdge::s_stepNum = 0;
|
||||
class SplitPostEdge : public SplitEdge {
|
||||
public:
|
||||
SplitPostEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top)
|
||||
: SplitEdge(graphp, fromp, top, WEIGHT_NORMAL) {}
|
||||
: SplitEdge{graphp, fromp, top, WEIGHT_NORMAL} {}
|
||||
virtual ~SplitPostEdge() override {}
|
||||
virtual bool followScoreboard() const override { return false; }
|
||||
virtual string dotColor() const override { return "khaki"; }
|
||||
@@ -197,7 +197,7 @@ public:
|
||||
class SplitLVEdge : public SplitEdge {
|
||||
public:
|
||||
SplitLVEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top)
|
||||
: SplitEdge(graphp, fromp, top, WEIGHT_NORMAL) {}
|
||||
: SplitEdge{graphp, fromp, top, WEIGHT_NORMAL} {}
|
||||
virtual ~SplitLVEdge() override {}
|
||||
virtual bool followScoreboard() const override { return true; }
|
||||
virtual string dotColor() const override { return "yellowGreen"; }
|
||||
@@ -206,7 +206,7 @@ public:
|
||||
class SplitRVEdge : public SplitEdge {
|
||||
public:
|
||||
SplitRVEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top)
|
||||
: SplitEdge(graphp, fromp, top, WEIGHT_NORMAL) {}
|
||||
: SplitEdge{graphp, fromp, top, WEIGHT_NORMAL} {}
|
||||
virtual ~SplitRVEdge() override {}
|
||||
virtual bool followScoreboard() const override { return true; }
|
||||
virtual string dotColor() const override { return "green"; }
|
||||
@@ -215,7 +215,7 @@ public:
|
||||
struct SplitScorebdEdge : public SplitEdge {
|
||||
public:
|
||||
SplitScorebdEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top)
|
||||
: SplitEdge(graphp, fromp, top, WEIGHT_NORMAL) {}
|
||||
: SplitEdge{graphp, fromp, top, WEIGHT_NORMAL} {}
|
||||
virtual ~SplitScorebdEdge() override {}
|
||||
virtual bool followScoreboard() const override { return true; }
|
||||
virtual string dotColor() const override { return "blue"; }
|
||||
@@ -226,7 +226,7 @@ struct SplitStrictEdge : public SplitEdge {
|
||||
// The only non-cutable edge type
|
||||
public:
|
||||
SplitStrictEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top)
|
||||
: SplitEdge(graphp, fromp, top, WEIGHT_NORMAL, NOT_CUTABLE) {}
|
||||
: SplitEdge{graphp, fromp, top, WEIGHT_NORMAL, NOT_CUTABLE} {}
|
||||
virtual ~SplitStrictEdge() override {}
|
||||
virtual bool followScoreboard() const override { return true; }
|
||||
virtual string dotColor() const override { return "blue"; }
|
||||
@@ -701,9 +701,9 @@ public:
|
||||
// and generates its split blocks, writing the split blocks
|
||||
// into *newBlocksp.
|
||||
EmitSplitVisitor(AstAlways* nodep, const IfColorVisitor* ifColorp, AlwaysVec* newBlocksp)
|
||||
: m_origAlwaysp(nodep)
|
||||
, m_ifColorp(ifColorp)
|
||||
, m_newBlocksp(newBlocksp) {
|
||||
: m_origAlwaysp{nodep}
|
||||
, m_ifColorp{ifColorp}
|
||||
, m_newBlocksp{newBlocksp} {
|
||||
UINFO(6, " splitting always " << nodep << endl);
|
||||
}
|
||||
|
||||
@@ -830,12 +830,11 @@ private:
|
||||
ReplaceMap m_replaceBlocks;
|
||||
|
||||
// AstNodeIf* whose condition we're currently visiting
|
||||
AstNode* m_curIfConditional;
|
||||
AstNode* m_curIfConditional = nullptr;
|
||||
|
||||
// CONSTRUCTORS
|
||||
public:
|
||||
explicit SplitVisitor(AstNetlist* nodep)
|
||||
: m_curIfConditional(nullptr) {
|
||||
explicit SplitVisitor(AstNetlist* nodep) {
|
||||
iterate(nodep);
|
||||
|
||||
// Splice newly-split blocks into the tree. Remove placeholders
|
||||
|
||||
+5
-9
@@ -45,7 +45,7 @@ public:
|
||||
class SplitAsFindVisitor : public SplitAsBaseVisitor {
|
||||
private:
|
||||
// STATE
|
||||
AstVarScope* m_splitVscp; // Variable we want to split
|
||||
AstVarScope* m_splitVscp = nullptr; // Variable we want to split
|
||||
|
||||
// METHODS
|
||||
virtual void visit(AstVarRef* nodep) override {
|
||||
@@ -57,10 +57,7 @@ private:
|
||||
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit SplitAsFindVisitor(AstAlways* nodep) {
|
||||
m_splitVscp = nullptr;
|
||||
iterate(nodep);
|
||||
}
|
||||
explicit SplitAsFindVisitor(AstAlways* nodep) { iterate(nodep); }
|
||||
virtual ~SplitAsFindVisitor() override {}
|
||||
// METHODS
|
||||
AstVarScope* splitVscp() const { return m_splitVscp; }
|
||||
@@ -117,8 +114,8 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
SplitAsCleanVisitor(AstAlways* nodep, AstVarScope* vscp, bool modeMatch)
|
||||
: m_splitVscp(vscp)
|
||||
, m_modeMatch(modeMatch) {
|
||||
: m_splitVscp{vscp}
|
||||
, m_modeMatch{modeMatch} {
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~SplitAsCleanVisitor() override {}
|
||||
@@ -135,7 +132,7 @@ private:
|
||||
|
||||
// STATE
|
||||
VDouble0 m_statSplits; // Statistic tracking
|
||||
AstVarScope* m_splitVscp; // Variable we want to split
|
||||
AstVarScope* m_splitVscp = nullptr; // Variable we want to split
|
||||
|
||||
// METHODS
|
||||
void splitAlways(AstAlways* nodep) {
|
||||
@@ -187,7 +184,6 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit SplitAsVisitor(AstNetlist* nodep) {
|
||||
m_splitVscp = nullptr;
|
||||
AstNode::user1ClearTree(); // user1p() used on entire tree
|
||||
iterate(nodep);
|
||||
}
|
||||
|
||||
+36
-36
@@ -243,29 +243,29 @@ class UnpackRef {
|
||||
bool m_ftask; // true if the reference is in function/task. false if in module.
|
||||
public:
|
||||
UnpackRef(AstNode* stmtp, AstVarRef* nodep, bool ftask)
|
||||
: m_contextp(stmtp)
|
||||
, m_nodep(nodep)
|
||||
, m_index(-1)
|
||||
, m_msb(0)
|
||||
, m_lsb(1)
|
||||
, m_lvalue(nodep->lvalue())
|
||||
, m_ftask(ftask) {}
|
||||
: m_contextp{stmtp}
|
||||
, m_nodep{nodep}
|
||||
, m_index{-1}
|
||||
, m_msb{0}
|
||||
, m_lsb{1}
|
||||
, m_lvalue{nodep->lvalue()}
|
||||
, m_ftask{ftask} {}
|
||||
UnpackRef(AstNode* stmtp, AstArraySel* nodep, int idx, bool lvalue, bool ftask)
|
||||
: m_contextp(stmtp)
|
||||
, m_nodep(nodep)
|
||||
, m_index(idx)
|
||||
, m_msb(0)
|
||||
, m_lsb(1)
|
||||
, m_lvalue(lvalue)
|
||||
, m_ftask(ftask) {}
|
||||
: m_contextp{stmtp}
|
||||
, m_nodep{nodep}
|
||||
, m_index{idx}
|
||||
, m_msb{0}
|
||||
, m_lsb{1}
|
||||
, m_lvalue{lvalue}
|
||||
, m_ftask{ftask} {}
|
||||
UnpackRef(AstNode* stmtp, AstSliceSel* nodep, int msb, int lsb, bool lvalue, bool ftask)
|
||||
: m_contextp(stmtp)
|
||||
, m_nodep(nodep)
|
||||
, m_index(msb == lsb ? msb : -1) // Equivalent to ArraySel
|
||||
, m_msb(msb)
|
||||
, m_lsb(lsb)
|
||||
, m_lvalue(lvalue)
|
||||
, m_ftask(ftask) {}
|
||||
: m_contextp{stmtp}
|
||||
, m_nodep{nodep}
|
||||
, m_index{msb == lsb ? msb : -1} // Equivalent to ArraySel
|
||||
, m_msb{msb}
|
||||
, m_lsb{lsb}
|
||||
, m_lvalue{lvalue}
|
||||
, m_ftask{ftask} {}
|
||||
AstNode* nodep() const { return m_nodep; }
|
||||
bool isSingleRef() const {
|
||||
return VN_IS(m_nodep, ArraySel) || (m_msb == m_lsb && m_lsb == m_index);
|
||||
@@ -359,7 +359,7 @@ public:
|
||||
iterateChildren(nodep);
|
||||
}
|
||||
explicit Visitor(RefsInModule& p)
|
||||
: m_parent(p) {}
|
||||
: m_parent{p} {}
|
||||
} v(*this);
|
||||
v.iterate(nodep);
|
||||
}
|
||||
@@ -766,7 +766,7 @@ class SplitUnpackedVarVisitor : public AstNVisitor, public SplitVarImpl {
|
||||
|
||||
public:
|
||||
explicit SplitUnpackedVarVisitor(AstNetlist* nodep)
|
||||
: m_refs() {
|
||||
: m_refs{} {
|
||||
iterate(nodep);
|
||||
}
|
||||
~SplitUnpackedVarVisitor() {
|
||||
@@ -808,9 +808,9 @@ class SplitNewVar {
|
||||
AstVar* m_varp; // The LSB of this variable is always 0, not m_lsb
|
||||
public:
|
||||
SplitNewVar(int lsb, int bitwidth, AstVar* varp = nullptr)
|
||||
: m_lsb(lsb)
|
||||
, m_bitwidth(bitwidth)
|
||||
, m_varp(varp) {}
|
||||
: m_lsb{lsb}
|
||||
, m_bitwidth{bitwidth}
|
||||
, m_varp{varp} {}
|
||||
int lsb() const { return m_lsb; }
|
||||
int msb() const { return m_lsb + m_bitwidth - 1; }
|
||||
int bitwidth() const { return m_bitwidth; }
|
||||
@@ -835,13 +835,13 @@ class PackedVarRefEntry {
|
||||
|
||||
public:
|
||||
PackedVarRefEntry(AstSel* selp, int lsb, int bitwidth)
|
||||
: m_nodep(selp)
|
||||
, m_lsb(lsb)
|
||||
, m_bitwidth(bitwidth) {}
|
||||
: m_nodep{selp}
|
||||
, m_lsb{lsb}
|
||||
, m_bitwidth{bitwidth} {}
|
||||
PackedVarRefEntry(AstVarRef* refp, int lsb, int bitwidth)
|
||||
: m_nodep(refp)
|
||||
, m_lsb(lsb)
|
||||
, m_bitwidth(bitwidth) {}
|
||||
: m_nodep{refp}
|
||||
, m_lsb{lsb}
|
||||
, m_bitwidth{bitwidth} {}
|
||||
AstNode* nodep() const { return m_nodep; }
|
||||
int lsb() const { return m_lsb; }
|
||||
int msb() const { return m_lsb + m_bitwidth - 1; }
|
||||
@@ -897,7 +897,7 @@ public:
|
||||
return m_rhs;
|
||||
}
|
||||
explicit PackedVarRef(AstVar* varp)
|
||||
: m_basicp(varp->dtypep()->basicp()) {}
|
||||
: m_basicp{varp->dtypep()->basicp()} {}
|
||||
void append(const PackedVarRefEntry& e, bool lvalue) {
|
||||
UASSERT(!m_dedupDone, "cannot add after dedup()");
|
||||
if (lvalue)
|
||||
@@ -1205,9 +1205,9 @@ class SplitPackedVarVisitor : public AstNVisitor, public SplitVarImpl {
|
||||
public:
|
||||
// When reusing the information from SplitUnpackedVarVisitor
|
||||
SplitPackedVarVisitor(AstNetlist* nodep, SplitVarRefsMap& refs)
|
||||
: m_netp(nodep)
|
||||
, m_modp(nullptr)
|
||||
, m_numSplit(0) {
|
||||
: m_netp{nodep}
|
||||
, m_modp{nullptr}
|
||||
, m_numSplit{0} {
|
||||
// If you want ignore refs and walk the tne entire AST,
|
||||
// just call iterateChildren(m_modp) and split() for each module
|
||||
for (SplitVarRefsMap::iterator it = refs.begin(), it_end = refs.end(); it != it_end;
|
||||
|
||||
+2
-2
@@ -208,8 +208,8 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
StatsVisitor(AstNetlist* nodep, const string& stage, bool fast)
|
||||
: m_stage(stage)
|
||||
, m_fast(fast) {
|
||||
: m_stage{stage}
|
||||
, m_fast{fast} {
|
||||
UINFO(9, "Starting stats, fast=" << fast << endl);
|
||||
m_cfuncp = nullptr;
|
||||
m_counting = !m_fast;
|
||||
|
||||
+8
-8
@@ -32,12 +32,12 @@ class VDouble0 {
|
||||
public:
|
||||
// METHODS
|
||||
VDouble0()
|
||||
: m_d(0) {}
|
||||
: m_d{0.0} {}
|
||||
~VDouble0() {}
|
||||
|
||||
// Implicit conversion operators:
|
||||
explicit VDouble0(const vluint64_t v)
|
||||
: m_d(v) {}
|
||||
: m_d{static_cast<double>(v)} {}
|
||||
operator double() const { return m_d; }
|
||||
|
||||
// Explicit operators:
|
||||
@@ -90,12 +90,12 @@ public:
|
||||
// CONSTRUCTORS
|
||||
V3Statistic(const string& stage, const string& name, double count, bool sumit = false,
|
||||
bool perf = false)
|
||||
: m_name(name)
|
||||
, m_count(count)
|
||||
, m_stage(stage)
|
||||
, m_sumit(sumit)
|
||||
, m_perf(perf)
|
||||
, m_printit(true) {}
|
||||
: m_name{name}
|
||||
, m_count{count}
|
||||
, m_stage{stage}
|
||||
, m_sumit{sumit}
|
||||
, m_perf{perf}
|
||||
, m_printit{true} {}
|
||||
virtual ~V3Statistic() {}
|
||||
};
|
||||
|
||||
|
||||
@@ -182,7 +182,7 @@ public:
|
||||
|
||||
// CONSTRUCTORS
|
||||
explicit StatsReport(std::ofstream* aofp)
|
||||
: os(*aofp) {
|
||||
: os{*aofp} {
|
||||
header();
|
||||
sumit();
|
||||
stars();
|
||||
|
||||
+2
-2
@@ -127,7 +127,7 @@ public:
|
||||
m_inthash[7] = 0x5be0cd19;
|
||||
}
|
||||
explicit VHashSha256(const string& data)
|
||||
: VHashSha256() {
|
||||
: VHashSha256{} {
|
||||
insert(data);
|
||||
}
|
||||
~VHashSha256() {}
|
||||
@@ -165,7 +165,7 @@ class VName {
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit VName(const string& name)
|
||||
: m_name(name) {}
|
||||
: m_name{name} {}
|
||||
~VName() {}
|
||||
// METHODS
|
||||
void name(const string& name) {
|
||||
|
||||
+7
-11
@@ -67,18 +67,16 @@ protected:
|
||||
class SubstVarEntry {
|
||||
// MEMBERS
|
||||
AstVar* m_varp; // Variable this tracks
|
||||
bool m_wordAssign; // True if any word assignments
|
||||
bool m_wordUse; // True if any individual word usage
|
||||
bool m_wordAssign = false; // True if any word assignments
|
||||
bool m_wordUse = false; // True if any individual word usage
|
||||
SubstVarWord m_whole; // Data for whole vector used at once
|
||||
std::vector<SubstVarWord> m_words; // Data for every word, if multi word variable
|
||||
int debug() { return SubstBaseVisitor::debug(); }
|
||||
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit SubstVarEntry(AstVar* varp) { // Construction for when a var is used
|
||||
m_varp = varp;
|
||||
m_wordAssign = false;
|
||||
m_wordUse = false;
|
||||
explicit SubstVarEntry(AstVar* varp)
|
||||
: m_varp{varp} { // Construction for when a var is used
|
||||
m_words.resize(varp->widthWords());
|
||||
m_whole.clear();
|
||||
for (int i = 0; i < varp->widthWords(); i++) m_words[i].clear();
|
||||
@@ -211,7 +209,7 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
SubstUseVisitor(AstNode* nodep, int origStep)
|
||||
: m_origStep(origStep) {
|
||||
: m_origStep{origStep} {
|
||||
UINFO(9, " SubstUseVisitor " << origStep << " " << nodep << endl);
|
||||
iterate(nodep);
|
||||
}
|
||||
@@ -234,8 +232,8 @@ private:
|
||||
|
||||
// STATE
|
||||
std::vector<SubstVarEntry*> m_entryps; // Nodes to delete when we are finished
|
||||
int m_ops; // Number of operators on assign rhs
|
||||
int m_assignStep; // Assignment number to determine var lifetime
|
||||
int m_ops = 0; // Number of operators on assign rhs
|
||||
int m_assignStep = 0; // Assignment number to determine var lifetime
|
||||
VDouble0 m_statSubsts; // Statistic tracking
|
||||
|
||||
enum {
|
||||
@@ -370,8 +368,6 @@ public:
|
||||
explicit SubstVisitor(AstNode* nodep) {
|
||||
AstNode::user1ClearTree(); // user1p() used on entire tree
|
||||
AstNode::user2ClearTree(); // user2p() used on entire tree
|
||||
m_ops = 0;
|
||||
m_assignStep = 0;
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~SubstVisitor() override {
|
||||
|
||||
+6
-6
@@ -57,8 +57,8 @@ private:
|
||||
|
||||
public:
|
||||
TspVertexTmpl(V3Graph* graphp, const T_Key& k)
|
||||
: V3GraphVertex(graphp)
|
||||
, m_key(k) {}
|
||||
: V3GraphVertex{graphp}
|
||||
, m_key{k} {}
|
||||
virtual ~TspVertexTmpl() override {}
|
||||
const T_Key& key() const { return m_key; }
|
||||
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
|
||||
// CONSTRUCTORS
|
||||
TspGraphTmpl()
|
||||
: V3Graph() {}
|
||||
: V3Graph{} {}
|
||||
virtual ~TspGraphTmpl() override {}
|
||||
|
||||
// METHODS
|
||||
@@ -503,9 +503,9 @@ void V3TSP::tspSort(const V3TSP::StateVec& states, V3TSP::StateVec* resultp) {
|
||||
class TspTestState : public V3TSP::TspStateBase {
|
||||
public:
|
||||
TspTestState(unsigned xpos, unsigned ypos)
|
||||
: m_xpos(xpos)
|
||||
, m_ypos(ypos)
|
||||
, m_serial(++m_serialNext) {}
|
||||
: m_xpos{xpos}
|
||||
, m_ypos{ypos}
|
||||
, m_serial{++m_serialNext} {}
|
||||
~TspTestState() {}
|
||||
virtual int cost(const TspStateBase* otherp) const override {
|
||||
return cost(dynamic_cast<const TspTestState*>(otherp));
|
||||
|
||||
+10
-18
@@ -57,7 +57,8 @@ public:
|
||||
virtual void varRefCb(AstVarRef* nodep) override;
|
||||
|
||||
// CONSTRUCTORS
|
||||
explicit TableSimulateVisitor(TableVisitor* cbthis) { m_cbthis = cbthis; }
|
||||
explicit TableSimulateVisitor(TableVisitor* cbthis)
|
||||
: m_cbthis{cbthis} {}
|
||||
virtual ~TableSimulateVisitor() override {}
|
||||
};
|
||||
|
||||
@@ -70,22 +71,22 @@ private:
|
||||
// Cleared on each always/assignw
|
||||
|
||||
// STATE
|
||||
double m_totalBytes; // Total bytes in tables created
|
||||
double m_totalBytes = 0; // Total bytes in tables created
|
||||
VDouble0 m_statTablesCre; // Statistic tracking
|
||||
|
||||
// State cleared on each module
|
||||
AstNodeModule* m_modp; // Current MODULE
|
||||
int m_modTables; // Number of tables created in this module
|
||||
AstNodeModule* m_modp = nullptr; // Current MODULE
|
||||
int m_modTables = 0; // Number of tables created in this module
|
||||
typedef std::deque<AstVarScope*> ModTableVector;
|
||||
ModTableVector m_modTableVscs; // All tables created
|
||||
|
||||
// State cleared on each scope
|
||||
AstScope* m_scopep; // Current SCOPE
|
||||
AstScope* m_scopep = nullptr; // Current SCOPE
|
||||
|
||||
// State cleared on each always/assignw
|
||||
bool m_assignDly; // Consists of delayed assignments instead of normal assignments
|
||||
int m_inWidth; // Input table width
|
||||
int m_outWidth; // Output table width
|
||||
bool m_assignDly = false; // Consists of delayed assignments instead of normal assignments
|
||||
int m_inWidth = 0; // Input table width
|
||||
int m_outWidth = 0; // Output table width
|
||||
std::deque<AstVarScope*> m_inVarps; // Input variable list
|
||||
std::deque<AstVarScope*> m_outVarps; // Output variable list
|
||||
std::deque<bool> m_outNotSet; // True if output variable is not set at some point
|
||||
@@ -451,16 +452,7 @@ private:
|
||||
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit TableVisitor(AstNetlist* nodep) {
|
||||
m_modp = nullptr;
|
||||
m_modTables = 0;
|
||||
m_scopep = nullptr;
|
||||
m_assignDly = 0;
|
||||
m_inWidth = 0;
|
||||
m_outWidth = 0;
|
||||
m_totalBytes = 0;
|
||||
iterate(nodep);
|
||||
}
|
||||
explicit TableVisitor(AstNetlist* nodep) { iterate(nodep); }
|
||||
virtual ~TableVisitor() override { //
|
||||
V3Stats::addStat("Optimizations, Tables created", m_statTablesCre);
|
||||
}
|
||||
|
||||
+13
-21
@@ -44,7 +44,7 @@ class TaskBaseVertex : public V3GraphVertex {
|
||||
bool m_noInline = false; // Marked with pragma
|
||||
public:
|
||||
explicit TaskBaseVertex(V3Graph* graphp)
|
||||
: V3GraphVertex(graphp) {}
|
||||
: V3GraphVertex{graphp} {}
|
||||
virtual ~TaskBaseVertex() override {}
|
||||
bool pure() const { return m_impurep == nullptr; }
|
||||
AstNode* impureNode() const { return m_impurep; }
|
||||
@@ -56,14 +56,12 @@ public:
|
||||
class TaskFTaskVertex : public TaskBaseVertex {
|
||||
// Every task gets a vertex, and we link tasks together based on funcrefs.
|
||||
AstNodeFTask* m_nodep;
|
||||
AstCFunc* m_cFuncp;
|
||||
AstCFunc* m_cFuncp = nullptr;
|
||||
|
||||
public:
|
||||
TaskFTaskVertex(V3Graph* graphp, AstNodeFTask* nodep)
|
||||
: TaskBaseVertex(graphp)
|
||||
, m_nodep(nodep) {
|
||||
m_cFuncp = nullptr;
|
||||
}
|
||||
: TaskBaseVertex{graphp}
|
||||
, m_nodep{nodep} {}
|
||||
virtual ~TaskFTaskVertex() override {}
|
||||
AstNodeFTask* nodep() const { return m_nodep; }
|
||||
virtual string name() const override { return nodep()->name(); }
|
||||
@@ -77,7 +75,7 @@ class TaskCodeVertex : public TaskBaseVertex {
|
||||
// Top vertex for all calls not under another task
|
||||
public:
|
||||
explicit TaskCodeVertex(V3Graph* graphp)
|
||||
: TaskBaseVertex(graphp) {}
|
||||
: TaskBaseVertex{graphp} {}
|
||||
virtual ~TaskCodeVertex() override {}
|
||||
virtual string name() const override { return "*CODE*"; }
|
||||
virtual string dotColor() const override { return "green"; }
|
||||
@@ -86,7 +84,7 @@ public:
|
||||
class TaskEdge : public V3GraphEdge {
|
||||
public:
|
||||
TaskEdge(V3Graph* graphp, TaskBaseVertex* fromp, TaskBaseVertex* top)
|
||||
: V3GraphEdge(graphp, fromp, top, 1, false) {}
|
||||
: V3GraphEdge{graphp, fromp, top, 1, false} {}
|
||||
virtual ~TaskEdge() override {}
|
||||
virtual string dotLabel() const override { return "w" + cvtToStr(weight()); }
|
||||
};
|
||||
@@ -333,12 +331,12 @@ private:
|
||||
|
||||
// STATE
|
||||
TaskStateVisitor* m_statep; // Common state between visitors
|
||||
AstNodeModule* m_modp; // Current module
|
||||
AstTopScope* m_topScopep; // Current top scope
|
||||
AstScope* m_scopep; // Current scope
|
||||
InsertMode m_insMode; // How to insert
|
||||
AstNode* m_insStmtp; // Where to insert statement
|
||||
int m_modNCalls; // Incrementing func # for making symbols
|
||||
AstNodeModule* m_modp = nullptr; // Current module
|
||||
AstTopScope* m_topScopep = nullptr; // Current top scope
|
||||
AstScope* m_scopep = nullptr; // Current scope
|
||||
InsertMode m_insMode = IM_BEFORE; // How to insert
|
||||
AstNode* m_insStmtp = nullptr; // Where to insert statement
|
||||
int m_modNCalls = 0; // Incrementing func # for making symbols
|
||||
DpiNames m_dpiNames; // Map of all created DPI functions
|
||||
|
||||
// METHODS
|
||||
@@ -1353,13 +1351,7 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
TaskVisitor(AstNetlist* nodep, TaskStateVisitor* statep)
|
||||
: m_statep(statep) {
|
||||
m_modp = nullptr;
|
||||
m_topScopep = nullptr;
|
||||
m_scopep = nullptr;
|
||||
m_insMode = IM_BEFORE;
|
||||
m_insStmtp = nullptr;
|
||||
m_modNCalls = 0;
|
||||
: m_statep{statep} {
|
||||
AstNode::user1ClearTree();
|
||||
iterate(nodep);
|
||||
}
|
||||
|
||||
+20
-29
@@ -60,14 +60,14 @@ public:
|
||||
enum { ACTIVITY_ALWAYS = ((1UL << 31) - 2) };
|
||||
enum { ACTIVITY_SLOW = 0 };
|
||||
TraceActivityVertex(V3Graph* graphp, AstNode* nodep, bool slow)
|
||||
: V3GraphVertex(graphp)
|
||||
, m_insertp(nodep) {
|
||||
: V3GraphVertex{graphp}
|
||||
, m_insertp{nodep} {
|
||||
m_activityCode = 0;
|
||||
m_slow = slow;
|
||||
}
|
||||
TraceActivityVertex(V3Graph* graphp, vlsint32_t code)
|
||||
: V3GraphVertex(graphp)
|
||||
, m_insertp(nullptr) {
|
||||
: V3GraphVertex{graphp}
|
||||
, m_insertp{nullptr} {
|
||||
m_activityCode = code;
|
||||
m_slow = false;
|
||||
}
|
||||
@@ -100,8 +100,8 @@ class TraceCFuncVertex : public V3GraphVertex {
|
||||
|
||||
public:
|
||||
TraceCFuncVertex(V3Graph* graphp, AstCFunc* nodep)
|
||||
: V3GraphVertex(graphp)
|
||||
, m_nodep(nodep) {}
|
||||
: V3GraphVertex{graphp}
|
||||
, m_nodep{nodep} {}
|
||||
virtual ~TraceCFuncVertex() override {}
|
||||
// ACCESSORS
|
||||
AstCFunc* nodep() const { return m_nodep; }
|
||||
@@ -113,13 +113,12 @@ public:
|
||||
class TraceTraceVertex : public V3GraphVertex {
|
||||
AstTraceDecl* const m_nodep; // TRACEINC this represents
|
||||
// nullptr, or other vertex with the real code() that duplicates this one
|
||||
TraceTraceVertex* m_duplicatep;
|
||||
TraceTraceVertex* m_duplicatep = nullptr;
|
||||
|
||||
public:
|
||||
TraceTraceVertex(V3Graph* graphp, AstTraceDecl* nodep)
|
||||
: V3GraphVertex(graphp)
|
||||
, m_nodep(nodep)
|
||||
, m_duplicatep(nullptr) {}
|
||||
: V3GraphVertex{graphp}
|
||||
, m_nodep{nodep} {}
|
||||
virtual ~TraceTraceVertex() override {}
|
||||
// ACCESSORS
|
||||
AstTraceDecl* nodep() const { return m_nodep; }
|
||||
@@ -138,8 +137,8 @@ class TraceVarVertex : public V3GraphVertex {
|
||||
|
||||
public:
|
||||
TraceVarVertex(V3Graph* graphp, AstVarScope* nodep)
|
||||
: V3GraphVertex(graphp)
|
||||
, m_nodep(nodep) {}
|
||||
: V3GraphVertex{graphp}
|
||||
, m_nodep{nodep} {}
|
||||
virtual ~TraceVarVertex() override {}
|
||||
// ACCESSORS
|
||||
AstVarScope* nodep() const { return m_nodep; }
|
||||
@@ -168,16 +167,16 @@ private:
|
||||
// AstUser4InUse In V3Hashed
|
||||
|
||||
// STATE
|
||||
AstNodeModule* m_topModp; // Module to add variables to
|
||||
AstScope* m_topScopep; // Scope to add variables to
|
||||
AstCFunc* m_funcp; // C function adding to graph
|
||||
AstTraceDecl* m_tracep; // Trace function adding to graph
|
||||
AstVarScope* m_activityVscp; // Activity variable
|
||||
uint32_t m_activityNumber; // Count of fields in activity variable
|
||||
uint32_t m_code; // Trace ident code# being assigned
|
||||
AstNodeModule* m_topModp = nullptr; // Module to add variables to
|
||||
AstScope* m_topScopep = nullptr; // Scope to add variables to
|
||||
AstCFunc* m_funcp = nullptr; // C function adding to graph
|
||||
AstTraceDecl* m_tracep = nullptr; // Trace function adding to graph
|
||||
AstVarScope* m_activityVscp = nullptr; // Activity variable
|
||||
uint32_t m_activityNumber = 0; // Count of fields in activity variable
|
||||
uint32_t m_code = 0; // Trace ident code# being assigned
|
||||
V3Graph m_graph; // Var/CFunc tracking
|
||||
TraceActivityVertex* const m_alwaysVtxp; // "Always trace" vertex
|
||||
bool m_finding; // Pass one of algorithm?
|
||||
bool m_finding = false; // Pass one of algorithm?
|
||||
|
||||
VDouble0 m_statChgSigs; // Statistic tracking
|
||||
VDouble0 m_statUniqSigs; // Statistic tracking
|
||||
@@ -874,15 +873,7 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit TraceVisitor(AstNetlist* nodep)
|
||||
: m_alwaysVtxp(new TraceActivityVertex(&m_graph, TraceActivityVertex::ACTIVITY_ALWAYS)) {
|
||||
m_funcp = nullptr;
|
||||
m_tracep = nullptr;
|
||||
m_topModp = nullptr;
|
||||
m_topScopep = nullptr;
|
||||
m_finding = false;
|
||||
m_activityVscp = nullptr;
|
||||
m_activityNumber = 0;
|
||||
m_code = 0;
|
||||
: m_alwaysVtxp{new TraceActivityVertex{&m_graph, TraceActivityVertex::ACTIVITY_ALWAYS}} {
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~TraceVisitor() override {
|
||||
|
||||
+9
-19
@@ -36,15 +36,15 @@ private:
|
||||
// NODE STATE
|
||||
|
||||
// STATE
|
||||
AstScope* m_topScopep; // Current top scope
|
||||
AstCFunc* m_initFuncp; // Trace function being built
|
||||
AstCFunc* m_initSubFuncp; // Trace function being built (under m_init)
|
||||
int m_initSubStmts; // Number of statements in function
|
||||
int m_funcNum; // Function number being built
|
||||
AstVarScope* m_traVscp; // Signal being trace constructed
|
||||
AstNode* m_traValuep; // Signal being traced's value to trace in it
|
||||
AstScope* m_topScopep = nullptr; // Current top scope
|
||||
AstCFunc* m_initFuncp = nullptr; // Trace function being built
|
||||
AstCFunc* m_initSubFuncp = nullptr; // Trace function being built (under m_init)
|
||||
int m_initSubStmts = 0; // Number of statements in function
|
||||
int m_funcNum = 0; // Function number being built
|
||||
AstVarScope* m_traVscp = nullptr; // Signal being trace constructed
|
||||
AstNode* m_traValuep = nullptr; // Signal being traced's value to trace in it
|
||||
string m_traShowname; // Signal being traced's component name
|
||||
bool m_interface; // Currently tracing an interface
|
||||
bool m_interface = false; // Currently tracing an interface
|
||||
|
||||
VDouble0 m_statSigs; // Statistic tracking
|
||||
VDouble0 m_statIgnSigs; // Statistic tracking
|
||||
@@ -338,17 +338,7 @@ private:
|
||||
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit TraceDeclVisitor(AstNetlist* nodep) {
|
||||
m_topScopep = nullptr;
|
||||
m_initFuncp = nullptr;
|
||||
m_initSubFuncp = nullptr;
|
||||
m_initSubStmts = 0;
|
||||
m_funcNum = 0;
|
||||
m_traVscp = nullptr;
|
||||
m_traValuep = nullptr;
|
||||
m_interface = false;
|
||||
iterate(nodep);
|
||||
}
|
||||
explicit TraceDeclVisitor(AstNetlist* nodep) { iterate(nodep); }
|
||||
virtual ~TraceDeclVisitor() override {
|
||||
V3Stats::addStat("Tracing, Traced signals", m_statSigs);
|
||||
V3Stats::addStat("Tracing, Ignored signals", m_statIgnSigs);
|
||||
|
||||
+10
-16
@@ -85,8 +85,8 @@ class TristateVertex : public V3GraphVertex {
|
||||
bool m_processed = false; // Tristating was cleaned up
|
||||
public:
|
||||
TristateVertex(V3Graph* graphp, AstNode* nodep)
|
||||
: V3GraphVertex(graphp)
|
||||
, m_nodep(nodep) {}
|
||||
: V3GraphVertex{graphp}
|
||||
, m_nodep{nodep} {}
|
||||
virtual ~TristateVertex() override {}
|
||||
// ACCESSORS
|
||||
AstNode* nodep() const { return m_nodep; }
|
||||
@@ -302,8 +302,8 @@ class TristatePinVisitor : public TristateBaseVisitor {
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
TristatePinVisitor(AstNode* nodep, TristateGraph& tgraph, bool lvalue)
|
||||
: m_tgraph(tgraph)
|
||||
, m_lvalue(lvalue) {
|
||||
: m_tgraph{tgraph}
|
||||
, m_lvalue{lvalue} {
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~TristatePinVisitor() override {}
|
||||
@@ -336,14 +336,14 @@ class TristateVisitor : public TristateBaseVisitor {
|
||||
}; // Both bits set
|
||||
|
||||
// MEMBERS
|
||||
bool m_graphing; // Major mode - creating graph
|
||||
bool m_graphing = false; // Major mode - creating graph
|
||||
//
|
||||
AstNodeModule* m_modp; // Current module
|
||||
AstCell* m_cellp; // current cell
|
||||
AstNodeModule* m_modp = nullptr; // Current module
|
||||
AstCell* m_cellp = nullptr; // current cell
|
||||
VarMap m_lhsmap; // LHS driver map
|
||||
int m_unique;
|
||||
bool m_alhs; // On LHS of assignment
|
||||
AstNode* m_logicp; // Current logic being built
|
||||
int m_unique = 0;
|
||||
bool m_alhs = false; // On LHS of assignment
|
||||
AstNode* m_logicp = nullptr; // Current logic being built
|
||||
TristateGraph m_tgraph; // Logic graph
|
||||
|
||||
// STATS
|
||||
@@ -1345,12 +1345,6 @@ class TristateVisitor : public TristateBaseVisitor {
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit TristateVisitor(AstNode* nodep) {
|
||||
m_graphing = false;
|
||||
m_modp = nullptr;
|
||||
m_cellp = nullptr;
|
||||
m_unique = 0;
|
||||
m_alhs = false;
|
||||
m_logicp = nullptr;
|
||||
m_tgraph.clear();
|
||||
iterate(nodep);
|
||||
}
|
||||
|
||||
+6
-13
@@ -238,11 +238,11 @@ private:
|
||||
|
||||
// STATE
|
||||
std::vector<UndrivenVarEntry*> m_entryps[3]; // Nodes to delete when we are finished
|
||||
bool m_inBBox; // In black box; mark as driven+used
|
||||
bool m_inContAssign; // In continuous assignment
|
||||
bool m_inProcAssign; // In procedural assignment
|
||||
AstNodeFTask* m_taskp; // Current task
|
||||
AstAlways* m_alwaysCombp; // Current always if combo, otherwise nullptr
|
||||
bool m_inBBox = false; // In black box; mark as driven+used
|
||||
bool m_inContAssign = false; // In continuous assignment
|
||||
bool m_inProcAssign = false; // In procedural assignment
|
||||
AstNodeFTask* m_taskp = nullptr; // Current task
|
||||
AstAlways* m_alwaysCombp = nullptr; // Current always if combo, otherwise nullptr
|
||||
|
||||
// METHODS
|
||||
VL_DEBUG_FUNC; // Declare debug()
|
||||
@@ -439,14 +439,7 @@ private:
|
||||
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit UndrivenVisitor(AstNetlist* nodep) {
|
||||
m_inBBox = false;
|
||||
m_inContAssign = false;
|
||||
m_inProcAssign = false;
|
||||
m_taskp = nullptr;
|
||||
m_alwaysCombp = nullptr;
|
||||
iterate(nodep);
|
||||
}
|
||||
explicit UndrivenVisitor(AstNetlist* nodep) { iterate(nodep); }
|
||||
virtual ~UndrivenVisitor() override {
|
||||
for (std::vector<UndrivenVarEntry*>::iterator it = m_entryps[1].begin();
|
||||
it != m_entryps[1].end(); ++it) {
|
||||
|
||||
+5
-11
@@ -52,11 +52,11 @@ private:
|
||||
AstUser2InUse m_inuser2;
|
||||
|
||||
// STATE
|
||||
AstNodeModule* m_modp; // Current module
|
||||
bool m_constXCvt; // Convert X's
|
||||
AstNodeModule* m_modp = nullptr; // Current module
|
||||
AstAssignW* m_assignwp = nullptr; // Current assignment
|
||||
AstAssignDly* m_assigndlyp = nullptr; // Current assignment
|
||||
bool m_constXCvt = false; // Convert X's
|
||||
VDouble0 m_statUnkVars; // Statistic tracking
|
||||
AstAssignW* m_assignwp; // Current assignment
|
||||
AstAssignDly* m_assigndlyp; // Current assignment
|
||||
|
||||
// METHODS
|
||||
VL_DEBUG_FUNC; // Declare debug()
|
||||
@@ -428,13 +428,7 @@ private:
|
||||
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit UnknownVisitor(AstNetlist* nodep) {
|
||||
m_modp = nullptr;
|
||||
m_assigndlyp = nullptr;
|
||||
m_assignwp = nullptr;
|
||||
m_constXCvt = false;
|
||||
iterate(nodep);
|
||||
}
|
||||
explicit UnknownVisitor(AstNetlist* nodep) { iterate(nodep); }
|
||||
virtual ~UnknownVisitor() override { //
|
||||
V3Stats::addStat("Unknowns, variables created", m_statUnkVars);
|
||||
}
|
||||
|
||||
+1
-1
@@ -497,7 +497,7 @@ public:
|
||||
// Unroll class functions
|
||||
|
||||
UnrollStateful::UnrollStateful()
|
||||
: m_unrollerp(new UnrollVisitor) {}
|
||||
: m_unrollerp{new UnrollVisitor} {}
|
||||
UnrollStateful::~UnrollStateful() { delete m_unrollerp; }
|
||||
|
||||
void UnrollStateful::unrollGen(AstNodeFor* nodep, const string& beginName) {
|
||||
|
||||
+15
-22
@@ -105,14 +105,14 @@ class WidthVP {
|
||||
Stage m_stage; // If true, report errors
|
||||
public:
|
||||
WidthVP(AstNodeDType* dtypep, Stage stage)
|
||||
: m_dtypep(dtypep)
|
||||
, m_stage(stage) {
|
||||
: m_dtypep{dtypep}
|
||||
, m_stage{stage} {
|
||||
// Prelim doesn't look at assignments, so shouldn't need a dtype,
|
||||
// however AstPattern uses them
|
||||
}
|
||||
WidthVP(Determ determ, Stage stage)
|
||||
: m_dtypep(nullptr)
|
||||
, m_stage(stage) {
|
||||
: m_dtypep{nullptr}
|
||||
, m_stage{stage} {
|
||||
if (determ != SELF && stage != PRELIM)
|
||||
v3fatalSrc("Context-determined width request only allowed as prelim step");
|
||||
}
|
||||
@@ -184,15 +184,16 @@ private:
|
||||
typedef std::map<int, AstPatMember*> PatVecMap;
|
||||
|
||||
// STATE
|
||||
WidthVP* m_vup; // Current node state
|
||||
WidthVP* m_vup = nullptr; // Current node state
|
||||
bool m_paramsOnly; // Computing parameter value; limit operation
|
||||
AstRange* m_cellRangep; // Range for arrayed instantiations, nullptr for normal instantiations
|
||||
AstNodeFTask* m_ftaskp; // Current function/task
|
||||
AstNodeProcedure* m_procedurep; // Current final/always
|
||||
AstFunc* m_funcp; // Current function
|
||||
AstAttrOf* m_attrp; // Current attribute
|
||||
AstRange* m_cellRangep
|
||||
= nullptr; // Range for arrayed instantiations, nullptr for normal instantiations
|
||||
AstNodeFTask* m_ftaskp = nullptr; // Current function/task
|
||||
AstNodeProcedure* m_procedurep = nullptr; // Current final/always
|
||||
AstFunc* m_funcp = nullptr; // Current function
|
||||
AstAttrOf* m_attrp = nullptr; // Current attribute
|
||||
bool m_doGenerate; // Do errors later inside generate statement
|
||||
int m_dtTables; // Number of created data type tables
|
||||
int m_dtTables = 0; // Number of created data type tables
|
||||
TableMap m_tableMap; // Created tables so can remove duplicates
|
||||
|
||||
// ENUMS
|
||||
@@ -5404,18 +5405,10 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
WidthVisitor(bool paramsOnly, // [in] TRUE if we are considering parameters only.
|
||||
bool doGenerate) { // [in] TRUE if we are inside a generate statement and
|
||||
bool doGenerate) // [in] TRUE if we are inside a generate statement and
|
||||
// // don't wish to trigger errors
|
||||
m_paramsOnly = paramsOnly;
|
||||
m_cellRangep = nullptr;
|
||||
m_ftaskp = nullptr;
|
||||
m_procedurep = nullptr;
|
||||
m_funcp = nullptr;
|
||||
m_attrp = nullptr;
|
||||
m_doGenerate = doGenerate;
|
||||
m_dtTables = 0;
|
||||
m_vup = nullptr;
|
||||
}
|
||||
: m_paramsOnly{paramsOnly}
|
||||
, m_doGenerate{doGenerate} {}
|
||||
AstNode* mainAcceptEdit(AstNode* nodep) {
|
||||
return userIterateSubtreeReturnEdits(nodep, WidthVP(SELF, BOTH).p());
|
||||
}
|
||||
|
||||
+3
-3
@@ -64,9 +64,9 @@ private:
|
||||
AstNodeDType* m_dtypep; // Data type for the 'from' slice
|
||||
VNumRange m_fromRange; // Numeric range bounds for the 'from' slice
|
||||
FromData(AstNodeDType* errp, AstNodeDType* dtypep, const VNumRange& fromRange)
|
||||
: m_errp(errp)
|
||||
, m_dtypep(dtypep)
|
||||
, m_fromRange(fromRange) {}
|
||||
: m_errp{errp}
|
||||
, m_dtypep{dtypep}
|
||||
, m_fromRange{fromRange} {}
|
||||
~FromData() {}
|
||||
};
|
||||
FromData fromDataForArray(AstNode* nodep, AstNode* basefromp) {
|
||||
|
||||
+3
-3
@@ -39,9 +39,9 @@ private:
|
||||
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
VlcPoint(const string& name, int pointNum)
|
||||
: m_name(name)
|
||||
, m_pointNum(pointNum) {}
|
||||
VlcPoint(const string& name, vluint64_t pointNum)
|
||||
: m_name{name}
|
||||
, m_pointNum{pointNum} {}
|
||||
~VlcPoint() {}
|
||||
// ACCESSORS
|
||||
const string& name() const { return m_name; }
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user