Commentary - Spelling fixes
This commit is contained in:
parent
a4daae66de
commit
fa904f386c
|
|
@ -196,7 +196,7 @@ private:
|
|||
AstVar* varp = nodep->varp();
|
||||
if (m_check == CT_SEQ
|
||||
&& m_assignp
|
||||
&& !varp->isUsedLoopIdx() // Ignore loop indicies
|
||||
&& !varp->isUsedLoopIdx() // Ignore loop indices
|
||||
&& !varp->isTemp()) {
|
||||
// Allow turning off warnings on the always, or the variable also
|
||||
if (!m_alwaysp->fileline()->warnIsOff(V3ErrorCode::BLKSEQ)
|
||||
|
|
@ -320,7 +320,7 @@ private:
|
|||
return;
|
||||
}
|
||||
|
||||
// Read sensitivitues
|
||||
// Read sensitivities
|
||||
m_itemCombo = false;
|
||||
m_itemSequent = false;
|
||||
iterateAndNextNull(oldsensesp);
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ private:
|
|||
virtual void visit(AstNodePslCoverOrAssert* nodep) {
|
||||
if (nodep->sentreep()) return; // Already processed
|
||||
clearAssertInfo();
|
||||
// Find PslClocking's burried under nodep->exprsp
|
||||
// Find PslClocking's buried under nodep->exprsp
|
||||
iterateChildren(nodep);
|
||||
nodep->sentreep(newSenTree(nodep));
|
||||
clearAssertInfo();
|
||||
|
|
|
|||
|
|
@ -262,7 +262,7 @@ AstNode* AstNode::addNext(AstNode* nodep, AstNode* newp) {
|
|||
UDEBUGONLY(UASSERT_OBJ(!oldtailp->m_nextp, nodep,
|
||||
"Node had next, but headtail says it shouldn't"););
|
||||
} else {
|
||||
// Though inefficent, we are occasionally passed a addNext in the middle of a list.
|
||||
// Though inefficient, we are occasionally passed a addNext in the middle of a list.
|
||||
while (oldtailp->m_nextp != NULL) oldtailp = oldtailp->m_nextp;
|
||||
}
|
||||
}
|
||||
|
|
@ -1090,7 +1090,7 @@ string AstNode::locationStr() const {
|
|||
const AstScope* scopep;
|
||||
if ((scopep = VN_CAST_CONST(backp, Scope))) {
|
||||
// The design is flattened and there are no useful scopes
|
||||
// This is probably because of inilining
|
||||
// This is probably because of inlining
|
||||
if (scopep->isTop()) break;
|
||||
|
||||
str += scopep->prettyName();
|
||||
|
|
|
|||
10
src/V3Ast.h
10
src/V3Ast.h
|
|
@ -73,7 +73,7 @@ public:
|
|||
// enum en {...};
|
||||
// const char* ascii() const {...};
|
||||
enum en m_e;
|
||||
// cppcheck-suppress uninitVar // responsiblity of each subclass
|
||||
// cppcheck-suppress uninitVar // responsibility of each subclass
|
||||
inline AstType() {}
|
||||
// cppcheck-suppress noExplicitConstructor
|
||||
inline AstType(en _e) : m_e(_e) {}
|
||||
|
|
@ -776,7 +776,7 @@ public:
|
|||
inline std::ostream& operator<<(std::ostream& os, const AstParseRefExp& rhs) { return os<<rhs.ascii(); }
|
||||
|
||||
//######################################################################
|
||||
// VNumRange - Structure containing numberic range information
|
||||
// VNumRange - Structure containing numeric range information
|
||||
// See also AstRange, which is a symbolic version of this
|
||||
|
||||
struct VNumRange {
|
||||
|
|
@ -910,7 +910,7 @@ public:
|
|||
//
|
||||
// AstUser2InUse m_userres;
|
||||
//
|
||||
// This will clear the tree, and prevent another visitor from clobering
|
||||
// This will clear the tree, and prevent another visitor from clobbering
|
||||
// user2. When the member goes out of scope it will be automagically
|
||||
// freed up.
|
||||
|
||||
|
|
@ -1262,7 +1262,7 @@ public:
|
|||
static int instrCountPli() { return 20; } ///< Instruction cycles to call pli routines
|
||||
static int instrCountDouble() { return 8; } ///< Instruction cycles to convert or do floats
|
||||
static int instrCountDoubleDiv() { return 40; } ///< Instruction cycles to divide floats
|
||||
static int instrCountDoubleTrig() { return 200; } ///< Instruction cycles to do triganomics
|
||||
static int instrCountDoubleTrig() { return 200; } ///< Instruction cycles to do trigonomics
|
||||
static int instrCountString() { return 100; } ///< Instruction cycles to do string ops
|
||||
static int instrCountCall() { return instrCountBranch()+10; } ///< Instruction cycles to call subroutine
|
||||
static int instrCountTime() { return instrCountCall()+5; } ///< Instruction cycles to determine simulation time
|
||||
|
|
@ -2189,7 +2189,7 @@ class AstNodeModule : public AstNode {
|
|||
private:
|
||||
string m_name; // Name of the module
|
||||
string m_origName; // Name of the module, ignoring name() changes, for dot lookup
|
||||
string m_hierName; // Hierachical name for errors, etc.
|
||||
string m_hierName; // Hierarchical name for errors, etc.
|
||||
bool m_modPublic:1; // Module has public references
|
||||
bool m_modTrace:1; // Tracing this module
|
||||
bool m_inLibrary:1; // From a library, no error if not used, never top level
|
||||
|
|
|
|||
|
|
@ -538,7 +538,7 @@ public:
|
|||
bool littleEndian() const { return (rangep() ? rangep()->littleEndian() : m.m_nrange.littleEndian()); }
|
||||
bool implicit() const { return keyword() == AstBasicDTypeKwd::LOGIC_IMPLICIT; }
|
||||
VNumRange declRange() const { return isRanged() ? VNumRange(msb(), lsb(), littleEndian()) : VNumRange(); }
|
||||
void cvtRangeConst() { // Convert to smaller represenation
|
||||
void cvtRangeConst() { // Convert to smaller representation
|
||||
if (rangep() && VN_IS(rangep()->msbp(), Const) && VN_IS(rangep()->lsbp(), Const)) {
|
||||
m.m_nrange.init(rangep()->msbConst(), rangep()->lsbConst(),
|
||||
rangep()->littleEndian());
|
||||
|
|
@ -3192,7 +3192,7 @@ public:
|
|||
ASTNODE_NODE_FUNCS(Repeat)
|
||||
AstNode* countp() const { return op2p(); } // op2 = condition to continue
|
||||
AstNode* bodysp() const { return op3p(); } // op3 = body of loop
|
||||
virtual bool isGateOptimizable() const { return false; } // Not releavant - converted to FOR
|
||||
virtual bool isGateOptimizable() const { return false; } // Not relevant - converted to FOR
|
||||
virtual int instrCount() const { return instrCountBranch(); }
|
||||
virtual V3Hash sameHash() const { return V3Hash(); }
|
||||
virtual bool same(const AstNode* samep) const { return true; }
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ private:
|
|||
return false;
|
||||
}
|
||||
}
|
||||
if (m_caseItems <= 3) return false; // Not worth simplifing
|
||||
if (m_caseItems <= 3) return false; // Not worth simplifying
|
||||
// Convert valueItem from AstCaseItem* to the expression
|
||||
// Not done earlier, as we may now have a NULL because it's just a ";" NOP branch
|
||||
for (uint32_t i=0; i<(1UL<<m_caseWidth); ++i) {
|
||||
|
|
@ -223,7 +223,7 @@ private:
|
|||
if (msb<0) {
|
||||
// There's no space for a IF. We know upperValue is thus down to a specific
|
||||
// exact value, so just return the tree value
|
||||
// Note can't clone here, as we're going to check for equivelence above
|
||||
// Note can't clone here, as we're going to check for equivalence above
|
||||
return m_valueItem[upperValue];
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ private:
|
|||
// If we have uint64 = CAST(uint64(x)) then the upcasting
|
||||
// really needs to be CAST(uint64(CAST(uint32(x))).
|
||||
// Otherwise a (uint64)(a>b) would return wrong value, as
|
||||
// less than has undeterministic signedness.
|
||||
// less than has nondeterministic signedness.
|
||||
if (nodep->isQuad() && !nodep->lhsp()->isQuad()
|
||||
&& !VN_IS(nodep->lhsp(), CCast)) {
|
||||
insertCast(nodep->lhsp(), VL_WORDSIZE);
|
||||
|
|
@ -154,7 +154,7 @@ private:
|
|||
nodep->user1(1);
|
||||
}
|
||||
virtual void visit(AstConst* nodep) {
|
||||
// Constants are of unknown size if smaller than 33 bits, becase
|
||||
// Constants are of unknown size if smaller than 33 bits, because
|
||||
// we're too lazy to wrap every constant in the universe in
|
||||
// ((IData)#).
|
||||
nodep->user1(nodep->isQuad() || nodep->isWide());
|
||||
|
|
|
|||
|
|
@ -682,7 +682,7 @@ private:
|
|||
}
|
||||
virtual void visit(AstSenGate* nodep) {
|
||||
// First handle the clock part will be handled in a minute by visit AstSenItem
|
||||
// The logic gating term is delt with as logic
|
||||
// The logic gating term is dealt with as logic
|
||||
iterateNewStmt(nodep);
|
||||
}
|
||||
virtual void visit(AstAssignAlias* nodep) {
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ private:
|
|||
int width = cppWidth(nodep); // widthMin is unchanged
|
||||
if (old_dtypep->width() != width) {
|
||||
// Since any given dtype's cppWidth() is the same, we can just
|
||||
// remember one convertion for each, and reuse it
|
||||
// remember one conversion for each, and reuse it
|
||||
if (AstNodeDType* new_dtypep = VN_CAST(old_dtypep->user3p(), NodeDType)) {
|
||||
nodep->dtypep(new_dtypep);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -301,7 +301,7 @@ private:
|
|||
changep),
|
||||
incp, NULL);
|
||||
// We could add another IF to detect posedges, and only increment if so.
|
||||
// It's another whole branch though verus a potential memory miss.
|
||||
// It's another whole branch though versus a potential memory miss.
|
||||
// We'll go with the miss.
|
||||
newp->addIfsp(new AstAssign(nodep->fileline(),
|
||||
changep->cloneTree(false),
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ protected:
|
|||
// Note this is disabled, it still needed work
|
||||
// Also repair it for DPI functions; when make __common need to insure proper
|
||||
// flags get inherited from the old to new AstCFunc, and that AstText doesn't
|
||||
// get split between functions causing the text to have a danginling reference.
|
||||
// get split between functions causing the text to have a dangling reference.
|
||||
bool statementCombine() { return false; } // duplicateFunctionCombine();
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class V3ConfigLine {
|
|||
public:
|
||||
int m_lineno; // Line number to make change at
|
||||
V3ErrorCode m_code; // Error code
|
||||
bool m_on; // True to enaable message
|
||||
bool m_on; // True to enable message
|
||||
V3ConfigLine(V3ErrorCode code, int lineno, bool on)
|
||||
: m_lineno(lineno), m_code(code), m_on(on) {}
|
||||
~V3ConfigLine() {}
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ private:
|
|||
// AstJumpLabel::user4 -> bool. Set when AstJumpGo uses this label
|
||||
|
||||
// STATE
|
||||
bool m_params; // If true, propogate parameterized and true numbers only
|
||||
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
|
||||
|
|
@ -557,7 +557,7 @@ private:
|
|||
return false;
|
||||
}
|
||||
bool concatMergeable(const AstNode* lhsp, const AstNode* rhsp) {
|
||||
// determine if {a OP b, c OP d} => {a, c} OP {b, d} is advantagous
|
||||
// determine if {a OP b, c OP d} => {a, c} OP {b, d} is advantageous
|
||||
if (!v3Global.opt.oAssemble()) return false; // opt disabled
|
||||
if (lhsp->type() != rhsp->type()) return false;
|
||||
if (!ifConcatMergeableBiop(lhsp)) return false;
|
||||
|
|
@ -677,21 +677,21 @@ private:
|
|||
// NODE(..., CHILD(...)) -> CHILD(...)
|
||||
childp->unlinkFrBackWithNext();
|
||||
// If replacing a SEL for example, the data type comes from the parent (is less wide).
|
||||
// This may adversly affect the operation of the node being replaced.
|
||||
// This may adversely affect the operation of the node being replaced.
|
||||
childp->dtypeFrom(nodep);
|
||||
nodep->replaceWith(childp);
|
||||
nodep->deleteTree(); VL_DANGLING(nodep);
|
||||
}
|
||||
|
||||
//! Replace a ternary node with its RHS after iterating
|
||||
//! Used with short-circuting, where the RHS has not yet been iterated.
|
||||
//! Used with short-circuiting, where the RHS has not yet been iterated.
|
||||
void replaceWIteratedRhs(AstNodeTriop* nodep) {
|
||||
if (AstNode* rhsp = nodep->rhsp()) iterateAndNextNull(rhsp);
|
||||
replaceWChild(nodep, nodep->rhsp()); // May have changed
|
||||
}
|
||||
|
||||
//! Replace a ternary node with its THS after iterating
|
||||
//! Used with short-circuting, where the THS has not yet been iterated.
|
||||
//! Used with short-circuiting, where the THS has not yet been iterated.
|
||||
void replaceWIteratedThs(AstNodeTriop* nodep) {
|
||||
if (AstNode* thsp = nodep->thsp()) iterateAndNextNull(thsp);
|
||||
replaceWChild(nodep, nodep->thsp()); // May have changed
|
||||
|
|
@ -1658,7 +1658,7 @@ private:
|
|||
|| VN_IS(nodep->sensp(), EnumItemRef)
|
||||
|| (nodep->varrefp() && nodep->varrefp()->varp()->isParam()))) {
|
||||
// Constants in sensitivity lists may be removed (we'll simplify later)
|
||||
if (nodep->isClocked()) { // A constant can never get a pos/negexge
|
||||
if (nodep->isClocked()) { // A constant can never get a pos/negedge
|
||||
if (onlySenItemInSenTree(nodep)) {
|
||||
nodep->replaceWith(new AstSenItem(nodep->fileline(), AstSenItem::Never()));
|
||||
nodep->deleteTree(); VL_DANGLING(nodep);
|
||||
|
|
@ -2192,7 +2192,7 @@ private:
|
|||
// v--- *1* These ops are always first, as we warn before replacing
|
||||
// v--- *V* This op is a verilog op, only in m_doV mode
|
||||
// v--- *C* This op works on all constant children, allowed in m_doConst mode
|
||||
// v--- *S* This op specifies a type should use short-circuting of its lhs op
|
||||
// v--- *S* This op specifies a type should use short-circuiting of its lhs op
|
||||
|
||||
TREEOP1("AstSel{warnSelect(nodep)}", "NEVER");
|
||||
// Generic constants on both side. Do this first to avoid other replacements
|
||||
|
|
@ -2586,7 +2586,7 @@ AstNode* V3Const::constifyParamsEdit(AstNode* nodep) {
|
|||
//! trigger warnings when we deal with the width. It is possible that these
|
||||
//! are spurious, existing within sub-expressions that will not actually be
|
||||
//! generated. Since such occurrences, must be constant, in order to be
|
||||
//! someting a generate block can depend on, we can wait until later to do the
|
||||
//! something a generate block can depend on, we can wait until later to do the
|
||||
//! width check.
|
||||
//! @return Pointer to the edited node.
|
||||
AstNode* V3Const::constifyGenerateParamsEdit(AstNode* nodep) {
|
||||
|
|
|
|||
|
|
@ -262,7 +262,7 @@ private:
|
|||
}
|
||||
}
|
||||
else if (AstUnionDType* adtypep = VN_CAST(dtypep, UnionDType)) {
|
||||
// Arbitrarially handle only the first member of the union
|
||||
// Arbitrarily handle only the first member of the union
|
||||
if (AstMemberDType* itemp = adtypep->membersp()) {
|
||||
AstNodeDType* subtypep = itemp->subDTypep()->skipRefp();
|
||||
ToggleEnt newent (above.m_comment+string(".")+itemp->name(),
|
||||
|
|
|
|||
|
|
@ -407,7 +407,7 @@ public:
|
|||
iterate(nodep);
|
||||
|
||||
deadCheckVar();
|
||||
// We only elimate scopes when in a flattened structure
|
||||
// We only eliminate scopes when in a flattened structure
|
||||
// Otherwise we have no easy way to know if a scope is used
|
||||
if (elimScopes) deadCheckScope();
|
||||
if (elimCells) deadCheckCells();
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ private:
|
|||
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 intial blocks
|
||||
bool m_inInitial; // True in initial blocks
|
||||
typedef std::map<std::pair<AstNodeModule*,string>,AstVar*> VarMap;
|
||||
VarMap m_modVarMap; // Table of new var names created under module
|
||||
V3Double0 m_statSharedSet;// Statistic tracking
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ private:
|
|||
|
||||
//--------------------
|
||||
// Marking of non-static functions (because they might need "this")
|
||||
// (Here instead of new vistor after V3Descope just to avoid another visitor)
|
||||
// (Here instead of new visitor after V3Descope just to avoid another visitor)
|
||||
void needNonStaticFunc(AstNode* nodep) {
|
||||
UASSERT_OBJ(m_funcp, nodep, "Non-static accessor not under a function");
|
||||
if (m_funcp->isStatic().trueU()) {
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ private:
|
|||
m_needThis = true;
|
||||
return name+"->";
|
||||
} else {
|
||||
// Reference to something elsewhere, or relative refences
|
||||
// Reference to something elsewhere, or relative references
|
||||
// are disabled. Use global variable
|
||||
UINFO(8," Descope "<<scopep<<endl);
|
||||
UINFO(8," to "<<scopep->name()<<endl);
|
||||
|
|
|
|||
|
|
@ -246,7 +246,7 @@ public:
|
|||
// If this isn't the first instantiation of this module under this
|
||||
// design, don't really count the bucket, and rely on verilator_cov to
|
||||
// aggregate counts. This is because Verilator combines all
|
||||
// hiearchies itself, and if verilator_cov also did it, you'd end up
|
||||
// hierarchies itself, and if verilator_cov also did it, you'd end up
|
||||
// with (number-of-instant) times too many counts in this bin.
|
||||
puts(", first"); // Enable, passed from __Vconfigure parameter
|
||||
puts(", "); putsQuoted(nodep->fileline()->filename());
|
||||
|
|
@ -1865,7 +1865,7 @@ void EmitCImp::emitCtorImp(AstNodeModule* modp) {
|
|||
//
|
||||
// For example: suppose models A and B are each compiled to run on
|
||||
// 4 threads. The client might create a single thread pool with 3
|
||||
// threads and pass it to both models. If the client can ensure tht
|
||||
// threads and pass it to both models. If the client can ensure that
|
||||
// A.eval() and B.eval() do NOT run concurrently, there will be no
|
||||
// contention for the threads. This mode is missing for now. (Is
|
||||
// there demand for such a setup?)
|
||||
|
|
@ -3103,7 +3103,7 @@ class EmitCTrace : EmitCStmts {
|
|||
}
|
||||
|
||||
// VISITORS
|
||||
using EmitCStmts::visit; // Suppress hidden overloaded virtual function warnng
|
||||
using EmitCStmts::visit; // Suppress hidden overloaded virtual function warning
|
||||
virtual void visit(AstNetlist* nodep) {
|
||||
// Top module only
|
||||
iterate(nodep->topModulep());
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ class EmitCSyms : EmitCBaseVisitor {
|
|||
}
|
||||
|
||||
void varsExpand() {
|
||||
// We didn'e have all m_scopes loaded when we encountered variables, so expand them now
|
||||
// We didn't have all m_scopes loaded when we encountered variables, so expand them now
|
||||
// It would be less code if each module inserted its own variables.
|
||||
// Someday. For now public isn't common.
|
||||
for (std::vector<ScopeModPair>::iterator itsc = m_scopes.begin();
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ public:
|
|||
ENDLABEL, // End lable name mismatch
|
||||
GENCLK, // Generated Clock
|
||||
IFDEPTH, // If statements too deep
|
||||
IGNOREDRETURN, // Ignoring return value (funcation as task)
|
||||
IGNOREDRETURN, // Ignoring return value (function as task)
|
||||
IMPERFECTSCH, // Imperfect schedule (disabled by default)
|
||||
IMPLICIT, // Implicit wire
|
||||
IMPORTSTAR, // Import::* in $unit
|
||||
|
|
|
|||
|
|
@ -700,7 +700,7 @@ private:
|
|||
// Lhs or Rhs may be word, long, or quad.
|
||||
// newAstWordSelClone nicely abstracts the difference.
|
||||
int rhsshift = rhsp->rhsp()->widthMin();
|
||||
// Sometimes doing the words backwards is preferrable.
|
||||
// Sometimes doing the words backwards is preferable.
|
||||
// When we have x={x,foo} backwards is better, when x={foo,x} forward is better
|
||||
// However V3Subst tends to rip this up, so not worth optimizing now.
|
||||
for (int w=0; w<rhsp->widthWords(); w++) {
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ inline void V3FileDependImp::writeTimes(const string& filename, const string& cm
|
|||
for (std::set<DependFile>::iterator iter=m_filenameList.begin();
|
||||
iter!=m_filenameList.end(); ++iter) {
|
||||
// Read stats of files we create after we're done making them
|
||||
// (execpt for this file, of course)
|
||||
// (except for this file, of course)
|
||||
DependFile* dfp = const_cast<DependFile*>(&(*iter));
|
||||
V3Options::fileNfsFlush(dfp->filename());
|
||||
dfp->loadStats();
|
||||
|
|
|
|||
|
|
@ -484,7 +484,7 @@ private:
|
|||
}
|
||||
virtual void visit(AstSenGate* nodep) {
|
||||
// First handle the clock part will be handled in a minute by visit AstSenItem
|
||||
// The logic gating term is delt with as logic
|
||||
// The logic gating term is dealt with as logic
|
||||
iterateNewStmt(nodep, "Clock gater", "Clock gater");
|
||||
}
|
||||
virtual void visit(AstInitial* nodep) {
|
||||
|
|
|
|||
|
|
@ -169,7 +169,7 @@ private:
|
|||
UINFO(8," "<<why<<" "<<origEdgep->fromp()<<" ->"<<origEdgep->top()<<endl);
|
||||
}
|
||||
}
|
||||
// Work Que
|
||||
// Work Queue
|
||||
void workPush(V3GraphVertex* vertexp) {
|
||||
GraphAcycVertex* avertexp = static_cast<GraphAcycVertex*>(vertexp);
|
||||
// Add vertex to list of nodes needing further optimization trials
|
||||
|
|
@ -507,7 +507,7 @@ void GraphAcyc::placeTryEdge(V3GraphEdge* edgep) {
|
|||
edgep->cutable(true); // So graph still looks pretty
|
||||
cutOrigEdge(edgep, " Cut loop");
|
||||
edgep->unlinkDelete(); VL_DANGLING(edgep);
|
||||
// Backout the ranks we calculated
|
||||
// Back out the ranks we calculated
|
||||
while (GraphAcycVertex* vertexp = workBeginp()) {
|
||||
workPop();
|
||||
vertexp->rank(vertexp->m_storedRank);
|
||||
|
|
|
|||
|
|
@ -522,7 +522,7 @@ void DfaGraph::dfaReduce() {
|
|||
// this so we just create a edge for each case and mark it "complemented."
|
||||
//
|
||||
// 3. Delete temp vertex (old accept/new reject) and related edges.
|
||||
// The user's old accept is now the new accept. This is imporant as
|
||||
// The user's old accept is now the new accept. This is important as
|
||||
// we want the virtual type of it to be intact.
|
||||
|
||||
class DfaGraphComplement : GraphAlg<> {
|
||||
|
|
|
|||
|
|
@ -88,8 +88,8 @@ private:
|
|||
|
||||
// MEMBERS
|
||||
VxHolderCmp m_vxHolderCmp; // Vertext comparison functor
|
||||
ReadyVertices m_readyVertices; // List of ready verticies
|
||||
WaitingVertices m_waitingVertices; // List of wiating verticies
|
||||
ReadyVertices m_readyVertices; // List of ready vertices
|
||||
WaitingVertices m_waitingVertices; // List of waiting vertices
|
||||
typename ReadyVertices::iterator m_last; // Previously returned element
|
||||
GraphWay m_way; // FORWARD or REVERSE order of traversal
|
||||
|
||||
|
|
|
|||
|
|
@ -270,7 +270,7 @@ private:
|
|||
nodep->addNextHere(newp);
|
||||
// Remove ranging and fix name
|
||||
newp->rangep()->unlinkFrBack()->deleteTree();
|
||||
// Somewhat illogically, we need to rename the orignal name of the cell too.
|
||||
// Somewhat illogically, we need to rename the original name of the cell too.
|
||||
// as that is the name users expect for dotting
|
||||
// The spec says we add [x], but that won't work in C...
|
||||
newp->name(newp->name()+"__BRA__"+cvtToStr(instNum)+"__KET__");
|
||||
|
|
|
|||
|
|
@ -332,7 +332,7 @@ public:
|
|||
VSymEnt* insertInline(VSymEnt* abovep, VSymEnt* modSymp,
|
||||
AstCellInline* nodep, const string& basename) {
|
||||
// A fake point in the hierarchy, corresponding to an inlined module
|
||||
// This refrences to another Sym, and eventually resolves to a module with a prefix
|
||||
// This references to another Sym, and eventually resolves to a module with a prefix
|
||||
UASSERT_OBJ(abovep, nodep, "Null symbol table inserting node");
|
||||
VSymEnt* symp = new VSymEnt(&m_syms, nodep);
|
||||
UINFO(9," INSERTinl se"<<cvtToHex(symp)
|
||||
|
|
@ -955,7 +955,7 @@ class LinkDotFindVisitor : public AstNVisitor {
|
|||
m_curSymp->fallbackp(oldCurSymp);
|
||||
// Convert the func's range to the output variable
|
||||
// This should probably be done in the Parser instead, as then we could
|
||||
// just attact normal signal attributes to it.
|
||||
// just attach normal signal attributes to it.
|
||||
if (nodep->fvarp()
|
||||
&& !VN_IS(nodep->fvarp(), Var)) {
|
||||
AstNodeDType* dtypep = VN_CAST(nodep->fvarp(), NodeDType);
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ private:
|
|||
nodep->v3fatalSrc("Unknown jump point for break/disable/continue");
|
||||
return NULL;
|
||||
}
|
||||
// Skip over variables as we'll just move them in a momement
|
||||
// Skip over variables as we'll just move them in a moment
|
||||
// Also this would otherwise prevent us from using a label twice
|
||||
// see t_func_return test.
|
||||
while (underp && VN_IS(underp, Var)) underp = underp->nextp();
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ void V3LinkLevel::wrapTopCell(AstNetlist* rootp) {
|
|||
typedef vl_unordered_set<std::string> NameSet;
|
||||
NameSet ioNames;
|
||||
NameSet dupNames;
|
||||
// For all modulues, skipping over new top
|
||||
// For all modules, skipping over new top
|
||||
for (AstNodeModule* oldmodp = VN_CAST(rootp->modulesp()->nextp(), NodeModule);
|
||||
oldmodp && oldmodp->level() <= 2;
|
||||
oldmodp = VN_CAST(oldmodp->nextp(), NodeModule)) {
|
||||
|
|
@ -163,7 +163,7 @@ void V3LinkLevel::wrapTopCell(AstNetlist* rootp) {
|
|||
}
|
||||
}
|
||||
|
||||
// For all modulues, skipping over new top
|
||||
// For all modules, skipping over new top
|
||||
for (AstNodeModule* oldmodp = VN_CAST(rootp->modulesp()->nextp(), NodeModule);
|
||||
oldmodp && oldmodp->level() <= 2;
|
||||
oldmodp = VN_CAST(oldmodp->nextp(), NodeModule)) {
|
||||
|
|
|
|||
|
|
@ -650,7 +650,7 @@ string V3Number::toDecimalU() const {
|
|||
for (int nibble_bit = 0; nibble_bit < maxdecwidth; nibble_bit += 4) {
|
||||
if (bcd.bitsValue(nibble_bit, 4) >= 5) {
|
||||
tmp2.setAllBits0();
|
||||
tmp2.setBit(nibble_bit, 1); // Add 3, decompsed as two bits
|
||||
tmp2.setBit(nibble_bit, 1); // Add 3, decomposed as two bits
|
||||
tmp2.setBit(nibble_bit+1, 1);
|
||||
tmp.opAssign(bcd);
|
||||
bcd.opAdd(tmp, tmp2);
|
||||
|
|
|
|||
|
|
@ -555,7 +555,7 @@ string V3Options::argString(int argc, char** argv) {
|
|||
|
||||
void V3Options::parseOpts(FileLine* fl, int argc, char** argv) {
|
||||
// Parse all options
|
||||
// Inital entry point from Verilator.cpp
|
||||
// Initial entry point from Verilator.cpp
|
||||
parseOptsList(fl, ".", argc, argv);
|
||||
|
||||
// Default certain options and error check
|
||||
|
|
|
|||
|
|
@ -1071,7 +1071,7 @@ private:
|
|||
con = false;
|
||||
}
|
||||
if (varscp->varp()->attrClockEn() && !m_inPre && !m_inPost && !m_inClocked) {
|
||||
// clock_enable attribute: user's worring about it for us
|
||||
// clock_enable attribute: user's worrying about it for us
|
||||
con = false;
|
||||
}
|
||||
if (m_inClkAss && (varscp->varp()->attrClocker()
|
||||
|
|
@ -1411,7 +1411,7 @@ void OrderVisitor::processInputsOutIterate(OrderEitherVertex* vertexp, VertexVec
|
|||
vertexp->user(3); // out-edges processed
|
||||
|
||||
{
|
||||
// Propagate PrimaryIn through simple assignments, followint target of vertex
|
||||
// Propagate PrimaryIn through simple assignments, following target of vertex
|
||||
for (V3GraphEdge* edgep = vertexp->outBeginp(); edgep; edgep=edgep->outNextp()) {
|
||||
OrderEitherVertex* toVertexp = static_cast<OrderEitherVertex*>(edgep->top());
|
||||
if (OrderVarStdVertex* vvertexp = dynamic_cast<OrderVarStdVertex*>(toVertexp)) {
|
||||
|
|
|
|||
|
|
@ -464,7 +464,7 @@ private:
|
|||
}
|
||||
}
|
||||
|
||||
//! Parameter subsitution for generated for loops.
|
||||
//! Parameter substitution for generated for loops.
|
||||
//! @todo Unlike generated IF, we don't have to worry about short-circuiting the conditional
|
||||
//! expression, since this is currently restricted to simple comparisons. If we ever do
|
||||
//! move to more generic constant expressions, such code will be needed here.
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ class MergeCandidate;
|
|||
// should cost almost nothing in terms of partitioner quality.
|
||||
//
|
||||
// If you want the most aggressive possible partition, set it "false" and
|
||||
// be prepared to be dissappointed when the improvement in the partition is
|
||||
// be prepared to be disappointed when the improvement in the partition is
|
||||
// negligible / in the noise.
|
||||
//
|
||||
// Q) Why retain the control, if there is really no downside?
|
||||
|
|
@ -2204,7 +2204,7 @@ public:
|
|||
, m_ready(m_mtaskCmp) {}
|
||||
~PartPackMTasks() {}
|
||||
|
||||
// METHOS
|
||||
// METHODS
|
||||
uint32_t completionTime(const ExecMTask* mtaskp, uint32_t thread) {
|
||||
const MTaskState& state = m_mtaskState[mtaskp];
|
||||
UASSERT(mtaskp->thread() != 0xffffffff, "Mtask should have assigned thread");
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ public:
|
|||
string m_strify; ///< Text to be stringified
|
||||
|
||||
// For defines
|
||||
std::stack<V3DefineRef> m_defRefs; ///< Pending definine substitution
|
||||
std::stack<V3DefineRef> m_defRefs; ///< Pending define substitution
|
||||
std::stack<VPreIfEntry> m_ifdefStack; ///< Stack of true/false emitting evaluations
|
||||
unsigned m_defDepth; ///< How many `defines deep
|
||||
bool m_defPutJoin; ///< Insert `` after substitution
|
||||
|
|
@ -564,7 +564,7 @@ string V3PreProcImp::defineSubst(V3DefineRef* refp) {
|
|||
// and would make recursive definitions and parameter handling nasty.
|
||||
//
|
||||
// Note we parse the definition parameters and value here. If a
|
||||
// parametrized define is used many, many times, we could cache the
|
||||
// parameterized define is used many, many times, we could cache the
|
||||
// parsed result.
|
||||
UINFO(4,"defineSubstIn `"<<refp->name()<<" "<<refp->params()<<endl);
|
||||
for (unsigned i=0; i<refp->args().size(); i++) {
|
||||
|
|
@ -598,7 +598,7 @@ string V3PreProcImp::defineSubst(V3DefineRef* refp) {
|
|||
// Parse it
|
||||
if (argName!="") {
|
||||
if (refp->args().size() > numArgs) {
|
||||
// A call `def( a ) must be equivelent to `def(a ), so trimWhitespace
|
||||
// A call `def( a ) must be equivalent to `def(a ), so trimWhitespace
|
||||
// At one point we didn't trim trailing
|
||||
// whitespace, but this confuses `"
|
||||
string arg = trimWhitespace(refp->args()[numArgs], true);
|
||||
|
|
@ -954,7 +954,7 @@ int V3PreProcImp::getStateToken() {
|
|||
|
||||
if (tok==VP_DEFREF_JOIN) {
|
||||
// Here's something fun and unspecified as yet:
|
||||
// The existance of non-existance of a base define changes `` expansion
|
||||
// The existence of non-existance of a base define changes `` expansion
|
||||
// `define QA_b zzz
|
||||
// `define Q1 `QA``_b
|
||||
// 1Q1 -> zzz
|
||||
|
|
@ -1048,7 +1048,7 @@ int V3PreProcImp::getStateToken() {
|
|||
else goto next_tok;
|
||||
}
|
||||
else if (tok==VP_DEFREF) {
|
||||
// IE, `ifdef `MACRO(x): Substitue and come back here when state pops.
|
||||
// IE, `ifdef `MACRO(x): Substitute and come back here when state pops.
|
||||
break;
|
||||
}
|
||||
else {
|
||||
|
|
@ -1288,7 +1288,7 @@ int V3PreProcImp::getStateToken() {
|
|||
}
|
||||
else if (tok==VP_DEFREF) {
|
||||
// Spec says to expand macros inside `"
|
||||
// Substitue it into the stream, then return here
|
||||
// Substitute it into the stream, then return here
|
||||
break;
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ protected:
|
|||
|
||||
// Set language standard up front
|
||||
if (!v3Global.opt.preprocOnly()) {
|
||||
// Leting lex parse this saves us from having to specially en/decode
|
||||
// Letting lex parse this saves us from having to specially en/decode
|
||||
// from the V3LangCode to the various Lex BEGIN states. The language
|
||||
// of this source file is updated here, in case there have been any
|
||||
// intervening +<lang>ext+ options since it was first encountered.
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
// For each wide OP, make a a temporary variable with the wide value
|
||||
// For each deep expression, assign expression to temporary.
|
||||
//
|
||||
// Each display (independant transformation; here as Premit is a good point)
|
||||
// Each display (independent transformation; here as Premit is a good point)
|
||||
// If autoflush, insert a flush
|
||||
//
|
||||
//*************************************************************************
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ private:
|
|||
|
||||
PackageScopeMap m_packageScopes; // Scopes for each package
|
||||
VarScopeMap m_varScopes; // Varscopes created for each scope and var
|
||||
VarRefScopeSet m_varRefScopes; // Varrefs-in-scopes needing fixup when donw
|
||||
VarRefScopeSet m_varRefScopes; // Varrefs-in-scopes needing fixup when done
|
||||
|
||||
// METHODS
|
||||
VL_DEBUG_FUNC; // Declare debug()
|
||||
|
|
|
|||
|
|
@ -946,7 +946,7 @@ private:
|
|||
}
|
||||
|
||||
// default
|
||||
// These types are definately not reducable
|
||||
// These types are definitely not reducible
|
||||
// AstCoverInc, AstArraySel, AstFinish,
|
||||
// AstRand, AstTime, AstUCFunc, AstCCall, AstCStmt, AstUCStmt
|
||||
virtual void visit(AstNode* nodep) {
|
||||
|
|
|
|||
|
|
@ -256,7 +256,7 @@ string VHashSha1::digestSymbol() {
|
|||
// Make a symbol name from hash. Similar to base64, however base 64
|
||||
// has + and / for last two digits, but need C symbol, and we also
|
||||
// avoid conflicts with use of _, so use "AB" at the end.
|
||||
// Thus this function is non-reversable.
|
||||
// Thus this function is non-reversible.
|
||||
static const char digits[64+1]
|
||||
= "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789AB";
|
||||
const string& binhash = digestBinary();
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ public:
|
|||
class VSpellCheck {
|
||||
// CONSTANTS
|
||||
enum { NUM_CANDIDATE_LIMIT = 10000 }; // Avoid searching huge netlists
|
||||
enum { LENGTH_LIMIT = 100 }; // Maximum string length to seach
|
||||
enum { LENGTH_LIMIT = 100 }; // Maximum string length to search
|
||||
// TYPES
|
||||
typedef unsigned int EditDistance;
|
||||
typedef std::vector<string> Candidates;
|
||||
|
|
|
|||
|
|
@ -545,7 +545,7 @@ public:
|
|||
}
|
||||
virtual int cost(const TspTestState* otherp) const {
|
||||
// For test purposes, each TspTestState is merely a point
|
||||
// on the cartesian plane; cost is the linear distance
|
||||
// on the Cartesian plane; cost is the linear distance
|
||||
// between two points.
|
||||
unsigned xabs, yabs;
|
||||
xabs = diff(otherp->m_xpos, m_xpos);
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ private:
|
|||
|
||||
public:
|
||||
void simulateVarRefCb(AstVarRef* nodep) {
|
||||
// Called by TableSimulateVisitor on each unique varref enountered
|
||||
// Called by TableSimulateVisitor on each unique varref encountered
|
||||
UINFO(9," SimVARREF "<<nodep<<endl);
|
||||
AstVarScope* vscp = nodep->varScopep();
|
||||
if (nodep->lvalue()) {
|
||||
|
|
@ -283,7 +283,7 @@ private:
|
|||
// Create table
|
||||
// There may be a simulation path by which the output doesn't change value.
|
||||
// We could bail on these cases, or we can have a "change it" boolean.
|
||||
// We've choosen the later route, since recirc is common in large FSMs.
|
||||
// We've chosen the latter route, since recirc is common in large FSMs.
|
||||
for (std::deque<AstVarScope*>::iterator it = m_outVarps.begin();
|
||||
it != m_outVarps.end(); ++it) {
|
||||
m_outNotSet.push_back(false);
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ private:
|
|||
addIgnore("Wide memory > --trace-max-array ents");
|
||||
} else if (VN_IS(nodep->subDTypep()->skipRefp(), BasicDType) // Nothing lower than this array
|
||||
&& m_traVscp->dtypep()->skipRefp() == nodep) { // Nothing above this array
|
||||
// Simple 1-D array, use exising V3EmitC runtime loop rather than unrolling
|
||||
// Simple 1-D array, use existing V3EmitC runtime loop rather than unrolling
|
||||
// This will put "(index)" at end of signal name for us
|
||||
if (m_traVscp->dtypep()->skipRefp()->isString()) {
|
||||
addIgnore("Unsupported: strings");
|
||||
|
|
|
|||
|
|
@ -925,7 +925,7 @@ class TristateVisitor : public TristateBaseVisitor {
|
|||
UINFO(9,dbgState()<<nodep<<endl);
|
||||
if (debug()>=9) nodep->dumpTree(cout, "-assign: ");
|
||||
// if the rhsp of this assign statement has an output enable driver,
|
||||
// then propage the corresponding output enable assign statement.
|
||||
// then propagate the corresponding output enable assign statement.
|
||||
// down the lvalue tree by recursion for eventual attachment to
|
||||
// the appropriate output signal's VarRef.
|
||||
if (nodep->rhsp()->user1p()) {
|
||||
|
|
@ -1031,7 +1031,7 @@ class TristateVisitor : public TristateBaseVisitor {
|
|||
// the complexity of merging tristate drivers at any level, the
|
||||
// current limitation of this implementation is that a pullup/down
|
||||
// gets applied to all bits of a bus and a bus cannot have drivers
|
||||
// in opposite directions on indvidual pins.
|
||||
// in opposite directions on individual pins.
|
||||
varrefp->lvalue(true);
|
||||
m_tgraph.didProcess(nodep);
|
||||
m_tgraph.didProcess(varrefp->varp());
|
||||
|
|
@ -1261,7 +1261,7 @@ class TristateVisitor : public TristateBaseVisitor {
|
|||
&& m_tgraph.isTristate(nodep->varp())
|
||||
// and in a position where it feeds upstream to another tristate
|
||||
&& m_tgraph.feedsTri(nodep)) {
|
||||
// Then propage the enable from the original variable
|
||||
// Then propagate the enable from the original variable
|
||||
UINFO(9," Ref-to-tri "<<nodep<<endl);
|
||||
AstVar* enVarp = getCreateEnVarp(nodep->varp());
|
||||
nodep->user1p(new AstVarRef(nodep->fileline(), enVarp, false));
|
||||
|
|
|
|||
|
|
@ -238,7 +238,7 @@ private:
|
|||
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 procedual assignment
|
||||
bool m_inProcAssign; // In procedural assignment
|
||||
AstNodeFTask* m_taskp; // Current task
|
||||
AstAlways* m_alwaysCombp; // Current always if combo, otherwise NULL
|
||||
|
||||
|
|
|
|||
|
|
@ -4230,7 +4230,7 @@ AstNode* V3Width::widthParamsEdit(AstNode* nodep) {
|
|||
//! trigger warnings when we deal with the width. It is possible that
|
||||
//! these are spurious, existing within sub-expressions that will not
|
||||
//! actually be generated. Since such occurrences, must be constant, in
|
||||
//! order to be someting a generate block can depend on, we can wait until
|
||||
//! order to be something a generate block can depend on, we can wait until
|
||||
//! later to do the width check.
|
||||
//! @return Pointer to the edited node.
|
||||
AstNode* V3Width::widthGenerateParamsEdit(
|
||||
|
|
|
|||
|
|
@ -393,7 +393,7 @@ private:
|
|||
// How to recover? We'll strip a dimension.
|
||||
nodep->replaceWith(fromp); pushDeletep(nodep); VL_DANGLING(nodep);
|
||||
}
|
||||
// delete whataver we didn't use in reconstruction
|
||||
// delete whatever we didn't use in reconstruction
|
||||
if (!fromp->backp()) { pushDeletep(fromp); VL_DANGLING(fromp); }
|
||||
if (!msbp->backp()) { pushDeletep(msbp); VL_DANGLING(msbp); }
|
||||
if (!lsbp->backp()) { pushDeletep(lsbp); VL_DANGLING(lsbp); }
|
||||
|
|
@ -465,7 +465,7 @@ private:
|
|||
// How to recover? We'll strip a dimension.
|
||||
nodep->replaceWith(fromp); pushDeletep(nodep); VL_DANGLING(nodep);
|
||||
}
|
||||
// delete whataver we didn't use in reconstruction
|
||||
// delete whatever we didn't use in reconstruction
|
||||
if (!fromp->backp()) { pushDeletep(fromp); VL_DANGLING(fromp); }
|
||||
if (!rhsp->backp()) { pushDeletep(rhsp); VL_DANGLING(rhsp); }
|
||||
if (!widthp->backp()) { pushDeletep(widthp); VL_DANGLING(widthp); }
|
||||
|
|
|
|||
Loading…
Reference in New Issue