From 45de0599d7611b3fd008354bd0eab32300cd37f6 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Mon, 27 Nov 2017 20:11:34 -0500 Subject: [PATCH] Commentary --- bin/verilator | 10 +++++----- src/V3Cdc.cpp | 6 +++--- src/V3ClkGater.cpp | 2 +- src/V3Delayed.cpp | 2 +- src/V3GraphTest.cpp | 6 +++--- src/V3Order.cpp | 2 +- src/V3OrderGraph.h | 6 +++--- src/V3Split.cpp | 4 ++-- src/V3Trace.cpp | 8 ++++---- src/V3Tristate.cpp | 2 +- test_regress/t/t_order_comboloop.v | 2 +- 11 files changed, 25 insertions(+), 25 deletions(-) diff --git a/bin/verilator b/bin/verilator index d814e976d..e714a029d 100755 --- a/bin/verilator +++ b/bin/verilator @@ -433,7 +433,7 @@ Enable all assertions. =item --autoflush -After every $display or $fdisplay, flush the output stream. This insures +After every $display or $fdisplay, flush the output stream. This ensures that messages will appear immediately but may reduce performance; for best performance call "fflush(stdout)" occasionally in the main C loop. Defaults off, which will buffer output as provided by the normal C stdio @@ -1113,7 +1113,7 @@ Creates a dump file with statistics on the design in {prefix}__stats.txt. =item --stats-vars -Creates more detailed statistics including a list of all the variables by +Creates more detailed statistics, including a list of all the variables by size (plain --stats just gives a count). See --stats, which is implied by this. @@ -1140,8 +1140,8 @@ Adds waveform tracing code to the model. Verilator will generate additional {prefix}__Trace*.cpp files that will need to be compiled. In addition verilated_vcd_sc.cpp (for SystemC traces) or verilated_vcd_c.cpp (for both) must be compiled and linked in. If using the Verilator -generated Makefiles, these will be added as source targets for you. If -you're not using the Verilator makefiles, you will need to add these to +generated Makefiles, these files will be added as source targets for you. +If you're not using the Verilator makefiles, you will need to add these to your Makefile manually. Having tracing compiled in may result in some small performance losses, @@ -1569,7 +1569,7 @@ fast path, mostly code that is executed every cycle. OPT_SLOW specifies optimizations for slow-path files (plus tracing), which execute only rarely, yet take a long time to compile with optimization on. OPT specifies overall optimization and affects all compiles, including those -OPT_FAST and OPT_SLOW affect. For best results, use OPT="-O2", and link +OPT_FAST and OPT_SLOW control. For best results, use OPT="-O2", and link with "-static". Nearly the same results can be had with much better compile times with OPT_FAST="-O1 -fstrict-aliasing". Higher optimization such as "-O3" may help, but gcc compile times may be excessive under O3 on diff --git a/src/V3Cdc.cpp b/src/V3Cdc.cpp index 05c4f6f53..b35f01982 100644 --- a/src/V3Cdc.cpp +++ b/src/V3Cdc.cpp @@ -76,7 +76,7 @@ public: , m_srcDomainSet(false), m_dstDomainSet(false) , m_asyncPath(false) {} virtual ~CdcEitherVertex() {} - // Accessors + // ACCESSORS AstScope* scopep() const { return m_scopep; } AstNode* nodep() const { return m_nodep; } AstSenTree* srcDomainp() const { return m_srcDomainp; } @@ -99,7 +99,7 @@ public: CdcVarVertex(V3Graph* graphp, AstScope* scopep, AstVarScope* varScp) : CdcEitherVertex(graphp, scopep, varScp), m_varScp(varScp), m_cntAsyncRst(0), m_fromFlop(false) {} virtual ~CdcVarVertex() {} - // Accessors + // ACCESSORS AstVarScope* varScp() const { return m_varScp; } virtual string name() const { return (cvtToStr((void*)m_varScp)+" "+varScp()->name()); } virtual string dotColor() const { return fromFlop() ? "green" : cntAsyncRst() ? "red" : "blue"; } @@ -118,7 +118,7 @@ public: , m_hazard(false), m_isFlop(false) { srcDomainp(sensenodep); dstDomainp(sensenodep); } virtual ~CdcLogicVertex() {} - // Accessors + // ACCESSORS virtual string name() const { return (cvtToStr((void*)nodep())+"@"+scopep()->prettyName()); } virtual string dotColor() const { return hazard() ? "black" : "yellow"; } bool hazard() const { return m_hazard; } diff --git a/src/V3ClkGater.cpp b/src/V3ClkGater.cpp index 2ff7800fd..46ba6f061 100644 --- a/src/V3ClkGater.cpp +++ b/src/V3ClkGater.cpp @@ -373,7 +373,7 @@ class GaterVisitor : public GaterBaseVisitor { } void scoreboardPli(AstNode* nodep) { // Order all PLI statements with other PLI statements - // This insures $display's and such remain in proper order + // This ensures $display's and such remain in proper order // We don't prevent splitting out other non-pli statements, however, // because it is common to have $uasserts sprinkled about. if (!m_pliVertexp) { diff --git a/src/V3Delayed.cpp b/src/V3Delayed.cpp index d3197a60f..b432fe4b2 100644 --- a/src/V3Delayed.cpp +++ b/src/V3Delayed.cpp @@ -289,7 +289,7 @@ private: // // Create ALWAYSPOST for delayed variable // We add all logic to the same block if it's for the same memory - // This insures that multiple assignments to the same memory will result + // This ensures that multiple assignments to the same memory will result // in correctly ordered code - the last assignment must be last. // It also has the nice side effect of assisting cache locality. AstNode* selectsp = varrefp; diff --git a/src/V3GraphTest.cpp b/src/V3GraphTest.cpp index 832cd8f3b..34b8661d8 100644 --- a/src/V3GraphTest.cpp +++ b/src/V3GraphTest.cpp @@ -74,7 +74,7 @@ class V3GraphTestVertex : public V3GraphVertex { public: V3GraphTestVertex(V3Graph* graphp, const string& name) : V3GraphVertex(graphp), m_name(name) {} virtual ~V3GraphTestVertex() {} - // Accessors + // ACCESSORS virtual string name() const { return m_name; } }; @@ -82,7 +82,7 @@ class V3GraphTestVarVertex : public V3GraphTestVertex { public: V3GraphTestVarVertex(V3Graph* graphp, const string& name) : V3GraphTestVertex(graphp, name) {} virtual ~V3GraphTestVarVertex() {} - // Accessors + // ACCESSORS virtual string dotColor() const { return "blue"; } }; @@ -272,7 +272,7 @@ class DfaTestVertex : public DfaVertex { public: DfaTestVertex(DfaGraph* graphp, const string& name) : DfaVertex(graphp), m_name(name) {} virtual ~DfaTestVertex() {} - // Accessors + // ACCESSORS virtual string name() const { return m_name; } }; diff --git a/src/V3Order.cpp b/src/V3Order.cpp index 1e1b765ed..a881c1081 100644 --- a/src/V3Order.cpp +++ b/src/V3Order.cpp @@ -44,7 +44,7 @@ // Add vertex for this logic // Add edge logic_sensitive_vertex->logic_vertex // Add edge logic_generated_var_PREORDER->logic_vertex -// This insures the AssignPre gets scheduled before this logic +// This ensures the AssignPre gets scheduled before this logic // Add edge logic_vertex->consumed_var_PREVAR // Add edge logic_vertex->consumed_var_POSTVAR // Add edge logic_vertex->logic_generated_var (same as if comb) diff --git a/src/V3OrderGraph.h b/src/V3OrderGraph.h index 98961f666..96be69ff7 100644 --- a/src/V3OrderGraph.h +++ b/src/V3OrderGraph.h @@ -144,7 +144,7 @@ public: virtual OrderVEdgeType type() const = 0; virtual bool domainMatters() = 0; // Must be in same domain when cross edge to this vertex virtual string dotName() const { return cvtToStr((void*)m_scopep)+"_"; } - // Accessors + // ACCESSORS void domainp(AstSenTree* domainp) { m_domainp = domainp; } AstScope* scopep() const { return m_scopep; } AstSenTree* domainp() const { return m_domainp; } @@ -200,7 +200,7 @@ public: return new OrderLogicVertex(graphp, *this); } virtual OrderVEdgeType type() const { return OrderVEdgeType::VERTEX_LOGIC; } virtual bool domainMatters() { return true; } - // Accessors + // ACCESSORS virtual string name() const { return (cvtToStr((void*)m_nodep)+"\\n "+cvtToStr(nodep()->typeName())); } AstNode* nodep() const { return m_nodep; } virtual string dotColor() const { return "yellow"; } @@ -225,7 +225,7 @@ public: virtual ~OrderVarVertex() {} virtual OrderVarVertex* clone (V3Graph* graphp) const = 0; virtual OrderVEdgeType type() const = 0; - // Accessors + // ACCESSORS AstVarScope* varScp() const { return m_varScp; } void isClock(bool flag) { m_isClock=flag; } bool isClock() const { return m_isClock; } diff --git a/src/V3Split.cpp b/src/V3Split.cpp index 58f36bf05..c96a30384 100644 --- a/src/V3Split.cpp +++ b/src/V3Split.cpp @@ -82,7 +82,7 @@ protected: SplitNodeVertex(V3Graph* graphp, AstNode* nodep) : V3GraphVertex(graphp), m_nodep(nodep) {} virtual ~SplitNodeVertex() {} - // Accessors + // ACCESSORS // Do not make accessor for nodep(), It may change due to // reordering a lower block, but we don't repair it virtual string name() const { @@ -257,7 +257,7 @@ private: void scoreboardPli() { // Order all PLI statements with other PLI statements - // This insures $display's and such remain in proper order + // This ensures $display's and such remain in proper order // We don't prevent splitting out other non-pli statements, however. if (!m_pliVertexp) { m_pliVertexp = new SplitPliVertex(&m_graph); // m_graph.clear() will delete it diff --git a/src/V3Trace.cpp b/src/V3Trace.cpp index 69403cde0..839c1fb12 100644 --- a/src/V3Trace.cpp +++ b/src/V3Trace.cpp @@ -86,7 +86,7 @@ public: m_slow = false; } virtual ~TraceActivityVertex() {} - // Accessors + // ACCESSORS AstNode* insertp() const { if (!m_insertp) v3fatalSrc("Null insertp; probably called on a special always/slow."); return m_insertp; @@ -111,7 +111,7 @@ public: : V3GraphVertex(graphp), m_nodep(nodep) { } virtual ~TraceCFuncVertex() {} - // Accessors + // ACCESSORS AstCFunc* nodep() const { return m_nodep; } virtual string name() const { return nodep()->name(); } virtual string dotColor() const { return "yellow"; } @@ -124,7 +124,7 @@ public: TraceTraceVertex(V3Graph* graphp, AstTraceInc* nodep) : V3GraphVertex(graphp), m_nodep(nodep), m_duplicatep(NULL) {} virtual ~TraceTraceVertex() {} - // Accessors + // ACCESSORS AstTraceInc* nodep() const { return m_nodep; } virtual string name() const { return nodep()->declp()->name(); } virtual string dotColor() const { return "red"; } @@ -140,7 +140,7 @@ public: TraceVarVertex(V3Graph* graphp, AstVarScope* nodep) : V3GraphVertex(graphp), m_nodep(nodep) {} virtual ~TraceVarVertex() {} - // Accessors + // ACCESSORS AstVarScope* nodep() const { return m_nodep; } virtual string name() const { return nodep()->name(); } virtual string dotColor() const { return "skyblue"; } diff --git a/src/V3Tristate.cpp b/src/V3Tristate.cpp index b189cdcdc..9c590a7ae 100644 --- a/src/V3Tristate.cpp +++ b/src/V3Tristate.cpp @@ -99,7 +99,7 @@ public: : V3GraphVertex(graphp) , m_nodep(nodep), m_isTristate(false), m_feedsTri(false), m_processed(false) {} virtual ~TristateVertex() {} - // Accessors + // ACCESSORS AstNode* nodep() const { return m_nodep; } AstVar* varp() const { return nodep()->castVar(); } virtual string name() const { diff --git a/test_regress/t/t_order_comboloop.v b/test_regress/t/t_order_comboloop.v index b852991dc..0d98f10ce 100644 --- a/test_regress/t/t_order_comboloop.v +++ b/test_regress/t/t_order_comboloop.v @@ -38,7 +38,7 @@ module t (/*AUTOARG*/ end // This forms a "loop" where we keep going through the always till runner=0 - // This isn't "regular" beh code, but insures our change detection is working properly + // This isn't "regular" beh code, but ensures our change detection is working properly always @ (/*AS*/runner) begin runnerm1 = runner - 32'd1; end