Internals: UINFO now includes newline itself. No functional change.
This commit is contained in:
parent
091be59f0d
commit
46c7b69c64
|
|
@ -647,7 +647,7 @@ public:
|
|||
// Active class functions
|
||||
|
||||
void V3Active::activeAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{ ActiveVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("active", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,11 +61,11 @@ class ActiveTopVisitor final : public VNVisitor {
|
|||
void visit(AstNodeModule* nodep) override {
|
||||
// Create required actives and add to module
|
||||
// We can start ordering at a module, or a scope
|
||||
UINFO(4, " MOD " << nodep << endl);
|
||||
UINFO(4, " MOD " << nodep);
|
||||
iterateChildren(nodep);
|
||||
}
|
||||
void visit(AstActive* nodep) override {
|
||||
UINFO(4, " ACTIVE " << nodep << endl);
|
||||
UINFO(4, " ACTIVE " << nodep);
|
||||
// Remove duplicate clocks and such; sensesp() may change!
|
||||
V3Const::constifyExpensiveEdit(nodep);
|
||||
AstSenTree* sensesp = nodep->sensesp();
|
||||
|
|
@ -95,10 +95,10 @@ class ActiveTopVisitor final : public VNVisitor {
|
|||
// Move the SENTREE for each active up to the global level.
|
||||
// This way we'll easily see what clock domains are identical
|
||||
AstSenTree* const wantp = m_finder.getSenTree(sensesp);
|
||||
UINFO(4, " lookdone\n");
|
||||
UINFO(4, " lookdone");
|
||||
if (wantp != sensesp) {
|
||||
// Move the active's contents to the other active
|
||||
UINFO(4, " merge active " << sensesp << " into " << wantp << endl);
|
||||
UINFO(4, " merge active " << sensesp << " into " << wantp);
|
||||
if (nodep->sensesStorep()) {
|
||||
UASSERT_OBJ(sensesp == nodep->sensesStorep(), nodep,
|
||||
"sensesStore should have been deleted earlier if different");
|
||||
|
|
@ -155,7 +155,7 @@ public:
|
|||
// Active class functions
|
||||
|
||||
void V3ActiveTop::activeTopAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{ ActiveTopVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("activetop", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -635,7 +635,7 @@ class AssertVisitor final : public VNVisitor {
|
|||
FileLine* const fl = nodep->fileline();
|
||||
switch (nodep->ctlType()) {
|
||||
case VAssertCtlType::ON:
|
||||
UINFO(9, "Generating assertctl for a module: " << m_modp << endl);
|
||||
UINFO(9, "Generating assertctl for a module: " << m_modp);
|
||||
nodep->replaceWith(new AstCExpr{
|
||||
fl,
|
||||
"vlSymsp->_vm_contextp__->assertOnSet("s + std::to_string(nodep->ctlAssertTypes())
|
||||
|
|
@ -644,7 +644,7 @@ class AssertVisitor final : public VNVisitor {
|
|||
break;
|
||||
case VAssertCtlType::OFF:
|
||||
case VAssertCtlType::KILL: {
|
||||
UINFO(9, "Generating assertctl for a module: " << m_modp << endl);
|
||||
UINFO(9, "Generating assertctl for a module: " << m_modp);
|
||||
nodep->replaceWith(new AstCExpr{fl,
|
||||
"vlSymsp->_vm_contextp__->assertOnClear("s
|
||||
+ std::to_string(nodep->ctlAssertTypes()) + " ,"s
|
||||
|
|
@ -725,7 +725,7 @@ public:
|
|||
// Top Assert class
|
||||
|
||||
void V3Assert::assertAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{ AssertVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("assert", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ private:
|
|||
void visit(AstClocking* const nodep) override {
|
||||
VL_RESTORER(m_clockingp);
|
||||
m_clockingp = nodep;
|
||||
UINFO(8, " CLOCKING" << nodep << endl);
|
||||
UINFO(8, " CLOCKING" << nodep);
|
||||
iterateChildren(nodep);
|
||||
if (nodep->eventp()) nodep->addNextHere(nodep->eventp()->unlinkFrBack());
|
||||
VL_DO_DANGLING(pushDeletep(nodep->unlinkFrBack()), nodep);
|
||||
|
|
@ -359,9 +359,9 @@ private:
|
|||
}
|
||||
}
|
||||
void visit(AstNodeVarRef* nodep) override {
|
||||
UINFO(8, " -varref: " << nodep << endl);
|
||||
UINFO(8, " -varref-var-back: " << nodep->varp()->backp() << endl);
|
||||
UINFO(8, " -varref-var-user1: " << nodep->varp()->user1p() << endl);
|
||||
UINFO(8, " -varref: " << nodep);
|
||||
UINFO(8, " -varref-var-back: " << nodep->varp()->backp());
|
||||
UINFO(8, " -varref-var-user1: " << nodep->varp()->user1p());
|
||||
if (AstClockingItem* const itemp = VN_CAST(
|
||||
nodep->varp()->user1p() ? nodep->varp()->user1p() : nodep->varp()->firstAbovep(),
|
||||
ClockingItem)) {
|
||||
|
|
@ -369,12 +369,12 @@ private:
|
|||
|
||||
// ensure linking still works, this has to be done only once
|
||||
if (AstVarXRef* xrefp = VN_CAST(nodep, VarXRef)) {
|
||||
UINFO(8, " -clockvarxref-in: " << xrefp << endl);
|
||||
UINFO(8, " -clockvarxref-in: " << xrefp);
|
||||
string dotted = xrefp->dotted();
|
||||
const size_t dotPos = dotted.rfind('.');
|
||||
dotted.erase(dotPos, string::npos);
|
||||
xrefp->dotted(dotted);
|
||||
UINFO(8, " -clockvarxref-out: " << xrefp << endl);
|
||||
UINFO(8, " -clockvarxref-out: " << xrefp);
|
||||
m_xrefsp.emplace_back(xrefp);
|
||||
}
|
||||
|
||||
|
|
@ -613,7 +613,7 @@ public:
|
|||
// Top Assert class
|
||||
|
||||
void V3AssertPre::assertPreAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{ AssertPreVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("assertpre", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -671,7 +671,7 @@ AstNode* AstNode::unlinkFrBack(VNRelinker* linkerp) {
|
|||
|
||||
void AstNode::relink(VNRelinker* linkerp) {
|
||||
if (debug() > 8) {
|
||||
UINFO(0, " EDIT: relink: ");
|
||||
UINFO_PREFIX(" EDIT: relink: ");
|
||||
dumpPtrs();
|
||||
}
|
||||
AstNode* const newp = this;
|
||||
|
|
@ -1344,7 +1344,7 @@ void AstNode::dumpTreeFile(const string& filename, bool doDump) {
|
|||
// Not const function as calls checkTree
|
||||
if (doDump) {
|
||||
{ // Write log & close
|
||||
UINFO(2, "Dumping " << filename << endl);
|
||||
UINFO(2, "Dumping " << filename);
|
||||
const std::unique_ptr<std::ofstream> logsp{V3File::new_ofstream(filename)};
|
||||
if (logsp->fail()) v3fatal("Can't write file: " << filename);
|
||||
*logsp << "Verilator Tree Dump (format 0x3900) from <e" << std::dec << editCountLast();
|
||||
|
|
@ -1389,7 +1389,7 @@ void AstNode::dumpTreeDot(std::ostream& os) const {
|
|||
|
||||
void AstNode::dumpTreeJsonFile(const string& filename, bool doDump) {
|
||||
if (!doDump) return;
|
||||
UINFO(2, "Dumping " << filename << endl);
|
||||
UINFO(2, "Dumping " << filename);
|
||||
const std::unique_ptr<std::ofstream> treejsonp{V3File::new_ofstream(filename)};
|
||||
if (treejsonp->fail()) v3fatal("Can't write file: " << filename);
|
||||
dumpTreeJson(*treejsonp);
|
||||
|
|
@ -1398,7 +1398,7 @@ void AstNode::dumpTreeJsonFile(const string& filename, bool doDump) {
|
|||
|
||||
void AstNode::dumpJsonMetaFileGdb(const char* filename) { dumpJsonMetaFile(filename); }
|
||||
void AstNode::dumpJsonMetaFile(const string& filename) {
|
||||
UINFO(2, "Dumping " << filename << endl);
|
||||
UINFO(2, "Dumping " << filename);
|
||||
const std::unique_ptr<std::ofstream> treejsonp{V3File::new_ofstream(filename)};
|
||||
if (treejsonp->fail()) v3fatalStatic("Can't write file: " << filename);
|
||||
*treejsonp << '{';
|
||||
|
|
@ -1412,7 +1412,7 @@ void AstNode::dumpJsonMetaFile(const string& filename) {
|
|||
|
||||
void AstNode::dumpTreeDotFile(const string& filename, bool doDump) {
|
||||
if (doDump) {
|
||||
UINFO(2, "Dumping " << filename << endl);
|
||||
UINFO(2, "Dumping " << filename);
|
||||
const std::unique_ptr<std::ofstream> treedotp{V3File::new_ofstream(filename)};
|
||||
if (treedotp->fail()) v3fatal("Can't write file: " << filename);
|
||||
*treedotp << "digraph vTree{\n";
|
||||
|
|
@ -1608,9 +1608,9 @@ static VCastable computeCastableImp(const AstNodeDType* toDtp, const AstNodeDTyp
|
|||
VCastable AstNode::computeCastable(const AstNodeDType* toDtp, const AstNodeDType* fromDtp,
|
||||
const AstNode* fromConstp) {
|
||||
const auto castable = computeCastableImp(toDtp, fromDtp, fromConstp);
|
||||
UINFO(9, " castable=" << castable << " for " << toDtp << endl);
|
||||
UINFO(9, " =?= " << fromDtp << endl);
|
||||
if (fromConstp) UINFO(9, " const= " << fromConstp << endl);
|
||||
UINFO(9, " castable=" << castable << " for " << toDtp);
|
||||
UINFO(9, " =?= " << fromDtp);
|
||||
if (fromConstp) UINFO(9, " const= " << fromConstp);
|
||||
return castable;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ class BeginVisitor final : public VNVisitor {
|
|||
string dot(const string& a, const string& b) { return VString::dot(a, "__DOT__", b); }
|
||||
|
||||
void dotNames(const AstNodeBlock* const nodep, const char* const blockName) {
|
||||
UINFO(8, "nname " << m_namedScope << endl);
|
||||
UINFO(8, "nname " << m_namedScope);
|
||||
if (nodep->name() != "") { // Else unneeded unnamed block
|
||||
// Create data for dotted variable resolution
|
||||
string dottedname = nodep->name() + "__DOT__"; // So always found
|
||||
|
|
@ -149,7 +149,7 @@ class BeginVisitor final : public VNVisitor {
|
|||
// Rename it (e.g. class under a generate)
|
||||
if (m_unnamedScope != "") {
|
||||
nodep->name(dot(m_unnamedScope, nodep->name()));
|
||||
UINFO(8, " rename to " << nodep->name() << endl);
|
||||
UINFO(8, " rename to " << nodep->name());
|
||||
m_statep->userMarkChanged(nodep);
|
||||
}
|
||||
VL_RESTORER(m_displayScope);
|
||||
|
|
@ -161,11 +161,11 @@ class BeginVisitor final : public VNVisitor {
|
|||
iterateChildren(nodep);
|
||||
}
|
||||
void visit(AstNodeFTask* nodep) override {
|
||||
UINFO(8, " " << nodep << endl);
|
||||
UINFO(8, " " << nodep);
|
||||
// Rename it
|
||||
if (m_unnamedScope != "") {
|
||||
nodep->name(dot(m_unnamedScope, nodep->name()));
|
||||
UINFO(8, " rename to " << nodep->name() << endl);
|
||||
UINFO(8, " rename to " << nodep->name());
|
||||
m_statep->userMarkChanged(nodep);
|
||||
}
|
||||
// BEGIN wrapping a function rename that function, but don't affect
|
||||
|
|
@ -200,7 +200,7 @@ class BeginVisitor final : public VNVisitor {
|
|||
}
|
||||
void visit(AstBegin* nodep) override {
|
||||
// Begin blocks were only useful in variable creation, change names and delete
|
||||
UINFO(8, " " << nodep << endl);
|
||||
UINFO(8, " " << nodep);
|
||||
VL_RESTORER(m_displayScope);
|
||||
VL_RESTORER(m_namedScope);
|
||||
VL_RESTORER(m_unnamedScope);
|
||||
|
|
@ -255,12 +255,12 @@ class BeginVisitor final : public VNVisitor {
|
|||
}
|
||||
}
|
||||
void visit(AstCell* nodep) override {
|
||||
UINFO(8, " CELL " << nodep << endl);
|
||||
UINFO(8, " CELL " << nodep);
|
||||
if (m_namedScope != "") {
|
||||
m_statep->userMarkChanged(nodep);
|
||||
// Rename it
|
||||
nodep->name(dot(m_namedScope, nodep->name()));
|
||||
UINFO(8, " rename to " << nodep->name() << endl);
|
||||
UINFO(8, " rename to " << nodep->name());
|
||||
// Move to module
|
||||
nodep->unlinkFrBack();
|
||||
m_modp->addStmtsp(nodep);
|
||||
|
|
@ -268,10 +268,10 @@ class BeginVisitor final : public VNVisitor {
|
|||
iterateChildren(nodep);
|
||||
}
|
||||
void visit(AstVarXRef* nodep) override {
|
||||
UINFO(9, " VARXREF " << nodep << endl);
|
||||
UINFO(9, " VARXREF " << nodep);
|
||||
if (m_namedScope != "" && nodep->inlinedDots() == "" && !m_ftaskp) {
|
||||
nodep->inlinedDots(m_namedScope);
|
||||
UINFO(9, " rescope to " << nodep << endl);
|
||||
UINFO(9, " rescope to " << nodep);
|
||||
}
|
||||
}
|
||||
void visit(AstScopeName* nodep) override {
|
||||
|
|
@ -339,23 +339,23 @@ private:
|
|||
void visit(AstNodeFTaskRef* nodep) override {
|
||||
UASSERT_OBJ(nodep->taskp(), nodep, "unlinked");
|
||||
if (nodep->taskp()->user1()) { // It was converted
|
||||
UINFO(9, " relinkFTask " << nodep << endl);
|
||||
UINFO(9, " relinkFTask " << nodep);
|
||||
nodep->name(nodep->taskp()->name());
|
||||
}
|
||||
iterateChildrenConst(nodep);
|
||||
}
|
||||
void visit(AstVarRef* nodep) override {
|
||||
if (nodep->varp()->user1()) { // It was converted
|
||||
UINFO(9, " relinVarRef " << nodep << endl);
|
||||
UINFO(9, " relinVarRef " << nodep);
|
||||
}
|
||||
iterateChildrenConst(nodep);
|
||||
}
|
||||
void visit(AstIfaceRefDType* nodep) override {
|
||||
// May have changed cell names
|
||||
// TypeTable is always after all modules, so names are stable
|
||||
UINFO(8, " IFACEREFDTYPE " << nodep << endl);
|
||||
UINFO(8, " IFACEREFDTYPE " << nodep);
|
||||
if (nodep->cellp()) nodep->cellName(nodep->cellp()->name());
|
||||
UINFO(8, " rename to " << nodep << endl);
|
||||
UINFO(8, " rename to " << nodep);
|
||||
iterateChildrenConst(nodep);
|
||||
}
|
||||
//--------------------
|
||||
|
|
@ -371,7 +371,7 @@ public:
|
|||
// Task class functions
|
||||
|
||||
void V3Begin::debeginAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{
|
||||
BeginState state;
|
||||
{ BeginVisitor{nodep, &state}; }
|
||||
|
|
|
|||
|
|
@ -53,14 +53,14 @@ class BranchVisitor final : public VNVisitorConst {
|
|||
}
|
||||
void checkUnlikely(AstNode* nodep) {
|
||||
if (nodep->isUnlikely()) {
|
||||
UINFO(4, " UNLIKELY: " << nodep << endl);
|
||||
UINFO(4, " UNLIKELY: " << nodep);
|
||||
m_unlikely++;
|
||||
}
|
||||
}
|
||||
|
||||
// VISITORS
|
||||
void visit(AstNodeIf* nodep) override {
|
||||
UINFO(4, " IF: " << nodep << endl);
|
||||
UINFO(4, " IF: " << nodep);
|
||||
VL_RESTORER(m_likely);
|
||||
VL_RESTORER(m_unlikely);
|
||||
{
|
||||
|
|
@ -119,6 +119,6 @@ public:
|
|||
// Branch class functions
|
||||
|
||||
void V3Branch::branchAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{ BranchVisitor{nodep}; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -332,11 +332,11 @@ public:
|
|||
// Broken check entry point
|
||||
|
||||
void V3Broken::brokenAll(AstNetlist* nodep) {
|
||||
// UINFO(9, __FUNCTION__ << ": " << endl);
|
||||
// UINFO(9, __FUNCTION__ << ": ");
|
||||
static bool inBroken = false;
|
||||
if (VL_UNCOVERABLE(inBroken)) {
|
||||
// A error called by broken can recurse back into broken; avoid this
|
||||
UINFO(1, "Broken called under broken, skipping recursion.\n"); // LCOV_EXCL_LINE
|
||||
UINFO(1, "Broken called under broken, skipping recursion."); // LCOV_EXCL_LINE
|
||||
} else {
|
||||
inBroken = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -260,7 +260,7 @@ void V3CCtors::evalAsserts() {
|
|||
}
|
||||
|
||||
void V3CCtors::cctorsAll() {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
evalAsserts();
|
||||
{ CCtorsVisitor{v3Global.rootp()}; }
|
||||
V3Global::dumpCheckGlobalTree("cctors", 0, dumpTreeEitherLevel() >= 3);
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ public:
|
|||
for (auto& used : m_didUse) {
|
||||
AstCUse* const newp = new AstCUse{used.second.first, used.second.second, used.first};
|
||||
m_modp->addStmtsp(newp);
|
||||
UINFO(8, "Insert " << newp << endl);
|
||||
UINFO(8, "Insert " << newp);
|
||||
}
|
||||
}
|
||||
~CUseVisitor() override = default;
|
||||
|
|
@ -109,7 +109,7 @@ public:
|
|||
// Class class functions
|
||||
|
||||
void V3CUse::cUseAll() {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
// Call visitor separately for each module, so visitor state is cleared
|
||||
for (AstNodeModule* modp = v3Global.rootp()->modulesp(); modp;
|
||||
modp = VN_AS(modp->nextp(), NodeModule)) {
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ class CaseVisitor final : public VNVisitor {
|
|||
m_caseNoOverlapsAllCovered = false;
|
||||
return false; // Too wide for analysis
|
||||
}
|
||||
UINFO(8, "Simple case statement: " << nodep << endl);
|
||||
UINFO(8, "Simple case statement: " << nodep);
|
||||
const uint32_t numCases = 1UL << m_caseWidth;
|
||||
// Zero list of items for each value
|
||||
for (uint32_t i = 0; i < numCases; ++i) m_valueItem[i] = nullptr;
|
||||
|
|
@ -376,7 +376,7 @@ class CaseVisitor final : public VNVisitor {
|
|||
if (debug() >= 9) { // LCOV_EXCL_START
|
||||
for (uint32_t i = 0; i < (1UL << m_caseWidth); ++i) {
|
||||
if (const AstNode* const itemp = m_valueItem[i]) {
|
||||
UINFO(9, "Value " << std::hex << i << " " << itemp << endl);
|
||||
UINFO(9, "Value " << std::hex << i << " " << itemp);
|
||||
}
|
||||
}
|
||||
} // LCOV_EXCL_STOP
|
||||
|
|
@ -600,11 +600,11 @@ public:
|
|||
// Case class functions
|
||||
|
||||
void V3Case::caseAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{ CaseVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("case", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
void V3Case::caseLint(AstNodeCase* nodep) {
|
||||
UINFO(4, __FUNCTION__ << ": " << endl);
|
||||
UINFO(4, __FUNCTION__ << ": ");
|
||||
{ CaseLintVisitor{nodep}; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ class CastVisitor final : public VNVisitor {
|
|||
//
|
||||
AstCCast* const castp
|
||||
= new AstCCast{nodep->fileline(), nodep, needsize, nodep->widthMin()};
|
||||
UINFO(4, " MadeCast " << static_cast<void*>(castp) << " for " << nodep << endl);
|
||||
UINFO(4, " MadeCast " << static_cast<void*>(castp) << " for " << nodep);
|
||||
relinkHandle.relink(castp);
|
||||
// if (debug() > 8) castp->dumpTree("- castins: ");
|
||||
//
|
||||
|
|
@ -239,7 +239,7 @@ public:
|
|||
// Cast class functions
|
||||
|
||||
void V3Cast::castAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{ CastVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("cast", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -243,7 +243,7 @@ public:
|
|||
for (auto moved : m_toScopeMoves) {
|
||||
AstNode* const nodep = moved.first;
|
||||
AstScope* const scopep = moved.second;
|
||||
UINFO(9, "moving " << nodep << " to " << scopep << endl);
|
||||
UINFO(9, "moving " << nodep << " to " << scopep);
|
||||
if (VN_IS(nodep, NodeFTask)) {
|
||||
scopep->addBlocksp(nodep->unlinkFrBack());
|
||||
} else if (VN_IS(nodep, Var)) {
|
||||
|
|
@ -261,7 +261,7 @@ public:
|
|||
for (auto moved : m_toPackageMoves) {
|
||||
AstNode* const nodep = moved.first;
|
||||
AstNodeModule* const modp = moved.second;
|
||||
UINFO(9, "moving " << nodep << " to " << modp << endl);
|
||||
UINFO(9, "moving " << nodep << " to " << modp);
|
||||
nodep->unlinkFrBack();
|
||||
modp->addStmtsp(nodep);
|
||||
}
|
||||
|
|
@ -294,7 +294,7 @@ public:
|
|||
// Class class functions
|
||||
|
||||
void V3Class::classAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{ ClassVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("class", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ class CleanVisitor final : public VNVisitor {
|
|||
|
||||
// Operate on nodes
|
||||
void insertClean(AstNodeExpr* nodep) { // We'll insert ABOVE passed node
|
||||
UINFO(4, " NeedClean " << nodep << endl);
|
||||
UINFO(4, " NeedClean " << nodep);
|
||||
VNRelinker relinkHandle;
|
||||
nodep->unlinkFrBack(&relinkHandle);
|
||||
//
|
||||
|
|
@ -326,7 +326,7 @@ public:
|
|||
// Clean class functions
|
||||
|
||||
void V3Clean::cleanAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{ CleanVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("clean", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ public:
|
|||
// Clock class functions
|
||||
|
||||
void V3Clock::clockAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{ ClockVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("clock", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -113,8 +113,8 @@ class CombineVisitor final : VNVisitor {
|
|||
if (oldp->user3()) std::swap(oldp, newp);
|
||||
|
||||
// Something is being replaced
|
||||
UINFO(9, "Replacing " << oldp << endl);
|
||||
UINFO(9, " with " << newp << endl);
|
||||
UINFO(9, "Replacing " << oldp);
|
||||
UINFO(9, " with " << newp);
|
||||
++m_cfuncsCombined;
|
||||
replaced = true;
|
||||
|
||||
|
|
@ -233,7 +233,7 @@ public:
|
|||
// Combine class functions
|
||||
|
||||
void V3Combine::combineAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
CombineVisitor::apply(nodep);
|
||||
V3Global::dumpCheckGlobalTree("combine", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ static void makeToStringMiddle(AstClass* nodep) {
|
|||
// V3Common class functions
|
||||
|
||||
void V3Common::commonAll() {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
// NODE STATE
|
||||
// Entire netlist:
|
||||
// AstClass::user1() -> bool. True if class needs to_string dumper
|
||||
|
|
|
|||
|
|
@ -404,17 +404,17 @@ public:
|
|||
void applyIgnores(FileLine* filelinep) {
|
||||
// HOT routine, called each parsed token line of this filename
|
||||
if (m_lastIgnore.lineno != filelinep->lineno()) {
|
||||
// UINFO(9, " ApplyIgnores for " << filelinep->ascii() << endl);
|
||||
// UINFO(9, " ApplyIgnores for " << filelinep->ascii());
|
||||
// Process all on/offs for lines up to and including the current line
|
||||
const int curlineno = filelinep->lastLineno();
|
||||
for (; m_lastIgnore.it != m_ignLines.end(); ++m_lastIgnore.it) {
|
||||
if (m_lastIgnore.it->m_lineno > curlineno) break;
|
||||
// UINFO(9, " Hit " << *m_lastIgnore.it << endl);
|
||||
// UINFO(9, " Hit " << *m_lastIgnore.it);
|
||||
filelinep->warnOn(m_lastIgnore.it->m_code, m_lastIgnore.it->m_on);
|
||||
}
|
||||
if (false && debug() >= 9) {
|
||||
for (IgnLines::const_iterator it = m_lastIgnore.it; it != m_ignLines.end(); ++it) {
|
||||
UINFO(9, " NXT " << *it << endl);
|
||||
UINFO(9, " NXT " << *it);
|
||||
}
|
||||
}
|
||||
m_lastIgnore.lineno = filelinep->lastLineno();
|
||||
|
|
@ -480,7 +480,7 @@ class V3ConfigScopeTraceResolver final {
|
|||
public:
|
||||
void addScopeTraceOn(bool on, const string& scope, int levels) {
|
||||
UINFO(9, "addScopeTraceOn " << on << " '" << scope << "' "
|
||||
<< " levels=" << levels << endl);
|
||||
<< " levels=" << levels);
|
||||
m_entries.emplace_back(V3ConfigScopeTraceEntry{scope, on, levels});
|
||||
m_matchCache.clear();
|
||||
}
|
||||
|
|
@ -499,7 +499,7 @@ public:
|
|||
for (const auto& ch : scope) {
|
||||
if (ch == '.') ++maxLevel;
|
||||
}
|
||||
UINFO(9, "getScopeTraceOn " << scope << " maxLevel=" << maxLevel << endl);
|
||||
UINFO(9, "getScopeTraceOn " << scope << " maxLevel=" << maxLevel);
|
||||
|
||||
bool enabled = true;
|
||||
for (const auto& ent : m_entries) {
|
||||
|
|
@ -518,7 +518,7 @@ public:
|
|||
UINFO(9, "getScopeTraceOn-part " << scope << " enabled=" << enabled
|
||||
<< " @ lev=" << partLevel
|
||||
<< (levelMatch ? "[match]" : "[miss]")
|
||||
<< " from scopepart=" << scopepart << endl);
|
||||
<< " from scopepart=" << scopepart);
|
||||
break;
|
||||
}
|
||||
if (partEnd == scope.length()) break;
|
||||
|
|
|
|||
117
src/V3Const.cpp
117
src/V3Const.cpp
|
|
@ -394,7 +394,7 @@ class ConstBitOpTreeVisitor final : public VNVisitorConst {
|
|||
bool setFailed(bool fail, const char* reason, AstNode* nodep, int line) {
|
||||
if (fail && !m_failed) {
|
||||
UINFO(9, "cannot optimize " << m_rootp << " reason:" << reason << " called from line:"
|
||||
<< line << " when checking:" << nodep << std::endl);
|
||||
<< line << " when checking:" << nodep);
|
||||
// if (debug() >= 9) m_rootp->dumpTree("- root: ");
|
||||
m_failed = true;
|
||||
}
|
||||
|
|
@ -402,7 +402,7 @@ class ConstBitOpTreeVisitor final : public VNVisitorConst {
|
|||
}
|
||||
void incrOps(const AstNode* nodep, int line) {
|
||||
++m_ops;
|
||||
UINFO(9, "Increment to " << m_ops << " " << nodep << " called from line " << line << "\n");
|
||||
UINFO(9, "Increment to " << m_ops << " " << nodep << " called from line " << line);
|
||||
}
|
||||
VarInfo& getVarInfo(const LeafInfo& ref) {
|
||||
UASSERT_OBJ(ref.refp(), m_rootp, "null varref in And/Or/Xor optimization");
|
||||
|
|
@ -729,11 +729,11 @@ public:
|
|||
if (v->getConstResult()) {
|
||||
UASSERT_OBJ(visitor.isOrTree(), nodep,
|
||||
"Only OR tree can yield known 1 result");
|
||||
UINFO(9, "OR tree with const 1 term: " << v->refp() << endl);
|
||||
UINFO(9, "OR tree with const 1 term: " << v->refp());
|
||||
// Known 1 bit in OR tree, whole result is 1
|
||||
resultp = new AstConst{fl, AstConst::BitTrue{}};
|
||||
} else if (visitor.isAndTree()) {
|
||||
UINFO(9, "AND tree with const 0 term: " << v->refp() << endl);
|
||||
UINFO(9, "AND tree with const 0 term: " << v->refp());
|
||||
// Known 0 bit in AND tree, whole result is 0
|
||||
resultp = new AstConst{fl, AstConst::BitFalse{}};
|
||||
} else {
|
||||
|
|
@ -750,10 +750,10 @@ public:
|
|||
resultOps += std::get<1>(result);
|
||||
if (std::get<2>(result)) {
|
||||
hasCleanTerm = true;
|
||||
UINFO(9, "Clean term: " << termps.back() << endl);
|
||||
UINFO(9, "Clean term: " << termps.back());
|
||||
} else {
|
||||
hasDirtyTerm = true;
|
||||
UINFO(9, "Dirty term: " << termps.back() << endl);
|
||||
UINFO(9, "Dirty term: " << termps.back());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -770,7 +770,7 @@ public:
|
|||
} else {
|
||||
// Otherwise, conservatively assume the frozen term is dirty
|
||||
hasDirtyTerm = true;
|
||||
UINFO(9, "Dirty frozen term: " << termp << endl);
|
||||
UINFO(9, "Dirty frozen term: " << termp);
|
||||
}
|
||||
frozenNodes[frozenInfo.second].push_back(termp);
|
||||
}
|
||||
|
|
@ -1103,8 +1103,7 @@ class ConstVisitor final : public VNVisitor {
|
|||
if (!VN_IS(condp->thenp(), Const) && !VN_IS(condp->elsep(), Const)) return false;
|
||||
AstConst* const maskp = VN_CAST(nodep->lhsp(), Const);
|
||||
if (!maskp) return false;
|
||||
UINFO(4, "AND(CONSTm, CONDcond(c, i, e))->CONDcond(c, AND(m,i), AND(m, e)) " << nodep
|
||||
<< endl);
|
||||
UINFO(4, "AND(CONSTm, CONDcond(c, i, e))->CONDcond(c, AND(m,i), AND(m, e)) " << nodep);
|
||||
AstNodeCond* const newp = static_cast<AstNodeCond*>(condp->cloneType(
|
||||
condp->condp()->unlinkFrBack(),
|
||||
new AstAnd{nodep->fileline(), maskp->cloneTree(false), condp->thenp()->unlinkFrBack()},
|
||||
|
|
@ -1219,7 +1218,7 @@ class ConstVisitor final : public VNVisitor {
|
|||
|
||||
if (newp) {
|
||||
nodep->replaceWithKeepDType(newp);
|
||||
UINFO(4, "Transformed leaf of bit tree to " << newp << std::endl);
|
||||
UINFO(4, "Transformed leaf of bit tree to " << newp);
|
||||
VL_DO_DANGLING(pushDeletep(nodep), nodep);
|
||||
}
|
||||
|
||||
|
|
@ -1362,7 +1361,7 @@ class ConstVisitor final : public VNVisitor {
|
|||
const int newLsb = lp->toSInt() + bp->toSInt();
|
||||
if (newLsb + nodep->widthConst() > ap->width()) return false;
|
||||
//
|
||||
UINFO(9, "SEL(SHIFTR(a,b),l,w) -> SEL(a,l+b,w)\n");
|
||||
UINFO(9, "SEL(SHIFTR(a,b),l,w) -> SEL(a,l+b,w)");
|
||||
if (debug() >= 9) nodep->dumpTree("- SEL(SH)-in: ");
|
||||
AstSel* const newp
|
||||
= new AstSel{nodep->fileline(), ap->unlinkFrBack(), newLsb, nodep->widthConst()};
|
||||
|
|
@ -1454,7 +1453,7 @@ class ConstVisitor final : public VNVisitor {
|
|||
: (" (adjusted +" + cvtToStr(-nodep->declRange().lo())
|
||||
+ " to account for negative lsb)")));
|
||||
UINFO(1, " Related Raw index is " << nodep->msbConst() << ":"
|
||||
<< nodep->lsbConst() << endl);
|
||||
<< nodep->lsbConst());
|
||||
// Don't replace with zero, we'll do it later
|
||||
}
|
||||
}
|
||||
|
|
@ -1638,14 +1637,14 @@ class ConstVisitor final : public VNVisitor {
|
|||
V3Number numv{nodep, nodep->widthMinV()};
|
||||
nodep->numberOperate(numv, constNumV(nodep->lhsp()));
|
||||
const V3Number& num = toNumC(nodep, numv);
|
||||
UINFO(4, "UNICONST -> " << num << endl);
|
||||
UINFO(4, "UNICONST -> " << num);
|
||||
VL_DO_DANGLING(replaceNum(nodep, num), nodep);
|
||||
}
|
||||
void replaceConst(AstNodeBiop* nodep) {
|
||||
V3Number numv{nodep, nodep->widthMinV()};
|
||||
nodep->numberOperate(numv, constNumV(nodep->lhsp()), constNumV(nodep->rhsp()));
|
||||
const V3Number& num = toNumC(nodep, numv);
|
||||
UINFO(4, "BICONST -> " << num << endl);
|
||||
UINFO(4, "BICONST -> " << num);
|
||||
VL_DO_DANGLING(replaceNum(nodep, num), nodep);
|
||||
}
|
||||
void replaceConst(AstNodeTriop* nodep) {
|
||||
|
|
@ -1653,7 +1652,7 @@ class ConstVisitor final : public VNVisitor {
|
|||
nodep->numberOperate(numv, constNumV(nodep->lhsp()), constNumV(nodep->rhsp()),
|
||||
constNumV(nodep->thsp()));
|
||||
const V3Number& num = toNumC(nodep, numv);
|
||||
UINFO(4, "TRICONST -> " << num << endl);
|
||||
UINFO(4, "TRICONST -> " << num);
|
||||
VL_DO_DANGLING(replaceNum(nodep, num), nodep);
|
||||
}
|
||||
void replaceConst(AstNodeQuadop* nodep) {
|
||||
|
|
@ -1661,7 +1660,7 @@ class ConstVisitor final : public VNVisitor {
|
|||
nodep->numberOperate(numv, constNumV(nodep->lhsp()), constNumV(nodep->rhsp()),
|
||||
constNumV(nodep->thsp()), constNumV(nodep->fhsp()));
|
||||
const V3Number& num = toNumC(nodep, numv);
|
||||
UINFO(4, "QUADCONST -> " << num << endl);
|
||||
UINFO(4, "QUADCONST -> " << num);
|
||||
VL_DO_DANGLING(replaceNum(nodep, num), nodep);
|
||||
}
|
||||
|
||||
|
|
@ -1835,8 +1834,7 @@ class ConstVisitor final : public VNVisitor {
|
|||
"tried to merge two selects which are not adjacent");
|
||||
AstSel* const newselp = new AstSel{
|
||||
lselp->fromp()->fileline(), rselp->fromp()->unlinkFrBack(), rstart, lwidth + rwidth};
|
||||
UINFO(5, "merged two adjacent sel " << lselp << " and " << rselp << " to one " << newselp
|
||||
<< endl);
|
||||
UINFO(5, "merged two adjacent sel " << lselp << " and " << rselp << " to one " << newselp);
|
||||
|
||||
nodep->replaceWithKeepDType(newselp);
|
||||
VL_DO_DANGLING(pushDeletep(lselp), lselp);
|
||||
|
|
@ -1862,7 +1860,7 @@ class ConstVisitor final : public VNVisitor {
|
|||
lrp->replaceWith(newrp);
|
||||
VL_DO_DANGLING(pushDeletep(lrp), lrp);
|
||||
lp->dtypeChgWidthSigned(newlp->width(), newlp->width(), VSigning::UNSIGNED);
|
||||
UINFO(5, "merged " << nodep << endl);
|
||||
UINFO(5, "merged " << nodep);
|
||||
VL_DO_DANGLING(pushDeletep(rp->unlinkFrBack()), rp);
|
||||
nodep->replaceWithKeepDType(lp->unlinkFrBack());
|
||||
VL_DO_DANGLING(pushDeletep(nodep), nodep);
|
||||
|
|
@ -1884,7 +1882,7 @@ class ConstVisitor final : public VNVisitor {
|
|||
VL_DO_DANGLING(pushDeletep(nodep), nodep);
|
||||
}
|
||||
void replacePowShift(AstNodeBiop* nodep) { // Pow or PowS
|
||||
UINFO(5, "POW(2,b)->SHIFTL(1,b) " << nodep << endl);
|
||||
UINFO(5, "POW(2,b)->SHIFTL(1,b) " << nodep);
|
||||
AstNodeExpr* const rhsp = nodep->rhsp()->unlinkFrBack();
|
||||
AstShiftL* const newp
|
||||
= new AstShiftL{nodep->fileline(), new AstConst{nodep->fileline(), 1}, rhsp};
|
||||
|
|
@ -1893,7 +1891,7 @@ class ConstVisitor final : public VNVisitor {
|
|||
VL_DO_DANGLING(pushDeletep(nodep), nodep);
|
||||
}
|
||||
void replaceMulShift(AstMul* nodep) { // Mul, but not MulS as not simple shift
|
||||
UINFO(5, "MUL(2^n,b)->SHIFTL(b,n) " << nodep << endl);
|
||||
UINFO(5, "MUL(2^n,b)->SHIFTL(b,n) " << nodep);
|
||||
const int amount = VN_AS(nodep->lhsp(), Const)->num().mostSetBitP1() - 1; // 2^n->n+1
|
||||
AstNodeExpr* const opp = nodep->rhsp()->unlinkFrBack();
|
||||
AstShiftL* const newp
|
||||
|
|
@ -1902,7 +1900,7 @@ class ConstVisitor final : public VNVisitor {
|
|||
VL_DO_DANGLING(pushDeletep(nodep), nodep);
|
||||
}
|
||||
void replaceDivShift(AstDiv* nodep) { // Mul, but not MulS as not simple shift
|
||||
UINFO(5, "DIV(b,2^n)->SHIFTR(b,n) " << nodep << endl);
|
||||
UINFO(5, "DIV(b,2^n)->SHIFTR(b,n) " << nodep);
|
||||
const int amount = VN_AS(nodep->rhsp(), Const)->num().mostSetBitP1() - 1; // 2^n->n+1
|
||||
AstNodeExpr* const opp = nodep->lhsp()->unlinkFrBack();
|
||||
AstShiftR* const newp
|
||||
|
|
@ -1911,7 +1909,7 @@ class ConstVisitor final : public VNVisitor {
|
|||
VL_DO_DANGLING(pushDeletep(nodep), nodep);
|
||||
}
|
||||
void replaceModAnd(AstModDiv* nodep) { // Mod, but not ModS as not simple shift
|
||||
UINFO(5, "MOD(b,2^n)->AND(b,2^n-1) " << nodep << endl);
|
||||
UINFO(5, "MOD(b,2^n)->AND(b,2^n-1) " << nodep);
|
||||
const int amount = VN_AS(nodep->rhsp(), Const)->num().mostSetBitP1() - 1; // 2^n->n+1
|
||||
V3Number mask{nodep, nodep->width()};
|
||||
mask.setMask(amount);
|
||||
|
|
@ -1922,7 +1920,7 @@ class ConstVisitor final : public VNVisitor {
|
|||
VL_DO_DANGLING(pushDeletep(nodep), nodep);
|
||||
}
|
||||
void replaceShiftOp(AstNodeBiop* nodep) {
|
||||
UINFO(5, "SHIFT(AND(a,b),CONST)->AND(SHIFT(a,CONST),SHIFT(b,CONST)) " << nodep << endl);
|
||||
UINFO(5, "SHIFT(AND(a,b),CONST)->AND(SHIFT(a,CONST),SHIFT(b,CONST)) " << nodep);
|
||||
const int width = nodep->width();
|
||||
const int widthMin = nodep->widthMin();
|
||||
VNRelinker handle;
|
||||
|
|
@ -1946,7 +1944,7 @@ class ConstVisitor final : public VNVisitor {
|
|||
iterate(newp); // Further reduce, either node may have more reductions.
|
||||
}
|
||||
void replaceShiftShift(AstNodeBiop* nodep) {
|
||||
UINFO(4, "SHIFT(SHIFT(a,s1),s2)->SHIFT(a,ADD(s1,s2)) " << nodep << endl);
|
||||
UINFO(4, "SHIFT(SHIFT(a,s1),s2)->SHIFT(a,ADD(s1,s2)) " << nodep);
|
||||
if (debug() >= 9) nodep->dumpTree("- repShiftShift_old: ");
|
||||
AstNodeBiop* const lhsp = VN_AS(nodep->lhsp(), NodeBiop);
|
||||
lhsp->unlinkFrBack();
|
||||
|
|
@ -2040,8 +2038,8 @@ class ConstVisitor final : public VNVisitor {
|
|||
return false;
|
||||
}
|
||||
const bool lsbFirstAssign = (con1p->toUInt() < con2p->toUInt());
|
||||
UINFO(4, "replaceAssignMultiSel " << nodep << endl);
|
||||
UINFO(4, " && " << nextp << endl);
|
||||
UINFO(4, "replaceAssignMultiSel " << nodep);
|
||||
UINFO(4, " && " << nextp);
|
||||
// if (debug()) nodep->dumpTree("- comb1: ");
|
||||
// if (debug()) nextp->dumpTree("- comb2: ");
|
||||
AstNodeExpr* const rhs1p = nodep->rhsp()->unlinkFrBack();
|
||||
|
|
@ -2110,7 +2108,7 @@ class ConstVisitor final : public VNVisitor {
|
|||
if (need_temp_pure) {
|
||||
// if the RHS is impure we need to create a temporary variable for it, because
|
||||
// further handling involves copying of the RHS.
|
||||
UINFO(4, " ASSITEMPPURE " << nodep << endl);
|
||||
UINFO(4, " ASSITEMPPURE " << nodep);
|
||||
// ASSIGN(CONCAT(lc1,lc2),rhs) -> ASSIGN(temp,rhs),
|
||||
// ASSIGN(lc1,SEL(temp,{size1})),
|
||||
// ASSIGN(lc2,SEL(temp,{size2}))
|
||||
|
|
@ -2126,13 +2124,13 @@ class ConstVisitor final : public VNVisitor {
|
|||
} else if (need_temp) {
|
||||
// The first time we constify, there may be the same variable on the LHS
|
||||
// and RHS. In that case, we must use temporaries, or {a,b}={b,a} will break.
|
||||
UINFO(4, " ASSITEMP " << nodep << endl);
|
||||
UINFO(4, " ASSITEMP " << nodep);
|
||||
// ASSIGN(CONCAT(lc1,lc2),rhs) -> ASSIGN(temp1,SEL(rhs,{size})),
|
||||
// ASSIGN(temp2,SEL(newrhs,{size}))
|
||||
// ASSIGN(lc1,temp1),
|
||||
// ASSIGN(lc2,temp2)
|
||||
} else {
|
||||
UINFO(4, " ASSI " << nodep << endl);
|
||||
UINFO(4, " ASSI " << nodep);
|
||||
// ASSIGN(CONCAT(lc1,lc2),rhs) -> ASSIGN(lc1,SEL(rhs,{size})),
|
||||
// ASSIGN(lc2,SEL(newrhs,{size}))
|
||||
}
|
||||
|
|
@ -2316,7 +2314,7 @@ class ConstVisitor final : public VNVisitor {
|
|||
if (!aboveBlockp) return false;
|
||||
if (aboveBlockp != nodep->labelp()->blockp()) return false;
|
||||
if (aboveBlockp->endStmtsp() != nodep->labelp()) return false;
|
||||
UINFO(4, "JUMPGO => last remove " << nodep << endl);
|
||||
UINFO(4, "JUMPGO => last remove " << nodep);
|
||||
VL_DO_DANGLING(pushDeletep(nodep->unlinkFrBack()), nodep);
|
||||
return true;
|
||||
}
|
||||
|
|
@ -2372,7 +2370,7 @@ class ConstVisitor final : public VNVisitor {
|
|||
AstNode* const newp = valuep->cloneTree(false);
|
||||
newp->fileline(nodep->fileline());
|
||||
nodep->replaceWithKeepDType(newp);
|
||||
UINFO(4, "Simulate->" << newp << endl);
|
||||
UINFO(4, "Simulate->" << newp);
|
||||
VL_DO_DANGLING(pushDeletep(nodep), nodep);
|
||||
}
|
||||
}
|
||||
|
|
@ -2469,7 +2467,7 @@ class ConstVisitor final : public VNVisitor {
|
|||
AstRand* const bRandp = VN_CAST(nodep->rhsp(), Rand);
|
||||
if (!aRandp || !bRandp) return false;
|
||||
if (!aRandp->combinable(bRandp)) return false;
|
||||
UINFO(4, "Concat(Rand,Rand) => Rand: " << nodep << endl);
|
||||
UINFO(4, "Concat(Rand,Rand) => Rand: " << nodep);
|
||||
nodep->replaceWithKeepDType(aRandp->unlinkFrBack());
|
||||
VL_DO_DANGLING(pushDeletep(nodep), nodep);
|
||||
return true;
|
||||
|
|
@ -2479,7 +2477,7 @@ class ConstVisitor final : public VNVisitor {
|
|||
AstRand* const aRandp = VN_CAST(nodep->fromp(), Rand);
|
||||
if (!aRandp) return false;
|
||||
if (aRandp->seedp()) return false;
|
||||
UINFO(4, "Sel(Rand) => Rand: " << nodep << endl);
|
||||
UINFO(4, "Sel(Rand) => Rand: " << nodep);
|
||||
nodep->replaceWithKeepDType(aRandp->unlinkFrBack());
|
||||
VL_DO_DANGLING(pushDeletep(nodep), nodep);
|
||||
return true;
|
||||
|
|
@ -2508,7 +2506,7 @@ class ConstVisitor final : public VNVisitor {
|
|||
// putting additional CONCATs on the RHS leads to fewer assembler operations.
|
||||
// However, we'll end up with lots of wide moves if we make huge trees
|
||||
// like that, so on 32 bit boundaries, we'll do the opposite form.
|
||||
UINFO(4, "Move concat: " << nodep << endl);
|
||||
UINFO(4, "Move concat: " << nodep);
|
||||
if (operandConcatMove(nodep) > 1) {
|
||||
AstNodeExpr* const ap = nodep->lhsp()->unlinkFrBack();
|
||||
AstConcat* const bcConcp = VN_AS(nodep->rhsp(), Concat);
|
||||
|
|
@ -2572,7 +2570,7 @@ class ConstVisitor final : public VNVisitor {
|
|||
AstNodeExpr* const lsb1p = nodep->lsbp()->unlinkFrBack();
|
||||
AstNodeExpr* const lsb2p = belowp->lsbp()->unlinkFrBack();
|
||||
// Eliminate lower range
|
||||
UINFO(4, "Elim Lower range: " << nodep << endl);
|
||||
UINFO(4, "Elim Lower range: " << nodep);
|
||||
AstNodeExpr* newlsbp;
|
||||
if (VN_IS(lsb1p, Const) && VN_IS(lsb2p, Const)) {
|
||||
newlsbp = new AstConst{lsb1p->fileline(),
|
||||
|
|
@ -2787,7 +2785,7 @@ class ConstVisitor final : public VNVisitor {
|
|||
|| nodep->varp()->isParam())) {
|
||||
if (operandConst(valuep)) {
|
||||
const V3Number& num = VN_AS(valuep, Const)->num();
|
||||
// UINFO(2,"constVisit "<<cvtToHex(valuep)<<" "<<num<<endl);
|
||||
// UINFO(2, "constVisit " << cvtToHex(valuep) << " " << num);
|
||||
VL_DO_DANGLING(replaceNum(nodep, num), nodep);
|
||||
did = true;
|
||||
} else if (m_selp && VN_IS(valuep, InitArray)) {
|
||||
|
|
@ -2796,7 +2794,7 @@ class ConstVisitor final : public VNVisitor {
|
|||
AstNode* const itemp = initarp->getIndexDefaultedValuep(bit);
|
||||
if (VN_IS(itemp, Const)) {
|
||||
const V3Number& num = VN_AS(itemp, Const)->num();
|
||||
// UINFO(2,"constVisit "<<cvtToHex(valuep)<<" "<<num<<endl);
|
||||
// UINFO(2, "constVisit " << cvtToHex(valuep) << " " << num);
|
||||
VL_DO_DANGLING(replaceNum(nodep, num), nodep);
|
||||
did = true;
|
||||
}
|
||||
|
|
@ -2825,7 +2823,7 @@ class ConstVisitor final : public VNVisitor {
|
|||
void visit(AstExprStmt* nodep) override {
|
||||
iterateChildren(nodep);
|
||||
if (!AstNode::afterCommentp(nodep->stmtsp())) {
|
||||
UINFO(8, "ExprStmt(...) " << nodep << " " << nodep->resultp() << endl);
|
||||
UINFO(8, "ExprStmt(...) " << nodep << " " << nodep->resultp());
|
||||
nodep->replaceWith(nodep->resultp()->unlinkFrBack());
|
||||
VL_DO_DANGLING(pushDeletep(nodep), nodep);
|
||||
// Removing the ExprStmt might have made something impure above now pure
|
||||
|
|
@ -2899,7 +2897,7 @@ class ConstVisitor final : public VNVisitor {
|
|||
lastSensp = VN_AS(lastSensp, Not)->lhsp();
|
||||
invert = !invert;
|
||||
}
|
||||
UINFO(8, "senItem(NOT...) " << nodep << " " << invert << endl);
|
||||
UINFO(8, "senItem(NOT...) " << nodep << " " << invert);
|
||||
if (invert) nodep->edgeType(nodep->edgeType().invert());
|
||||
sensp->replaceWith(lastSensp->unlinkFrBack());
|
||||
VL_DO_DANGLING(pushDeletep(sensp), sensp);
|
||||
|
|
@ -3097,7 +3095,7 @@ class ConstVisitor final : public VNVisitor {
|
|||
&& !varrefp->varp()->isForced() // Not forced (not really a constant)
|
||||
) {
|
||||
// ASSIGNW (VARREF, const) -> INITIAL ( ASSIGN (VARREF, const) )
|
||||
UINFO(4, "constAssignW " << nodep << endl);
|
||||
UINFO(4, "constAssignW " << nodep);
|
||||
// Make a initial assignment
|
||||
AstNodeExpr* const exprp = nodep->rhsp()->unlinkFrBack();
|
||||
varrefp->unlinkFrBack();
|
||||
|
|
@ -3129,13 +3127,13 @@ class ConstVisitor final : public VNVisitor {
|
|||
if (const AstConst* const constp = VN_CAST(nodep->condp(), Const)) {
|
||||
AstNode* keepp = nullptr;
|
||||
if (constp->isZero()) {
|
||||
UINFO(4, "IF(0,{any},{x}) => {x}: " << nodep << endl);
|
||||
UINFO(4, "IF(0,{any},{x}) => {x}: " << nodep);
|
||||
keepp = nodep->elsesp();
|
||||
} else if (!m_doV || constp->isNeqZero()) { // Might be X in Verilog
|
||||
UINFO(4, "IF(!0,{x},{any}) => {x}: " << nodep << endl);
|
||||
UINFO(4, "IF(!0,{x},{any}) => {x}: " << nodep);
|
||||
keepp = nodep->thensp();
|
||||
} else {
|
||||
UINFO(4, "IF condition is X, retaining: " << nodep << endl);
|
||||
UINFO(4, "IF condition is X, retaining: " << nodep);
|
||||
return;
|
||||
}
|
||||
if (keepp) {
|
||||
|
|
@ -3155,7 +3153,7 @@ class ConstVisitor final : public VNVisitor {
|
|||
VL_DO_DANGLING(pushDeletep(nodep->unlinkFrBack()), nodep);
|
||||
}
|
||||
} else if (!AstNode::afterCommentp(nodep->thensp())) {
|
||||
UINFO(4, "IF({x}) nullptr {...} => IF(NOT{x}}: " << nodep << endl);
|
||||
UINFO(4, "IF({x}) nullptr {...} => IF(NOT{x}}: " << nodep);
|
||||
AstNodeExpr* const condp = nodep->condp();
|
||||
AstNode* const elsesp = nodep->elsesp();
|
||||
condp->unlinkFrBackWithNext();
|
||||
|
|
@ -3169,7 +3167,7 @@ class ConstVisitor final : public VNVisitor {
|
|||
} else if (((VN_IS(nodep->condp(), Not) && nodep->condp()->width() == 1)
|
||||
|| VN_IS(nodep->condp(), LogNot))
|
||||
&& nodep->thensp() && nodep->elsesp()) {
|
||||
UINFO(4, "IF(NOT {x}) => IF(x) swapped if/else" << nodep << endl);
|
||||
UINFO(4, "IF(NOT {x}) => IF(x) swapped if/else" << nodep);
|
||||
AstNodeExpr* const condp
|
||||
= VN_AS(nodep->condp(), NodeUniop)->lhsp()->unlinkFrBackWithNext();
|
||||
AstNode* const thensp = nodep->thensp()->unlinkFrBackWithNext();
|
||||
|
|
@ -3180,9 +3178,8 @@ class ConstVisitor final : public VNVisitor {
|
|||
nodep->replaceWith(ifp);
|
||||
VL_DO_DANGLING(pushDeletep(nodep), nodep);
|
||||
} else if (ifSameAssign(nodep)) {
|
||||
UINFO(
|
||||
4,
|
||||
"IF({a}) ASSIGN({b},{c}) else ASSIGN({b},{d}) => ASSIGN({b}, {a}?{c}:{d})\n");
|
||||
UINFO(4,
|
||||
"IF({a}) ASSIGN({b},{c}) else ASSIGN({b},{d}) => ASSIGN({b}, {a}?{c}:{d})");
|
||||
AstNodeAssign* const thensp = VN_AS(nodep->thensp(), NodeAssign);
|
||||
AstNodeAssign* const elsesp = VN_AS(nodep->elsesp(), NodeAssign);
|
||||
thensp->unlinkFrBack();
|
||||
|
|
@ -3195,7 +3192,7 @@ class ConstVisitor final : public VNVisitor {
|
|||
} else if (false // Disabled, as vpm assertions are faster
|
||||
// without due to short-circuiting
|
||||
&& operandIfIf(nodep)) {
|
||||
UINFO(9, "IF({a}) IF({b}) => IF({a} && {b})" << endl);
|
||||
UINFO(9, "IF({a}) IF({b}) => IF({a} && {b})");
|
||||
AstNodeIf* const lowerIfp = VN_AS(nodep->thensp(), NodeIf);
|
||||
AstNodeExpr* const condp = nodep->condp()->unlinkFrBack();
|
||||
AstNode* const lowerThensp = lowerIfp->thensp()->unlinkFrBackWithNext();
|
||||
|
|
@ -3249,7 +3246,7 @@ class ConstVisitor final : public VNVisitor {
|
|||
if (pformatp->text().length() + nformatp->text().length() > DISPLAY_MAX_MERGE_LENGTH)
|
||||
return false;
|
||||
//
|
||||
UINFO(9, "DISPLAY(SF({a})) DISPLAY(SF({b})) -> DISPLAY(SF({a}+{b}))" << endl);
|
||||
UINFO(9, "DISPLAY(SF({a})) DISPLAY(SF({b})) -> DISPLAY(SF({a}+{b}))");
|
||||
// Convert DT_DISPLAY to DT_WRITE as may allow later optimizations
|
||||
if (prevp->displayType() == VDisplayType::DT_DISPLAY) {
|
||||
prevp->displayType(VDisplayType::DT_WRITE);
|
||||
|
|
@ -3281,7 +3278,7 @@ class ConstVisitor final : public VNVisitor {
|
|||
}
|
||||
}
|
||||
if (m_doNConst && anyconst) {
|
||||
// UINFO(9, " Display in " << nodep->text() << endl);
|
||||
// UINFO(9, " Display in " << nodep->text());
|
||||
string newFormat;
|
||||
string fmt;
|
||||
bool inPct = false;
|
||||
|
|
@ -3310,7 +3307,7 @@ class ConstVisitor final : public VNVisitor {
|
|||
if (VN_IS(argp, Const)) { // Convert it
|
||||
const string out = constNumV(argp).displayed(nodep, fmt);
|
||||
UINFO(9, " DispConst: " << fmt << " -> " << out << " for "
|
||||
<< argp << endl);
|
||||
<< argp);
|
||||
// fmt = out w/ replace % with %% as it must be literal.
|
||||
fmt = VString::quotePercent(out);
|
||||
VL_DO_DANGLING(pushDeletep(argp->unlinkFrBack()), argp);
|
||||
|
|
@ -3326,7 +3323,7 @@ class ConstVisitor final : public VNVisitor {
|
|||
}
|
||||
if (newFormat != nodep->text()) {
|
||||
nodep->text(newFormat);
|
||||
UINFO(9, " Display out " << nodep << endl);
|
||||
UINFO(9, " Display out " << nodep);
|
||||
}
|
||||
}
|
||||
if (!nodep->exprsp() && nodep->name().find('%') == string::npos && !nodep->hidden()) {
|
||||
|
|
@ -3367,7 +3364,7 @@ class ConstVisitor final : public VNVisitor {
|
|||
m_hasJumpDelay = thisWhileHasJumpDelay || oldHasJumpDelay;
|
||||
if (m_doNConst) {
|
||||
if (nodep->condp()->isZero()) {
|
||||
UINFO(4, "WHILE(0) => nop " << nodep << endl);
|
||||
UINFO(4, "WHILE(0) => nop " << nodep);
|
||||
if (nodep->precondsp()) {
|
||||
nodep->replaceWith(nodep->precondsp());
|
||||
} else {
|
||||
|
|
@ -3459,7 +3456,7 @@ class ConstVisitor final : public VNVisitor {
|
|||
iterateChildren(nodep);
|
||||
// AstJumpGo's below here that point to this node will set user4
|
||||
if (m_doExpensive && !nodep->user4()) {
|
||||
UINFO(4, "JUMPLABEL => unused " << nodep << endl);
|
||||
UINFO(4, "JUMPLABEL => unused " << nodep);
|
||||
AstNode* underp = nullptr;
|
||||
if (nodep->stmtsp()) underp = nodep->stmtsp()->unlinkFrBackWithNext();
|
||||
if (underp) {
|
||||
|
|
@ -3963,7 +3960,7 @@ AstNode* V3Const::constifyGenerateParamsEdit(AstNode* nodep) {
|
|||
|
||||
void V3Const::constifyAllLint(AstNetlist* nodep) {
|
||||
// Only call from Verilator.cpp, as it uses user#'s
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{
|
||||
ConstVisitor visitor{ConstVisitor::PROC_V_WARN, /* globalPass: */ true};
|
||||
(void)visitor.mainAcceptEdit(nodep);
|
||||
|
|
@ -3972,7 +3969,7 @@ void V3Const::constifyAllLint(AstNetlist* nodep) {
|
|||
}
|
||||
|
||||
void V3Const::constifyCpp(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{
|
||||
ConstVisitor visitor{ConstVisitor::PROC_CPP, /* globalPass: */ true};
|
||||
(void)visitor.mainAcceptEdit(nodep);
|
||||
|
|
@ -3996,7 +3993,7 @@ void V3Const::constifyAllLive(AstNetlist* nodep) {
|
|||
// Only call from Verilator.cpp, as it uses user#'s
|
||||
// This only pushes constants up, doesn't make any other edits
|
||||
// IE doesn't prune dead statements, as we need to do some usability checks after this
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{
|
||||
ConstVisitor visitor{ConstVisitor::PROC_LIVE, /* globalPass: */ true};
|
||||
(void)visitor.mainAcceptEdit(nodep);
|
||||
|
|
@ -4006,7 +4003,7 @@ void V3Const::constifyAllLive(AstNetlist* nodep) {
|
|||
|
||||
void V3Const::constifyAll(AstNetlist* nodep) {
|
||||
// Only call from Verilator.cpp, as it uses user#'s
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{
|
||||
ConstVisitor visitor{ConstVisitor::PROC_V_EXPENSIVE, /* globalPass: */ true};
|
||||
(void)visitor.mainAcceptEdit(nodep);
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ class CoverageVisitor final : public VNVisitor {
|
|||
AstCoverDecl* const declp = new AstCoverDecl{fl, page, comment, linescov, offset};
|
||||
declp->hier(hier);
|
||||
m_modp->addStmtsp(declp);
|
||||
UINFO(9, "new " << declp << endl);
|
||||
UINFO(9, "new " << declp);
|
||||
|
||||
AstCoverInc* const incp = new AstCoverInc{fl, declp};
|
||||
if (!trace_var_name.empty()
|
||||
|
|
@ -197,7 +197,7 @@ class CoverageVisitor final : public VNVisitor {
|
|||
varp->setIgnoreSchedWrite(); // Ignore the increment output, so no UNOPTFLAT
|
||||
varp->trace(true);
|
||||
m_modp->addStmtsp(varp);
|
||||
UINFO(5, "New coverage trace: " << varp << endl);
|
||||
UINFO(5, "New coverage trace: " << varp);
|
||||
AstAssign* const assp = new AstAssign{
|
||||
incp->fileline(), new AstVarRef{incp->fileline(), varp, VAccess::WRITE},
|
||||
new AstAdd{incp->fileline(), new AstVarRef{incp->fileline(), varp, VAccess::READ},
|
||||
|
|
@ -223,7 +223,7 @@ class CoverageVisitor final : public VNVisitor {
|
|||
// Ensure line numbers we track are in the same file as this block
|
||||
// so track via nodep
|
||||
m_state.m_nodep = nodep;
|
||||
UINFO(9, "line create h" << m_state.m_handle << " " << nodep << endl);
|
||||
UINFO(9, "line create h" << m_state.m_handle << " " << nodep);
|
||||
}
|
||||
void lineTrack(const AstNode* nodep) {
|
||||
if (m_state.lineCoverageOn(nodep) && !m_ifCond
|
||||
|
|
@ -231,7 +231,7 @@ class CoverageVisitor final : public VNVisitor {
|
|||
for (int lineno = nodep->fileline()->firstLineno();
|
||||
lineno <= nodep->fileline()->lastLineno(); ++lineno) {
|
||||
UINFO(9, "line track " << lineno << " for h" << m_state.m_handle << " "
|
||||
<< m_state.m_nodep << endl);
|
||||
<< m_state.m_nodep);
|
||||
m_handleLines[m_state.m_handle].insert(lineno);
|
||||
}
|
||||
}
|
||||
|
|
@ -266,7 +266,7 @@ class CoverageVisitor final : public VNVisitor {
|
|||
if (!out.empty()) out += ",";
|
||||
out += linesFirstLast(first, last);
|
||||
}
|
||||
UINFO(9, "lines out " << out << " for h" << state.m_handle << " " << nodep << endl);
|
||||
UINFO(9, "lines out " << out << " for h" << state.m_handle << " " << nodep);
|
||||
return out;
|
||||
}
|
||||
|
||||
|
|
@ -358,9 +358,9 @@ class CoverageVisitor final : public VNVisitor {
|
|||
&& v3Global.opt.coverageToggle()) {
|
||||
const char* const disablep = varIgnoreToggle(nodep);
|
||||
if (disablep) {
|
||||
UINFO(4, " Disable Toggle: " << disablep << " " << nodep << endl);
|
||||
UINFO(4, " Disable Toggle: " << disablep << " " << nodep);
|
||||
} else {
|
||||
UINFO(4, " Toggle: " << nodep << endl);
|
||||
UINFO(4, " Toggle: " << nodep);
|
||||
// There's several overall ways to approach this
|
||||
// Treat like tracing, where a end-of-timestamp action sees all changes
|
||||
// Works ok, but would be quite slow as need to reform
|
||||
|
|
@ -519,7 +519,7 @@ class CoverageVisitor final : public VNVisitor {
|
|||
|
||||
// VISITORS - LINE COVERAGE
|
||||
void visit(AstCond* nodep) override {
|
||||
UINFO(4, " COND: " << nodep << endl);
|
||||
UINFO(4, " COND: " << nodep);
|
||||
|
||||
if (m_seeking == NONE) coverExprs(nodep->condp());
|
||||
|
||||
|
|
@ -558,7 +558,7 @@ class CoverageVisitor final : public VNVisitor {
|
|||
void visit(AstIf* nodep) override {
|
||||
if (nodep->user2()) return;
|
||||
|
||||
UINFO(4, " IF: " << nodep << endl);
|
||||
UINFO(4, " IF: " << nodep);
|
||||
if (m_state.m_on) {
|
||||
// An else-if. When we iterate the if, use "elsif" marking
|
||||
const bool elsif
|
||||
|
|
@ -603,7 +603,7 @@ class CoverageVisitor final : public VNVisitor {
|
|||
&& elseState.lineCoverageOn(nodep)) {
|
||||
// Normal if. Linecov shows what's inside the if (not condition that is
|
||||
// always executed)
|
||||
UINFO(4, " COVER-branch: " << nodep << endl);
|
||||
UINFO(4, " COVER-branch: " << nodep);
|
||||
nodep->addThensp(newCoverInc(nodep->fileline(), "", "v_branch", "if",
|
||||
linesCov(ifState, nodep), 0,
|
||||
traceNameForLine(nodep, "if")));
|
||||
|
|
@ -616,7 +616,7 @@ class CoverageVisitor final : public VNVisitor {
|
|||
}
|
||||
// If/else attributes to each block as non-branch coverage
|
||||
else if (first_elsif || cont_elsif) {
|
||||
UINFO(4, " COVER-elsif: " << nodep << endl);
|
||||
UINFO(4, " COVER-elsif: " << nodep);
|
||||
if (ifState.lineCoverageOn(nodep)) {
|
||||
nodep->addThensp(newCoverInc(nodep->fileline(), "", "v_line", "elsif",
|
||||
linesCov(ifState, nodep), 0,
|
||||
|
|
@ -626,13 +626,13 @@ class CoverageVisitor final : public VNVisitor {
|
|||
} else {
|
||||
// Cover as separate blocks (not a branch as is not two-legged)
|
||||
if (ifState.lineCoverageOn(nodep)) {
|
||||
UINFO(4, " COVER-half-if: " << nodep << endl);
|
||||
UINFO(4, " COVER-half-if: " << nodep);
|
||||
nodep->addThensp(newCoverInc(nodep->fileline(), "", "v_line", "if",
|
||||
linesCov(ifState, nodep), 0,
|
||||
traceNameForLine(nodep, "if")));
|
||||
}
|
||||
if (elseState.lineCoverageOn(nodep)) {
|
||||
UINFO(4, " COVER-half-el: " << nodep << endl);
|
||||
UINFO(4, " COVER-half-el: " << nodep);
|
||||
nodep->addElsesp(newCoverInc(nodep->fileline(), "", "v_line", "else",
|
||||
linesCov(elseState, nodep), 1,
|
||||
traceNameForLine(nodep, "else")));
|
||||
|
|
@ -643,19 +643,19 @@ class CoverageVisitor final : public VNVisitor {
|
|||
VL_RESTORER(m_ifCond);
|
||||
m_ifCond = true;
|
||||
iterateAndNextNull(nodep->condp());
|
||||
UINFO(9, " done HANDLE " << m_state.m_handle << " for " << nodep << endl);
|
||||
UINFO(9, " done HANDLE " << m_state.m_handle << " for " << nodep);
|
||||
}
|
||||
void visit(AstCaseItem* nodep) override {
|
||||
// We don't add an explicit "default" coverage if not provided,
|
||||
// as we already have a warning when there is no default.
|
||||
UINFO(4, " CASEI: " << nodep << endl);
|
||||
UINFO(4, " CASEI: " << nodep);
|
||||
if (m_state.lineCoverageOn(nodep)) {
|
||||
VL_RESTORER(m_state);
|
||||
createHandle(nodep);
|
||||
iterateAndNextNull(nodep->stmtsp());
|
||||
if (m_state.lineCoverageOn(nodep)) { // if the case body didn't disable it
|
||||
lineTrack(nodep);
|
||||
UINFO(4, " COVER: " << nodep << endl);
|
||||
UINFO(4, " COVER: " << nodep);
|
||||
nodep->addStmtsp(newCoverInc(nodep->fileline(), "", "v_line", "case",
|
||||
linesCov(m_state, nodep), 0,
|
||||
traceNameForLine(nodep, "case")));
|
||||
|
|
@ -663,7 +663,7 @@ class CoverageVisitor final : public VNVisitor {
|
|||
}
|
||||
}
|
||||
void visit(AstCover* nodep) override {
|
||||
UINFO(4, " COVER: " << nodep << endl);
|
||||
UINFO(4, " COVER: " << nodep);
|
||||
VL_RESTORER(m_state);
|
||||
m_state.m_on = true; // Always do cover blocks, even if there's a $stop
|
||||
createHandle(nodep);
|
||||
|
|
@ -677,13 +677,13 @@ class CoverageVisitor final : public VNVisitor {
|
|||
}
|
||||
}
|
||||
void visit(AstStop* nodep) override {
|
||||
UINFO(4, " STOP: " << nodep << endl);
|
||||
UINFO(4, " STOP: " << nodep);
|
||||
m_state.m_on = false;
|
||||
}
|
||||
void visit(AstPragma* nodep) override {
|
||||
if (nodep->pragType() == VPragmaType::COVERAGE_BLOCK_OFF) {
|
||||
// Skip all NEXT nodes under this block, and skip this if/case branch
|
||||
UINFO(4, " OFF: h" << m_state.m_handle << " " << nodep << endl);
|
||||
UINFO(4, " OFF: h" << m_state.m_handle << " " << nodep);
|
||||
m_state.m_on = false;
|
||||
VL_DO_DANGLING(nodep->unlinkFrBack()->deleteTree(), nodep);
|
||||
} else {
|
||||
|
|
@ -1009,7 +1009,7 @@ class CoverageVisitor final : public VNVisitor {
|
|||
}
|
||||
|
||||
void exprUnsupported(AstNode* nodep, const string& why) {
|
||||
UINFO(9, "unsupported: " << why << " " << nodep << endl);
|
||||
UINFO(9, "unsupported: " << why << " " << nodep);
|
||||
bool wasSeeking = m_seeking == SEEKING;
|
||||
Objective oldSeeking = m_seeking;
|
||||
if (wasSeeking) abortExprCoverage();
|
||||
|
|
@ -1029,7 +1029,7 @@ public:
|
|||
// Coverage class functions
|
||||
|
||||
void V3Coverage::coverage(AstNetlist* rootp) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{ CoverageVisitor{rootp}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("coverage", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ class CoverageJoinVisitor final : public VNVisitor {
|
|||
// METHODS
|
||||
|
||||
void detectDuplicates() {
|
||||
UINFO(9, "Finding duplicates\n");
|
||||
UINFO(9, "Finding duplicates");
|
||||
// Note uses user4
|
||||
V3DupFinder dupFinder; // Duplicate code detection
|
||||
// Hash all of the original signals we toggle cover
|
||||
|
|
@ -70,14 +70,14 @@ class CoverageJoinVisitor final : public VNVisitor {
|
|||
// covertoggle which is immediately above, so:
|
||||
AstCoverToggle* const removep = VN_AS(duporigp->backp(), CoverToggle);
|
||||
UASSERT_OBJ(removep, nodep, "CoverageJoin duplicate of wrong type");
|
||||
UINFO(8, " Orig " << nodep << " -->> " << nodep->incp()->declp() << endl);
|
||||
UINFO(8, " dup " << removep << " -->> " << removep->incp()->declp() << endl);
|
||||
UINFO(8, " Orig " << nodep << " -->> " << nodep->incp()->declp());
|
||||
UINFO(8, " dup " << removep << " -->> " << removep->incp()->declp());
|
||||
// The CoverDecl the duplicate pointed to now needs to point to the
|
||||
// original's data. I.e. the duplicate will get the coverage number
|
||||
// from the non-duplicate
|
||||
AstCoverDecl* const datadeclp = nodep->incp()->declp()->dataDeclThisp();
|
||||
removep->incp()->declp()->dataDeclp(datadeclp);
|
||||
UINFO(8, " new " << removep->incp()->declp() << endl);
|
||||
UINFO(8, " new " << removep->incp()->declp());
|
||||
// Mark the found node as a duplicate of the first node
|
||||
// (Not vice-versa as we have the iterator for the found node)
|
||||
removep->unlinkFrBack();
|
||||
|
|
@ -115,7 +115,7 @@ public:
|
|||
// Coverage class functions
|
||||
|
||||
void V3CoverageJoin::coverageJoin(AstNetlist* rootp) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{ CoverageJoinVisitor{rootp}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("coveragejoin", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ class DeadVisitor final : public VNVisitor {
|
|||
// METHODS
|
||||
|
||||
void deleting(AstNode* nodep) {
|
||||
UINFO(9, " deleting " << nodep << endl);
|
||||
UINFO(9, " deleting " << nodep);
|
||||
VL_DO_DANGLING(pushDeletep(nodep->unlinkFrBack()), nodep);
|
||||
}
|
||||
|
||||
|
|
@ -353,7 +353,7 @@ class DeadVisitor final : public VNVisitor {
|
|||
if (modp->dead()
|
||||
|| (modp->level() > 2 && modp->user1() == 0 && !modp->internal())) {
|
||||
// > 2 because L1 is the wrapper, L2 is the top user module
|
||||
UINFO(4, " Dead module " << modp << endl);
|
||||
UINFO(4, " Dead module " << modp);
|
||||
// And its children may now be killable too; correct counts
|
||||
// Recurse, as cells may not be directly under the module but in a generate
|
||||
if (!modp->dead()) { // If was dead didn't increment user1's
|
||||
|
|
@ -382,7 +382,7 @@ class DeadVisitor final : public VNVisitor {
|
|||
AstScope* const scp = *it;
|
||||
if (!scp) continue;
|
||||
if (scp->user1() == 0) {
|
||||
UINFO(4, " Dead AstScope " << scp << endl);
|
||||
UINFO(4, " Dead AstScope " << scp);
|
||||
scp->aboveScopep()->user1Inc(-1);
|
||||
if (scp->dtypep()) scp->dtypep()->user1Inc(-1);
|
||||
deleting(scp);
|
||||
|
|
@ -422,12 +422,12 @@ class DeadVisitor final : public VNVisitor {
|
|||
// Delete any unused varscopes
|
||||
for (AstVarScope* vscp : m_vscsp) {
|
||||
if (vscp->user1() == 0) {
|
||||
UINFO(4, " Dead " << vscp << endl);
|
||||
UINFO(4, " Dead " << vscp);
|
||||
const std::pair<AssignMap::iterator, AssignMap::iterator> eqrange
|
||||
= m_assignMap.equal_range(vscp);
|
||||
for (AssignMap::iterator itr = eqrange.first; itr != eqrange.second; ++itr) {
|
||||
AstNodeAssign* const assp = itr->second;
|
||||
UINFO(4, " Dead assign " << assp << endl);
|
||||
UINFO(4, " Dead assign " << assp);
|
||||
assp->dtypep()->user1Inc(-1);
|
||||
deleting(assp);
|
||||
}
|
||||
|
|
@ -442,7 +442,7 @@ class DeadVisitor final : public VNVisitor {
|
|||
AstVar* const varp = *it;
|
||||
if (!varp) continue;
|
||||
if (varp->user1() == 0) {
|
||||
UINFO(4, " Dead " << varp << endl);
|
||||
UINFO(4, " Dead " << varp);
|
||||
if (varp->dtypep()) varp->dtypep()->user1Inc(-1);
|
||||
deleting(varp);
|
||||
*it = nullptr;
|
||||
|
|
@ -553,7 +553,7 @@ public:
|
|||
// Dead class functions
|
||||
|
||||
void V3Dead::deadifyModules(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{ // node, elimUserVars, elimDTypes, elimScopes, elimCells, elimTopIfaces
|
||||
DeadVisitor{nodep, false, false, false, false, !v3Global.opt.topIfacesSupported()};
|
||||
} // Destruct before checking
|
||||
|
|
@ -561,25 +561,25 @@ void V3Dead::deadifyModules(AstNetlist* nodep) {
|
|||
}
|
||||
|
||||
void V3Dead::deadifyDTypes(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{ DeadVisitor{nodep, false, true, false, false, false}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("deadDtypes", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
||||
void V3Dead::deadifyDTypesScoped(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{ DeadVisitor{nodep, false, true, true, false, false}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("deadDtypesScoped", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
||||
void V3Dead::deadifyAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{ DeadVisitor{nodep, true, true, false, true, false}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("deadAll", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
||||
void V3Dead::deadifyAllScoped(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{ DeadVisitor{nodep, true, true, true, true, false}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("deadAllScoped", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1067,7 +1067,7 @@ public:
|
|||
// Delayed class functions
|
||||
|
||||
void V3Delayed::delayedAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{ DelayedVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("delayed", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ class DepthVisitor final : public VNVisitor {
|
|||
// METHODS
|
||||
|
||||
void createDeepTemp(AstNodeExpr* nodep) {
|
||||
UINFO(6, " Deep " << nodep << endl);
|
||||
UINFO(6, " Deep " << nodep);
|
||||
// if (debug() >= 9) nodep->dumpTree("- deep: ");
|
||||
AstVar* const varp = new AstVar{nodep->fileline(), VVarType::STMTTEMP,
|
||||
m_tempNames.get(nodep), nodep->dtypep()};
|
||||
|
|
@ -127,7 +127,7 @@ class DepthVisitor final : public VNVisitor {
|
|||
void needNonStaticFunc(AstNode* nodep) {
|
||||
UASSERT_OBJ(m_cfuncp, nodep, "Non-static accessor not under a function");
|
||||
if (m_cfuncp->isStatic()) {
|
||||
UINFO(5, "Mark non-public due to " << nodep << endl);
|
||||
UINFO(5, "Mark non-public due to " << nodep);
|
||||
m_cfuncp->isStatic(false);
|
||||
}
|
||||
}
|
||||
|
|
@ -158,7 +158,7 @@ public:
|
|||
// Depth class functions
|
||||
|
||||
void V3Depth::depthAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{ DepthVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("depth", 0, dumpTreeEitherLevel() >= 6);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ class DepthBlockVisitor final : public VNVisitor {
|
|||
funcp->argTypes(EmitCBase::symClassVar());
|
||||
callp->argTypes("vlSymsp");
|
||||
}
|
||||
UINFO(6, " New " << callp << endl);
|
||||
UINFO(6, " New " << callp);
|
||||
relinkHandle.relink(callp->makeStmt());
|
||||
// Done
|
||||
return funcp;
|
||||
|
|
@ -68,7 +68,7 @@ class DepthBlockVisitor final : public VNVisitor {
|
|||
|
||||
// VISITORS
|
||||
void visit(AstNodeModule* nodep) override {
|
||||
UINFO(4, " MOD " << nodep << endl);
|
||||
UINFO(4, " MOD " << nodep);
|
||||
VL_RESTORER(m_modp);
|
||||
m_modp = nodep;
|
||||
m_deepNum = 0;
|
||||
|
|
@ -87,7 +87,7 @@ class DepthBlockVisitor final : public VNVisitor {
|
|||
void visit(AstNodeStmt* nodep) override {
|
||||
++m_depth;
|
||||
if (m_depth > v3Global.opt.compLimitBlocks()) { // Already done
|
||||
UINFO(4, "DeepBlocks " << m_depth << " " << nodep << endl);
|
||||
UINFO(4, "DeepBlocks " << m_depth << " " << nodep);
|
||||
const AstNode* const backp = nodep->backp(); // Only for debug
|
||||
if (debug() >= 9) backp->dumpTree("- pre : ");
|
||||
AstCFunc* const funcp = createDeepFunc(nodep);
|
||||
|
|
@ -115,7 +115,7 @@ public:
|
|||
// DepthBlock class functions
|
||||
|
||||
void V3DepthBlock::depthBlockAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{ DepthBlockVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("deepblock", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -97,9 +97,9 @@ class DescopeVisitor final : public VNVisitor {
|
|||
// Static functions can't use relative references via 'this->'
|
||||
const bool relativeRefOk = !m_funcp->isStatic();
|
||||
|
||||
UINFO(8, " Descope ref under " << m_scopep << endl);
|
||||
UINFO(8, " ref to " << scopep << endl);
|
||||
UINFO(8, " aboveScope " << scopep->aboveScopep() << endl);
|
||||
UINFO(8, " Descope ref under " << m_scopep);
|
||||
UINFO(8, " ref to " << scopep);
|
||||
UINFO(8, " aboveScope " << scopep->aboveScopep());
|
||||
|
||||
if (VN_IS(scopep->modp(), Class)) {
|
||||
// Direct reference to class members are from within the class itself, references from
|
||||
|
|
@ -133,7 +133,7 @@ class DescopeVisitor final : public VNVisitor {
|
|||
const bool moreOfSame1 = (nextIt1 != m_modFuncs.end() && nextIt1->first == name);
|
||||
if (moreOfSame1) {
|
||||
// Multiple functions under this name, need a wrapper function
|
||||
UINFO(6, " Wrapping " << name << " multifuncs\n");
|
||||
UINFO(6, " Wrapping " << name << " multifuncs");
|
||||
AstCFunc* const newfuncp = topFuncp->cloneTree(false);
|
||||
if (newfuncp->initsp()) newfuncp->initsp()->unlinkFrBackWithNext()->deleteTree();
|
||||
if (newfuncp->stmtsp()) newfuncp->stmtsp()->unlinkFrBackWithNext()->deleteTree();
|
||||
|
|
@ -152,9 +152,8 @@ class DescopeVisitor final : public VNVisitor {
|
|||
= (nextIt2 != m_modFuncs.end() && nextIt2->first == name);
|
||||
UASSERT_OBJ(funcp->scopep(), funcp, "Not scoped");
|
||||
|
||||
UINFO(6, " Wrapping " << name << " " << funcp << endl);
|
||||
UINFO(6,
|
||||
" at " << newfuncp->argTypes() << " und " << funcp->argTypes() << endl);
|
||||
UINFO(6, " Wrapping " << name << " " << funcp);
|
||||
UINFO(6, " at " << newfuncp->argTypes() << " und " << funcp->argTypes());
|
||||
funcp->declPrivate(true);
|
||||
AstVarRef* argsp = nullptr;
|
||||
for (AstNode* stmtp = newfuncp->argsp(); stmtp; stmtp = stmtp->nextp()) {
|
||||
|
|
@ -199,7 +198,7 @@ class DescopeVisitor final : public VNVisitor {
|
|||
if (debug() >= 9) newfuncp->dumpTree("- newfunc: ");
|
||||
} else {
|
||||
// Only a single function under this name, we can rename it
|
||||
UINFO(6, " Wrapping " << name << " just one " << topFuncp << endl);
|
||||
UINFO(6, " Wrapping " << name << " just one " << topFuncp);
|
||||
topFuncp->name(name);
|
||||
}
|
||||
}
|
||||
|
|
@ -231,7 +230,7 @@ class DescopeVisitor final : public VNVisitor {
|
|||
return;
|
||||
}
|
||||
// Convert the hierch name
|
||||
UINFO(9, " ref-in " << nodep << endl);
|
||||
UINFO(9, " ref-in " << nodep);
|
||||
UASSERT_OBJ(m_scopep, nodep, "Node not under scope");
|
||||
const AstVar* const varp = nodep->varScopep()->varp();
|
||||
const AstScope* const scopep = nodep->varScopep()->scopep();
|
||||
|
|
@ -245,10 +244,10 @@ class DescopeVisitor final : public VNVisitor {
|
|||
nodep->selfPointer(descopedSelfPointer(scopep));
|
||||
}
|
||||
nodep->varScopep(nullptr);
|
||||
UINFO(9, " refout " << nodep << " selfPtr=" << nodep->selfPointer().asString() << endl);
|
||||
UINFO(9, " refout " << nodep << " selfPtr=" << nodep->selfPointer().asString());
|
||||
}
|
||||
void visit(AstCCall* nodep) override {
|
||||
// UINFO(9, " " << nodep << endl);
|
||||
// UINFO(9, " " << nodep);
|
||||
iterateChildren(nodep);
|
||||
// Convert the hierch name
|
||||
UASSERT_OBJ(m_scopep, nodep, "Node not under scope");
|
||||
|
|
@ -295,7 +294,7 @@ public:
|
|||
// Descope class functions
|
||||
|
||||
void V3Descope::descopeAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{ DescopeVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("descope", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -230,14 +230,14 @@ public:
|
|||
};
|
||||
|
||||
void V3DfgOptimizer::extract(AstNetlist* netlistp) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
// Extract more optimization candidates
|
||||
DataflowExtractVisitor::apply(netlistp);
|
||||
V3Global::dumpCheckGlobalTree("dfg-extract", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
||||
void V3DfgOptimizer::optimize(AstNetlist* netlistp, const string& label) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
|
||||
// NODE STATE
|
||||
// AstVar::user1 -> Used by V3DfgPasses::astToDfg, V3DfgPasses::eliminateVars
|
||||
|
|
@ -258,7 +258,7 @@ void V3DfgOptimizer::optimize(AstNetlist* netlistp, const string& label) {
|
|||
AstModule* const modp = VN_CAST(nodep, Module);
|
||||
if (!modp) continue;
|
||||
|
||||
UINFO(4, "Applying DFG optimization to module '" << modp->name() << "'" << endl);
|
||||
UINFO(4, "Applying DFG optimization to module '" << modp->name() << "'");
|
||||
++ctx.m_modules;
|
||||
|
||||
// Build the DFG of this module
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ class V3DfgPeephole final : public DfgVisitor {
|
|||
// METHODS
|
||||
bool checkApplying(VDfgPeepholePattern id) {
|
||||
if (!m_ctx.m_enabled[id]) return false;
|
||||
UINFO(9, "Applying DFG pattern " << id.ascii() << endl);
|
||||
UINFO(9, "Applying DFG pattern " << id.ascii());
|
||||
++m_ctx.m_count[id];
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ class V3DiagSarifImp final {
|
|||
: "warning");
|
||||
|
||||
string text = msg.text();
|
||||
// UINFO(9, "Result raw text " << text << endl << endl);
|
||||
// UINFO(9, "Result raw text " << text);
|
||||
|
||||
// We put the entire message including relatedLocations text
|
||||
// into the primary message text, because viewers such as
|
||||
|
|
@ -190,6 +190,6 @@ void V3DiagSarif::pushMessage(const VErrorMessage& msg) VL_MT_DISABLED {
|
|||
|
||||
void V3DiagSarif::output(bool success) {
|
||||
if (!v3Global.opt.diagnosticsSarif()) return;
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
V3DiagSarifImp::s().output(success);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ V3DupFinder::iterator V3DupFinder::findDuplicate(AstNode* nodep, V3DupFinderUser
|
|||
}
|
||||
|
||||
void V3DupFinder::dumpFile(const string& filename, bool tree) {
|
||||
UINFO(2, "Dumping " << filename << endl);
|
||||
UINFO(2, "Dumping " << filename);
|
||||
const std::unique_ptr<std::ofstream> logp{V3File::new_ofstream(filename)};
|
||||
if (logp->fail()) v3fatal("Can't write file: " << filename);
|
||||
|
||||
|
|
|
|||
|
|
@ -121,6 +121,6 @@ public:
|
|||
// EmitC static functions
|
||||
|
||||
void V3EmitC::emitcConstPool() {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
EmitCConstPool(v3Global.rootp()->constPoolp());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -321,7 +321,7 @@ void EmitCFunc::displayNode(AstNode* nodep, AstScopeName* scopenamep, const stri
|
|||
bool inPct = false;
|
||||
bool ignore = false;
|
||||
for (; pos != vformat.end(); ++pos) {
|
||||
// UINFO(1, "Parse '" << *pos << "' IP" << inPct << " List " << cvtToHex(elistp) << endl);
|
||||
// UINFO(1, "Parse '" << *pos << "' IP" << inPct << " List " << cvtToHex(elistp));
|
||||
if (!inPct && pos[0] == '%') {
|
||||
inPct = true;
|
||||
ignore = false;
|
||||
|
|
|
|||
|
|
@ -605,7 +605,7 @@ class EmitCHeader final : public EmitCConstInit {
|
|||
}
|
||||
|
||||
explicit EmitCHeader(const AstNodeModule* modp) {
|
||||
UINFO(5, " Emitting header for " << prefixNameProtect(modp) << endl);
|
||||
UINFO(5, " Emitting header for " << prefixNameProtect(modp));
|
||||
|
||||
// Open output file
|
||||
const string filename = v3Global.opt.makeDir() + "/" + prefixNameProtect(modp) + ".h";
|
||||
|
|
@ -665,7 +665,7 @@ public:
|
|||
// EmitC class functions
|
||||
|
||||
void V3EmitC::emitcHeaders() {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
|
||||
// Process each module in turn
|
||||
for (const AstNode* nodep = v3Global.rootp()->modulesp(); nodep; nodep = nodep->nextp()) {
|
||||
|
|
|
|||
|
|
@ -549,7 +549,7 @@ class EmitCImp final : EmitCFunc {
|
|||
: m_fileModp{modp}
|
||||
, m_slow{slow}
|
||||
, m_cfilesr{cfilesr} {
|
||||
UINFO(5, " Emitting implementation of " << prefixNameProtect(modp) << endl);
|
||||
UINFO(5, " Emitting implementation of " << prefixNameProtect(modp));
|
||||
|
||||
m_modp = modp;
|
||||
|
||||
|
|
@ -978,7 +978,7 @@ public:
|
|||
// EmitC class functions
|
||||
|
||||
void V3EmitC::emitcImp() {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
// Make parent module pointers available.
|
||||
const EmitCParentModule emitCParentModule;
|
||||
std::list<std::deque<AstCFile*>> cfiles;
|
||||
|
|
@ -1019,7 +1019,7 @@ void V3EmitC::emitcImp() {
|
|||
}
|
||||
|
||||
void V3EmitC::emitcFiles() {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
for (AstNodeFile* filep = v3Global.rootp()->filesp(); filep;
|
||||
filep = VN_AS(filep->nextp(), NodeFile)) {
|
||||
AstCFile* const cfilep = VN_CAST(filep, CFile);
|
||||
|
|
|
|||
|
|
@ -61,6 +61,6 @@ public:
|
|||
// EmitC class functions
|
||||
|
||||
void V3EmitC::emitcInlines() {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{ EmitCInlines{v3Global.rootp()}; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -123,6 +123,6 @@ private:
|
|||
// EmitC class functions
|
||||
|
||||
void V3EmitCMain::emit() {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{ EmitCMain visitor; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -221,6 +221,6 @@ public:
|
|||
};
|
||||
|
||||
void V3EmitCMake::emit() {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
const CMakeEmitter emitter;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -697,6 +697,6 @@ public:
|
|||
// EmitC class functions
|
||||
|
||||
void V3EmitC::emitcModel() {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{ EmitCModel{v3Global.rootp()}; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,6 +73,6 @@ public:
|
|||
// EmitC static functions
|
||||
|
||||
void V3EmitC::emitcPch() {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
EmitCPch{};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -235,12 +235,12 @@ class EmitCSyms final : EmitCBaseVisitorConst {
|
|||
varBase = whole;
|
||||
}
|
||||
// UINFO(9, "For " << scopep->name() << " - " << varp->name() << " Scp "
|
||||
// << scpName << "Var " << varBase << endl);
|
||||
// << scpName << "Var " << varBase);
|
||||
const string varBasePretty = AstNode::vpiName(VName::dehash(varBase));
|
||||
const string scpPretty = AstNode::prettyName(VName::dehash(scpName));
|
||||
const string scpSym = scopeSymString(VName::dehash(scpName));
|
||||
// UINFO(9, " scnameins sp " << scpName << " sp " << scpPretty << " ss "
|
||||
// << scpSym << endl);
|
||||
// << scpSym);
|
||||
if (v3Global.opt.vpi()) varHierarchyScopes(scpName);
|
||||
if (m_scopeNames.find(scpSym) == m_scopeNames.end()) {
|
||||
// cppcheck-suppress stlFindInsert
|
||||
|
|
@ -348,7 +348,7 @@ class EmitCSyms final : EmitCBaseVisitorConst {
|
|||
void visit(AstScopeName* nodep) override {
|
||||
const string name = nodep->scopeSymName();
|
||||
// UINFO(9, "scnameins sp " << nodep->name() << " sp " << nodep->scopePrettySymName()
|
||||
// << " ss" << name << endl);
|
||||
// << " ss" << name);
|
||||
const int timeunit = m_modp ? m_modp->timeunit().powerOfTen() : 0;
|
||||
m_dpiScopeNames.emplace(name, ScopeData{nodep, name, nodep->scopePrettySymName(), "<null>",
|
||||
timeunit, "SCOPE_OTHER"});
|
||||
|
|
@ -402,7 +402,7 @@ public:
|
|||
};
|
||||
|
||||
void EmitCSyms::emitSymHdr() {
|
||||
UINFO(6, __FUNCTION__ << ": " << endl);
|
||||
UINFO(6, __FUNCTION__ << ": ");
|
||||
const string filename = v3Global.opt.makeDir() + "/" + symClassName() + ".h";
|
||||
AstCFile* const cfilep = newCFile(filename, true /*slow*/, false /*source*/);
|
||||
V3OutCFile* const ofilep = optSystemC() ? new V3OutScFile{filename} : new V3OutCFile{filename};
|
||||
|
|
@ -686,7 +686,7 @@ void EmitCSyms::emitScopeHier(bool destroy) {
|
|||
}
|
||||
|
||||
void EmitCSyms::emitSymImp() {
|
||||
UINFO(6, __FUNCTION__ << ": " << endl);
|
||||
UINFO(6, __FUNCTION__ << ": ");
|
||||
const string filename = v3Global.opt.makeDir() + "/" + symClassName() + ".cpp";
|
||||
AstCFile* const cfilep = newCFile(filename, true /*slow*/, true /*source*/);
|
||||
cfilep->support(true);
|
||||
|
|
@ -1025,7 +1025,7 @@ void EmitCSyms::emitSymImp() {
|
|||
//######################################################################
|
||||
|
||||
void EmitCSyms::emitDpiHdr() {
|
||||
UINFO(6, __FUNCTION__ << ": " << endl);
|
||||
UINFO(6, __FUNCTION__ << ": ");
|
||||
const string filename = v3Global.opt.makeDir() + "/" + topClassName() + "__Dpi.h";
|
||||
AstCFile* const cfilep = newCFile(filename, false /*slow*/, false /*source*/);
|
||||
cfilep->support(true);
|
||||
|
|
@ -1080,7 +1080,7 @@ void EmitCSyms::emitDpiHdr() {
|
|||
//######################################################################
|
||||
|
||||
void EmitCSyms::emitDpiImp() {
|
||||
UINFO(6, __FUNCTION__ << ": " << endl);
|
||||
UINFO(6, __FUNCTION__ << ": ");
|
||||
const string filename = v3Global.opt.makeDir() + "/" + topClassName() + "__Dpi.cpp";
|
||||
AstCFile* const cfilep = newCFile(filename, false /*slow*/, true /*source*/);
|
||||
cfilep->support(true);
|
||||
|
|
@ -1138,6 +1138,6 @@ void EmitCSyms::emitDpiImp() {
|
|||
// EmitC class functions
|
||||
|
||||
void V3EmitC::emitcSyms(bool dpiHdrOnly) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
EmitCSyms{v3Global.rootp(), dpiHdrOnly};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -185,13 +185,13 @@ private:
|
|||
if (inputFilesCount < MIN_FILES_COUNT
|
||||
&& inputFilesCount <= static_cast<size_t>(totalBucketsNum)) {
|
||||
UINFO(4, "File concatenation skipped: Too few files (" << m_inputFiles.size() << " < "
|
||||
<< MIN_FILES_COUNT << ")\n");
|
||||
<< MIN_FILES_COUNT << ")");
|
||||
groupingRedundant = true;
|
||||
}
|
||||
if (inputFilesCount < (MIN_FILES_PER_BUCKET * totalBucketsNum)) {
|
||||
UINFO(4, "File concatenation skipped: Too few files per bucket ("
|
||||
<< m_inputFiles.size() << " < " << MIN_FILES_PER_BUCKET << " - "
|
||||
<< totalBucketsNum << ")\n");
|
||||
<< totalBucketsNum << ")");
|
||||
groupingRedundant = true;
|
||||
}
|
||||
if (!groupingRedundant) return false;
|
||||
|
|
@ -394,19 +394,19 @@ private:
|
|||
}
|
||||
|
||||
void process() {
|
||||
UINFO(4, __FUNCTION__ << " group file prefix: " << m_groupFilePrefix << '\n');
|
||||
UINFO(5, "Number of input files: " << m_inputFiles.size() << '\n');
|
||||
UINFO(5, "Total score: " << m_totalScore << '\n');
|
||||
UINFO(4, __FUNCTION__ << " group file prefix: " << m_groupFilePrefix);
|
||||
UINFO(5, "Number of input files: " << m_inputFiles.size());
|
||||
UINFO(5, "Total score: " << m_totalScore);
|
||||
|
||||
const int totalBucketsNum = v3Global.opt.outputGroups();
|
||||
UINFO(5, "Number of buckets: " << totalBucketsNum << '\n');
|
||||
UINFO(5, "Number of buckets: " << totalBucketsNum);
|
||||
UASSERT(totalBucketsNum > 0, "More than 0 buckets required");
|
||||
|
||||
if (fallbackNoGrouping(m_inputFiles.size())) return;
|
||||
|
||||
if (debug() >= 6 || dumpLevel() >= 6) {
|
||||
const string filename = v3Global.debugFilename("outputgroup") + ".txt";
|
||||
UINFO(5, "Dumping " << filename << endl);
|
||||
UINFO(5, "Dumping " << filename);
|
||||
m_logp = std::unique_ptr<std::ofstream>{V3File::new_ofstream(filename)};
|
||||
if (m_logp->fail()) v3fatal("Can't write file: " << filename);
|
||||
}
|
||||
|
|
@ -427,7 +427,7 @@ private:
|
|||
list.m_isConcatenable = false;
|
||||
UINFO(5, "Excluding from concatenation: Work List contains only one file: "
|
||||
"Work List #"
|
||||
<< list.m_dbgId << endl);
|
||||
<< list.m_dbgId);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -926,11 +926,11 @@ public:
|
|||
// Gate class functions
|
||||
|
||||
void V3EmitMk::emitmk() {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
const EmitMk emitter;
|
||||
}
|
||||
|
||||
void V3EmitMk::emitHierVerilation(const V3HierBlockPlan* planp) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
EmitMkHierVerilation{planp};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -178,6 +178,6 @@ public:
|
|||
};
|
||||
|
||||
void V3EmitMkJson::emit() {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
const V3EmitMkJsonEmitter emitter;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -995,7 +995,7 @@ void V3EmitV::verilogForTree(const AstNode* nodep, std::ostream& os) {
|
|||
}
|
||||
|
||||
void V3EmitV::emitvFiles() {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
for (AstNodeFile* filep = v3Global.rootp()->filesp(); filep;
|
||||
filep = VN_AS(filep->nextp(), NodeFile)) {
|
||||
AstVFile* const vfilep = VN_CAST(filep, VFile);
|
||||
|
|
@ -1009,7 +1009,7 @@ void V3EmitV::emitvFiles() {
|
|||
}
|
||||
|
||||
void V3EmitV::debugEmitV(const string& filename) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
V3OutVFile of{filename};
|
||||
{ EmitVFileVisitor{v3Global.rootp(), &of, true, true}; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -436,7 +436,7 @@ public:
|
|||
// EmitXml class functions
|
||||
|
||||
void V3EmitXml::emitxml() {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
// All-in-one file
|
||||
const string filename = (v3Global.opt.xmlOutput().empty()
|
||||
? v3Global.opt.makeDir() + "/" + v3Global.opt.prefix() + ".xml"
|
||||
|
|
|
|||
|
|
@ -624,13 +624,17 @@ void v3errorEndFatal(std::ostringstream& sstr)
|
|||
#define UINFO(level, stmsg) \
|
||||
do { \
|
||||
if (VL_UNCOVERABLE(debug() >= (level))) { \
|
||||
std::cout << "- " << V3Error::lineStr(__FILE__, __LINE__) << stmsg; \
|
||||
std::ostringstream ss; \
|
||||
ss << "- " << V3Error::lineStr(__FILE__, __LINE__) << stmsg; \
|
||||
if (ss.str()[ss.str().size() - 1] != '\n') ss << '\n'; \
|
||||
std::cout << ss.str(); \
|
||||
} \
|
||||
} while (false)
|
||||
#define UINFONL(level, stmsg) \
|
||||
do { \
|
||||
if (VL_UNCOVERABLE(debug() >= (level))) { std::cout << stmsg; } \
|
||||
} while (false)
|
||||
/// Print the prefix of UINFO, but no newline. No level argument, as
|
||||
/// always need an if() at the caller site to determine if rest of the line
|
||||
/// gets printed or not
|
||||
#define UINFO_PREFIX(stmsg) \
|
||||
do { std::cout << "- " << V3Error::lineStr(__FILE__, __LINE__) << stmsg; } while (false)
|
||||
|
||||
/// Compile statements only when debug build
|
||||
#ifdef VL_DEBUG
|
||||
|
|
|
|||
|
|
@ -383,7 +383,7 @@ class PackThreads final {
|
|||
}
|
||||
|
||||
UINFO(6, "Sandbagged end time for " << mtaskp->name() << " on th " << threadId << " = "
|
||||
<< sandbaggedEndTime << endl);
|
||||
<< sandbaggedEndTime);
|
||||
return sandbaggedEndTime;
|
||||
}
|
||||
|
||||
|
|
@ -454,7 +454,7 @@ class PackThreads final {
|
|||
if (timeBegin > bestTime) {
|
||||
UINFO(6, "th " << threadId << " busy until " << timeBegin
|
||||
<< ", later than bestTime " << bestTime
|
||||
<< ", skipping thread.\n");
|
||||
<< ", skipping thread.");
|
||||
break;
|
||||
}
|
||||
for (const V3GraphEdge& edge : mtaskp->inEdges()) {
|
||||
|
|
@ -463,7 +463,7 @@ class PackThreads final {
|
|||
if (priorEndTime > timeBegin) timeBegin = priorEndTime;
|
||||
}
|
||||
UINFO(6, "Task " << mtaskp->name() << " start at " << timeBegin
|
||||
<< " on thread " << threadId << endl);
|
||||
<< " on thread " << threadId);
|
||||
if ((timeBegin < bestTime)
|
||||
|| ((timeBegin == bestTime)
|
||||
&& bestMtaskp // Redundant, but appeases static analysis tools
|
||||
|
|
@ -515,7 +515,7 @@ class PackThreads final {
|
|||
"Tasks after one being assigned should not be ready");
|
||||
if (isReady(schedule, nextp)) {
|
||||
readyMTasks.insert(nextp);
|
||||
UINFO(6, "Inserted " << nextp->name() << " into ready\n");
|
||||
UINFO(6, "Inserted " << nextp->name() << " into ready");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -754,9 +754,9 @@ void normalizeCosts(Costs& costs) {
|
|||
// profiled data. (Improves results if only a few profiles missing.)
|
||||
const double estToProfile
|
||||
= static_cast<double>(sumCostProfiled) / static_cast<double>(sumCostEstimate);
|
||||
UINFO(5, "Estimated data needs scaling by "
|
||||
<< estToProfile << ", sumCostProfiled=" << sumCostProfiled
|
||||
<< " sumCostEstimate=" << sumCostEstimate << endl);
|
||||
UINFO(5, "Estimated data needs scaling by " << estToProfile
|
||||
<< ", sumCostProfiled=" << sumCostProfiled
|
||||
<< " sumCostEstimate=" << sumCostEstimate);
|
||||
for (auto& est : costs) {
|
||||
uint64_t& costEstimate = est.second.first;
|
||||
costEstimate = scaleCost(costEstimate, estToProfile);
|
||||
|
|
@ -770,14 +770,13 @@ void normalizeCosts(Costs& costs) {
|
|||
const uint64_t& costProfiled = est.second.second;
|
||||
if (maxCost < costEstimate) maxCost = costEstimate;
|
||||
if (maxCost < costProfiled) maxCost = costProfiled;
|
||||
UINFO(9,
|
||||
"Post uint scale: ce = " << est.second.first << " cp=" << est.second.second << endl);
|
||||
UINFO(9, "Post uint scale: ce = " << est.second.first << " cp=" << est.second.second);
|
||||
}
|
||||
const uint64_t scaleDownTo = 10000000; // Extra room for future algorithms to add costs
|
||||
if (maxCost > scaleDownTo) {
|
||||
const double scaleup = static_cast<double>(scaleDownTo) / static_cast<double>(maxCost);
|
||||
UINFO(5, "Scaling data to within 32-bits by multiply by=" << scaleup << ", maxCost="
|
||||
<< maxCost << endl);
|
||||
UINFO(5, "Scaling data to within 32-bits by multiply by=" << scaleup
|
||||
<< ", maxCost=" << maxCost);
|
||||
for (auto& est : costs) {
|
||||
est.second.first = scaleCost(est.second.first, scaleup);
|
||||
est.second.second = scaleCost(est.second.second, scaleup);
|
||||
|
|
@ -797,7 +796,7 @@ void fillinCosts(V3Graph* execMTaskGraphp) {
|
|||
= V3Config::getProfileData(v3Global.opt.prefix(), mtp->hashName());
|
||||
if (costProfiled) {
|
||||
UINFO(5, "Profile data for mtask " << mtp->id() << " " << mtp->hashName()
|
||||
<< " cost override " << costProfiled << endl);
|
||||
<< " cost override " << costProfiled);
|
||||
}
|
||||
costs[mtp->id()] = std::make_pair(costEstimate, costProfiled);
|
||||
}
|
||||
|
|
@ -810,7 +809,7 @@ void fillinCosts(V3Graph* execMTaskGraphp) {
|
|||
ExecMTask* const mtp = vtx.as<ExecMTask>();
|
||||
const uint32_t costEstimate = costs[mtp->id()].first;
|
||||
const uint64_t costProfiled = costs[mtp->id()].second;
|
||||
UINFO(9, "ce = " << costEstimate << " cp=" << costProfiled << endl);
|
||||
UINFO(9, "ce = " << costEstimate << " cp=" << costProfiled);
|
||||
UASSERT(costEstimate <= (1UL << 31), "cost scaling math would overflow uint32");
|
||||
UASSERT(costProfiled <= (1UL << 31), "cost scaling math would overflow uint32");
|
||||
const uint64_t costProfiled32 = static_cast<uint32_t>(costProfiled);
|
||||
|
|
@ -863,7 +862,7 @@ void finalizeCosts(V3Graph* execMTaskGraphp) {
|
|||
// the MTaskBody to see if it's empty. That's the source of truth.
|
||||
AstMTaskBody* const bodyp = mtp->bodyp();
|
||||
if (!bodyp->stmtsp()) { // Kill this empty mtask
|
||||
UINFO(6, "Removing zero-cost " << mtp->name() << endl);
|
||||
UINFO(6, "Removing zero-cost " << mtp->name());
|
||||
for (V3GraphEdge& in : mtp->inEdges()) {
|
||||
for (V3GraphEdge& out : mtp->outEdges()) {
|
||||
new V3GraphEdge{execMTaskGraphp, in.fromp(), out.top(), 1};
|
||||
|
|
@ -891,12 +890,12 @@ void finalizeCosts(V3Graph* execMTaskGraphp) {
|
|||
V3Stats::addStat("MTask graph, final, parallelism factor", report.parallelismFactor());
|
||||
if (debug() >= 3) {
|
||||
UINFO(0, "\n");
|
||||
UINFO(0, " Final mtask parallelism report:\n");
|
||||
UINFO(0, " Critical path cost = " << report.criticalPathCost() << "\n");
|
||||
UINFO(0, " Total graph cost = " << report.totalGraphCost() << "\n");
|
||||
UINFO(0, " MTask vertex count = " << report.vertexCount() << "\n");
|
||||
UINFO(0, " Edge count = " << report.edgeCount() << "\n");
|
||||
UINFO(0, " Parallelism factor = " << report.parallelismFactor() << "\n");
|
||||
UINFO(0, " Final mtask parallelism report:");
|
||||
UINFO(0, " Critical path cost = " << report.criticalPathCost());
|
||||
UINFO(0, " Total graph cost = " << report.totalGraphCost());
|
||||
UINFO(0, " MTask vertex count = " << report.vertexCount());
|
||||
UINFO(0, " Edge count = " << report.edgeCount());
|
||||
UINFO(0, " Parallelism factor = " << report.parallelismFactor());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ class ExpandVisitor final : public VNVisitor {
|
|||
// Use state that ExpandOkVisitor calculated
|
||||
bool isImpure(AstNode* nodep) {
|
||||
const bool impure = nodep->user2();
|
||||
if (impure) UINFO(9, " impure " << nodep << endl);
|
||||
if (impure) UINFO(9, " impure " << nodep);
|
||||
return impure;
|
||||
}
|
||||
|
||||
|
|
@ -265,7 +265,7 @@ class ExpandVisitor final : public VNVisitor {
|
|||
//====================
|
||||
|
||||
bool expandWide(AstNodeAssign* nodep, AstConst* rhsp) {
|
||||
UINFO(8, " Wordize ASSIGN(CONST) " << nodep << endl);
|
||||
UINFO(8, " Wordize ASSIGN(CONST) " << nodep);
|
||||
if (!doExpandWide(nodep)) return false;
|
||||
// -> {for each_word{ ASSIGN(WORDSEL(wide,#),WORDSEL(CONST,#))}}
|
||||
if (rhsp->num().isFourState()) {
|
||||
|
|
@ -281,7 +281,7 @@ class ExpandVisitor final : public VNVisitor {
|
|||
}
|
||||
//-------- Uniops
|
||||
bool expandWide(AstNodeAssign* nodep, AstVarRef* rhsp) {
|
||||
UINFO(8, " Wordize ASSIGN(VARREF) " << nodep << endl);
|
||||
UINFO(8, " Wordize ASSIGN(VARREF) " << nodep);
|
||||
if (!doExpandWide(nodep)) return false;
|
||||
for (int w = 0; w < nodep->widthWords(); ++w) {
|
||||
addWordAssign(nodep, w, newAstWordSelClone(rhsp, w));
|
||||
|
|
@ -289,7 +289,7 @@ class ExpandVisitor final : public VNVisitor {
|
|||
return true;
|
||||
}
|
||||
bool expandWide(AstNodeAssign* nodep, AstArraySel* rhsp) {
|
||||
UINFO(8, " Wordize ASSIGN(ARRAYSEL) " << nodep << endl);
|
||||
UINFO(8, " Wordize ASSIGN(ARRAYSEL) " << nodep);
|
||||
UASSERT_OBJ(!VN_IS(nodep->dtypep()->skipRefp(), UnpackArrayDType), nodep,
|
||||
"ArraySel with unpacked arrays should have been removed in V3Slice");
|
||||
if (!doExpandWide(nodep)) return false;
|
||||
|
|
@ -299,7 +299,7 @@ class ExpandVisitor final : public VNVisitor {
|
|||
return true;
|
||||
}
|
||||
bool expandWide(AstNodeAssign* nodep, AstNot* rhsp) {
|
||||
UINFO(8, " Wordize ASSIGN(NOT) " << nodep << endl);
|
||||
UINFO(8, " Wordize ASSIGN(NOT) " << nodep);
|
||||
// -> {for each_word{ ASSIGN(WORDSEL(wide,#),NOT(WORDSEL(lhs,#))) }}
|
||||
if (!doExpandWide(nodep)) return false;
|
||||
FileLine* const fl = rhsp->fileline();
|
||||
|
|
@ -310,7 +310,7 @@ class ExpandVisitor final : public VNVisitor {
|
|||
}
|
||||
//-------- Biops
|
||||
bool expandWide(AstNodeAssign* nodep, AstAnd* rhsp) {
|
||||
UINFO(8, " Wordize ASSIGN(AND) " << nodep << endl);
|
||||
UINFO(8, " Wordize ASSIGN(AND) " << nodep);
|
||||
if (!doExpandWide(nodep)) return false;
|
||||
FileLine* const fl = nodep->fileline();
|
||||
for (int w = 0; w < nodep->widthWords(); ++w) {
|
||||
|
|
@ -321,7 +321,7 @@ class ExpandVisitor final : public VNVisitor {
|
|||
return true;
|
||||
}
|
||||
bool expandWide(AstNodeAssign* nodep, AstOr* rhsp) {
|
||||
UINFO(8, " Wordize ASSIGN(OR) " << nodep << endl);
|
||||
UINFO(8, " Wordize ASSIGN(OR) " << nodep);
|
||||
if (!doExpandWide(nodep)) return false;
|
||||
FileLine* const fl = nodep->fileline();
|
||||
for (int w = 0; w < nodep->widthWords(); ++w) {
|
||||
|
|
@ -332,7 +332,7 @@ class ExpandVisitor final : public VNVisitor {
|
|||
return true;
|
||||
}
|
||||
bool expandWide(AstNodeAssign* nodep, AstXor* rhsp) {
|
||||
UINFO(8, " Wordize ASSIGN(XOR) " << nodep << endl);
|
||||
UINFO(8, " Wordize ASSIGN(XOR) " << nodep);
|
||||
if (!doExpandWide(nodep)) return false;
|
||||
FileLine* const fl = nodep->fileline();
|
||||
for (int w = 0; w < nodep->widthWords(); ++w) {
|
||||
|
|
@ -344,7 +344,7 @@ class ExpandVisitor final : public VNVisitor {
|
|||
}
|
||||
//-------- Triops
|
||||
bool expandWide(AstNodeAssign* nodep, AstNodeCond* rhsp) {
|
||||
UINFO(8, " Wordize ASSIGN(COND) " << nodep << endl);
|
||||
UINFO(8, " Wordize ASSIGN(COND) " << nodep);
|
||||
if (!doExpandWide(nodep)) return false;
|
||||
FileLine* const fl = nodep->fileline();
|
||||
for (int w = 0; w < nodep->widthWords(); ++w) {
|
||||
|
|
@ -372,7 +372,7 @@ class ExpandVisitor final : public VNVisitor {
|
|||
} else if (lhsp->isWide()) {
|
||||
nodep->v3fatalSrc("extending larger thing into smaller?");
|
||||
} else {
|
||||
UINFO(8, " EXTEND(q<-l) " << nodep << endl);
|
||||
UINFO(8, " EXTEND(q<-l) " << nodep);
|
||||
newp = new AstCCast{nodep->fileline(), lhsp, nodep};
|
||||
}
|
||||
} else { // Long
|
||||
|
|
@ -384,7 +384,7 @@ class ExpandVisitor final : public VNVisitor {
|
|||
}
|
||||
}
|
||||
bool expandWide(AstNodeAssign* nodep, AstExtend* rhsp) {
|
||||
UINFO(8, " Wordize ASSIGN(EXTEND) " << nodep << endl);
|
||||
UINFO(8, " Wordize ASSIGN(EXTEND) " << nodep);
|
||||
if (!doExpandWide(nodep)) return false;
|
||||
AstNodeExpr* const rlhsp = rhsp->lhsp();
|
||||
for (int w = 0; w < rlhsp->widthWords(); ++w) {
|
||||
|
|
@ -408,7 +408,7 @@ class ExpandVisitor final : public VNVisitor {
|
|||
// See under ASSIGN(WIDE)
|
||||
} else if (nodep->fromp()->isWide()) {
|
||||
if (isImpure(nodep)) return;
|
||||
UINFO(8, " SEL(wide) " << nodep << endl);
|
||||
UINFO(8, " SEL(wide) " << nodep);
|
||||
UASSERT_OBJ(nodep->widthConst() <= 64, nodep, "Inconsistent width");
|
||||
// Selection amounts
|
||||
// Check for constant shifts & save some constification work later.
|
||||
|
|
@ -482,7 +482,7 @@ class ExpandVisitor final : public VNVisitor {
|
|||
VL_DO_DANGLING(replaceWithDelete(nodep, newp), nodep);
|
||||
} else { // Long/Quad from Long/Quad
|
||||
// No isImpure() check - can handle side effects in below
|
||||
UINFO(8, " SEL->SHIFT " << nodep << endl);
|
||||
UINFO(8, " SEL->SHIFT " << nodep);
|
||||
FileLine* const fl = nodep->fileline();
|
||||
AstNodeExpr* fromp = nodep->fromp()->unlinkFrBack();
|
||||
AstNodeExpr* const lsbp = nodep->lsbp()->unlinkFrBack();
|
||||
|
|
@ -501,13 +501,13 @@ class ExpandVisitor final : public VNVisitor {
|
|||
if (!doExpandWide(nodep)) return false;
|
||||
if (VN_IS(rhsp->lsbp(), Const) && VL_BITBIT_E(rhsp->lsbConst()) == 0) {
|
||||
const int lsb = rhsp->lsbConst();
|
||||
UINFO(8, " Wordize ASSIGN(SEL,align) " << nodep << endl);
|
||||
UINFO(8, " Wordize ASSIGN(SEL,align) " << nodep);
|
||||
for (int w = 0; w < nodep->widthWords(); ++w) {
|
||||
addWordAssign(nodep, w, newAstWordSelClone(rhsp->fromp(), w + VL_BITWORD_E(lsb)));
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
UINFO(8, " Wordize ASSIGN(EXTRACT,misalign) " << nodep << endl);
|
||||
UINFO(8, " Wordize ASSIGN(EXTRACT,misalign) " << nodep);
|
||||
FileLine* const nfl = nodep->fileline();
|
||||
FileLine* const rfl = rhsp->fileline();
|
||||
FileLine* const ffl = rhsp->fromp()->fileline();
|
||||
|
|
@ -559,7 +559,7 @@ class ExpandVisitor final : public VNVisitor {
|
|||
V3Number maskold{nodep, destp->widthMin()};
|
||||
maskold.opNot(maskset);
|
||||
if (destwide) {
|
||||
UINFO(8, " ASSIGNSEL(const,wide) " << nodep << endl);
|
||||
UINFO(8, " ASSIGNSEL(const,wide) " << nodep);
|
||||
for (int w = 0; w < destp->widthWords(); ++w) {
|
||||
if (w >= VL_BITWORD_E(lsb) && w <= VL_BITWORD_E(msb)) {
|
||||
// else we would just be setting it to the same exact value
|
||||
|
|
@ -591,7 +591,7 @@ class ExpandVisitor final : public VNVisitor {
|
|||
VL_DO_DANGLING(rhsp->deleteTree(), rhsp);
|
||||
VL_DO_DANGLING(destp->deleteTree(), destp);
|
||||
} else {
|
||||
UINFO(8, " ASSIGNSEL(const,narrow) " << nodep << endl);
|
||||
UINFO(8, " ASSIGNSEL(const,narrow) " << nodep);
|
||||
if (destp->isQuad() && !rhsp->isQuad()) rhsp = new AstCCast{nfl, rhsp, nodep};
|
||||
AstNodeExpr* oldvalp = destp->cloneTreePure(true);
|
||||
fixCloneLvalue(oldvalp);
|
||||
|
|
@ -613,7 +613,7 @@ class ExpandVisitor final : public VNVisitor {
|
|||
return true;
|
||||
} else { // non-const select offset
|
||||
if (destwide && lhsp->widthConst() == 1) {
|
||||
UINFO(8, " ASSIGNSEL(varlsb,wide,1bit) " << nodep << endl);
|
||||
UINFO(8, " ASSIGNSEL(varlsb,wide,1bit) " << nodep);
|
||||
AstNodeExpr* const rhsp = nodep->rhsp()->unlinkFrBack();
|
||||
AstNodeExpr* const destp = lhsp->fromp()->unlinkFrBack();
|
||||
AstNodeExpr* oldvalp = newWordSel(lfl, destp->cloneTreePure(true), lhsp->lsbp());
|
||||
|
|
@ -638,7 +638,7 @@ class ExpandVisitor final : public VNVisitor {
|
|||
insertBefore(nodep, newp);
|
||||
return true;
|
||||
} else if (destwide) {
|
||||
UINFO(8, " ASSIGNSEL(varlsb,wide) -- NoOp -- " << nodep << endl);
|
||||
UINFO(8, " ASSIGNSEL(varlsb,wide) -- NoOp -- " << nodep);
|
||||
// For wide destp, we can either form a equation for every destination word,
|
||||
// with the appropriate long equation of if it's being written or not.
|
||||
// Or, we can use a LHS variable arraysel with
|
||||
|
|
@ -650,7 +650,7 @@ class ExpandVisitor final : public VNVisitor {
|
|||
// Reconsider if we get subexpression elimination.
|
||||
return false;
|
||||
} else {
|
||||
UINFO(8, " ASSIGNSEL(varlsb,narrow) " << nodep << endl);
|
||||
UINFO(8, " ASSIGNSEL(varlsb,narrow) " << nodep);
|
||||
// nodep->dumpTree("- old: ");
|
||||
AstNodeExpr* rhsp = nodep->rhsp()->unlinkFrBack();
|
||||
AstNodeExpr* const destp = lhsp->fromp()->unlinkFrBack();
|
||||
|
|
@ -694,7 +694,7 @@ class ExpandVisitor final : public VNVisitor {
|
|||
// See under ASSIGN(WIDE)
|
||||
} else {
|
||||
// No isImpure() check - can handle side effects in below
|
||||
UINFO(8, " CONCAT " << nodep << endl);
|
||||
UINFO(8, " CONCAT " << nodep);
|
||||
FileLine* const fl = nodep->fileline();
|
||||
AstNodeExpr* lhsp = nodep->lhsp()->unlinkFrBack();
|
||||
AstNodeExpr* rhsp = nodep->rhsp()->unlinkFrBack();
|
||||
|
|
@ -708,7 +708,7 @@ class ExpandVisitor final : public VNVisitor {
|
|||
}
|
||||
}
|
||||
bool expandWide(AstNodeAssign* nodep, AstConcat* rhsp) {
|
||||
UINFO(8, " Wordize ASSIGN(CONCAT) " << nodep << endl);
|
||||
UINFO(8, " Wordize ASSIGN(CONCAT) " << nodep);
|
||||
if (!doExpandWide(rhsp)) return false;
|
||||
FileLine* const fl = rhsp->fileline();
|
||||
// Lhs or Rhs may be word, long, or quad.
|
||||
|
|
@ -737,10 +737,10 @@ class ExpandVisitor final : public VNVisitor {
|
|||
AstNodeExpr* newp;
|
||||
const int lhswidth = lhsp->widthMin();
|
||||
if (lhswidth == 1) {
|
||||
UINFO(8, " REPLICATE(w1) " << nodep << endl);
|
||||
UINFO(8, " REPLICATE(w1) " << nodep);
|
||||
newp = new AstNegate{fl, lhsp};
|
||||
} else {
|
||||
UINFO(8, " REPLICATE " << nodep << endl);
|
||||
UINFO(8, " REPLICATE " << nodep);
|
||||
const AstConst* const constp = VN_AS(nodep->countp(), Const);
|
||||
UASSERT_OBJ(constp, nodep,
|
||||
"Replication value isn't a constant. Checked earlier!");
|
||||
|
|
@ -764,7 +764,7 @@ class ExpandVisitor final : public VNVisitor {
|
|||
}
|
||||
}
|
||||
bool expandWide(AstNodeAssign* nodep, AstReplicate* rhsp) {
|
||||
UINFO(8, " Wordize ASSIGN(REPLICATE) " << nodep << endl);
|
||||
UINFO(8, " Wordize ASSIGN(REPLICATE) " << nodep);
|
||||
if (!doExpandWide(rhsp)) return false;
|
||||
FileLine* const fl = nodep->fileline();
|
||||
AstNodeExpr* const lhsp = rhsp->srcp();
|
||||
|
|
@ -795,7 +795,7 @@ class ExpandVisitor final : public VNVisitor {
|
|||
iterateChildren(nodep);
|
||||
if (nodep->lhsp()->isWide()) {
|
||||
if (isImpure(nodep)) return;
|
||||
UINFO(8, " Wordize EQ/NEQ " << nodep << endl);
|
||||
UINFO(8, " Wordize EQ/NEQ " << nodep);
|
||||
// -> (0=={or{for each_word{WORDSEL(lhs,#)^WORDSEL(rhs,#)}}}
|
||||
FileLine* const fl = nodep->fileline();
|
||||
AstNodeExpr* newp = nullptr;
|
||||
|
|
@ -821,7 +821,7 @@ class ExpandVisitor final : public VNVisitor {
|
|||
FileLine* const fl = nodep->fileline();
|
||||
if (nodep->lhsp()->isWide()) {
|
||||
if (isImpure(nodep)) return;
|
||||
UINFO(8, " Wordize REDOR " << nodep << endl);
|
||||
UINFO(8, " Wordize REDOR " << nodep);
|
||||
// -> (0!={or{for each_word{WORDSEL(lhs,#)}}}
|
||||
AstNodeExpr* newp = nullptr;
|
||||
for (int w = 0; w < nodep->lhsp()->widthWords(); ++w) {
|
||||
|
|
@ -832,7 +832,7 @@ class ExpandVisitor final : public VNVisitor {
|
|||
VL_DO_DANGLING(replaceWithDelete(nodep, newp), nodep);
|
||||
} else {
|
||||
// No isImpure() check - can handle side effects in below
|
||||
UINFO(8, " REDOR->EQ " << nodep << endl);
|
||||
UINFO(8, " REDOR->EQ " << nodep);
|
||||
AstNodeExpr* const lhsp = nodep->lhsp()->unlinkFrBack();
|
||||
AstNodeExpr* const newp = new AstNeq{
|
||||
fl, new AstConst{fl, AstConst::WidthedValue{}, longOrQuadWidth(nodep), 0}, lhsp};
|
||||
|
|
@ -845,7 +845,7 @@ class ExpandVisitor final : public VNVisitor {
|
|||
FileLine* const fl = nodep->fileline();
|
||||
if (nodep->lhsp()->isWide()) {
|
||||
if (isImpure(nodep)) return;
|
||||
UINFO(8, " Wordize REDAND " << nodep << endl);
|
||||
UINFO(8, " Wordize REDAND " << nodep);
|
||||
// -> (0!={and{for each_word{WORDSEL(lhs,#)}}}
|
||||
AstNodeExpr* newp = nullptr;
|
||||
for (int w = 0; w < nodep->lhsp()->widthWords(); ++w) {
|
||||
|
|
@ -865,7 +865,7 @@ class ExpandVisitor final : public VNVisitor {
|
|||
VL_DO_DANGLING(replaceWithDelete(nodep, newp), nodep);
|
||||
} else {
|
||||
// No isImpure() check - can handle side effects in below
|
||||
UINFO(8, " REDAND->EQ " << nodep << endl);
|
||||
UINFO(8, " REDAND->EQ " << nodep);
|
||||
AstNodeExpr* const lhsp = nodep->lhsp()->unlinkFrBack();
|
||||
AstNodeExpr* const newp = new AstEq{fl, new AstConst{fl, wordMask(lhsp)}, lhsp};
|
||||
VL_DO_DANGLING(replaceWithDelete(nodep, newp), nodep);
|
||||
|
|
@ -876,7 +876,7 @@ class ExpandVisitor final : public VNVisitor {
|
|||
iterateChildren(nodep);
|
||||
if (nodep->lhsp()->isWide()) {
|
||||
if (isImpure(nodep)) return;
|
||||
UINFO(8, " Wordize REDXOR " << nodep << endl);
|
||||
UINFO(8, " Wordize REDXOR " << nodep);
|
||||
// -> (0!={redxor{for each_word{XOR(WORDSEL(lhs,#))}}}
|
||||
FileLine* const fl = nodep->fileline();
|
||||
AstNodeExpr* newp = nullptr;
|
||||
|
|
@ -885,7 +885,7 @@ class ExpandVisitor final : public VNVisitor {
|
|||
newp = newp ? new AstXor{fl, newp, eqp} : eqp;
|
||||
}
|
||||
newp = new AstRedXor{fl, newp};
|
||||
UINFO(8, " Wordize REDXORnew " << newp << endl);
|
||||
UINFO(8, " Wordize REDXORnew " << newp);
|
||||
VL_DO_DANGLING(replaceWithDelete(nodep, newp), nodep);
|
||||
}
|
||||
// We don't reduce non-wide XORs, as its more efficient to use a temp register,
|
||||
|
|
@ -962,7 +962,7 @@ public:
|
|||
// Expand class functions
|
||||
|
||||
void V3Expand::expandAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{
|
||||
ExpandOkVisitor okVisitor{nodep};
|
||||
ExpandVisitor{nodep};
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ class V3FileDependImp final {
|
|||
m_stat.st_mtime = 1;
|
||||
m_exists = false;
|
||||
// Not an error... This can occur due to `line directives in the .vpp files
|
||||
UINFO(1, "-Info: File not statable: " << filename() << endl);
|
||||
UINFO(1, "-Info: File not statable: " << filename());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -215,7 +215,7 @@ void V3FileDependImp::writeTimes(const string& filename, const string& cmdlineIn
|
|||
bool V3FileDependImp::checkTimes(const string& filename, const string& cmdlineIn) {
|
||||
const std::unique_ptr<std::ifstream> ifp{V3File::new_ifstream_nodepend(filename)};
|
||||
if (ifp->fail()) {
|
||||
UINFO(2, " --check-times failed: no input " << filename << endl);
|
||||
UINFO(2, " --check-times failed: no input " << filename);
|
||||
return false;
|
||||
}
|
||||
{
|
||||
|
|
@ -231,7 +231,7 @@ bool V3FileDependImp::checkTimes(const string& filename, const string& cmdlineIn
|
|||
const string chkCmdline = V3Os::getline(*ifp, '"');
|
||||
const string cmdline = stripQuotes(cmdlineIn);
|
||||
if (cmdline != chkCmdline) {
|
||||
UINFO(2, " --check-times failed: different command line\n");
|
||||
UINFO(2, " --check-times failed: different command line");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -261,7 +261,7 @@ bool V3FileDependImp::checkTimes(const string& filename, const string& cmdlineIn
|
|||
struct stat chkStat;
|
||||
const int err = stat(chkFilename.c_str(), &chkStat);
|
||||
if (err != 0) {
|
||||
UINFO(2, " --check-times failed: missing " << chkFilename << endl);
|
||||
UINFO(2, " --check-times failed: missing " << chkFilename);
|
||||
return false;
|
||||
}
|
||||
// UINFO(9," got d="<<chkDir<<" s="<<chkSize<<" ct="<<chkCstime<<"."
|
||||
|
|
@ -387,7 +387,7 @@ private:
|
|||
if (!m_pidExited && waitpid(m_pid, &m_pidStatus, hang ? 0 : WNOHANG)) {
|
||||
UINFO(1, "--pipe-filter: Exited, status "
|
||||
<< m_pidStatus << " exit=" << WEXITSTATUS(m_pidStatus) << " err"
|
||||
<< std::strerror(errno) << endl);
|
||||
<< std::strerror(errno));
|
||||
m_readEof = true;
|
||||
m_pidExited = true;
|
||||
}
|
||||
|
|
@ -402,7 +402,7 @@ private:
|
|||
if (size > 0 && size < todo) todo = size;
|
||||
errno = 0;
|
||||
const ssize_t got = read(fd, buf, todo);
|
||||
// UINFO(9,"RD GOT g "<< got<<" e "<<errno<<" "<<strerror(errno)<<endl);
|
||||
// UINFO(9, "RD GOT g " << got << " e " << errno << " " << strerror(errno));
|
||||
// usleep(50*1000);
|
||||
if (got > 0) {
|
||||
outl.push_back(string(buf, got));
|
||||
|
|
@ -424,7 +424,7 @@ private:
|
|||
// cppverilator-suppress unusedFunction unusedPrivateFunction
|
||||
string readFilterLine() {
|
||||
// Slow, but we don't need it much
|
||||
UINFO(9, "readFilterLine\n");
|
||||
UINFO(9, "readFilterLine");
|
||||
string line;
|
||||
while (!m_readEof) {
|
||||
StrList outl;
|
||||
|
|
@ -458,7 +458,7 @@ private:
|
|||
while (!m_readEof && out.length() > offset) {
|
||||
errno = 0;
|
||||
const int got = write(m_writeFd, (out.c_str()) + offset, out.length() - offset);
|
||||
// UINFO(9,"WR GOT g "<< got<<" e "<<errno<<" "<<strerror(errno)<<endl);
|
||||
// UINFO(9, "WR GOT g " << got << " e " << errno << " " << strerror(errno));
|
||||
// usleep(50*1000);
|
||||
if (got > 0) {
|
||||
offset += got;
|
||||
|
|
@ -502,12 +502,12 @@ private:
|
|||
v3fatal("--pipe-filter: stdin/stdout closed before pipe opened\n");
|
||||
}
|
||||
|
||||
UINFO(1, "--pipe-filter: /bin/sh -c " << command << endl);
|
||||
UINFO(1, "--pipe-filter: /bin/sh -c " << command);
|
||||
|
||||
const pid_t pid = fork();
|
||||
if (pid < 0) v3fatal("--pipe-filter: fork failed: " << std::strerror(errno));
|
||||
if (pid == 0) { // Child
|
||||
UINFO(6, "In child\n");
|
||||
UINFO(6, "In child");
|
||||
close(fd_stdin[P_WR]);
|
||||
dup2(fd_stdin[P_RD], 0);
|
||||
close(fd_stdout[P_RD]);
|
||||
|
|
@ -521,7 +521,7 @@ private:
|
|||
} else { // Parent
|
||||
UINFO(6, "In parent, child pid " << pid << " stdin " << fd_stdin[P_WR] << "->"
|
||||
<< fd_stdin[P_RD] << " stdout " << fd_stdout[P_WR]
|
||||
<< "->" << fd_stdout[P_RD] << endl);
|
||||
<< "->" << fd_stdout[P_RD]);
|
||||
m_pid = pid;
|
||||
m_pidExited = false;
|
||||
m_pidStatus = 0;
|
||||
|
|
@ -538,7 +538,7 @@ private:
|
|||
flags = fcntl(m_writeFd, F_GETFL, 0);
|
||||
fcntl(m_writeFd, F_SETFL, flags | O_NONBLOCK);
|
||||
}
|
||||
UINFO(6, "startFilter complete\n");
|
||||
UINFO(6, "startFilter complete");
|
||||
#else
|
||||
v3fatalSrc("--pipe-filter not implemented on this platform");
|
||||
#endif
|
||||
|
|
@ -548,7 +548,7 @@ private:
|
|||
if (m_pid) stopFilter();
|
||||
}
|
||||
void stopFilter() {
|
||||
UINFO(6, "Stopping filter process\n");
|
||||
UINFO(6, "Stopping filter process");
|
||||
#ifdef INFILTER_PIPE
|
||||
close(m_writeFd);
|
||||
checkFilter(true);
|
||||
|
|
@ -557,7 +557,7 @@ private:
|
|||
}
|
||||
m_pid = 0;
|
||||
close(m_readFd);
|
||||
UINFO(6, "Closed\n");
|
||||
UINFO(6, "Closed");
|
||||
#else
|
||||
v3fatalSrc("--pipe-filter not implemented on this platform");
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -408,7 +408,7 @@ public:
|
|||
//
|
||||
|
||||
void V3Force::forceAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
if (!v3Global.hasForceableSignals()) return;
|
||||
{
|
||||
ForceState state;
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ public:
|
|||
UASSERT_OBJ(!m_instance.initialized(), m_procp, "Dynamic scope already instantiated.");
|
||||
|
||||
m_instance.m_classp = new AstClass{m_procp->fileline(), generateDynScopeClassName()};
|
||||
UINFO(9, "new dynscope class " << m_instance.m_classp << endl);
|
||||
UINFO(9, "new dynscope class " << m_instance.m_classp);
|
||||
m_instance.m_refDTypep
|
||||
= new AstClassRefDType{m_procp->fileline(), m_instance.m_classp, nullptr};
|
||||
v3Global.rootp()->typeTablep()->addTypesp(m_instance.m_refDTypep);
|
||||
|
|
@ -91,7 +91,7 @@ public:
|
|||
generateDynScopeHandleName(m_procp), m_instance.m_refDTypep};
|
||||
m_instance.m_handlep->funcLocal(true);
|
||||
m_instance.m_handlep->lifetime(VLifetime::AUTOMATIC);
|
||||
UINFO(9, "new dynscope var " << m_instance.m_handlep << endl);
|
||||
UINFO(9, "new dynscope var " << m_instance.m_handlep);
|
||||
|
||||
return m_instance;
|
||||
}
|
||||
|
|
@ -119,7 +119,7 @@ public:
|
|||
varp->varType(VVarType::MEMBER);
|
||||
varp->lifetime(VLifetime::AUTOMATIC);
|
||||
varp->usedLoopIdx(false); // No longer unrollable
|
||||
UINFO(9, "insert DynScope member " << varp << endl);
|
||||
UINFO(9, "insert DynScope member " << varp);
|
||||
m_instance.m_classp->addStmtsp(varp);
|
||||
}
|
||||
|
||||
|
|
@ -462,7 +462,7 @@ class DynScopeVisitor final : public VNVisitor {
|
|||
forkp->joinType(VJoinType::JOIN_NONE);
|
||||
nodep->replaceWith(forkp);
|
||||
forkp->addStmtsp(nodep);
|
||||
UINFO(9, "assign new fork " << forkp << endl);
|
||||
UINFO(9, "assign new fork " << forkp);
|
||||
} else {
|
||||
visit(static_cast<AstNodeStmt*>(nodep));
|
||||
}
|
||||
|
|
@ -481,7 +481,7 @@ public:
|
|||
// Commit changes to AST
|
||||
bool typesAdded = false;
|
||||
for (auto orderp : m_frameOrder) {
|
||||
UINFO(9, "Frame commit " << orderp << endl);
|
||||
UINFO(9, "Frame commit " << orderp);
|
||||
auto frameIt = m_frames.find(orderp);
|
||||
UASSERT_OBJ(frameIt != m_frames.end(), orderp, "m_frames didn't contain m_frameOrder");
|
||||
ForkDynScopeFrame* framep = frameIt->second;
|
||||
|
|
@ -537,7 +537,7 @@ class ForkVisitor final : public VNVisitor {
|
|||
varp->direction(VDirection::INPUT);
|
||||
varp->funcLocal(true);
|
||||
varp->lifetime(VLifetime::AUTOMATIC);
|
||||
UINFO(9, "new capture var " << varp << endl);
|
||||
UINFO(9, "new capture var " << varp);
|
||||
m_capturedVarsp = AstNode::addNext(m_capturedVarsp, varp);
|
||||
// Use the original ref as an argument for call
|
||||
m_capturedVarRefsp
|
||||
|
|
@ -603,7 +603,7 @@ class ForkVisitor final : public VNVisitor {
|
|||
}
|
||||
|
||||
m_modp->addStmtsp(taskp);
|
||||
UINFO(9, "new " << taskp << endl);
|
||||
UINFO(9, "new " << taskp);
|
||||
|
||||
AstTaskRef* const taskrefp = new AstTaskRef{nodep->fileline(), taskp, m_capturedVarRefsp};
|
||||
AstStmtExpr* const taskcallp = taskrefp->makeStmt();
|
||||
|
|
@ -698,13 +698,13 @@ public:
|
|||
// Fork class functions
|
||||
|
||||
void V3Fork::makeDynamicScopes(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{ DynScopeVisitor{nodep}; }
|
||||
V3Global::dumpCheckGlobalTree("fork_dynscope", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
||||
void V3Fork::makeTasks(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{ ForkVisitor{nodep}; }
|
||||
V3Global::dumpCheckGlobalTree("fork", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ class BalanceConcatTree final {
|
|||
|
||||
// Returns replacement node, or nullptr if no change
|
||||
static AstConcat* balance(AstConcat* const rootp) {
|
||||
UINFO(9, "balanceConcat " << rootp << "\n");
|
||||
UINFO(9, "balanceConcat " << rootp);
|
||||
// Gather all input vertices of the tree
|
||||
const std::vector<AstNodeExpr*> exprps = gatherTerms(rootp);
|
||||
// Don't bother with trivial trees
|
||||
|
|
@ -219,7 +219,7 @@ class FuncOptVisitor final : public VNVisitor {
|
|||
// Split wide assignments with a wide concatenation on the RHS.
|
||||
// Returns true if 'nodep' was deleted
|
||||
bool splitConcat(AstNodeAssign* nodep) {
|
||||
UINFO(9, "splitConcat " << nodep << "\n");
|
||||
UINFO(9, "splitConcat " << nodep);
|
||||
// Only care about concatenations on the right
|
||||
AstConcat* const rhsp = VN_CAST(nodep->rhsp(), Concat);
|
||||
if (!rhsp) return false;
|
||||
|
|
@ -253,7 +253,7 @@ class FuncOptVisitor final : public VNVisitor {
|
|||
if (!nodep->user1() && readsLhs(nodep)) return false;
|
||||
|
||||
// Ok, actually split it now
|
||||
UINFO(5, "splitConcat optimizing " << nodep << "\n");
|
||||
UINFO(5, "splitConcat optimizing " << nodep);
|
||||
++m_concatSplits;
|
||||
// The 2 parts and their offsets
|
||||
AstNodeExpr* const rrp = rhsp->rhsp()->unlinkFrBack();
|
||||
|
|
@ -291,7 +291,7 @@ class FuncOptVisitor final : public VNVisitor {
|
|||
void visit(AstConcat* nodep) override {
|
||||
if (v3Global.opt.fFuncBalanceCat() && !nodep->user1() && !VN_IS(nodep->backp(), Concat)) {
|
||||
if (AstConcat* const newp = BalanceConcatTree::apply(nodep)) {
|
||||
UINFO(5, "balanceConcat optimizing " << nodep << "\n");
|
||||
UINFO(5, "balanceConcat optimizing " << nodep);
|
||||
++m_balancedConcats;
|
||||
nodep->replaceWith(newp);
|
||||
VL_DO_DANGLING(pushDeletep(nodep), nodep);
|
||||
|
|
@ -319,7 +319,7 @@ public:
|
|||
//######################################################################
|
||||
|
||||
void V3FuncOpt::funcOptAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{
|
||||
const VNUser1InUse user1InUse;
|
||||
V3ThreadScope threadScope;
|
||||
|
|
|
|||
|
|
@ -57,15 +57,15 @@ public:
|
|||
bool dedupable() const { return m_dedupable; }
|
||||
bool consumed() const { return m_consumed; }
|
||||
void setConsumed(const char* /*consumedReason*/) {
|
||||
// if (!m_consumed) UINFO(0, "\t\tSetConsumed " << consumedReason << " " << this << endl);
|
||||
// if (!m_consumed) UINFO(0, "\t\tSetConsumed " << consumedReason << " " << this);
|
||||
m_consumed = true;
|
||||
}
|
||||
void clearReducible(const char* /*nonReducibleReason*/) {
|
||||
// UINFO(0, " NR: " << nonReducibleReason << " " << name() << endl);
|
||||
// UINFO(0, " NR: " << nonReducibleReason << " " << name());
|
||||
m_reducible = false;
|
||||
}
|
||||
void clearDedupable(const char* /*nonDedupableReason*/) {
|
||||
// UINFO(0, " ND: " << nonDedupableReason << " " << name() << endl);
|
||||
// UINFO(0, " ND: " << nonDedupableReason << " " << name());
|
||||
m_dedupable = false;
|
||||
}
|
||||
void clearReducibleAndDedupable(const char* nonReducibleReason) {
|
||||
|
|
@ -160,7 +160,7 @@ public:
|
|||
GateVarVertex* makeVarVertex(AstVarScope* vscp) {
|
||||
GateVarVertex* vVtxp = reinterpret_cast<GateVarVertex*>(vscp->user1p());
|
||||
if (!vVtxp) {
|
||||
UINFO(6, "New vertex " << vscp << endl);
|
||||
UINFO(6, "New vertex " << vscp);
|
||||
vVtxp = new GateVarVertex{this, vscp};
|
||||
vscp->user1p(vVtxp);
|
||||
if (vscp->varp()->sensIfacep()) {
|
||||
|
|
@ -381,7 +381,7 @@ class GateConcatVisitor final : public VNVisitorConst {
|
|||
nodep->user2(true);
|
||||
m_found_offset = m_offset;
|
||||
m_found = true;
|
||||
UINFO(9, "CLK DECOMP Concat found var (off = " << m_offset << ") - " << nodep << endl);
|
||||
UINFO(9, "CLK DECOMP Concat found var (off = " << m_offset << ") - " << nodep);
|
||||
}
|
||||
m_offset += nodep->dtypep()->width();
|
||||
}
|
||||
|
|
@ -431,7 +431,7 @@ class GateClkDecomp final {
|
|||
// Check that we haven't been here before
|
||||
if (vscp->user2SetOnce()) return;
|
||||
|
||||
UINFO(9, "CLK DECOMP Var - " << vVtxp << " : " << vscp << endl);
|
||||
UINFO(9, "CLK DECOMP Var - " << vVtxp << " : " << vscp);
|
||||
VL_RESTORER(m_clkVectors);
|
||||
if (vscp->varp()->width() > 1) {
|
||||
m_clkVectors = true;
|
||||
|
|
@ -499,7 +499,7 @@ class GateClkDecomp final {
|
|||
|
||||
explicit GateClkDecomp(GateGraph& graph)
|
||||
: m_graph{graph} {
|
||||
UINFO(9, "Starting clock decomposition" << endl);
|
||||
UINFO(9, "Starting clock decomposition");
|
||||
for (V3GraphVertex& vtx : graph.vertices()) {
|
||||
GateVarVertex* const vVtxp = vtx.cast<GateVarVertex>();
|
||||
if (!vVtxp) continue;
|
||||
|
|
@ -508,7 +508,7 @@ class GateClkDecomp final {
|
|||
if (vscp->varp()->attrClocker() != VVarAttrClocker::CLOCKER_YES) continue;
|
||||
|
||||
if (vscp->varp()->width() == 1) {
|
||||
UINFO(9, "CLK DECOMP - " << vVtxp << " : " << vscp << endl);
|
||||
UINFO(9, "CLK DECOMP - " << vVtxp << " : " << vscp);
|
||||
m_clkVtxp = vVtxp;
|
||||
visit(vVtxp, 0);
|
||||
}
|
||||
|
|
@ -544,7 +544,7 @@ class GateOkVisitor final : public VNVisitorConst {
|
|||
|
||||
// METHODS
|
||||
void clearSimple(const char* because) {
|
||||
if (m_isSimple) UINFO(9, "Clear simple " << because << endl);
|
||||
if (m_isSimple) UINFO(9, "Clear simple " << because);
|
||||
m_isSimple = false;
|
||||
}
|
||||
|
||||
|
|
@ -619,7 +619,7 @@ class GateOkVisitor final : public VNVisitorConst {
|
|||
|
||||
if (!(m_dedupe ? nodep->isGateDedupable() : nodep->isGateOptimizable()) //
|
||||
|| !nodep->isPure() || nodep->isBrancher()) {
|
||||
UINFO(5, "Non optimizable type: " << nodep << endl);
|
||||
UINFO(5, "Non optimizable type: " << nodep);
|
||||
clearSimple("Non optimizable type");
|
||||
return;
|
||||
}
|
||||
|
|
@ -815,7 +815,7 @@ class GateInline final {
|
|||
if (!okVisitor.varAssigned(vVtxp->varScp())) continue;
|
||||
if (excludedWide(vVtxp, okVisitor.substitutionp())) {
|
||||
++m_statExcluded;
|
||||
UINFO(9, "Gate inline exclude '" << vVtxp->name() << "'" << endl);
|
||||
UINFO(9, "Gate inline exclude '" << vVtxp->name() << "'");
|
||||
vVtxp->clearReducible("Excluded wide"); // Check once.
|
||||
continue;
|
||||
}
|
||||
|
|
@ -1153,18 +1153,18 @@ class GateDedupe final {
|
|||
|
||||
++m_statDedupLogic;
|
||||
GateVarVertex* const dupVVtxp = dupRefp->varScopep()->user1u().to<GateVarVertex*>();
|
||||
UINFO(4, "replacing " << vVtxp << " with " << dupVVtxp << endl);
|
||||
UINFO(4, "replacing " << vVtxp << " with " << dupVVtxp);
|
||||
|
||||
// Replace all of this varvertex's consumers with dupRefp
|
||||
for (V3GraphEdge* const edgep : vVtxp->outEdges().unlinkable()) {
|
||||
const GateLogicVertex* const consumerVtxp = edgep->top()->as<GateLogicVertex>();
|
||||
AstNode* const consumerp = consumerVtxp->nodep();
|
||||
UINFO(9, "elim src vtx" << lVtxp << " node " << lVtxp->nodep() << endl);
|
||||
UINFO(9, "elim cons vtx" << consumerVtxp << " node " << consumerp << endl);
|
||||
UINFO(9, "elim var vtx " << vVtxp << " node " << vVtxp->varScp() << endl);
|
||||
UINFO(9, "replace with " << dupRefp << endl);
|
||||
UINFO(9, "elim src vtx" << lVtxp << " node " << lVtxp->nodep());
|
||||
UINFO(9, "elim cons vtx" << consumerVtxp << " node " << consumerp);
|
||||
UINFO(9, "elim var vtx " << vVtxp << " node " << vVtxp->varScp());
|
||||
UINFO(9, "replace with " << dupRefp);
|
||||
if (lVtxp == consumerVtxp) {
|
||||
UINFO(9, "skipping as self-recirculates\n");
|
||||
UINFO(9, "skipping as self-recirculates");
|
||||
} else {
|
||||
// Substitute consumer logic
|
||||
consumerp->foreach([&](AstNodeVarRef* refp) {
|
||||
|
|
@ -1213,14 +1213,14 @@ class GateDedupe final {
|
|||
|
||||
explicit GateDedupe(GateGraph& graph) {
|
||||
// Traverse starting from each of the clocks
|
||||
UINFO(9, "Gate dedupe() clocks:\n");
|
||||
UINFO(9, "Gate dedupe() clocks:");
|
||||
for (V3GraphVertex& vtx : graph.vertices()) {
|
||||
if (GateVarVertex* const vVtxp = vtx.cast<GateVarVertex>()) {
|
||||
if (vVtxp->isClock()) visit(vVtxp);
|
||||
}
|
||||
}
|
||||
// Traverse starting from each of the outputs
|
||||
UINFO(9, "Gate dedupe() outputs:\n");
|
||||
UINFO(9, "Gate dedupe() outputs:");
|
||||
for (V3GraphVertex& vtx : graph.vertices()) {
|
||||
if (GateVarVertex* const vVtxp = vtx.cast<GateVarVertex>()) {
|
||||
if (vVtxp->isTop() && vVtxp->varScp()->varp()->isWritable()) visit(vVtxp);
|
||||
|
|
@ -1287,7 +1287,7 @@ class GateMergeAssignments final {
|
|||
AstSel* const currSelp = VN_AS(assignp->lhsp(), Sel);
|
||||
|
||||
if (AstSel* const newSelp = merge(prevSelp, currSelp)) {
|
||||
UINFO(5, "assemble to new sel: " << newSelp << endl);
|
||||
UINFO(5, "assemble to new sel: " << newSelp);
|
||||
// replace preSel with newSel
|
||||
prevSelp->replaceWith(newSelp);
|
||||
VL_DO_DANGLING(prevSelp->deleteTree(), prevSelp);
|
||||
|
|
@ -1323,7 +1323,7 @@ class GateMergeAssignments final {
|
|||
|
||||
explicit GateMergeAssignments(GateGraph& graph)
|
||||
: m_graph{graph} {
|
||||
UINFO(6, "mergeAssigns\n");
|
||||
UINFO(6, "mergeAssigns");
|
||||
for (V3GraphVertex& vtx : graph.vertices()) {
|
||||
if (GateVarVertex* const vVtxp = vtx.cast<GateVarVertex>()) process(vVtxp);
|
||||
}
|
||||
|
|
@ -1386,7 +1386,7 @@ class GateUnused final {
|
|||
AstNode* const nodep = lVtxp->nodep();
|
||||
warnUnused(nodep);
|
||||
|
||||
UINFO(8, " Remove unconsumed " << nodep << endl);
|
||||
UINFO(8, " Remove unconsumed " << nodep);
|
||||
nodep->unlinkFrBack();
|
||||
VL_DO_DANGLING(nodep->deleteTree(), nodep);
|
||||
VL_DO_DANGLING(lVtxp->unlinkDelete(&m_graph), lVtxp);
|
||||
|
|
@ -1409,7 +1409,7 @@ public:
|
|||
// Pass entry point
|
||||
|
||||
void V3Gate::gateAll(AstNetlist* netlistp) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
|
||||
{
|
||||
// Build the graph
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ class GraphAcyc final {
|
|||
}
|
||||
void cutOrigEdge(V3GraphEdge* breakEdgep, const char* why) {
|
||||
// From the break edge, cut edges in original graph it represents
|
||||
UINFO(8, why << " CUT " << breakEdgep->fromp() << endl);
|
||||
UINFO(8, why << " CUT " << breakEdgep->fromp());
|
||||
breakEdgep->cut();
|
||||
const OrigEdgeList* const oEListp = static_cast<OrigEdgeList*>(breakEdgep->userp());
|
||||
if (!oEListp) {
|
||||
|
|
@ -168,8 +168,7 @@ class GraphAcyc final {
|
|||
// The breakGraph edge may represent multiple real edges; cut them all
|
||||
for (const auto& origEdgep : *oEListp) {
|
||||
origEdgep->cut();
|
||||
UINFO(8,
|
||||
" " << why << " " << origEdgep->fromp() << " ->" << origEdgep->top() << endl);
|
||||
UINFO(8, " " << why << " " << origEdgep->fromp() << " ->" << origEdgep->top());
|
||||
}
|
||||
}
|
||||
// Work Queue
|
||||
|
|
@ -280,7 +279,7 @@ void GraphAcyc::simplifyNone(GraphAcycVertex* avertexp) {
|
|||
// Likewise, vertices with no outputs
|
||||
if (avertexp->isDelete()) return;
|
||||
if (avertexp->inEmpty() || avertexp->outEmpty()) {
|
||||
UINFO(9, " SimplifyNoneRemove " << avertexp << endl);
|
||||
UINFO(9, " SimplifyNoneRemove " << avertexp);
|
||||
avertexp->setDelete(); // Mark so we won't delete it twice
|
||||
// Remove edges
|
||||
while (V3GraphEdge* const edgep = avertexp->outEdges().frontp()) {
|
||||
|
|
@ -305,7 +304,7 @@ void GraphAcyc::simplifyOne(GraphAcycVertex* avertexp) {
|
|||
// The in and out may be the same node; we'll make a loop
|
||||
// The in OR out may be THIS node; we can't delete it then.
|
||||
if (inVertexp != avertexp && outVertexp != avertexp) {
|
||||
UINFO(9, " SimplifyOneRemove " << avertexp << endl);
|
||||
UINFO(9, " SimplifyOneRemove " << avertexp);
|
||||
avertexp->setDelete(); // Mark so we won't delete it twice
|
||||
// Make a new edge connecting the two vertices directly
|
||||
// If both are breakable, we pick the one with less weight, else it's arbitrary
|
||||
|
|
@ -337,7 +336,7 @@ void GraphAcyc::simplifyOut(GraphAcycVertex* avertexp) {
|
|||
V3GraphEdge* const outEdgep = avertexp->outEdges().frontp();
|
||||
if (!outEdgep->cutable()) {
|
||||
V3GraphVertex* outVertexp = outEdgep->top();
|
||||
UINFO(9, " SimplifyOutRemove " << avertexp << endl);
|
||||
UINFO(9, " SimplifyOutRemove " << avertexp);
|
||||
avertexp->setDelete(); // Mark so we won't delete it twice
|
||||
for (V3GraphEdge* const inEdgep : avertexp->inEdges().unlinkable()) {
|
||||
V3GraphVertex* inVertexp = inEdgep->fromp();
|
||||
|
|
@ -377,16 +376,16 @@ void GraphAcyc::simplifyDup(GraphAcycVertex* avertexp) {
|
|||
if (!prevEdgep->cutable()) {
|
||||
// !cutable duplicates prev !cutable: we can ignore it, redundant
|
||||
// cutable duplicates prev !cutable: know it's not a relevant loop, ignore it
|
||||
UINFO(8, " DelDupEdge " << avertexp << " -> " << edgep->top() << endl);
|
||||
UINFO(8, " DelDupEdge " << avertexp << " -> " << edgep->top());
|
||||
VL_DO_DANGLING(edgep->unlinkDelete(), edgep);
|
||||
} else if (!edgep->cutable()) {
|
||||
// !cutable duplicates prev cutable: delete the earlier cutable
|
||||
UINFO(8, " DelDupPrev " << avertexp << " -> " << prevEdgep->top() << endl);
|
||||
UINFO(8, " DelDupPrev " << avertexp << " -> " << prevEdgep->top());
|
||||
VL_DO_DANGLING(prevEdgep->unlinkDelete(), prevEdgep);
|
||||
outVertexp->userp(edgep);
|
||||
} else {
|
||||
// cutable duplicates prev cutable: combine weights
|
||||
UINFO(8, " DelDupComb " << avertexp << " -> " << edgep->top() << endl);
|
||||
UINFO(8, " DelDupComb " << avertexp << " -> " << edgep->top());
|
||||
prevEdgep->weight(prevEdgep->weight() + edgep->weight());
|
||||
addOrigEdgep(prevEdgep, edgep);
|
||||
VL_DO_DANGLING(edgep->unlinkDelete(), edgep);
|
||||
|
|
@ -440,7 +439,7 @@ void GraphAcyc::place() {
|
|||
if (edge.weight() && edge.cutable()) ++numEdges;
|
||||
}
|
||||
}
|
||||
UINFO(4, " Cutable edges = " << numEdges << endl);
|
||||
UINFO(4, " Cutable edges = " << numEdges);
|
||||
|
||||
std::vector<V3GraphEdge*> edges; // List of all edges to be processed
|
||||
// Make the vector properly sized right off the bat -- faster than reallocating
|
||||
|
|
@ -463,8 +462,7 @@ void GraphAcyc::place() {
|
|||
void GraphAcyc::placeTryEdge(V3GraphEdge* edgep) {
|
||||
// Try to make this edge uncutable
|
||||
m_placeStep++;
|
||||
UINFO(8, " PlaceEdge s" << m_placeStep << " w" << edgep->weight() << " " << edgep->fromp()
|
||||
<< endl);
|
||||
UINFO(8, " PlaceEdge s" << m_placeStep << " w" << edgep->weight() << " " << edgep->fromp());
|
||||
// Make the edge uncutable so we detect it in placement
|
||||
edgep->cutable(false);
|
||||
// Vertex::m_user begin: number indicates this edge was completed
|
||||
|
|
@ -537,27 +535,27 @@ void GraphAcyc::main() {
|
|||
simplify(false);
|
||||
if (dumpGraphLevel() >= 5) m_breakGraph.dumpDotFilePrefixed("acyc_simp");
|
||||
|
||||
UINFO(4, " Cutting trivial loops\n");
|
||||
UINFO(4, " Cutting trivial loops");
|
||||
simplify(true);
|
||||
if (dumpGraphLevel() >= 6) m_breakGraph.dumpDotFilePrefixed("acyc_mid");
|
||||
|
||||
UINFO(4, " Ranking\n");
|
||||
UINFO(4, " Ranking");
|
||||
m_breakGraph.rank(&V3GraphEdge::followNotCutable);
|
||||
if (dumpGraphLevel() >= 6) m_breakGraph.dumpDotFilePrefixed("acyc_rank");
|
||||
|
||||
UINFO(4, " Placement\n");
|
||||
UINFO(4, " Placement");
|
||||
place();
|
||||
if (dumpGraphLevel() >= 6) m_breakGraph.dumpDotFilePrefixed("acyc_place");
|
||||
|
||||
UINFO(4, " Final Ranking\n");
|
||||
UINFO(4, " Final Ranking");
|
||||
// Only needed to assert there are no loops in completed graph
|
||||
m_breakGraph.rank(&V3GraphEdge::followAlwaysTrue);
|
||||
if (dumpGraphLevel() >= 6) m_breakGraph.dumpDotFilePrefixed("acyc_done");
|
||||
}
|
||||
|
||||
void V3Graph::acyclic(V3EdgeFuncP edgeFuncp) {
|
||||
UINFO(4, "Acyclic\n");
|
||||
UINFO(4, "Acyclic");
|
||||
GraphAcyc acyc{this, edgeFuncp};
|
||||
acyc.main();
|
||||
UINFO(4, "Acyclic done\n");
|
||||
UINFO(4, "Acyclic done");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -462,7 +462,7 @@ void V3Graph::sortEdges() {
|
|||
// (Results in better dcache packing.)
|
||||
|
||||
void V3Graph::order() {
|
||||
UINFO(2, "Order:\n");
|
||||
UINFO(2, "Order:");
|
||||
|
||||
// Compute rankings again
|
||||
rank(&V3GraphEdge::followAlwaysTrue);
|
||||
|
|
|
|||
|
|
@ -298,7 +298,7 @@ public:
|
|||
|
||||
void V3Graph::selfTest() {
|
||||
// Execute all of the tests
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{ V3GraphTestStrong{}.run(); }
|
||||
{ V3GraphTestAcyc{}.run(); }
|
||||
{ V3GraphTestVars{}.run(); }
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ class HasherVisitor final : public VNVisitorConst {
|
|||
|
||||
void visit(AstNode* nodep) override {
|
||||
#if VL_DEBUG
|
||||
UINFO(0, "%Warning: Hashing node as AstNode: " << nodep << endl);
|
||||
UINFO(0, "%Warning: Hashing node as AstNode: " << nodep);
|
||||
#endif
|
||||
m_hash += hashNodeAndIterate(nodep, HASH_DTYPE, HASH_CHILDREN, [=]() {});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -322,8 +322,7 @@ class HierBlockUsageCollectVisitor final : public VNVisitorConst {
|
|||
// Don't visit twice
|
||||
if (nodep->user1SetOnce()) return;
|
||||
UINFO(5, "Checking " << nodep->prettyNameQ() << " from "
|
||||
<< (m_hierBlockp ? m_hierBlockp->prettyNameQ() : "null"s)
|
||||
<< std::endl);
|
||||
<< (m_hierBlockp ? m_hierBlockp->prettyNameQ() : "null"s));
|
||||
VL_RESTORER(m_modp);
|
||||
AstModule* const prevHierBlockp = m_hierBlockp;
|
||||
ModuleSet prevReferred;
|
||||
|
|
@ -382,8 +381,8 @@ void V3HierBlockPlan::add(const AstNodeModule* modp, const V3HierBlockParams& pa
|
|||
if (pair.second) {
|
||||
V3HierBlock* hblockp = new V3HierBlock{modp, params};
|
||||
UINFO(3, "Add " << modp->prettyNameQ() << " with " << params.gparams().size()
|
||||
<< " parameters and " << params.gTypeParams().size() << " type parameters"
|
||||
<< std::endl);
|
||||
<< " parameters and " << params.gTypeParams().size()
|
||||
<< " type parameters");
|
||||
pair.first->second = hblockp;
|
||||
}
|
||||
}
|
||||
|
|
@ -394,7 +393,7 @@ void V3HierBlockPlan::registerUsage(const AstNodeModule* parentp, const AstNodeM
|
|||
const iterator child = m_blocks.find(childp);
|
||||
if (child != m_blocks.end()) {
|
||||
UINFO(3, "Found usage relation " << parentp->prettyNameQ() << " uses "
|
||||
<< childp->prettyNameQ() << std::endl);
|
||||
<< childp->prettyNameQ());
|
||||
parent->second->addChild(child->second);
|
||||
child->second->addParent(parent->second);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -94,13 +94,13 @@ class InlineMarkVisitor final : public VNVisitor {
|
|||
void cantInline(const char* reason, bool hard) {
|
||||
if (hard) {
|
||||
if (m_modp->user2() != CIL_NOTHARD) {
|
||||
UINFO(4, " No inline hard: " << reason << " " << m_modp << endl);
|
||||
UINFO(4, " No inline hard: " << reason << " " << m_modp);
|
||||
m_modp->user2(CIL_NOTHARD);
|
||||
++m_statUnsup;
|
||||
}
|
||||
} else {
|
||||
if (m_modp->user2() == CIL_MAYBE) {
|
||||
UINFO(4, " No inline soft: " << reason << " " << m_modp << endl);
|
||||
UINFO(4, " No inline soft: " << reason << " " << m_modp);
|
||||
m_modp->user2(CIL_NOTSOFT);
|
||||
}
|
||||
}
|
||||
|
|
@ -220,7 +220,7 @@ class InlineMarkVisitor final : public VNVisitor {
|
|||
|| refs * statements < v3Global.opt.inlineMult());
|
||||
m_moduleState(modp).m_inlined = doit;
|
||||
UINFO(4, " Inline=" << doit << " Possible=" << allowed << " Refs=" << refs
|
||||
<< " Stmts=" << statements << " " << modp << endl);
|
||||
<< " Stmts=" << statements << " " << modp);
|
||||
}
|
||||
}
|
||||
//--------------------
|
||||
|
|
@ -261,7 +261,7 @@ class InlineRelinkVisitor final : public VNVisitor {
|
|||
m_modp->addInlinesp(nodep);
|
||||
// Rename
|
||||
nodep->name(m_cellp->name() + "__DOT__" + nodep->name());
|
||||
UINFO(6, " Inline " << nodep << endl);
|
||||
UINFO(6, " Inline " << nodep);
|
||||
// Do CellInlines under this, but don't move them
|
||||
iterateChildren(nodep);
|
||||
}
|
||||
|
|
@ -285,7 +285,7 @@ class InlineRelinkVisitor final : public VNVisitor {
|
|||
FileLine* const flp = nodep->fileline();
|
||||
AstConst* const exprconstp = VN_CAST(nodep->user2p(), Const);
|
||||
AstVarRef* exprvarrefp = VN_CAST(nodep->user2p(), VarRef);
|
||||
UINFO(8, "connectto: " << nodep->user2p() << endl);
|
||||
UINFO(8, "connectto: " << nodep->user2p());
|
||||
UASSERT_OBJ(exprconstp || exprvarrefp, nodep,
|
||||
"Unknown interconnect type; pinReconnectSimple should have cleared up");
|
||||
if (exprconstp) {
|
||||
|
|
@ -296,7 +296,7 @@ class InlineRelinkVisitor final : public VNVisitor {
|
|||
// Public variable at the lower module end - we need to make sure we propagate
|
||||
// the logic changes up and down; if we aliased, we might
|
||||
// remove the change detection on the output variable.
|
||||
UINFO(9, "public pin assign: " << exprvarrefp << endl);
|
||||
UINFO(9, "public pin assign: " << exprvarrefp);
|
||||
UASSERT_OBJ(!nodep->isNonOutput(), nodep, "Outputs only - inputs use AssignAlias");
|
||||
m_modp->addStmtsp(new AstAssignW{flp, exprvarrefp->cloneTree(false),
|
||||
new AstVarRef{flp, nodep, VAccess::READ}});
|
||||
|
|
@ -304,7 +304,7 @@ class InlineRelinkVisitor final : public VNVisitor {
|
|||
// Public variable at this end and it is an unpacked array. We need to assign
|
||||
// instead of aliased, because otherwise it will pass V3Slice and invalid
|
||||
// code will be emitted.
|
||||
UINFO(9, "assign to public and unpacked: " << nodep << endl);
|
||||
UINFO(9, "assign to public and unpacked: " << nodep);
|
||||
exprvarrefp = exprvarrefp->cloneTree(false);
|
||||
exprvarrefp->access(VAccess::READ);
|
||||
nodep->user4(true); // Making assignment to it
|
||||
|
|
@ -387,7 +387,7 @@ class InlineRelinkVisitor final : public VNVisitor {
|
|||
if (AstVarRef* const varrefp = VN_CAST(nodep->lhsp(), VarRef)) {
|
||||
if (m_initialStatic && varrefp->varp()->user2() && varrefp->varp()->user4()) {
|
||||
// Initial assignment to i/o we are overriding, can remove
|
||||
UINFO(9, "Remove InitialStatic " << nodep << endl);
|
||||
UINFO(9, "Remove InitialStatic " << nodep);
|
||||
VL_DO_DANGLING(pushDeletep(nodep->unlinkFrBack()), nodep);
|
||||
return;
|
||||
}
|
||||
|
|
@ -438,7 +438,7 @@ class InlineRelinkVisitor final : public VNVisitor {
|
|||
if (m_renamedInterfaces.count(nodep->dotted())) {
|
||||
nodep->dotted(m_cellp->name() + "__DOT__" + nodep->dotted());
|
||||
}
|
||||
UINFO(8, " " << nodep << endl);
|
||||
UINFO(8, " " << nodep);
|
||||
iterateChildren(nodep);
|
||||
}
|
||||
|
||||
|
|
@ -502,7 +502,7 @@ class InlineVisitor final : public VNVisitor {
|
|||
|
||||
// METHODS
|
||||
void inlineCell(AstCell* nodep) {
|
||||
UINFO(5, " Inline CELL " << nodep << endl);
|
||||
UINFO(5, " Inline CELL " << nodep);
|
||||
|
||||
const VNUser2InUse user2InUse;
|
||||
const VNUser3InUse user3InUse;
|
||||
|
|
@ -550,7 +550,7 @@ class InlineVisitor final : public VNVisitor {
|
|||
// Create assignments to the pins
|
||||
for (AstPin* pinp = nodep->pinsp(); pinp; pinp = VN_AS(pinp->nextp(), Pin)) {
|
||||
if (!pinp->exprp()) continue;
|
||||
UINFO(6, " Pin change from " << pinp->modVarp() << endl);
|
||||
UINFO(6, " Pin change from " << pinp->modVarp());
|
||||
|
||||
AstNode* const connectRefp = pinp->exprp();
|
||||
UASSERT_OBJ(VN_IS(connectRefp, Const) || VN_IS(connectRefp, VarRef), pinp,
|
||||
|
|
@ -572,8 +572,8 @@ class InlineVisitor final : public VNVisitor {
|
|||
// One to one interconnect won't make a temporary variable.
|
||||
// This prevents creating a lot of extra wires for clock signals.
|
||||
// It will become a tracing alias.
|
||||
UINFO(6, "One-to-one " << connectRefp << endl);
|
||||
UINFO(6, " -to " << pinNewVarp << endl);
|
||||
UINFO(6, "One-to-one " << connectRefp);
|
||||
UINFO(6, " -to " << pinNewVarp);
|
||||
pinNewVarp->user2p(connectRefp);
|
||||
// Public output inside the cell must go via an assign rather
|
||||
// than alias. Else the public logic will set the alias, losing
|
||||
|
|
@ -648,7 +648,7 @@ public:
|
|||
// Inline class functions
|
||||
|
||||
void V3Inline::inlineAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
|
||||
{
|
||||
const VNUser1InUse m_inuser1; // output of InlineMarkVisitor, input to InlineVisitor.
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ class InstVisitor final : public VNVisitor {
|
|||
|
||||
// VISITORS
|
||||
void visit(AstCell* nodep) override {
|
||||
UINFO(4, " CELL " << nodep << endl);
|
||||
UINFO(4, " CELL " << nodep);
|
||||
VL_RESTORER(m_cellp);
|
||||
m_cellp = nodep;
|
||||
// VV***** We reset user1p() on each cell!!!
|
||||
|
|
@ -53,7 +53,7 @@ class InstVisitor final : public VNVisitor {
|
|||
void visit(AstPin* nodep) override {
|
||||
// PIN(p,expr) -> ASSIGNW(VARXREF(p),expr) (if sub's input)
|
||||
// or ASSIGNW(expr,VARXREF(p)) (if sub's output)
|
||||
UINFO(4, " PIN " << nodep << endl);
|
||||
UINFO(4, " PIN " << nodep);
|
||||
if (!nodep->user1()) {
|
||||
// Simplify it
|
||||
V3Inst::pinReconnectSimple(nodep, m_cellp, false);
|
||||
|
|
@ -134,7 +134,7 @@ private:
|
|||
// VISITORS
|
||||
void visit(AstVar* nodep) override {
|
||||
if (VN_IS(nodep->dtypep(), IfaceRefDType)) {
|
||||
UINFO(8, " dm-1-VAR " << nodep << endl);
|
||||
UINFO(8, " dm-1-VAR " << nodep);
|
||||
insert(nodep);
|
||||
}
|
||||
iterateChildrenConst(nodep);
|
||||
|
|
@ -145,7 +145,7 @@ private:
|
|||
public:
|
||||
// METHODS
|
||||
void insert(AstVar* nodep) {
|
||||
UINFO(8, " dmINSERT " << nodep << endl);
|
||||
UINFO(8, " dmINSERT " << nodep);
|
||||
m_modVarNameMap.emplace(nodep->name(), nodep);
|
||||
}
|
||||
AstVar* find(const string& name) {
|
||||
|
|
@ -166,7 +166,7 @@ public:
|
|||
InstDeModVarVisitor() = default;
|
||||
~InstDeModVarVisitor() override = default;
|
||||
void main(AstNodeModule* nodep) {
|
||||
UINFO(8, " dmMODULE " << nodep << endl);
|
||||
UINFO(8, " dmMODULE " << nodep);
|
||||
m_modVarNameMap.clear();
|
||||
iterateConst(nodep);
|
||||
}
|
||||
|
|
@ -190,12 +190,12 @@ private:
|
|||
if (VN_AS(VN_AS(nodep->dtypep(), UnpackArrayDType)->subDTypep(), IfaceRefDType)
|
||||
->isVirtual())
|
||||
return;
|
||||
UINFO(8, " dv-vec-VAR " << nodep << endl);
|
||||
UINFO(8, " dv-vec-VAR " << nodep);
|
||||
AstUnpackArrayDType* const arrdtype = VN_AS(nodep->dtypep(), UnpackArrayDType);
|
||||
AstNode* prevp = nullptr;
|
||||
for (int i = arrdtype->lo(); i <= arrdtype->hi(); ++i) {
|
||||
const string varNewName = nodep->name() + "__BRA__" + cvtToStr(i) + "__KET__";
|
||||
UINFO(8, "VAR name insert " << varNewName << " " << nodep << endl);
|
||||
UINFO(8, "VAR name insert " << varNewName << " " << nodep);
|
||||
if (!m_deModVars.find(varNewName)) {
|
||||
AstIfaceRefDType* const ifaceRefp
|
||||
= VN_AS(arrdtype->subDTypep(), IfaceRefDType)->cloneTree(false);
|
||||
|
|
@ -224,7 +224,7 @@ private:
|
|||
}
|
||||
|
||||
void visit(AstCell* nodep) override {
|
||||
UINFO(4, " CELL " << nodep << endl);
|
||||
UINFO(4, " CELL " << nodep);
|
||||
// Find submodule vars
|
||||
UASSERT_OBJ(nodep->modp(), nodep, "Unlinked");
|
||||
m_deModVars.main(nodep->modp());
|
||||
|
|
@ -256,7 +256,7 @@ private:
|
|||
// The spec says we add [x], but that won't work in C...
|
||||
newp->name(newp->name() + "__BRA__" + cvtToStr(instNum) + "__KET__");
|
||||
newp->origName(newp->origName() + "__BRA__" + cvtToStr(instNum) + "__KET__");
|
||||
UINFO(8, " CELL loop " << newp << endl);
|
||||
UINFO(8, " CELL loop " << newp);
|
||||
|
||||
// If this AstCell is actually an interface instantiation, also clone the IfaceRef
|
||||
// within the same parent module as the cell
|
||||
|
|
@ -307,19 +307,18 @@ private:
|
|||
// Any non-direct pins need reconnection with a part-select
|
||||
if (!nodep->exprp()) return; // No-connect
|
||||
if (m_cellRangep) {
|
||||
UINFO(4, " PIN " << nodep << endl);
|
||||
UINFO(4, " PIN " << nodep);
|
||||
const int modwidth = nodep->modVarp()->width();
|
||||
const int expwidth = nodep->exprp()->width();
|
||||
const std::pair<uint32_t, uint32_t> pinDim
|
||||
= nodep->modVarp()->dtypep()->dimensions(false);
|
||||
const std::pair<uint32_t, uint32_t> expDim
|
||||
= nodep->exprp()->dtypep()->dimensions(false);
|
||||
UINFO(4, " PINVAR " << nodep->modVarp() << endl);
|
||||
UINFO(4, " EXP " << nodep->exprp() << endl);
|
||||
UINFO(4, " PINVAR " << nodep->modVarp());
|
||||
UINFO(4, " EXP " << nodep->exprp());
|
||||
UINFO(4, " expwidth=" << expwidth << " modwidth=" << modwidth
|
||||
<< " expDim(p,u)=" << expDim.first << "," << expDim.second
|
||||
<< " pinDim(p,u)=" << pinDim.first << "," << pinDim.second
|
||||
<< endl);
|
||||
<< " pinDim(p,u)=" << pinDim.first << "," << pinDim.second);
|
||||
if (expDim.second == pinDim.second + 1) {
|
||||
// Connection to array, where array dimensions match the instant dimension
|
||||
const AstRange* const rangep
|
||||
|
|
@ -662,7 +661,7 @@ public:
|
|||
// See also V3Inst
|
||||
AstNodeExpr* rhsp = new AstVarRef{pinp->fileline(), newvarp, VAccess::READ};
|
||||
UINFO(5, "pinRecon width " << pinVarp->width() << " >? " << rhsp->width() << " >? "
|
||||
<< pinexprp->width() << endl);
|
||||
<< pinexprp->width());
|
||||
rhsp = extendOrSel(pinp->fileline(), rhsp, pinVarp);
|
||||
pinp->exprp(new AstVarRef{newvarp->fileline(), newvarp, VAccess::WRITE});
|
||||
AstNodeExpr* const rhsSelp = extendOrSel(pinp->fileline(), rhsp, pinexprp);
|
||||
|
|
@ -706,13 +705,13 @@ void V3Inst::checkOutputShort(AstPin* nodep) {
|
|||
// Inst class visitor
|
||||
|
||||
void V3Inst::instAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{ InstVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("inst", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
||||
void V3Inst::dearrayAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{ InstDeVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("dearray", 0, dumpTreeEitherLevel() >= 6);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ private:
|
|||
return savedCount;
|
||||
}
|
||||
void endVisitBase(uint32_t savedCount, AstNode* nodep) {
|
||||
UINFO(8, "cost " << std::setw(6) << std::left << m_instrCount << " " << nodep << endl);
|
||||
UINFO(8, "cost " << std::setw(6) << std::left << m_instrCount << " " << nodep);
|
||||
markCost(nodep);
|
||||
if (!m_ignoreRemaining) m_instrCount += savedCount;
|
||||
}
|
||||
|
|
@ -168,13 +168,13 @@ private:
|
|||
iterateAndNextConstNull(nodep->condp());
|
||||
const uint32_t savedCount = m_instrCount;
|
||||
|
||||
UINFO(8, "thensp:\n");
|
||||
UINFO(8, "thensp:");
|
||||
reset();
|
||||
iterateAndNextConstNull(nodep->thensp());
|
||||
uint32_t ifCount = m_instrCount;
|
||||
if (nodep->branchPred().unlikely()) ifCount = 0;
|
||||
|
||||
UINFO(8, "elsesp:\n");
|
||||
UINFO(8, "elsesp:");
|
||||
reset();
|
||||
iterateAndNextConstNull(nodep->elsesp());
|
||||
uint32_t elseCount = m_instrCount;
|
||||
|
|
@ -197,12 +197,12 @@ private:
|
|||
iterateAndNextConstNull(nodep->condp());
|
||||
const uint32_t savedCount = m_instrCount;
|
||||
|
||||
UINFO(8, "?\n");
|
||||
UINFO(8, "?");
|
||||
reset();
|
||||
iterateAndNextConstNull(nodep->thenp());
|
||||
const uint32_t ifCount = m_instrCount;
|
||||
|
||||
UINFO(8, ":\n");
|
||||
UINFO(8, ":");
|
||||
reset();
|
||||
iterateAndNextConstNull(nodep->elsep());
|
||||
const uint32_t elseCount = m_instrCount;
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ public:
|
|||
// Interface class functions
|
||||
|
||||
void V3Interface::interfaceAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
|
||||
{ InlineIntfRefVisitor{nodep}; }
|
||||
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ public:
|
|||
// we just don't optimize any public sigs
|
||||
// Check the var entry, and remove if appropriate
|
||||
if (AstNodeStmt* const oldassp = entp->assignp()) {
|
||||
UINFO(7, " PREV: " << oldassp << endl);
|
||||
UINFO(7, " PREV: " << oldassp);
|
||||
// Redundant assignment, in same level block
|
||||
// Don't delete it now as it will confuse iteration since it maybe WAY
|
||||
// above our current iteration point.
|
||||
|
|
@ -166,8 +166,8 @@ public:
|
|||
}
|
||||
void resetStatement(AstVarScope* nodep, AstCReset* rstp) {
|
||||
// Do we have a old assignment we can nuke?
|
||||
UINFO(4, " CRESETof: " << nodep << endl);
|
||||
UINFO(7, " new: " << rstp << endl);
|
||||
UINFO(4, " CRESETof: " << nodep);
|
||||
UINFO(7, " new: " << rstp);
|
||||
const auto pair = m_map.emplace(std::piecewise_construct, //
|
||||
std::forward_as_tuple(nodep),
|
||||
std::forward_as_tuple(LifeVarEntry::CRESET{}, rstp));
|
||||
|
|
@ -179,8 +179,8 @@ public:
|
|||
}
|
||||
void simpleAssign(AstVarScope* nodep, AstNodeAssign* assp) {
|
||||
// Do we have a old assignment we can nuke?
|
||||
UINFO(4, " ASSIGNof: " << nodep << endl);
|
||||
UINFO(7, " new: " << assp << endl);
|
||||
UINFO(4, " ASSIGNof: " << nodep);
|
||||
UINFO(7, " new: " << assp);
|
||||
const auto pair = m_map.emplace(std::piecewise_construct, //
|
||||
std::forward_as_tuple(nodep),
|
||||
std::forward_as_tuple(LifeVarEntry::SIMPLEASSIGN{}, assp));
|
||||
|
|
@ -191,7 +191,7 @@ public:
|
|||
// lifeDump();
|
||||
}
|
||||
void complexAssign(AstVarScope* nodep) {
|
||||
UINFO(4, " clearof: " << nodep << endl);
|
||||
UINFO(4, " clearof: " << nodep);
|
||||
const auto pair = m_map.emplace(nodep, LifeVarEntry::COMPLEXASSIGN{});
|
||||
if (!pair.second) pair.first->second.complexAssign();
|
||||
}
|
||||
|
|
@ -205,7 +205,7 @@ public:
|
|||
if (!varrefp->varp()->isSigPublic() && !varrefp->varp()->sensIfacep()) {
|
||||
// Aha, variable is constant; substitute in.
|
||||
// We'll later constant propagate
|
||||
UINFO(4, " replaceconst: " << varrefp << endl);
|
||||
UINFO(4, " replaceconst: " << varrefp);
|
||||
varrefp->replaceWith(constp->cloneTree(false));
|
||||
m_replacedVref = true;
|
||||
VL_DO_DANGLING(varrefp->deleteTree(), varrefp);
|
||||
|
|
@ -213,14 +213,14 @@ public:
|
|||
return; // **DONE, no longer a var reference**
|
||||
}
|
||||
}
|
||||
UINFO(4, " usage: " << nodep << endl);
|
||||
UINFO(4, " usage: " << nodep);
|
||||
pair.first->second.consumed();
|
||||
}
|
||||
}
|
||||
void complexAssignFind(AstVarScope* nodep) {
|
||||
const auto pair = m_map.emplace(nodep, LifeVarEntry::COMPLEXASSIGN{});
|
||||
if (!pair.second) {
|
||||
UINFO(4, " casfind: " << pair.first->first << endl);
|
||||
UINFO(4, " casfind: " << pair.first->first);
|
||||
pair.first->second.complexAssign();
|
||||
}
|
||||
}
|
||||
|
|
@ -257,7 +257,7 @@ public:
|
|||
AstVarScope* const nodep = itr.first;
|
||||
if (itr.second.setBeforeUse() && nodep->user1()) {
|
||||
// Both branches set the var, we can remove the assignment before the IF.
|
||||
UINFO(4, "DUALBRANCH " << nodep << endl);
|
||||
UINFO(4, "DUALBRANCH " << nodep);
|
||||
const auto itab = m_map.find(nodep);
|
||||
if (itab != m_map.end()) checkRemoveAssign(itab);
|
||||
}
|
||||
|
|
@ -267,12 +267,12 @@ public:
|
|||
void clear() { m_map.clear(); }
|
||||
// DEBUG
|
||||
void lifeDump() {
|
||||
UINFO(5, " LifeMap:" << endl);
|
||||
UINFO(5, " LifeMap:");
|
||||
for (const auto& itr : m_map) {
|
||||
UINFO(5, " Ent: " << (itr.second.setBeforeUse() ? "[F] " : " ") << itr.first
|
||||
<< endl);
|
||||
UINFO(5,
|
||||
" Ent: " << (itr.second.setBeforeUse() ? "[F] " : " ") << itr.first);
|
||||
if (itr.second.assignp()) { //
|
||||
UINFO(5, " Ass: " << itr.second.assignp() << endl);
|
||||
UINFO(5, " Ass: " << itr.second.assignp());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -363,7 +363,7 @@ class LifeVisitor final : public VNVisitor {
|
|||
|
||||
//---- Track control flow changes
|
||||
void visit(AstNodeIf* nodep) override {
|
||||
UINFO(4, " IF " << nodep << endl);
|
||||
UINFO(4, " IF " << nodep);
|
||||
// Condition is part of PREVIOUS block
|
||||
iterateAndNextNull(nodep->condp());
|
||||
LifeBlock* const prevLifep = m_lifep;
|
||||
|
|
@ -378,7 +378,7 @@ class LifeVisitor final : public VNVisitor {
|
|||
iterateAndNextNull(nodep->elsesp());
|
||||
}
|
||||
m_lifep = prevLifep;
|
||||
UINFO(4, " join " << endl);
|
||||
UINFO(4, " join ");
|
||||
// Find sets on both flows
|
||||
m_lifep->dualBranch(ifLifep, elseLifep);
|
||||
// For the next assignments, clear any variables that were read or written in the block
|
||||
|
|
@ -410,7 +410,7 @@ class LifeVisitor final : public VNVisitor {
|
|||
iterateAndNextNull(nodep->incsp());
|
||||
}
|
||||
m_lifep = prevLifep;
|
||||
UINFO(4, " joinfor" << endl);
|
||||
UINFO(4, " joinfor");
|
||||
// For the next assignments, clear any variables that were read or written in the block
|
||||
condLifep->lifeToAbove();
|
||||
bodyLifep->lifeToAbove();
|
||||
|
|
@ -430,13 +430,13 @@ class LifeVisitor final : public VNVisitor {
|
|||
iterateAndNextNull(nodep->stmtsp());
|
||||
m_lifep = prevLifep;
|
||||
}
|
||||
UINFO(4, " joinjump" << endl);
|
||||
UINFO(4, " joinjump");
|
||||
// For the next assignments, clear any variables that were read or written in the block
|
||||
bodyLifep->lifeToAbove();
|
||||
VL_DO_DANGLING(delete bodyLifep, bodyLifep);
|
||||
}
|
||||
void visit(AstNodeCCall* nodep) override {
|
||||
// UINFO(4, " CCALL " << nodep << endl);
|
||||
// UINFO(4, " CCALL " << nodep);
|
||||
iterateChildren(nodep);
|
||||
// Enter the function and trace it
|
||||
// else is non-inline or public function we optimize separately
|
||||
|
|
@ -448,7 +448,7 @@ class LifeVisitor final : public VNVisitor {
|
|||
}
|
||||
}
|
||||
void visit(AstCFunc* nodep) override {
|
||||
// UINFO(4, " CFUNC " << nodep << endl);
|
||||
// UINFO(4, " CFUNC " << nodep);
|
||||
if (!m_tracingCall && !nodep->entryPoint()) return;
|
||||
m_tracingCall = false;
|
||||
if (nodep->recursive()) setNoopt();
|
||||
|
|
@ -479,7 +479,7 @@ public:
|
|||
// CONSTRUCTORS
|
||||
LifeVisitor(AstNode* nodep, LifeState* statep)
|
||||
: m_statep{statep} {
|
||||
UINFO(4, " LifeVisitor on " << nodep << endl);
|
||||
UINFO(4, " LifeVisitor on " << nodep);
|
||||
{
|
||||
m_lifep = new LifeBlock{nullptr, m_statep};
|
||||
iterate(nodep);
|
||||
|
|
@ -530,7 +530,7 @@ public:
|
|||
// Life class functions
|
||||
|
||||
void V3Life::lifeAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{
|
||||
LifeState state;
|
||||
LifeTopVisitor{nodep, &state};
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ class LifePostElimVisitor final : public VNVisitor {
|
|||
const AstVarScope* const vscp = nodep->varScopep();
|
||||
UASSERT_OBJ(vscp, nodep, "Scope not assigned");
|
||||
if (AstVarScope* const newvscp = reinterpret_cast<AstVarScope*>(vscp->user4p())) {
|
||||
UINFO(9, " Replace " << nodep << " to " << newvscp << endl);
|
||||
UINFO(9, " Replace " << nodep << " to " << newvscp);
|
||||
AstVarRef* const newrefp = new AstVarRef{nodep->fileline(), newvscp, nodep->access()};
|
||||
nodep->replaceWith(newrefp);
|
||||
VL_DO_DANGLING(nodep->deleteTree(), nodep);
|
||||
|
|
@ -243,7 +243,7 @@ class LifePostDlyVisitor final : public VNVisitor {
|
|||
if (!canScrunch) continue;
|
||||
|
||||
// Delete and mark so LifePostElimVisitor will get it
|
||||
UINFO(4, " DELETE " << app->nodep << endl);
|
||||
UINFO(4, " DELETE " << app->nodep);
|
||||
dlyVarp->user4p(origVarp);
|
||||
VL_DO_DANGLING(app->nodep->unlinkFrBack()->deleteTree(), app->nodep);
|
||||
++m_statAssnDel;
|
||||
|
|
@ -360,7 +360,7 @@ public:
|
|||
// LifePost class functions
|
||||
|
||||
void V3LifePost::lifepostAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
// Mark redundant AssignPost
|
||||
{ LifePostDlyVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("life_post", 0, dumpTreeEitherLevel() >= 3);
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ class LinkCellsVisitor final : public VNVisitor {
|
|||
}
|
||||
void newEdge(V3GraphVertex* fromp, V3GraphVertex* top, int weight, bool cuttable) {
|
||||
const V3GraphEdge* const edgep = new V3GraphEdge{&m_graph, fromp, top, weight, cuttable};
|
||||
UINFO(9, " newEdge " << edgep << " " << fromp->name() << " -> " << top->name() << endl);
|
||||
UINFO(9, " newEdge " << edgep << " " << fromp->name() << " -> " << top->name());
|
||||
}
|
||||
|
||||
AstNodeModule* findModuleSym(const string& modName) {
|
||||
|
|
@ -186,7 +186,7 @@ class LinkCellsVisitor final : public VNVisitor {
|
|||
if (m_modp) newEdge(vertex(m_modp), vertex(nodep), 1, false);
|
||||
//
|
||||
m_modp = nodep;
|
||||
UINFO(4, "Link Module: " << nodep << endl);
|
||||
UINFO(4, "Link Module: " << nodep);
|
||||
if (nodep->fileline()->filebasenameNoExt() != nodep->prettyName()
|
||||
&& !v3Global.opt.isLibraryFile(nodep->fileline()->filename())
|
||||
&& !VN_IS(nodep, NotFoundModule) && !nodep->recursiveClone()
|
||||
|
|
@ -207,7 +207,7 @@ class LinkCellsVisitor final : public VNVisitor {
|
|||
const bool topMatch = (v3Global.opt.topModule() == nodep->prettyName());
|
||||
if (topMatch) {
|
||||
m_topVertexp = vertex(nodep);
|
||||
UINFO(2, "Link --top-module: " << nodep << endl);
|
||||
UINFO(2, "Link --top-module: " << nodep);
|
||||
nodep->inLibrary(false); // Safer to make sure it doesn't disappear
|
||||
}
|
||||
if (v3Global.opt.topModule() == "" ? nodep->inLibrary() // Library cells are lower
|
||||
|
|
@ -225,7 +225,7 @@ class LinkCellsVisitor final : public VNVisitor {
|
|||
|
||||
void visit(AstIfaceRefDType* nodep) override {
|
||||
// Cell: Resolve its filename. If necessary, parse it.
|
||||
UINFO(4, "Link IfaceRef: " << nodep << endl);
|
||||
UINFO(4, "Link IfaceRef: " << nodep);
|
||||
// Use findIdUpward instead of findIdFlat; it doesn't matter for now
|
||||
// but we might support modules-under-modules someday.
|
||||
AstNodeModule* const modp = resolveModule(nodep, nodep->ifaceName());
|
||||
|
|
@ -252,7 +252,7 @@ class LinkCellsVisitor final : public VNVisitor {
|
|||
// For historical reasons virtual interface reference variables remain VARs
|
||||
if (m_varp && !nodep->isVirtual()) m_varp->setIfaceRef();
|
||||
// Note cannot do modport resolution here; modports are allowed underneath generates
|
||||
UINFO(4, "Link IfaceRef done: " << nodep << endl);
|
||||
UINFO(4, "Link IfaceRef done: " << nodep);
|
||||
}
|
||||
|
||||
void visit(AstPackageExport* nodep) override {
|
||||
|
|
@ -288,7 +288,7 @@ class LinkCellsVisitor final : public VNVisitor {
|
|||
// TODO this doesn't allow bind to dotted hier names, that would require
|
||||
// this move to post param, which would mean we do not auto-read modules
|
||||
// and means we cannot compute module levels until later.
|
||||
UINFO(4, "Link Bind: " << nodep << endl);
|
||||
UINFO(4, "Link Bind: " << nodep);
|
||||
AstNodeModule* const modp = resolveModule(nodep, nodep->name());
|
||||
if (modp) {
|
||||
AstNode* const cellsp = nodep->cellsp()->unlinkFrBackWithNext();
|
||||
|
|
@ -322,13 +322,13 @@ class LinkCellsVisitor final : public VNVisitor {
|
|||
nodep->user1p(m_modp);
|
||||
//
|
||||
if (!nodep->modp() || cloned) {
|
||||
UINFO(4, "Link Cell: " << nodep << endl);
|
||||
UINFO(4, "Link Cell: " << nodep);
|
||||
// Use findIdFallback instead of findIdFlat; it doesn't matter for now
|
||||
// but we might support modules-under-modules someday.
|
||||
AstNodeModule* cellmodp = resolveModule(nodep, nodep->modName());
|
||||
if (cellmodp) {
|
||||
if (cellmodp == m_modp || cellmodp->user2p() == m_modp) {
|
||||
UINFO(1, "Self-recursive module " << cellmodp << endl);
|
||||
UINFO(1, "Self-recursive module " << cellmodp);
|
||||
cellmodp->recursive(true);
|
||||
nodep->recursive(true);
|
||||
if (!cellmodp->recursiveClone()) {
|
||||
|
|
@ -427,7 +427,7 @@ class LinkCellsVisitor final : public VNVisitor {
|
|||
if (ports.find(portp->name()) == ports.end()
|
||||
&& ports.find("__pinNumber" + cvtToStr(portp->pinNum())) == ports.end()) {
|
||||
if (pinStar) {
|
||||
UINFO(9, " need .* PORT " << portp << endl);
|
||||
UINFO(9, " need .* PORT " << portp);
|
||||
// Create any not already connected
|
||||
AstPin* const newp = new AstPin{
|
||||
nodep->fileline(), 0, portp->name(),
|
||||
|
|
@ -519,7 +519,7 @@ class LinkCellsVisitor final : public VNVisitor {
|
|||
if (nodep->modp()) { //
|
||||
iterateChildren(nodep);
|
||||
}
|
||||
UINFO(4, " Link Cell done: " << nodep << endl);
|
||||
UINFO(4, " Link Cell done: " << nodep);
|
||||
}
|
||||
|
||||
void visit(AstRefDType* nodep) override {
|
||||
|
|
@ -630,6 +630,6 @@ public:
|
|||
// Link class functions
|
||||
|
||||
void V3LinkCells::link(AstNetlist* nodep, VInFilter* filterp) {
|
||||
UINFO(4, __FUNCTION__ << ": " << endl);
|
||||
UINFO(4, __FUNCTION__ << ": ");
|
||||
{ LinkCellsVisitor{nodep, filterp}; }
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -201,7 +201,7 @@ class LinkIncVisitor final : public VNVisitor {
|
|||
void unsupported_visit(AstNode* nodep) {
|
||||
VL_RESTORER(m_unsupportedHere);
|
||||
m_unsupportedHere = true;
|
||||
UINFO(9, "Marking unsupported " << nodep << endl);
|
||||
UINFO(9, "Marking unsupported " << nodep);
|
||||
iterateChildren(nodep);
|
||||
}
|
||||
void visit(AstLogAnd* nodep) override { unsupported_visit(nodep); }
|
||||
|
|
@ -367,7 +367,7 @@ public:
|
|||
// Task class functions
|
||||
|
||||
void V3LinkInc::linkIncrements(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{ LinkIncVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("linkinc", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ class LinkJumpVisitor final : public VNVisitor {
|
|||
// METHODS
|
||||
AstJumpLabel* findAddLabel(AstNode* nodep, bool endOfIter) {
|
||||
// Put label under given node, and if WHILE optionally at end of iteration
|
||||
UINFO(4, "Create label for " << nodep << endl);
|
||||
UINFO(4, "Create label for " << nodep);
|
||||
if (VN_IS(nodep, JumpLabel)) return VN_AS(nodep, JumpLabel); // Done
|
||||
|
||||
// Made it previously? We always jump to the end, so this works out
|
||||
|
|
@ -113,7 +113,7 @@ class LinkJumpVisitor final : public VNVisitor {
|
|||
// see t_func_return test.
|
||||
while (underp && VN_IS(underp, Var)) underp = underp->nextp();
|
||||
UASSERT_OBJ(underp, nodep, "Break/disable/continue not under expected statement");
|
||||
UINFO(5, " Underpoint is " << underp << endl);
|
||||
UINFO(5, " Underpoint is " << underp);
|
||||
|
||||
if (VN_IS(underp, JumpLabel)) {
|
||||
return VN_AS(underp, JumpLabel);
|
||||
|
|
@ -175,7 +175,7 @@ class LinkJumpVisitor final : public VNVisitor {
|
|||
iterateChildren(nodep);
|
||||
}
|
||||
void visit(AstNodeBlock* nodep) override {
|
||||
UINFO(8, " " << nodep << endl);
|
||||
UINFO(8, " " << nodep);
|
||||
VL_RESTORER(m_inFork);
|
||||
VL_RESTORER(m_unrollFull);
|
||||
m_blockStack.push_back(nodep);
|
||||
|
|
@ -336,11 +336,11 @@ class LinkJumpVisitor final : public VNVisitor {
|
|||
VL_DO_DANGLING(pushDeletep(nodep), nodep);
|
||||
}
|
||||
void visit(AstDisable* nodep) override {
|
||||
UINFO(8, " DISABLE " << nodep << endl);
|
||||
UINFO(8, " DISABLE " << nodep);
|
||||
iterateChildren(nodep);
|
||||
AstNodeBlock* blockp = nullptr;
|
||||
for (AstNodeBlock* const stackp : vlstd::reverse_view(m_blockStack)) {
|
||||
UINFO(9, " UNDERBLK " << stackp << endl);
|
||||
UINFO(9, " UNDERBLK " << stackp);
|
||||
if (stackp->name() == nodep->name()) {
|
||||
blockp = stackp;
|
||||
break;
|
||||
|
|
@ -381,7 +381,7 @@ public:
|
|||
// Task class functions
|
||||
|
||||
void V3LinkJump::linkJump(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{ LinkJumpVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("linkjump", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ class LinkLValueVisitor final : public VNVisitor {
|
|||
}
|
||||
if (const AstClockingItem* const itemp
|
||||
= VN_CAST(nodep->varp()->backp(), ClockingItem)) {
|
||||
UINFO(5, "ClkOut " << nodep << endl);
|
||||
UINFO(5, "ClkOut " << nodep);
|
||||
if (itemp->outputp()) nodep->varp(itemp->outputp()->varp());
|
||||
}
|
||||
if (m_setForcedByCode) {
|
||||
|
|
@ -300,7 +300,7 @@ class LinkLValueVisitor final : public VNVisitor {
|
|||
if (nodep->varp() && nodep->access().isWriteOrRW()) {
|
||||
if (const AstClockingItem* const itemp
|
||||
= VN_CAST(nodep->varp()->backp(), ClockingItem)) {
|
||||
UINFO(5, "ClkOut " << nodep << endl);
|
||||
UINFO(5, "ClkOut " << nodep);
|
||||
if (itemp->outputp()) nodep->varp(itemp->outputp()->varp());
|
||||
}
|
||||
}
|
||||
|
|
@ -358,13 +358,13 @@ public:
|
|||
// Link class functions
|
||||
|
||||
void V3LinkLValue::linkLValue(AstNetlist* nodep) {
|
||||
UINFO(4, __FUNCTION__ << ": " << endl);
|
||||
UINFO(4, __FUNCTION__ << ": ");
|
||||
{ LinkLValueVisitor{nodep, VAccess::NOCHANGE}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("linklvalue", 0, dumpTreeEitherLevel() >= 6);
|
||||
}
|
||||
void V3LinkLValue::linkLValueSet(AstNode* nodep) {
|
||||
// Called by later link functions when it is known a node needs
|
||||
// to be converted to a lvalue.
|
||||
UINFO(9, __FUNCTION__ << ": " << endl);
|
||||
UINFO(9, __FUNCTION__ << ": ");
|
||||
{ LinkLValueVisitor{nodep, VAccess::WRITE}; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ struct CmpLevel final {
|
|||
void V3LinkLevel::modSortByLevel() {
|
||||
// Sort modules by levels, root down to lowest children
|
||||
// Calculate levels again in case we added modules
|
||||
UINFO(2, "modSortByLevel()\n");
|
||||
UINFO(2, "modSortByLevel()");
|
||||
|
||||
// level() was computed for us in V3LinkCells
|
||||
|
||||
|
|
@ -77,11 +77,11 @@ void V3LinkLevel::modSortByLevel() {
|
|||
|
||||
// Reorder the netlist's modules to have modules in level sorted order
|
||||
stable_sort(mods.begin(), mods.end(), CmpLevel()); // Sort the vector
|
||||
UINFO(9, "modSortByLevel() sorted\n"); // Comment required for gcc4.6.3 / bug666
|
||||
UINFO(9, "modSortByLevel() sorted"); // Comment required for gcc4.6.3 / bug666
|
||||
for (AstNodeModule* nodep : mods) nodep->unlinkFrBack();
|
||||
UASSERT_OBJ(!v3Global.rootp()->modulesp(), v3Global.rootp(), "Unlink didn't work");
|
||||
for (AstNodeModule* nodep : mods) v3Global.rootp()->addModulesp(nodep);
|
||||
UINFO(9, "modSortByLevel() done\n"); // Comment required for gcc4.6.3 / bug666
|
||||
UINFO(9, "modSortByLevel() done"); // Comment required for gcc4.6.3 / bug666
|
||||
V3Global::dumpCheckGlobalTree("cellsort", false, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
||||
|
|
@ -156,11 +156,11 @@ void V3LinkLevel::timescaling(const ModVec& mods) {
|
|||
// Wrapping
|
||||
|
||||
void V3LinkLevel::wrapTop(AstNetlist* rootp) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
// We do ONLY the top module
|
||||
AstNodeModule* const oldmodp = rootp->modulesp();
|
||||
if (!oldmodp) { // Later V3LinkDot will warn
|
||||
UINFO(1, "No module found to wrap\n");
|
||||
UINFO(1, "No module found to wrap");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -211,7 +211,7 @@ void V3LinkLevel::wrapTopCell(AstNetlist* rootp) {
|
|||
if (AstVar* const oldvarp = VN_CAST(subnodep, Var)) {
|
||||
if (oldvarp->isIO()) {
|
||||
if (!ioNames.insert(oldvarp->name()).second) {
|
||||
// UINFO(8, "Multitop dup I/O found: " << oldvarp << endl);
|
||||
// UINFO(8, "Multitop dup I/O found: " << oldvarp);
|
||||
dupNames.insert(oldvarp->name());
|
||||
}
|
||||
} else if (v3Global.opt.topIfacesSupported() && oldvarp->isIfaceRef()) {
|
||||
|
|
@ -220,7 +220,7 @@ void V3LinkLevel::wrapTopCell(AstNetlist* rootp) {
|
|||
const AstIfaceRefDType* const ifacerefp = VN_AS(subtypep, IfaceRefDType);
|
||||
if (!ifacerefp->cellp()) {
|
||||
if (!ioNames.insert(oldvarp->name()).second) {
|
||||
// UINFO(8, "Multitop dup interface found: " << oldvarp << endl);
|
||||
// UINFO(8, "Multitop dup interface found: " << oldvarp);
|
||||
dupNames.insert(oldvarp->name());
|
||||
}
|
||||
}
|
||||
|
|
@ -233,8 +233,7 @@ void V3LinkLevel::wrapTopCell(AstNetlist* rootp) {
|
|||
= VN_AS(arrsubtypep, IfaceRefDType);
|
||||
if (!ifacerefp->cellp()) {
|
||||
if (!ioNames.insert(oldvarp->name()).second) {
|
||||
// UINFO(8, "Multitop dup interface array found: " << oldvarp
|
||||
// << endl);
|
||||
// UINFO(8, "Multitop dup interface array found: " << oldvarp);
|
||||
dupNames.insert(oldvarp->name());
|
||||
}
|
||||
}
|
||||
|
|
@ -250,7 +249,7 @@ void V3LinkLevel::wrapTopCell(AstNetlist* rootp) {
|
|||
oldmodp && oldmodp->level() <= 2; oldmodp = VN_AS(oldmodp->nextp(), NodeModule)) {
|
||||
if (VN_IS(oldmodp, Package)) continue;
|
||||
// Add instance
|
||||
UINFO(5, "LOOP " << oldmodp << endl);
|
||||
UINFO(5, "LOOP " << oldmodp);
|
||||
AstCell* const cellp = new AstCell{
|
||||
newmodp->fileline(),
|
||||
newmodp->fileline(),
|
||||
|
|
@ -265,7 +264,7 @@ void V3LinkLevel::wrapTopCell(AstNetlist* rootp) {
|
|||
// Add pins
|
||||
for (AstNode* subnodep = oldmodp->stmtsp(); subnodep; subnodep = subnodep->nextp()) {
|
||||
if (AstVar* const oldvarp = VN_CAST(subnodep, Var)) {
|
||||
UINFO(8, "VARWRAP " << oldvarp << endl);
|
||||
UINFO(8, "VARWRAP " << oldvarp);
|
||||
if (oldvarp->isIO()) {
|
||||
string name = oldvarp->name();
|
||||
if (dupNames.find(name) != dupNames.end()) {
|
||||
|
|
|
|||
|
|
@ -134,9 +134,9 @@ class LinkParseVisitor final : public VNVisitor {
|
|||
FileLine* const nodeFlp = nodep->fileline();
|
||||
FileLine* const childFlp = childp->fileline();
|
||||
FileLine* const nextFlp = nextp->fileline();
|
||||
// UINFO(0, "checkInd " << nodeFlp->firstColumn() << " " << nodep << endl);
|
||||
// UINFO(0, " child " << childFlp->firstColumn() << " " << childp << endl);
|
||||
// UINFO(0, " next " << nextFlp->firstColumn() << " " << nextp << endl);
|
||||
// UINFO(0, "checkInd " << nodeFlp->firstColumn() << " " << nodep);
|
||||
// UINFO(0, " child " << childFlp->firstColumn() << " " << childp);
|
||||
// UINFO(0, " next " << nextFlp->firstColumn() << " " << nextp);
|
||||
// Same filename, later line numbers (no macro magic going on)
|
||||
if (nodeFlp->filenameno() != childFlp->filenameno()) return;
|
||||
if (nodeFlp->filenameno() != nextFlp->filenameno()) return;
|
||||
|
|
@ -231,7 +231,7 @@ class LinkParseVisitor final : public VNVisitor {
|
|||
void visit(AstNodeFTaskRef* nodep) override {
|
||||
if (!nodep->user1SetOnce()) { // Process only once.
|
||||
cleanFileline(nodep);
|
||||
UINFO(5, " " << nodep << endl);
|
||||
UINFO(5, " " << nodep);
|
||||
VL_RESTORER(m_valueModp);
|
||||
m_valueModp = nullptr;
|
||||
iterateChildren(nodep);
|
||||
|
|
@ -498,7 +498,7 @@ class LinkParseVisitor final : public VNVisitor {
|
|||
|
||||
void visit(AstDefImplicitDType* nodep) override {
|
||||
cleanFileline(nodep);
|
||||
UINFO(8, " DEFIMPLICIT " << nodep << endl);
|
||||
UINFO(8, " DEFIMPLICIT " << nodep);
|
||||
// Must remember what names we've already created, and combine duplicates
|
||||
// so that for "var enum {...} a,b" a & b will share a common typedef.
|
||||
// Change to unique name space per module so that an addition of
|
||||
|
|
@ -507,7 +507,7 @@ class LinkParseVisitor final : public VNVisitor {
|
|||
const ImplTypedefMap::iterator it = m_implTypedef.find(nodep->name());
|
||||
if (it != m_implTypedef.end()) {
|
||||
defp = it->second;
|
||||
UINFO(9, "Reused impltypedef " << nodep << " --> " << defp << endl);
|
||||
UINFO(9, "Reused impltypedef " << nodep << " --> " << defp);
|
||||
} else {
|
||||
// Definition must be inserted right after the variable (etc) that needed it
|
||||
// AstVar, AstTypedef, AstNodeFTask are common containers
|
||||
|
|
@ -532,7 +532,7 @@ class LinkParseVisitor final : public VNVisitor {
|
|||
// Rename so that name doesn't change if a type is added/removed elsewhere
|
||||
// But the m_implTypedef is stil by old name so we can find it for next new lookups
|
||||
defp->name("__typeimpmod" + cvtToStr(m_implTypedef.size()));
|
||||
UINFO(9, "New impltypedef " << defp << endl);
|
||||
UINFO(9, "New impltypedef " << defp);
|
||||
backp->addNextHere(defp);
|
||||
}
|
||||
}
|
||||
|
|
@ -549,7 +549,7 @@ class LinkParseVisitor final : public VNVisitor {
|
|||
|
||||
void visit(AstNodeForeach* nodep) override {
|
||||
// FOREACH(array, loopvars, body)
|
||||
UINFO(9, "FOREACH " << nodep << endl);
|
||||
UINFO(9, "FOREACH " << nodep);
|
||||
cleanFileline(nodep);
|
||||
// Separate iteration vars from base from variable
|
||||
// Input:
|
||||
|
|
@ -928,7 +928,7 @@ public:
|
|||
// Link class functions
|
||||
|
||||
void V3LinkParse::linkParse(AstNetlist* rootp) {
|
||||
UINFO(4, __FUNCTION__ << ": " << endl);
|
||||
UINFO(4, __FUNCTION__ << ": ");
|
||||
{ LinkParseVisitor{rootp}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("linkparse", 0, dumpTreeEitherLevel() >= 6);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ class LinkResolveVisitor final : public VNVisitor {
|
|||
// TODO: could move to V3LinkParse to get them out of the way of elaboration
|
||||
void visit(AstNodeModule* nodep) override {
|
||||
// Module: Create sim table for entire module and iterate
|
||||
UINFO(8, "MODULE " << nodep << endl);
|
||||
UINFO(8, "MODULE " << nodep);
|
||||
if (nodep->dead()) return;
|
||||
VL_RESTORER(m_modp);
|
||||
VL_RESTORER(m_senitemCvtNum);
|
||||
|
|
@ -179,7 +179,7 @@ class LinkResolveVisitor final : public VNVisitor {
|
|||
void visit(AstNodeFTaskRef* nodep) override {
|
||||
iterateChildren(nodep);
|
||||
if (AstLet* letp = VN_CAST(nodep->taskp(), Let)) {
|
||||
UINFO(7, "letSubstitute() " << nodep << " <- " << letp << endl);
|
||||
UINFO(7, "letSubstitute() " << nodep << " <- " << letp);
|
||||
if (letp->user2()) {
|
||||
nodep->v3error("Recursive let substitution " << letp->prettyNameQ());
|
||||
nodep->replaceWith(new AstConst{nodep->fileline(), AstConst::BitFalse{}});
|
||||
|
|
@ -208,7 +208,7 @@ class LinkResolveVisitor final : public VNVisitor {
|
|||
const auto it = portToExprs.find(refp->varp());
|
||||
if (it != portToExprs.end()) {
|
||||
AstNodeExpr* const pinp = it->second;
|
||||
UINFO(9, "let pin subst " << refp << " <- " << pinp << endl);
|
||||
UINFO(9, "let pin subst " << refp << " <- " << pinp);
|
||||
// Side effects are copied into pins, to match other simulators
|
||||
refp->replaceWith(pinp->cloneTree(false));
|
||||
VL_DO_DANGLING(pushDeletep(refp), refp);
|
||||
|
|
@ -445,7 +445,7 @@ class LinkResolveVisitor final : public VNVisitor {
|
|||
}
|
||||
|
||||
void visit(AstUdpTable* nodep) override {
|
||||
UINFO(5, "UDPTABLE " << nodep << endl);
|
||||
UINFO(5, "UDPTABLE " << nodep);
|
||||
if (!v3Global.opt.bboxUnsup()) {
|
||||
// We don't warn until V3Inst, so that UDPs that are in libraries and
|
||||
// never used won't result in any warnings.
|
||||
|
|
@ -559,7 +559,7 @@ public:
|
|||
// Link class functions
|
||||
|
||||
void V3LinkResolve::linkResolve(AstNetlist* rootp) {
|
||||
UINFO(4, __FUNCTION__ << ": " << endl);
|
||||
UINFO(4, __FUNCTION__ << ": ");
|
||||
{
|
||||
const LinkResolveVisitor visitor{rootp};
|
||||
LinkBotupVisitor{rootp};
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ class LocalizeVisitor final : public VNVisitor {
|
|||
// cannot cope with. This should be rare (introduced by V3Depth).
|
||||
if (funcps.size() > 1 && existsNonLeaf(funcps)) continue;
|
||||
|
||||
UINFO(4, "Localizing " << nodep << endl);
|
||||
UINFO(4, "Localizing " << nodep);
|
||||
++m_statLocVars;
|
||||
|
||||
// Yank the VarScope from it's parent and schedule them for deletion. Leave the Var
|
||||
|
|
@ -138,7 +138,7 @@ class LocalizeVisitor final : public VNVisitor {
|
|||
}
|
||||
|
||||
void visit(AstCFunc* nodep) override {
|
||||
UINFO(4, " CFUNC " << nodep << endl);
|
||||
UINFO(4, " CFUNC " << nodep);
|
||||
VL_RESTORER(m_cfuncp);
|
||||
VL_RESTORER(m_nodeDepth);
|
||||
m_cfuncp = nodep;
|
||||
|
|
@ -179,7 +179,7 @@ class LocalizeVisitor final : public VNVisitor {
|
|||
&& !nodep->varp()->sensIfacep() // Not sensitive to an interface
|
||||
&& !nodep->varp()->valuep() // Does not have an initializer
|
||||
) {
|
||||
UINFO(4, "Consider for localization: " << nodep << endl);
|
||||
UINFO(4, "Consider for localization: " << nodep);
|
||||
m_varScopeps.push_back(nodep);
|
||||
}
|
||||
// No iterate; Don't want varrefs under it (e.g.: in child dtype?)
|
||||
|
|
@ -202,7 +202,7 @@ class LocalizeVisitor final : public VNVisitor {
|
|||
if (nodep->access().isReadOrRW() && !varScopep->user2()) {
|
||||
// Variable is read, but is not known to have been assigned in this function. Mark
|
||||
// as not optimizable.
|
||||
UINFO(4, "Not optimizable (not written): " << nodep << endl);
|
||||
UINFO(4, "Not optimizable (not written): " << nodep);
|
||||
varScopep->user1(1);
|
||||
}
|
||||
}
|
||||
|
|
@ -227,7 +227,7 @@ public:
|
|||
// Localize class functions
|
||||
|
||||
void V3Localize::localizeAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{ LocalizeVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("localize", 0, dumpTreeEitherLevel() >= 6);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -645,7 +645,7 @@ class MergeCondVisitor final : public VNVisitor {
|
|||
AstNodeIf* recursivep = nullptr;
|
||||
// Merge if list is longer than one node
|
||||
if (m_mgFirstp != m_mgLastp) {
|
||||
UINFO(6, "MergeCond - First: " << m_mgFirstp << " Last: " << m_mgLastp << endl);
|
||||
UINFO(6, "MergeCond - First: " << m_mgFirstp << " Last: " << m_mgLastp);
|
||||
++m_statMerges;
|
||||
if (m_listLenght > m_statLongestList) m_statLongestList = m_listLenght;
|
||||
|
||||
|
|
@ -886,7 +886,7 @@ public:
|
|||
// MergeConditionals class functions
|
||||
|
||||
void V3MergeCond::mergeAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{ MergeCondVisitor{nodep}; }
|
||||
V3Global::dumpCheckGlobalTree("merge_cond", 0, dumpTreeEitherLevel() >= 6);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ public:
|
|||
// Name class functions
|
||||
|
||||
void V3Name::nameAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{ NameVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("name", 0, dumpTreeEitherLevel() >= 6);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1977,7 +1977,7 @@ V3Number& V3Number::opDiv(const V3Number& lhs, const V3Number& rhs) {
|
|||
// i op j, max(L(lhs),L(rhs)) bit return, if any 4-state, 4-state return
|
||||
NUM_ASSERT_OP_ARGS2(lhs, rhs);
|
||||
NUM_ASSERT_LOGIC_ARGS2(lhs, rhs);
|
||||
// UINFO(9, "opdiv "<<lhs<<" "<<rhs<<endl);
|
||||
// UINFO(9, "opdiv " << lhs << " " << rhs);
|
||||
if (lhs.isFourState() || rhs.isFourState()) return setAllBitsX();
|
||||
if (rhs.isEqZero()) return setAllBitsXRemoved();
|
||||
if (lhs.width() <= 64) {
|
||||
|
|
@ -1991,7 +1991,7 @@ V3Number& V3Number::opDiv(const V3Number& lhs, const V3Number& rhs) {
|
|||
V3Number& V3Number::opDivS(const V3Number& lhs, const V3Number& rhs) {
|
||||
// Signed divide
|
||||
// Correct number of zero bits/width matters
|
||||
// UINFO(9, ">>divs-start "<<lhs<<" "<<rhs<<endl);
|
||||
// UINFO(9, ">>divs-start " << lhs << " " << rhs);
|
||||
NUM_ASSERT_OP_ARGS2(lhs, rhs);
|
||||
NUM_ASSERT_LOGIC_ARGS2(lhs, rhs);
|
||||
if (lhs.isFourState() || rhs.isFourState()) return setAllBitsX();
|
||||
|
|
@ -2001,13 +2001,13 @@ V3Number& V3Number::opDivS(const V3Number& lhs, const V3Number& rhs) {
|
|||
V3Number rhsNoSign = rhs;
|
||||
if (rhs.isNegative()) rhsNoSign.opNegate(rhs);
|
||||
const V3Number qNoSign = opDiv(lhsNoSign, rhsNoSign);
|
||||
// UINFO(9, " >divs-mid "<<lhs<<" "<<rhs<<" "<<qNoSign<<endl);
|
||||
// UINFO(9, " >divs-mid " << lhs << " " << rhs << " " << qNoSign);
|
||||
if ((lhs.isNegative() && !rhs.isNegative()) || (!lhs.isNegative() && rhs.isNegative())) {
|
||||
opNegate(qNoSign);
|
||||
} else {
|
||||
opAssign(qNoSign);
|
||||
}
|
||||
UINFO(9, " <divs-out " << lhs << " " << rhs << " =" << *this << endl);
|
||||
UINFO(9, " <divs-out " << lhs << " " << rhs << " =" << *this);
|
||||
return *this;
|
||||
}
|
||||
V3Number& V3Number::opModDiv(const V3Number& lhs, const V3Number& rhs) {
|
||||
|
|
@ -2055,7 +2055,7 @@ V3Number& V3Number::opModDivGuts(const V3Number& lhs, const V3Number& rhs, bool
|
|||
const int vmsbp1 = rhs.mostSetBitP1(); // divisor
|
||||
if (VL_UNLIKELY(vmsbp1 == 0) // rwp==0 so division by zero. Return 0.
|
||||
|| VL_UNLIKELY(umsbp1 == 0)) { // 0/x so short circuit and return 0
|
||||
UINFO(9, " opmoddiv-zero " << lhs << " " << rhs << " now=" << *this << endl);
|
||||
UINFO(9, " opmoddiv-zero " << lhs << " " << rhs << " now=" << *this);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
|
@ -2073,7 +2073,7 @@ V3Number& V3Number::opModDivGuts(const V3Number& lhs, const V3Number& rhs, bool
|
|||
* static_cast<uint64_t>(rhs.m_data.num()[0].m_value));
|
||||
}
|
||||
UINFO(9, " opmoddiv-1w " << lhs << " " << rhs << " q=" << *this << " rem=0x" << std::hex
|
||||
<< k << std::dec << endl);
|
||||
<< k << std::dec);
|
||||
if (is_modulus) {
|
||||
setZero();
|
||||
m_data.num()[0].m_value = k;
|
||||
|
|
@ -2167,11 +2167,11 @@ V3Number& V3Number::opModDivGuts(const V3Number& lhs, const V3Number& rhs, bool
|
|||
}
|
||||
for (int i = vw; i < words; ++i) m_data.num()[i].m_value = 0;
|
||||
opCleanThis();
|
||||
UINFO(9, " opmoddiv-mod " << lhs << " " << rhs << " now=" << *this << endl);
|
||||
UINFO(9, " opmoddiv-mod " << lhs << " " << rhs << " now=" << *this);
|
||||
return *this;
|
||||
} else { // division
|
||||
opCleanThis();
|
||||
UINFO(9, " opmoddiv-div " << lhs << " " << rhs << " now=" << *this << endl);
|
||||
UINFO(9, " opmoddiv-div " << lhs << " " << rhs << " now=" << *this);
|
||||
return *this;
|
||||
}
|
||||
}
|
||||
|
|
@ -2213,7 +2213,7 @@ V3Number& V3Number::opPow(const V3Number& lhs, const V3Number& rhs, bool lsign,
|
|||
V3Number lastOut(&lhs, width());
|
||||
lastOut.opAssign(*this);
|
||||
opMul(lastOut, power);
|
||||
// UINFO(0, "pow "<<lhs<<" "<<rhs<<" b"<<bit<<" pow="<<power<<" now="<<*this<<endl);
|
||||
// UINFO(0, "pow "<<lhs<<" "<<rhs<<" b"<<bit<<" pow="<<power<<" now="<<*this);
|
||||
}
|
||||
}
|
||||
return *this;
|
||||
|
|
@ -2349,7 +2349,7 @@ V3Number& V3Number::opSel(const V3Number& lhs, uint32_t msbval, uint32_t lsbval)
|
|||
}
|
||||
++ibit;
|
||||
}
|
||||
// UINFO(0,"RANGE "<<lhs<<" "<<msb<<" "<<lsb<<" = "<<*this<<endl);
|
||||
// UINFO(0, "RANGE " << lhs << " " << msb << " " << lsb << " = " << *this);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
|
@ -2588,7 +2588,7 @@ V3Number& V3Number::opLteN(const V3Number& lhs, const V3Number& rhs) {
|
|||
//======================================================================
|
||||
|
||||
void V3Number::selfTest() {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
FileLine* const fl = new FileLine{FileLine::builtInFilename()};
|
||||
V3Number num{fl, 32, 0};
|
||||
num.selfTestThis();
|
||||
|
|
|
|||
|
|
@ -336,7 +336,7 @@ void V3Options::addParameter(const string& paramline, bool allowPlus) {
|
|||
value = param.substr(pos + 1);
|
||||
param.erase(pos);
|
||||
}
|
||||
UINFO(4, "Add parameter" << param << "=" << value << endl);
|
||||
UINFO(4, "Add parameter" << param << "=" << value);
|
||||
(void)m_parameters.erase(param);
|
||||
m_parameters[param] = value;
|
||||
}
|
||||
|
|
@ -1844,7 +1844,7 @@ void V3Options::parseOptsList(FileLine* fl, const string& optdir, int argc,
|
|||
parser.finalize();
|
||||
|
||||
for (int i = 0; i < argc;) {
|
||||
UINFO(9, " Option: " << argv[i] << endl);
|
||||
UINFO(9, " Option: " << argv[i]);
|
||||
if (!std::strcmp(argv[i], "-j")
|
||||
|| !std::strcmp(argv[i], "--j")) { // Allow gnu -- switches
|
||||
++i;
|
||||
|
|
@ -1896,7 +1896,7 @@ void V3Options::parseOptsList(FileLine* fl, const string& optdir, int argc,
|
|||
|
||||
void V3Options::parseOptsFile(FileLine* fl, const string& filename, bool rel) VL_MT_DISABLED {
|
||||
// Read the specified -f filename and process as arguments
|
||||
UINFO(1, "Reading Options File " << filename << endl);
|
||||
UINFO(1, "Reading Options File " << filename);
|
||||
|
||||
const std::unique_ptr<std::ifstream> ifp{V3File::new_ifstream(filename)};
|
||||
if (ifp->fail()) {
|
||||
|
|
|
|||
|
|
@ -553,7 +553,7 @@ public:
|
|||
|
||||
static void dumpCpFilePrefixed(const V3Graph& graph, const string& nameComment) {
|
||||
const string filename = v3Global.debugFilename(nameComment) + ".txt";
|
||||
UINFO(1, "Writing " << filename << endl);
|
||||
UINFO(1, "Writing " << filename);
|
||||
const std::unique_ptr<std::ofstream> ofp{V3File::new_ofstream(filename)};
|
||||
std::ostream* const osp = &(*ofp); // &* needed to deref unique_ptr
|
||||
if (osp->fail()) v3fatalStatic("Can't write file: " << filename);
|
||||
|
|
@ -1231,8 +1231,8 @@ public:
|
|||
v3Global.rootp()->fileline()->v3warn(
|
||||
UNOPTTHREADS, "Thread scheduler is unable to provide requested "
|
||||
"parallelism; suggest asking for fewer threads.");
|
||||
UINFO(1, "Critical path limit was=" << oldLimit << " now=" << m_scoreLimit
|
||||
<< endl);
|
||||
UINFO(1,
|
||||
"Critical path limit was=" << oldLimit << " now=" << m_scoreLimit);
|
||||
continue;
|
||||
}
|
||||
// Really stop
|
||||
|
|
@ -1297,7 +1297,7 @@ public:
|
|||
// increases from low numbers up toward cpLimit. It may be
|
||||
// helpful to see progress during slow partitions. Maybe
|
||||
// display something by default even?
|
||||
UINFO(6, "New scoreLimitBeforeRescore: " << m_scoreLimitBeforeRescore << endl);
|
||||
UINFO(6, "New scoreLimitBeforeRescore: " << m_scoreLimitBeforeRescore);
|
||||
}
|
||||
|
||||
// Finally merge this candidate.
|
||||
|
|
@ -1440,7 +1440,7 @@ private:
|
|||
<< recipientNewCpFwd.propagateCp << "\n"
|
||||
<< "donorNewCpFwd = " << donorNewCpFwd.cp
|
||||
<< (donorNewCpFwd.propagate ? " true " : " false ")
|
||||
<< donorNewCpFwd.propagateCp << endl);
|
||||
<< donorNewCpFwd.propagateCp);
|
||||
|
||||
recipientp->setCritPathCost(GraphWay::FORWARD, recipientNewCpFwd.cp);
|
||||
if (recipientNewCpFwd.propagate) {
|
||||
|
|
@ -1503,7 +1503,7 @@ private:
|
|||
// behave identically without the caching (just slower)
|
||||
|
||||
m_sb.rescore();
|
||||
UINFO(6, "Did rescore. Merges since previous = " << m_mergesSinceRescore << endl);
|
||||
UINFO(6, "Did rescore. Merges since previous = " << m_mergesSinceRescore);
|
||||
|
||||
m_mergesSinceRescore = 0;
|
||||
m_scoreLimitBeforeRescore = 0xffffffff;
|
||||
|
|
@ -1714,7 +1714,7 @@ class DpiImportCallVisitor final : public VNVisitor {
|
|||
// we have a normal DPI which induces DPI hazard by default.
|
||||
m_hasDpiHazard = V3Config::getProfileData(nodep->cname()) == 0;
|
||||
UINFO(9, "DPI wrapper '" << nodep->cname()
|
||||
<< "' has dpi hazard = " << m_hasDpiHazard << endl);
|
||||
<< "' has dpi hazard = " << m_hasDpiHazard);
|
||||
}
|
||||
}
|
||||
iterateChildren(nodep);
|
||||
|
|
@ -2055,7 +2055,7 @@ static void debugMTaskGraphStats(V3Graph& graph, const string& stage) {
|
|||
if (!debug() && !dumpLevel() && !dumpGraphLevel()) return;
|
||||
|
||||
UINFO(4, "\n");
|
||||
UINFO(4, " Stats for " << stage << endl);
|
||||
UINFO(4, " Stats for " << stage);
|
||||
uint32_t mtaskCount = 0;
|
||||
uint32_t totalCost = 0;
|
||||
std::array<uint32_t, 32> mtaskCostHist;
|
||||
|
|
@ -2070,14 +2070,14 @@ static void debugMTaskGraphStats(V3Graph& graph, const string& stage) {
|
|||
UASSERT(log2Cost < 32, "log2Cost overflow in debugMTaskGraphStats");
|
||||
++mtaskCostHist[log2Cost];
|
||||
}
|
||||
UINFO(4, " Total mtask cost = " << totalCost << "\n");
|
||||
UINFO(4, " Mtask count = " << mtaskCount << "\n");
|
||||
UINFO(4, " Avg cost / mtask = "
|
||||
<< ((mtaskCount > 0) ? cvtToStr(totalCost / mtaskCount) : "INF!") << "\n");
|
||||
UINFO(4, " Histogram of mtask costs:\n");
|
||||
UINFO(4, " Total mtask cost = " << totalCost);
|
||||
UINFO(4, " Mtask count = " << mtaskCount);
|
||||
UINFO(4, " Avg cost / mtask = " << ((mtaskCount > 0) ? cvtToStr(totalCost / mtaskCount)
|
||||
: "INF!"));
|
||||
UINFO(4, " Histogram of mtask costs:");
|
||||
for (unsigned i = 0; i < 32; ++i) {
|
||||
if (mtaskCostHist[i]) {
|
||||
UINFO(4, " 2^" << i << ": " << mtaskCostHist[i] << endl);
|
||||
UINFO(4, " 2^" << i << ": " << mtaskCostHist[i]);
|
||||
V3Stats::addStat("MTask graph, " + stage + ", mtask cost 2^" + (i < 10 ? " " : "")
|
||||
+ cvtToStr(i),
|
||||
mtaskCostHist[i]);
|
||||
|
|
@ -2102,12 +2102,12 @@ static void debugMTaskGraphStats(V3Graph& graph, const string& stage) {
|
|||
V3Stats::addStat("MTask graph, " + stage + ", parallelism factor", report.parallelismFactor());
|
||||
if (debug() >= 4) {
|
||||
UINFO(0, "\n");
|
||||
UINFO(0, " MTask Parallelism estimate based costs at stage" << stage << ":\n");
|
||||
UINFO(0, " Critical path cost = " << report.criticalPathCost() << "\n");
|
||||
UINFO(0, " Total graph cost = " << report.totalGraphCost() << "\n");
|
||||
UINFO(0, " MTask vertex count = " << report.vertexCount() << "\n");
|
||||
UINFO(0, " Edge count = " << report.edgeCount() << "\n");
|
||||
UINFO(0, " Parallelism factor = " << report.parallelismFactor() << "\n");
|
||||
UINFO(0, " MTask Parallelism estimate based costs at stage" << stage << ":");
|
||||
UINFO(0, " Critical path cost = " << report.criticalPathCost());
|
||||
UINFO(0, " Total graph cost = " << report.totalGraphCost());
|
||||
UINFO(0, " MTask vertex count = " << report.vertexCount());
|
||||
UINFO(0, " Edge count = " << report.edgeCount());
|
||||
UINFO(0, " Parallelism factor = " << report.parallelismFactor());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2127,7 +2127,7 @@ static void hashGraphDebug(const V3Graph& graph, const char* debugName) {
|
|||
hash = vx2Id[edge.top()] + 31U * hash; // The K&R hash function
|
||||
}
|
||||
}
|
||||
UINFO(0, "Hash of shape (not contents) of " << debugName << " = " << cvtToStr(hash) << endl);
|
||||
UINFO(0, "Hash of shape (not contents) of " << debugName << " = " << cvtToStr(hash));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
|
|
@ -2330,7 +2330,7 @@ class Partitioner final {
|
|||
const unsigned fudgeDenominator = 5;
|
||||
const uint32_t cpLimit
|
||||
= ((totalGraphCost * fudgeNumerator) / (targetParFactor * fudgeDenominator));
|
||||
UINFO(4, "Partitioner set cpLimit = " << cpLimit << endl);
|
||||
UINFO(4, "Partitioner set cpLimit = " << cpLimit);
|
||||
|
||||
Contraction::apply(*m_mTaskGraphp, cpLimit, m_entryMTaskp, m_exitMTaskp,
|
||||
// --debugPartition is used by tests
|
||||
|
|
@ -2481,7 +2481,7 @@ AstExecGraph* V3Order::createParallel(OrderGraph& orderGraph, const std::string&
|
|||
const bool newEntry = logicMTaskToExecMTask.emplace(mTaskp, execMTaskp).second;
|
||||
UASSERT_OBJ(newEntry, mTaskp, "LogicMTasks should be processed in dependencyorder");
|
||||
UINFO(3, "Final '" << tag << "' LogicMTask " << mTaskp->id() << " maps to ExecMTask"
|
||||
<< execMTaskp->id() << std::endl);
|
||||
<< execMTaskp->id());
|
||||
|
||||
// Add the dependency edges between ExecMTasks
|
||||
for (const V3GraphEdge& edge : mTaskp->inEdges()) {
|
||||
|
|
@ -2505,7 +2505,7 @@ AstExecGraph* V3Order::createParallel(OrderGraph& orderGraph, const std::string&
|
|||
}
|
||||
|
||||
void V3Order::selfTestParallel() {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
PropagateCp<GraphWay::FORWARD>::selfTest();
|
||||
PropagateCp<GraphWay::REVERSE>::selfTest();
|
||||
Contraction::selfTest();
|
||||
|
|
|
|||
|
|
@ -85,13 +85,13 @@ class V3OrderProcessDomains final {
|
|||
// else, if all inputs are from flops, it's end-of-sequential code
|
||||
// else, it's full combo code
|
||||
void processDomains() {
|
||||
UINFO(2, " Domains...\n");
|
||||
UINFO(2, " Domains...");
|
||||
// Buffer to hold external sensitivities
|
||||
std::vector<AstSenTree*> externalDomainps;
|
||||
// For each vertex
|
||||
for (V3GraphVertex& it : m_graph.vertices()) {
|
||||
OrderEitherVertex* const vtxp = it.as<OrderEitherVertex>();
|
||||
UINFO(5, " pdi: " << vtxp << endl);
|
||||
UINFO(5, " pdi: " << vtxp);
|
||||
// Sequential logic already has its domain set
|
||||
if (vtxp->domainp()) continue;
|
||||
|
||||
|
|
@ -99,7 +99,7 @@ class V3OrderProcessDomains final {
|
|||
// For logic, start with the explicit hybrid sensitivities
|
||||
OrderLogicVertex* const lvtxp = vtxp->cast<OrderLogicVertex>();
|
||||
if (lvtxp) domainp = lvtxp->hybridp();
|
||||
if (domainp) UINFO(6, " hybr d=" << debugDomain(domainp) << " " << vtxp << endl);
|
||||
if (domainp) UINFO(6, " hybr d=" << debugDomain(domainp) << " " << vtxp);
|
||||
|
||||
// For each incoming edge, examine the source vertex
|
||||
for (V3GraphEdge& edge : vtxp->inEdges()) {
|
||||
|
|
@ -111,7 +111,7 @@ class V3OrderProcessDomains final {
|
|||
|
||||
AstSenTree* fromDomainp = fromVtxp->domainp();
|
||||
|
||||
UINFO(6, " from d=" << debugDomain(fromDomainp) << " " << fromVtxp << endl);
|
||||
UINFO(6, " from d=" << debugDomain(fromDomainp) << " " << fromVtxp);
|
||||
UASSERT(fromDomainp == m_deleteDomainp || !fromDomainp->hasCombo(),
|
||||
"There should be no need for combinational domains");
|
||||
|
||||
|
|
@ -122,7 +122,7 @@ class V3OrderProcessDomains final {
|
|||
m_externalDomains(vscp, externalDomainps);
|
||||
for (AstSenTree* const externalDomainp : externalDomainps) {
|
||||
UINFO(6, " xtrn d=" << debugDomain(externalDomainp) << " " << fromVtxp
|
||||
<< " because of " << vscp << endl);
|
||||
<< " because of " << vscp);
|
||||
UASSERT_OBJ(!externalDomainp->hasCombo(), vscp,
|
||||
"There should be no need for combinational domains");
|
||||
fromDomainp = combineDomains(fromDomainp, externalDomainp);
|
||||
|
|
@ -150,7 +150,7 @@ class V3OrderProcessDomains final {
|
|||
// Set the domain of the vertex
|
||||
vtxp->domainp(domainp);
|
||||
|
||||
UINFO(5, " done d=" << debugDomain(domainp) << " " << vtxp << endl);
|
||||
UINFO(5, " done d=" << debugDomain(domainp) << " " << vtxp);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ VL_DEFINE_DEBUG_FUNCTIONS;
|
|||
std::vector<AstActive*> V3Order::createSerial(OrderGraph& graph, const std::string& tag,
|
||||
const TrigToSenMap& trigToSen, bool slow) {
|
||||
|
||||
UINFO(2, " Constructing serial code for '" + tag + "'\n");
|
||||
UINFO(2, " Constructing serial code for '" + tag + "'");
|
||||
|
||||
// Build the move graph
|
||||
OrderMoveDomScope::clear();
|
||||
|
|
|
|||
14
src/V3Os.cpp
14
src/V3Os.cpp
|
|
@ -92,9 +92,9 @@ string V3Os::getenvStr(const string& envvar, const string& defaultValue) {
|
|||
|
||||
void V3Os::setenvStr(const string& envvar, const string& value, const string& why) {
|
||||
if (why != "") {
|
||||
UINFO(1, "export " << envvar << "='" << value << "' # " << why << endl);
|
||||
UINFO(1, "export " << envvar << "='" << value << "' # " << why);
|
||||
} else {
|
||||
UINFO(1, "export " << envvar << "='" << value << "'" << endl);
|
||||
UINFO(1, "export " << envvar << "='" << value << "'");
|
||||
}
|
||||
#if defined(_WIN32) || defined(__MINGW32__)
|
||||
_putenv_s(envvar.c_str(), value.c_str());
|
||||
|
|
@ -263,8 +263,8 @@ string V3Os::filenameRelativePath(const string& filename, const string& base) VL
|
|||
auto aIt = a.begin();
|
||||
auto bIt = b.begin();
|
||||
while (aIt != a.end() && bIt != b.end()) {
|
||||
// UINFO(9, "fnrp scan " << (aIt - a.begin()) << " " << a.substr(aIt - a.begin()) << endl);
|
||||
// UINFO(9, "fnrp scan " << (bIt - b.begin()) << " " << b.substr(bIt - b.begin()) << endl);
|
||||
// UINFO(9, "fnrp scan " << (aIt - a.begin()) << " " << a.substr(aIt - a.begin()));
|
||||
// UINFO(9, "fnrp scan " << (bIt - b.begin()) << " " << b.substr(bIt - b.begin()));
|
||||
auto aWordIt = aIt; // position of next slash
|
||||
for (; aWordIt != a.end(); ++aWordIt) {
|
||||
if (isSlash(*aWordIt)) break;
|
||||
|
|
@ -370,7 +370,7 @@ void V3Os::filesystemFlushBuildDir(const string& dirname) {
|
|||
// Linux kernel may not reread from NFS unless timestamp modified
|
||||
const int err = utimes(dirname.c_str(), nullptr);
|
||||
// Not an error
|
||||
if (err != 0) UINFO(1, "-Info: File not utimed: " << dirname << endl);
|
||||
if (err != 0) UINFO(1, "-Info: File not utimed: " << dirname);
|
||||
#endif
|
||||
filesystemFlush(dirname);
|
||||
}
|
||||
|
|
@ -472,7 +472,7 @@ void V3Os::u_sleep(int64_t usec) {
|
|||
// METHODS (sub command)
|
||||
|
||||
int V3Os::system(const string& command) {
|
||||
UINFO(1, "Running system: " << command << endl);
|
||||
UINFO(1, "Running system: " << command);
|
||||
const int ret = ::system(command.c_str());
|
||||
if (VL_UNCOVERABLE(ret == -1)) {
|
||||
v3fatal("Failed to execute command:" // LCOV_EXCL_LINE
|
||||
|
|
@ -481,7 +481,7 @@ int V3Os::system(const string& command) {
|
|||
} else {
|
||||
UASSERT(WIFEXITED(ret), "system(" << command << ") returned unexpected value of " << ret);
|
||||
const int exit_code = WEXITSTATUS(ret);
|
||||
UINFO(1, command << " returned exit code of " << exit_code << std::endl);
|
||||
UINFO(1, command << " returned exit code of " << exit_code);
|
||||
UASSERT(exit_code >= 0, "exit code must not be negative");
|
||||
return exit_code;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -158,19 +158,18 @@ public:
|
|||
UASSERT_OBJ(paramIt != paramsIt->second.end(), modvarp, "must be registered");
|
||||
AstConst* const defValuep = VN_CAST(paramIt->second->valuep(), Const);
|
||||
if (defValuep && areSame(constp, defValuep)) {
|
||||
UINFO(5, "Setting default value of " << constp << " to " << modvarp
|
||||
<< std::endl);
|
||||
UINFO(5, "Setting default value of " << constp << " to " << modvarp);
|
||||
continue; // Skip this parameter because setting the same value
|
||||
}
|
||||
const auto pIt = vlstd::as_const(params).find(modvarp->name());
|
||||
UINFO(5, "Comparing " << modvarp->name() << " " << constp << std::endl);
|
||||
UINFO(5, "Comparing " << modvarp->name() << " " << constp);
|
||||
if (pIt == params.end() || paramIdx >= params.size()
|
||||
|| !areSame(constp, pIt->second.get())) {
|
||||
found = false;
|
||||
break;
|
||||
}
|
||||
UINFO(5, "Matched " << modvarp->name() << " " << constp << " and "
|
||||
<< pIt->second.get() << std::endl);
|
||||
<< pIt->second.get());
|
||||
++paramIdx;
|
||||
}
|
||||
}
|
||||
|
|
@ -398,7 +397,7 @@ class ParamProcessor final {
|
|||
}
|
||||
newname = pair.first->second;
|
||||
}
|
||||
UINFO(4, "Name: " << srcModp->name() << "->" << longname << "->" << newname << endl);
|
||||
UINFO(4, "Name: " << srcModp->name() << "->" << longname << "->" << newname);
|
||||
return newname;
|
||||
}
|
||||
AstNodeDType* arraySubDTypep(AstNodeDType* nodep) {
|
||||
|
|
@ -439,7 +438,7 @@ class ParamProcessor final {
|
|||
for (AstPin* pinp = startpinp; pinp; pinp = VN_AS(pinp->nextp(), Pin)) {
|
||||
if (pinp->modVarp()) {
|
||||
// Find it in the clone structure
|
||||
// UINFO(8,"Clone find 0x"<<hex<<(uint32_t)pinp->modVarp()<<endl);
|
||||
// UINFO(8,"Clone find 0x"<<hex<<(uint32_t)pinp->modVarp());
|
||||
const auto cloneiter = clonemapp->find(pinp->modVarp());
|
||||
UASSERT_OBJ(cloneiter != clonemapp->end(), pinp,
|
||||
"Couldn't find pin in clone list");
|
||||
|
|
@ -558,7 +557,7 @@ class ParamProcessor final {
|
|||
longname += type.str();
|
||||
}
|
||||
}
|
||||
UINFO(9, " module params longname: " << longname << endl);
|
||||
UINFO(9, " module params longname: " << longname);
|
||||
|
||||
const auto iter = m_longMap.find(longname);
|
||||
if (iter != m_longMap.end()) return iter->second; // Already calculated
|
||||
|
|
@ -645,7 +644,7 @@ class ParamProcessor final {
|
|||
m_modNameMap.emplace(newModp->name(), ModInfo{newModp});
|
||||
const auto iter = m_modNameMap.find(newname);
|
||||
CloneMap* const clonemapp = &(iter->second.m_cloneMap);
|
||||
UINFO(4, " De-parameterize to new: " << newModp << endl);
|
||||
UINFO(4, " De-parameterize to new: " << newModp);
|
||||
|
||||
// Grab all I/O so we can remap our pins later
|
||||
// Note we allow multiple users of a parameterized model,
|
||||
|
|
@ -658,12 +657,12 @@ class ParamProcessor final {
|
|||
const AstIfaceRefDType* const portIrefp = it->first;
|
||||
const AstIfaceRefDType* const pinIrefp = it->second;
|
||||
AstIfaceRefDType* const cloneIrefp = portIrefp->clonep();
|
||||
UINFO(8, " IfaceOld " << portIrefp << endl);
|
||||
UINFO(8, " IfaceTo " << pinIrefp << endl);
|
||||
UINFO(8, " IfaceOld " << portIrefp);
|
||||
UINFO(8, " IfaceTo " << pinIrefp);
|
||||
UASSERT_OBJ(cloneIrefp, portIrefp, "parameter clone didn't hit AstIfaceRefDType");
|
||||
UINFO(8, " IfaceClo " << cloneIrefp << endl);
|
||||
UINFO(8, " IfaceClo " << cloneIrefp);
|
||||
cloneIrefp->ifacep(pinIrefp->ifaceViaCellp());
|
||||
UINFO(8, " IfaceNew " << cloneIrefp << endl);
|
||||
UINFO(8, " IfaceNew " << cloneIrefp);
|
||||
}
|
||||
// Assign parameters to the constants specified
|
||||
// DOES clone() so must be finished with module clonep() before here
|
||||
|
|
@ -678,7 +677,7 @@ class ParamProcessor final {
|
|||
// Remove any existing parameter
|
||||
if (modvarp->valuep()) modvarp->valuep()->unlinkFrBack()->deleteTree();
|
||||
// Set this parameter to value requested by cell
|
||||
UINFO(9, " set param " << modvarp << " = " << newp << endl);
|
||||
UINFO(9, " set param " << modvarp << " = " << newp);
|
||||
modvarp->valuep(newp->cloneTree(false));
|
||||
modvarp->overriddenParam(overridden);
|
||||
} else if (AstParamTypeDType* const modptp = pinp->modPTypep()) {
|
||||
|
|
@ -698,7 +697,7 @@ class ParamProcessor final {
|
|||
// Already made this flavor?
|
||||
auto it = m_modNameMap.find(newname);
|
||||
if (it != m_modNameMap.end()) {
|
||||
UINFO(4, " De-parameterize to prev: " << it->second.m_modp << endl);
|
||||
UINFO(4, " De-parameterize to prev: " << it->second.m_modp);
|
||||
} else {
|
||||
deepCloneModule(srcModp, ifErrorp, paramsp, newname, ifaceRefRefs);
|
||||
it = m_modNameMap.find(newname);
|
||||
|
|
@ -777,7 +776,7 @@ class ParamProcessor final {
|
|||
pinp->v3error("Parameter type variable isn't a type: Param "
|
||||
<< modvarp->prettyNameQ());
|
||||
} else {
|
||||
UINFO(9, "Parameter type assignment expr=" << exprp << " to " << origp << endl);
|
||||
UINFO(9, "Parameter type assignment expr=" << exprp << " to " << origp);
|
||||
V3Const::constifyParamsEdit(pinp->exprp()); // Reconcile typedefs
|
||||
// Constify may have caused pinp->exprp to change
|
||||
rawTypep = VN_AS(pinp->exprp(), NodeDType);
|
||||
|
|
@ -848,7 +847,7 @@ class ParamProcessor final {
|
|||
IfaceRefDType);
|
||||
}
|
||||
|
||||
UINFO(9, " portIfaceRef " << portIrefp << endl);
|
||||
UINFO(9, " portIfaceRef " << portIrefp);
|
||||
|
||||
if (!portIrefp) {
|
||||
pinp->v3error("Interface port " << modvarp->prettyNameQ()
|
||||
|
|
@ -858,9 +857,9 @@ class ParamProcessor final {
|
|||
<< modvarp->prettyNameQ()
|
||||
<< " is not connected to interface/modport pin expression");
|
||||
} else {
|
||||
UINFO(9, " pinIfaceRef " << pinIrefp << endl);
|
||||
UINFO(9, " pinIfaceRef " << pinIrefp);
|
||||
if (portIrefp->ifaceViaCellp() != pinIrefp->ifaceViaCellp()) {
|
||||
UINFO(9, " IfaceRefDType needs reconnect " << pinIrefp << endl);
|
||||
UINFO(9, " IfaceRefDType needs reconnect " << pinIrefp);
|
||||
longnamer += ("_" + paramSmallName(srcModp, pinp->modVarp())
|
||||
+ paramValueNumber(pinIrefp));
|
||||
any_overridesr = true;
|
||||
|
|
@ -922,7 +921,7 @@ class ParamProcessor final {
|
|||
srcModpr = paramedModp;
|
||||
any_overrides = true;
|
||||
} else if (!any_overrides) {
|
||||
UINFO(8, "Cell parameters all match original values, skipping expansion.\n");
|
||||
UINFO(8, "Cell parameters all match original values, skipping expansion.");
|
||||
// If it's the first use of the default instance, create a copy and store it in user3p.
|
||||
// user3p will also be used to check if the default instance is used.
|
||||
if (!srcModpr->user3p() && (VN_IS(srcModpr, Class) || VN_IS(srcModpr, Iface))) {
|
||||
|
|
@ -940,7 +939,7 @@ class ParamProcessor final {
|
|||
= moduleFindOrClone(srcModpr, nodep, paramsp, newname, ifaceRefRefs);
|
||||
// We need to relink the pins to the new module
|
||||
relinkPinsByName(pinsp, modInfop->m_modp);
|
||||
UINFO(8, " Done with " << modInfop->m_modp << endl);
|
||||
UINFO(8, " Done with " << modInfop->m_modp);
|
||||
srcModpr = modInfop->m_modp;
|
||||
}
|
||||
|
||||
|
|
@ -1001,7 +1000,7 @@ public:
|
|||
// Cell: Check for parameters in the instantiation.
|
||||
// We always run this, even if no parameters, as need to look for interfaces,
|
||||
// and remove any recursive references
|
||||
UINFO(4, "De-parameterize: " << nodep << endl);
|
||||
UINFO(4, "De-parameterize: " << nodep);
|
||||
// Create new module name with _'s between the constants
|
||||
if (debug() >= 10) nodep->dumpTree("- cell: ");
|
||||
// Evaluate all module constants
|
||||
|
|
@ -1025,7 +1024,7 @@ public:
|
|||
// Set name for later warnings (if srcModpr changed value due to cloning)
|
||||
srcModpr->someInstanceName(instanceName);
|
||||
|
||||
UINFO(8, " Done with orig " << nodep << endl);
|
||||
UINFO(8, " Done with orig " << nodep);
|
||||
// if (debug() >= 10)
|
||||
// v3Global.rootp()->dumpTreeFile(v3Global.debugFilename("param-out.tree"));
|
||||
}
|
||||
|
|
@ -1192,7 +1191,7 @@ class ParamVisitor final : public VNVisitor {
|
|||
}
|
||||
|
||||
if (m_iterateModule) { // Iterating from visitCells
|
||||
UINFO(4, " MOD-under-MOD. " << nodep << endl);
|
||||
UINFO(4, " MOD-under-MOD. " << nodep);
|
||||
m_workQueue.emplace(nodep->level(), nodep); // Delay until current module is done
|
||||
// visitCells (which we are returning to) will process nodep from m_workQueue later
|
||||
return;
|
||||
|
|
@ -1249,11 +1248,11 @@ class ParamVisitor final : public VNVisitor {
|
|||
for (; candp; candp = candp->nextp()) {
|
||||
if (nodep->name() == candp->name()) {
|
||||
if (AstVar* const varp = VN_CAST(candp, Var)) {
|
||||
UINFO(9, "Found interface parameter: " << varp << endl);
|
||||
UINFO(9, "Found interface parameter: " << varp);
|
||||
nodep->varp(varp);
|
||||
return true;
|
||||
} else if (const AstPin* const pinp = VN_CAST(candp, Pin)) {
|
||||
UINFO(9, "Found interface parameter: " << pinp << endl);
|
||||
UINFO(9, "Found interface parameter: " << pinp);
|
||||
UASSERT_OBJ(pinp->exprp(), pinp, "Interface parameter pin missing expression");
|
||||
VL_DO_DANGLING(nodep->replaceWith(pinp->exprp()->cloneTree(false)), nodep);
|
||||
return true;
|
||||
|
|
@ -1269,7 +1268,7 @@ class ParamVisitor final : public VNVisitor {
|
|||
const AstNode* backp = nodep;
|
||||
while ((backp = backp->backp())) {
|
||||
if (VN_IS(backp, NodeModule)) {
|
||||
UINFO(9, "Hit module boundary, done looking for interface" << endl);
|
||||
UINFO(9, "Hit module boundary, done looking for interface");
|
||||
break;
|
||||
}
|
||||
if (const AstVar* const varp = VN_CAST(backp, Var)) {
|
||||
|
|
@ -1292,7 +1291,7 @@ class ParamVisitor final : public VNVisitor {
|
|||
// Interfaces passed in on the port map have ifaces
|
||||
if (const AstIface* const ifacep = ifacerefp->ifacep()) {
|
||||
if (dotted == backp->name()) {
|
||||
UINFO(9, "Iface matching scope: " << ifacep << endl);
|
||||
UINFO(9, "Iface matching scope: " << ifacep);
|
||||
if (ifaceParamReplace(nodep, ifacep->stmtsp())) { //
|
||||
return;
|
||||
}
|
||||
|
|
@ -1301,7 +1300,7 @@ class ParamVisitor final : public VNVisitor {
|
|||
// Interfaces declared in this module have cells
|
||||
else if (const AstCell* const cellp = ifacerefp->cellp()) {
|
||||
if (dotted == cellp->name()) {
|
||||
UINFO(9, "Iface matching scope: " << cellp << endl);
|
||||
UINFO(9, "Iface matching scope: " << cellp);
|
||||
if (ifaceParamReplace(nodep, cellp->paramsp())) { //
|
||||
return;
|
||||
}
|
||||
|
|
@ -1376,7 +1375,7 @@ class ParamVisitor final : public VNVisitor {
|
|||
|
||||
// Generate Statements
|
||||
void visit(AstGenIf* nodep) override {
|
||||
UINFO(9, " GENIF " << nodep << endl);
|
||||
UINFO(9, " GENIF " << nodep);
|
||||
iterateAndNextNull(nodep->condp());
|
||||
// We suppress errors when widthing params since short-circuiting in
|
||||
// the conditional evaluation may mean these error can never occur. We
|
||||
|
|
@ -1407,8 +1406,8 @@ class ParamVisitor final : public VNVisitor {
|
|||
if (AstGenFor* const forp = VN_AS(nodep->genforp(), GenFor)) {
|
||||
// We should have a GENFOR under here. We will be replacing the begin,
|
||||
// so process here rather than at the generate to avoid iteration problems
|
||||
UINFO(9, " BEGIN " << nodep << endl);
|
||||
UINFO(9, " GENFOR " << forp << endl);
|
||||
UINFO(9, " BEGIN " << nodep);
|
||||
UINFO(9, " GENFOR " << forp);
|
||||
// Visit child nodes before unrolling
|
||||
iterateAndNextNull(forp->initsp());
|
||||
iterateAndNextNull(forp->condp());
|
||||
|
|
@ -1441,7 +1440,7 @@ class ParamVisitor final : public VNVisitor {
|
|||
nodep->v3fatalSrc("GENFOR should have been wrapped in BEGIN");
|
||||
}
|
||||
void visit(AstGenCase* nodep) override {
|
||||
UINFO(9, " GENCASE " << nodep << endl);
|
||||
UINFO(9, " GENCASE " << nodep);
|
||||
bool hit = false;
|
||||
AstNode* keepp = nullptr;
|
||||
iterateAndNextNull(nodep->exprp());
|
||||
|
|
@ -1556,7 +1555,7 @@ public:
|
|||
// Param class functions
|
||||
|
||||
void V3Param::param(AstNetlist* rootp) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{ ParamVisitor{rootp}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("param", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -191,8 +191,8 @@ AstNodeDType* V3ParseGrammar::createArray(AstNodeDType* basep, AstNodeRange* nra
|
|||
AstVar* V3ParseGrammar::createVariable(FileLine* fileline, const string& name,
|
||||
AstNodeRange* arrayp, AstNode* attrsp) {
|
||||
AstNodeDType* dtypep = GRAMMARP->m_varDTypep;
|
||||
UINFO(5, " creVar " << name << " decl=" << GRAMMARP->m_varDecl << " io="
|
||||
<< GRAMMARP->m_varIO << " dt=" << (dtypep ? "set" : "") << endl);
|
||||
UINFO(5, " creVar " << name << " decl=" << GRAMMARP->m_varDecl
|
||||
<< " io=" << GRAMMARP->m_varIO << " dt=" << (dtypep ? "set" : ""));
|
||||
if (GRAMMARP->m_varIO == VDirection::NONE // In non-ANSI port list
|
||||
&& GRAMMARP->m_varDecl == VVarType::PORT) {
|
||||
// Just a port list with variable name (not v2k format); AstPort already created
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ void V3ParseImp::importIfInStd(FileLine* fileline, const string& id) {
|
|||
if (fileline->filename() == V3Options::getStdPackagePath()) return;
|
||||
if (AstPackage* const stdpkgp
|
||||
= v3Global.rootp()->stdPackagep()) { // else e.g. --no-std-package
|
||||
UINFO(9, "import and keep std:: for " << fileline << "\n");
|
||||
UINFO(9, "import and keep std:: for " << fileline);
|
||||
AstPackageImport* const impp = new AstPackageImport{stdpkgp->fileline(), stdpkgp, "*"};
|
||||
unitPackage(stdpkgp->fileline())->addStmtsp(impp);
|
||||
v3Global.setUsesStdPackage();
|
||||
|
|
@ -126,7 +126,7 @@ AstPragma* V3ParseImp::createTimescale(FileLine* fl, bool unitSet, double unitVa
|
|||
bool bad;
|
||||
unit = VTimescale{unitVal, bad /*ref*/};
|
||||
if (bad) {
|
||||
UINFO(1, "Value = " << unitVal << endl);
|
||||
UINFO(1, "Value = " << unitVal);
|
||||
fl->v3error("timeunit illegal value");
|
||||
}
|
||||
}
|
||||
|
|
@ -135,7 +135,7 @@ AstPragma* V3ParseImp::createTimescale(FileLine* fl, bool unitSet, double unitVa
|
|||
bool bad;
|
||||
prec = VTimescale{precVal, bad /*ref*/};
|
||||
if (bad) {
|
||||
UINFO(1, "Value = " << precVal << endl);
|
||||
UINFO(1, "Value = " << precVal);
|
||||
fl->v3error("timeprecision illegal value");
|
||||
}
|
||||
}
|
||||
|
|
@ -298,7 +298,7 @@ void V3ParseImp::parseFile(FileLine* fileline, const string& modfilename, bool i
|
|||
const string nondirname = V3Os::filenameNonDir(modfilename);
|
||||
const string modname = V3Os::filenameNonDirExt(modfilename);
|
||||
|
||||
UINFO(2, __FUNCTION__ << ": " << modname << (inLibrary ? " [LIB]" : "") << endl);
|
||||
UINFO(2, __FUNCTION__ << ": " << modname << (inLibrary ? " [LIB]" : ""));
|
||||
m_lexFileline = new FileLine{fileline};
|
||||
m_lexFileline->newContent();
|
||||
m_bisonLastFileline = m_lexFileline;
|
||||
|
|
@ -366,7 +366,7 @@ void V3ParseImp::dumpInputsFile() {
|
|||
}
|
||||
if (!append) {
|
||||
append = true;
|
||||
UINFO(1, "Writing all preprocessed output to " << vppfilename << endl);
|
||||
UINFO(1, "Writing all preprocessed output to " << vppfilename);
|
||||
*ofp << "// Dump of all post-preprocessor input\n";
|
||||
*ofp << "// Blank lines and `line directives have been removed\n";
|
||||
*ofp << "//\n";
|
||||
|
|
@ -380,7 +380,7 @@ void V3ParseImp::dumpInputsFile() {
|
|||
|
||||
void V3ParseImp::lexFile(const string& modname) {
|
||||
// Prepare for lexing
|
||||
UINFO(3, "Lexing " << modname << endl);
|
||||
UINFO(3, "Lexing " << modname);
|
||||
s_parsep = this;
|
||||
lexFileline()->warnResetDefault(); // Reenable warnings on each file
|
||||
lexDestroy(); // Restart from clean slate.
|
||||
|
|
@ -434,7 +434,7 @@ size_t V3ParseImp::tokenPipeScanIdType(size_t depthIn) {
|
|||
// and caller must check does NOT match tokenPipeScanIdCell
|
||||
size_t depth = depthIn;
|
||||
// UINFO(9, "tokenPipeScanType START d="
|
||||
// << depth << " " << V3ParseImp::tokenName(tokenPeekp(depth)->token) << endl);
|
||||
// << depth << " " << V3ParseImp::tokenName(tokenPeekp(depth)->token));
|
||||
if (tokenPeekp(depth)->token == '#' && tokenPeekp(depth + 1)->token == '(') {
|
||||
depth = tokenPipeScanParam(depth, false);
|
||||
// Not :: as then it's a yaID__CC, we'll parse that in tokenPipeScanId
|
||||
|
|
@ -446,7 +446,7 @@ size_t V3ParseImp::tokenPipeScanIdType(size_t depthIn) {
|
|||
if (tokenPeekp(depth)->token != yaID__LEX && tokenPeekp(depth)->token != yP_TICKBRA)
|
||||
return depthIn;
|
||||
++depth;
|
||||
// UINFO(9, "tokenPipeScanType MATCH\n");
|
||||
// UINFO(9, "tokenPipeScanType MATCH");
|
||||
|
||||
return depth;
|
||||
}
|
||||
|
|
@ -546,7 +546,7 @@ size_t V3ParseImp::tokenPipeScanTypeEq(size_t depth) {
|
|||
int V3ParseImp::tokenPipelineId(int token) {
|
||||
const V3ParseBisonYYSType* nexttokp = tokenPeekp(0); // First char after yaID
|
||||
const int nexttok = nexttokp->token;
|
||||
UINFO(9, "tokenPipelineId tok=" << yylval.token << endl);
|
||||
UINFO(9, "tokenPipelineId tok=" << yylval.token);
|
||||
UASSERT(yylval.token == yaID__LEX, "Start with ID");
|
||||
if (nexttok == yP_COLONCOLON) return yaID__CC;
|
||||
VL_RESTORER(yylval); // Remember value, as about to read ahead
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ class V3PreExpr final {
|
|||
static void selfTestOne(const string& expr, bool expect) {
|
||||
// This hacky self-test parser just looks at first character of
|
||||
// operator, and requires space separation of operators/values
|
||||
UINFO(9, "V3PreExpr selfTestOne " << expr << endl);
|
||||
UINFO(9, "V3PreExpr selfTestOne " << expr);
|
||||
FileLine* const flp = nullptr;
|
||||
V3PreExpr parser;
|
||||
parser.reset(flp);
|
||||
|
|
@ -166,11 +166,11 @@ class V3PreExpr final {
|
|||
|
||||
// METHODS
|
||||
void pushOp(const V3PreExprToken& token) {
|
||||
// UINFO(9, " pushOp " << token.ascii() << endl);
|
||||
// UINFO(9, " pushOp " << token.ascii());
|
||||
m_ops.push_back(token);
|
||||
}
|
||||
void pushValue(const V3PreExprToken& token) {
|
||||
// UINFO(9, " pushValue " << token.ascii() << endl);
|
||||
// UINFO(9, " pushValue " << token.ascii());
|
||||
m_values.push_back(token);
|
||||
}
|
||||
V3PreExprToken popValue() {
|
||||
|
|
@ -180,13 +180,13 @@ class V3PreExpr final {
|
|||
}
|
||||
const V3PreExprToken tok = m_values.back();
|
||||
m_values.pop_back();
|
||||
// UINFO(9, " popValue " << tok.ascii() << endl;
|
||||
// UINFO(9, " popValue " << tok.ascii());
|
||||
return tok;
|
||||
}
|
||||
void reduce() {
|
||||
UASSERT(!m_ops.empty(), "lost op stack beginning END");
|
||||
V3PreExprToken tok = m_ops.back();
|
||||
// UINFO(9, "Reduce " << tok.ascii() << endl);
|
||||
// UINFO(9, "Reduce " << tok.ascii());
|
||||
m_ops.pop_back();
|
||||
switch (tok.token()) {
|
||||
case V3PreExprToken::KET: {
|
||||
|
|
@ -241,7 +241,7 @@ class V3PreExpr final {
|
|||
while (!m_inputs.empty()) {
|
||||
V3PreExprToken tok = m_inputs.front();
|
||||
m_inputs.pop_front();
|
||||
UINFO(9, "input read " << tok.ascii() << endl);
|
||||
UINFO(9, "input read " << tok.ascii());
|
||||
if (tok.isValue()) {
|
||||
pushValue(tok);
|
||||
continue;
|
||||
|
|
@ -251,7 +251,7 @@ class V3PreExpr final {
|
|||
V3PreExprToken topTok = m_ops.back();
|
||||
auto action = parseTable[topTok.token()][tok.token()];
|
||||
UINFO(9, "pop action " << actionAscii(action) << " from parseTable[" << topTok.ascii()
|
||||
<< "][" << tok.ascii() << "]\n");
|
||||
<< "][" << tok.ascii() << "]");
|
||||
switch (action) {
|
||||
case RR: // Reduce
|
||||
reduce();
|
||||
|
|
@ -279,7 +279,7 @@ public:
|
|||
}
|
||||
void pushInput(const V3PreExprToken& token) {
|
||||
if (!m_firstFileline) m_firstFileline = token.fileline();
|
||||
UINFO(9, "pushInput " << token.ascii() << endl);
|
||||
UINFO(9, "pushInput " << token.ascii());
|
||||
m_inputs.push_back(token);
|
||||
}
|
||||
bool result() {
|
||||
|
|
|
|||
|
|
@ -345,7 +345,7 @@ FileLine* V3PreProcImp::defFileline(const string& name) {
|
|||
}
|
||||
void V3PreProcImp::define(FileLine* fl, const string& name, const string& value,
|
||||
const string& params, bool cmdline) {
|
||||
UINFO(4, "DEFINE '" << name << "' as '" << value << "' params '" << params << "'" << endl);
|
||||
UINFO(4, "DEFINE '" << name << "' as '" << value << "' params '" << params << "'");
|
||||
if (!V3LanguageWords::isKeyword("`"s + name).empty()) {
|
||||
fl->v3error("Attempting to define built-in directive: '`" << name
|
||||
<< "' (IEEE 1800-2023 22.5.1)");
|
||||
|
|
@ -619,13 +619,13 @@ string V3PreProcImp::defineSubst(VDefineRef* refp) {
|
|||
// Note we parse the definition parameters and value here. If a
|
||||
// parameterized define is used many, many times, we could cache the
|
||||
// parsed result.
|
||||
UINFO(4, "defineSubstIn `" << refp->name() << " " << refp->params() << endl);
|
||||
UINFO(4, "defineSubstIn `" << refp->name() << " " << refp->params());
|
||||
for (unsigned i = 0; i < refp->args().size(); i++) {
|
||||
UINFO(4, "defineArg[" << i << "] = '" << refp->args()[i] << "'" << endl);
|
||||
UINFO(4, "defineArg[" << i << "] = '" << refp->args()[i] << "'");
|
||||
}
|
||||
// Grab value
|
||||
const string value = defValue(refp->name());
|
||||
UINFO(4, "defineValue '" << V3PreLex::cleanDbgStrg(value) << "'" << endl);
|
||||
UINFO(4, "defineValue '" << V3PreLex::cleanDbgStrg(value) << "'");
|
||||
|
||||
std::map<const string, string> argValueByName;
|
||||
{ // Parse argument list into map
|
||||
|
|
@ -640,8 +640,8 @@ string V3PreProcImp::defineSubst(VDefineRef* refp) {
|
|||
const char* cp = params.c_str();
|
||||
if (*cp == '(') cp++;
|
||||
for (; *cp; cp++) {
|
||||
// UINFO(4," Parse Paren="<<paren<<" Arg="<<numArgs<<" token='"<<token<<"'
|
||||
// Parse="<<cp<<endl);
|
||||
// UINFO(4, " Parse Paren=" << paren << " Arg=" << numArgs << " token='" << token
|
||||
// << "' Parse=" << cp);
|
||||
if (!quote && paren == 1) {
|
||||
if (*cp == ')' || *cp == ',') {
|
||||
string valueDef;
|
||||
|
|
@ -652,7 +652,7 @@ string V3PreProcImp::defineSubst(VDefineRef* refp) {
|
|||
}
|
||||
argName = trimWhitespace(argName, true);
|
||||
UINFO(4, " Got Arg=" << numArgs << " argName='" << argName
|
||||
<< "' default='" << valueDef << "'" << endl);
|
||||
<< "' default='" << valueDef << "'");
|
||||
// Parse it
|
||||
if (argName != "") {
|
||||
if (refp->args().size() > numArgs) {
|
||||
|
|
@ -714,7 +714,7 @@ string V3PreProcImp::defineSubst(VDefineRef* refp) {
|
|||
bool backslashesc = false; // In \.....{space} block
|
||||
// Note we go through the loop once more at the nullptr end-of-string
|
||||
for (const char* cp = value.c_str(); (*cp) || argName != ""; cp = (*cp ? cp + 1 : cp)) {
|
||||
// UINFO(4, "CH "<<*cp<<" an "<<argName<<endl);
|
||||
// UINFO(4, "CH " << *cp << " an " << argName);
|
||||
if (!quote && !triquote && *cp == '\\') {
|
||||
backslashesc = true;
|
||||
} else if (std::isspace(*cp)) {
|
||||
|
|
@ -805,7 +805,7 @@ string V3PreProcImp::defineSubst(VDefineRef* refp) {
|
|||
}
|
||||
}
|
||||
|
||||
UINFO(4, "defineSubstOut '" << V3PreLex::cleanDbgStrg(out) << "'" << endl);
|
||||
UINFO(4, "defineSubstOut '" << V3PreLex::cleanDbgStrg(out) << "'");
|
||||
return out;
|
||||
}
|
||||
|
||||
|
|
@ -1015,7 +1015,7 @@ void V3PreProcImp::debugToken(int tok, const char* cmtp) {
|
|||
UINFO(0, flcol << ": " << cmtp << " " << (m_off ? "of" : "on") << " "
|
||||
<< procStateName(state()) << "(" << static_cast<int>(m_states.size())
|
||||
<< ") dr" << m_defRefs.size() << ": <" << m_lexp->currentStartState()
|
||||
<< ">" << tokenName(tok) << ": " << buf << endl);
|
||||
<< ">" << tokenName(tok) << ": " << buf);
|
||||
if (s_debugFileline >= 9) {
|
||||
std::cout << m_lexp->m_tokFilelinep->warnContextSecondary() << endl;
|
||||
}
|
||||
|
|
@ -1078,13 +1078,13 @@ int V3PreProcImp::getStateToken() {
|
|||
string name(yyourtext() + 1, yyourleng() - 1);
|
||||
if (defExists(name)) { // JOIN(DEFREF)
|
||||
// Put back the `` and process the defref
|
||||
UINFO(5, "```: define " << name << " exists, expand first\n");
|
||||
UINFO(5, "```: define " << name << " exists, expand first");
|
||||
// After define, unputString("``"). Not now as would lose yyourtext()
|
||||
m_defPutJoin = true;
|
||||
UINFO(5, "TOKEN now DEFREF\n");
|
||||
UINFO(5, "TOKEN now DEFREF");
|
||||
tok = VP_DEFREF;
|
||||
} else { // DEFREF(JOIN)
|
||||
UINFO(5, "```: define " << name << " doesn't exist, join first\n");
|
||||
UINFO(5, "```: define " << name << " doesn't exist, join first");
|
||||
// FALLTHRU, handle as with VP_SYMBOL_JOIN
|
||||
}
|
||||
}
|
||||
|
|
@ -1097,7 +1097,7 @@ int V3PreProcImp::getStateToken() {
|
|||
|| tok == VP_DEFREF_JOIN || tok == VP_JOIN) {
|
||||
// a`` -> string doesn't include the ``, so can just grab next and continue
|
||||
string out(yyourtext(), yyourleng());
|
||||
UINFO(5, "`` LHS:" << out << endl);
|
||||
UINFO(5, "`` LHS:" << out);
|
||||
// a``b``c can have multiple joins, so we need a stack
|
||||
m_joinStack.push(out);
|
||||
statePush(ps_JOIN);
|
||||
|
|
@ -1118,7 +1118,7 @@ int V3PreProcImp::getStateToken() {
|
|||
m_lastSym.assign(yyourtext(), yyourleng());
|
||||
if (state() == ps_DEFNAME_IFDEF || state() == ps_DEFNAME_IFNDEF) {
|
||||
bool enable = defExists(m_lastSym);
|
||||
UINFO(4, "Ifdef " << m_lastSym << (enable ? " ON" : " OFF") << endl);
|
||||
UINFO(4, "Ifdef " << m_lastSym << (enable ? " ON" : " OFF"));
|
||||
if (state() == ps_DEFNAME_IFNDEF) enable = !enable;
|
||||
m_ifdefStack.push(VPreIfEntry{enable, false});
|
||||
if (!enable) parsingOff();
|
||||
|
|
@ -1134,7 +1134,7 @@ int V3PreProcImp::getStateToken() {
|
|||
if (!lastIf.on()) parsingOn();
|
||||
// Handle `if portion
|
||||
const bool enable = !lastIf.everOn() && defExists(m_lastSym);
|
||||
UINFO(4, "Elsif " << m_lastSym << (enable ? " ON" : " OFF") << endl);
|
||||
UINFO(4, "Elsif " << m_lastSym << (enable ? " ON" : " OFF"));
|
||||
m_ifdefStack.push(VPreIfEntry{enable, lastIf.everOn()});
|
||||
if (!enable) parsingOff();
|
||||
}
|
||||
|
|
@ -1142,7 +1142,7 @@ int V3PreProcImp::getStateToken() {
|
|||
goto next_tok;
|
||||
} else if (state() == ps_DEFNAME_UNDEF) {
|
||||
if (!m_off) {
|
||||
UINFO(4, "Undef " << m_lastSym << endl);
|
||||
UINFO(4, "Undef " << m_lastSym);
|
||||
undef(m_lastSym);
|
||||
}
|
||||
statePop();
|
||||
|
|
@ -1161,7 +1161,7 @@ int V3PreProcImp::getStateToken() {
|
|||
if (yyourleng() == 1 && yyourtext()[0] == '('
|
||||
&& (state() == ps_DEFNAME_IFDEF || state() == ps_DEFNAME_IFNDEF
|
||||
|| state() == ps_DEFNAME_ELSIF)) {
|
||||
UINFO(4, "ifdef() start (\n");
|
||||
UINFO(4, "ifdef() start (");
|
||||
m_lexp->pushStateExpr();
|
||||
m_exprParser.reset(fileline());
|
||||
m_exprParenLevel = 1;
|
||||
|
|
@ -1222,7 +1222,7 @@ int V3PreProcImp::getStateToken() {
|
|||
} else {
|
||||
// Done with parsing expression
|
||||
bool enable = m_exprParser.result();
|
||||
UINFO(4, "ifdef() result=" << enable << endl);
|
||||
UINFO(4, "ifdef() result=" << enable);
|
||||
if (state() == ps_EXPR_IFDEF || state() == ps_EXPR_IFNDEF) {
|
||||
if (state() == ps_EXPR_IFNDEF) enable = !enable;
|
||||
m_ifdefStack.push(VPreIfEntry{enable, false});
|
||||
|
|
@ -1239,7 +1239,7 @@ int V3PreProcImp::getStateToken() {
|
|||
if (!lastIf.on()) parsingOn();
|
||||
// Handle `if portion
|
||||
enable = !lastIf.everOn() && enable;
|
||||
UINFO(4, "Elsif " << m_lastSym << (enable ? " ON" : " OFF") << endl);
|
||||
UINFO(4, "Elsif " << m_lastSym << (enable ? " ON" : " OFF"));
|
||||
m_ifdefStack.push(VPreIfEntry{enable, lastIf.everOn()});
|
||||
if (!enable) parsingOff();
|
||||
}
|
||||
|
|
@ -1322,7 +1322,7 @@ int V3PreProcImp::getStateToken() {
|
|||
value = trimWhitespace(value, true);
|
||||
// Define it
|
||||
UINFO(4, "Define " << m_lastSym << " " << formals << " = '"
|
||||
<< V3PreLex::cleanDbgStrg(value) << "'" << endl);
|
||||
<< V3PreLex::cleanDbgStrg(value) << "'");
|
||||
define(fileline(), m_lastSym, value, formals, false);
|
||||
}
|
||||
} else {
|
||||
|
|
@ -1353,7 +1353,7 @@ int V3PreProcImp::getStateToken() {
|
|||
VDefineRef* refp = &(m_defRefs.top());
|
||||
refp->nextarg(refp->nextarg() + m_lexp->m_defValue);
|
||||
m_lexp->m_defValue = "";
|
||||
UINFO(4, "defarg++ " << refp->nextarg() << endl);
|
||||
UINFO(4, "defarg++ " << refp->nextarg());
|
||||
if (tok == VP_DEFARG && yyourleng() == 1 && yyourtext()[0] == ',') {
|
||||
refp->args().push_back(refp->nextarg());
|
||||
stateChange(ps_DEFARG);
|
||||
|
|
@ -1378,7 +1378,7 @@ int V3PreProcImp::getStateToken() {
|
|||
const string lhs = m_joinStack.top();
|
||||
m_joinStack.pop();
|
||||
out.insert(0, lhs);
|
||||
UINFO(5, "``-end-defarg Out:" << out << endl);
|
||||
UINFO(5, "``-end-defarg Out:" << out);
|
||||
statePop();
|
||||
}
|
||||
if (!m_off) {
|
||||
|
|
@ -1427,7 +1427,7 @@ int V3PreProcImp::getStateToken() {
|
|||
if (tok == VP_STRING) {
|
||||
statePop();
|
||||
m_lastSym.assign(yyourtext(), yyourleng());
|
||||
UINFO(4, "Include " << m_lastSym << endl);
|
||||
UINFO(4, "Include " << m_lastSym);
|
||||
// Drop leading and trailing quotes.
|
||||
m_lastSym.erase(0, 1);
|
||||
m_lastSym.erase(m_lastSym.length() - 1, 1);
|
||||
|
|
@ -1466,11 +1466,11 @@ int V3PreProcImp::getStateToken() {
|
|||
UASSERT(!m_joinStack.empty(), "`` join stack empty, but in a ``");
|
||||
const string lhs = m_joinStack.top();
|
||||
m_joinStack.pop();
|
||||
UINFO(5, "`` LHS:" << lhs << endl);
|
||||
UINFO(5, "`` LHS:" << lhs);
|
||||
string rhs(yyourtext(), yyourleng());
|
||||
UINFO(5, "`` RHS:" << rhs << endl);
|
||||
UINFO(5, "`` RHS:" << rhs);
|
||||
const string out = lhs + rhs;
|
||||
UINFO(5, "`` Out:" << out << endl);
|
||||
UINFO(5, "`` Out:" << out);
|
||||
unputString(out);
|
||||
statePop();
|
||||
goto next_tok;
|
||||
|
|
@ -1542,14 +1542,14 @@ int V3PreProcImp::getStateToken() {
|
|||
const VPreIfEntry lastIf = m_ifdefStack.top();
|
||||
m_ifdefStack.pop();
|
||||
const bool enable = !lastIf.everOn();
|
||||
UINFO(4, "Else " << (enable ? " ON" : " OFF") << endl);
|
||||
UINFO(4, "Else " << (enable ? " ON" : " OFF"));
|
||||
m_ifdefStack.push(VPreIfEntry{enable, lastIf.everOn()});
|
||||
if (!lastIf.on()) parsingOn();
|
||||
if (!enable) parsingOff();
|
||||
}
|
||||
goto next_tok;
|
||||
case VP_ENDIF:
|
||||
UINFO(4, "Endif " << endl);
|
||||
UINFO(4, "Endif ");
|
||||
if (m_ifdefStack.empty()) {
|
||||
fileline()->v3error("`endif with no matching `if");
|
||||
} else {
|
||||
|
|
@ -1565,7 +1565,7 @@ int V3PreProcImp::getStateToken() {
|
|||
// m_off not right here, but inside substitution, to make this work:
|
||||
// `ifdef NEVER `DEFUN(`endif)
|
||||
string name(yyourtext() + 1, yyourleng() - 1);
|
||||
UINFO(4, "DefRef " << name << endl);
|
||||
UINFO(4, "DefRef " << name);
|
||||
if (m_defPutJoin) {
|
||||
m_defPutJoin = false;
|
||||
unputString("``");
|
||||
|
|
@ -1577,7 +1577,7 @@ int V3PreProcImp::getStateToken() {
|
|||
// Substitute
|
||||
if (!defExists(name)) { // Not found, return original string as-is
|
||||
m_defDepth = 0;
|
||||
UINFO(4, "Defref `" << name << " => not_defined" << endl);
|
||||
UINFO(4, "Defref `" << name << " => not_defined");
|
||||
if (m_off) {
|
||||
goto next_tok;
|
||||
} else {
|
||||
|
|
@ -1603,7 +1603,7 @@ int V3PreProcImp::getStateToken() {
|
|||
const string lhs = m_joinStack.top();
|
||||
m_joinStack.pop();
|
||||
out.insert(0, lhs);
|
||||
UINFO(5, "``-end-defref Out:" << out << endl);
|
||||
UINFO(5, "``-end-defref Out:" << out);
|
||||
statePop();
|
||||
}
|
||||
if (!m_off) {
|
||||
|
|
@ -1624,7 +1624,7 @@ int V3PreProcImp::getStateToken() {
|
|||
}
|
||||
goto next_tok;
|
||||
} else { // Found, with parameters
|
||||
UINFO(4, "Defref `" << name << " => parameterized" << endl);
|
||||
UINFO(4, "Defref `" << name << " => parameterized");
|
||||
// The CURRENT macro needs the paren saved, it's not a
|
||||
// property of the child macro
|
||||
if (!m_defRefs.empty()) m_defRefs.top().parenLevel(m_lexp->m_parenLevel);
|
||||
|
|
@ -1646,7 +1646,7 @@ int V3PreProcImp::getStateToken() {
|
|||
return tok;
|
||||
case VP_UNDEFINEALL:
|
||||
if (!m_off) {
|
||||
UINFO(4, "Undefineall " << endl);
|
||||
UINFO(4, "Undefineall ");
|
||||
undefineall();
|
||||
}
|
||||
goto next_tok;
|
||||
|
|
@ -1691,7 +1691,7 @@ int V3PreProcImp::getFinalToken(string& buf) {
|
|||
if (false && debug() >= 5) {
|
||||
const string bufcln = V3PreLex::cleanDbgStrg(buf);
|
||||
const string flcol = m_lexp->m_tokFilelinep->asciiLineCol();
|
||||
UINFO(0, flcol << ": FIN: " << tokenName(tok) << ": " << bufcln << endl);
|
||||
UINFO(0, flcol << ": FIN: " << tokenName(tok) << ": " << bufcln);
|
||||
}
|
||||
// Track `line
|
||||
const char* bufp = buf.c_str();
|
||||
|
|
@ -1706,8 +1706,7 @@ int V3PreProcImp::getFinalToken(string& buf) {
|
|||
if (debug() >= 5) {
|
||||
const string flcol = m_lexp->m_tokFilelinep->asciiLineCol();
|
||||
UINFO(0, flcol << ": FIN: readjust, fin at " << m_finFilelinep->lastLineno()
|
||||
<< " request at " << m_lexp->m_tokFilelinep->lastLineno()
|
||||
<< endl);
|
||||
<< " request at " << m_lexp->m_tokFilelinep->lastLineno());
|
||||
}
|
||||
m_finFilelinep->filename(m_lexp->m_tokFilelinep->filename());
|
||||
m_finFilelinep->lineno(m_lexp->m_tokFilelinep->lastLineno());
|
||||
|
|
@ -1751,7 +1750,7 @@ string V3PreProcImp::getline() {
|
|||
if (debug() >= 5) {
|
||||
const string bufcln = V3PreLex::cleanDbgStrg(buf);
|
||||
const string flcol = m_lexp->m_tokFilelinep->asciiLineCol();
|
||||
UINFO(0, flcol << ": GETFETC: " << tokenName(tok) << ": " << bufcln << endl);
|
||||
UINFO(0, flcol << ": GETFETC: " << tokenName(tok) << ": " << bufcln);
|
||||
}
|
||||
if (tok == VP_EOF) {
|
||||
// Add a final newline, if the user forgot the final \n.
|
||||
|
|
@ -1771,7 +1770,7 @@ string V3PreProcImp::getline() {
|
|||
if (debug() >= 4) {
|
||||
const string lncln = V3PreLex::cleanDbgStrg(theLine);
|
||||
const string flcol = m_lexp->m_tokFilelinep->asciiLineCol();
|
||||
UINFO(0, flcol << ": GETLINE: " << lncln << endl);
|
||||
UINFO(0, flcol << ": GETLINE: " << lncln);
|
||||
}
|
||||
return theLine;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ protected:
|
|||
bool preproc(FileLine* fl, const string& modname, VInFilter* filterp, V3ParseImp* parsep,
|
||||
const string& errmsg) { // "" for no error
|
||||
// Preprocess the given module, putting output in vppFilename
|
||||
UINFO(1, "Preprocessing " << modname << endl);
|
||||
UINFO(1, "Preprocessing " << modname);
|
||||
|
||||
// Preprocess
|
||||
s_filterp = filterp;
|
||||
|
|
@ -140,7 +140,7 @@ private:
|
|||
}
|
||||
if (filename == "") return ""; // Not found
|
||||
|
||||
UINFO(2, " Reading " << filename << endl);
|
||||
UINFO(2, " Reading " << filename);
|
||||
s_preprocp->openFile(fl, filterp, filename);
|
||||
return filename;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ class PremitVisitor final : public VNVisitor {
|
|||
|
||||
AstVar* createWideTemp(AstNodeExpr* nodep) {
|
||||
UASSERT_OBJ(m_stmtp, nodep, "Attempting to create temporary with no insertion point");
|
||||
UINFO(4, "createWideTemp: " << nodep << endl);
|
||||
UINFO(4, "createWideTemp: " << nodep);
|
||||
|
||||
VNRelinker relinker;
|
||||
nodep->unlinkFrBack(&relinker);
|
||||
|
|
@ -118,7 +118,7 @@ class PremitVisitor final : public VNVisitor {
|
|||
|
||||
void visitShift(AstNodeBiop* nodep) {
|
||||
// Shifts of > 32/64 bits in C++ will wrap-around and generate non-0s
|
||||
UINFO(4, " ShiftFix " << nodep << endl);
|
||||
UINFO(4, " ShiftFix " << nodep);
|
||||
const AstConst* const shiftp = VN_CAST(nodep->rhsp(), Const);
|
||||
if (shiftp && shiftp->num().mostSetBitP1() > 32) {
|
||||
shiftp->v3error(
|
||||
|
|
@ -181,7 +181,7 @@ class PremitVisitor final : public VNVisitor {
|
|||
m_inWhileCondp = nullptr
|
||||
|
||||
void visit(AstWhile* nodep) override {
|
||||
UINFO(4, " WHILE " << nodep << endl);
|
||||
UINFO(4, " WHILE " << nodep);
|
||||
// cppcheck-suppress shadowVariable // Also restored below
|
||||
START_STATEMENT_OR_RETURN(nodep);
|
||||
iterateAndNextNull(nodep->precondsp());
|
||||
|
|
@ -241,7 +241,7 @@ class PremitVisitor final : public VNVisitor {
|
|||
&& nodep->filep()->sameGateTree(VN_AS(searchp, Display)->filep())) {
|
||||
// There's another display next; we can just wait to flush
|
||||
} else {
|
||||
UINFO(4, "Autoflush " << nodep << endl);
|
||||
UINFO(4, "Autoflush " << nodep);
|
||||
nodep->addNextHere(
|
||||
new AstFFlush{nodep->fileline(),
|
||||
nodep->filep() ? nodep->filep()->cloneTreePure(true) : nullptr});
|
||||
|
|
@ -367,7 +367,7 @@ public:
|
|||
// Premit class functions
|
||||
|
||||
void V3Premit::premitAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{ PremitVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("premit", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -541,6 +541,6 @@ public:
|
|||
// ProtectLib class functions
|
||||
|
||||
void V3ProtectLib::protect() {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
ProtectVisitor{v3Global.rootp()};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ class RandomizeMarkVisitor final : public VNVisitor {
|
|||
}
|
||||
void setPackageRefs() {
|
||||
for (AstNodeVarRef* staticRefp : m_staticRefs) {
|
||||
UINFO(9, "Updated classOrPackage ref for " << staticRefp->name() << endl);
|
||||
UINFO(9, "Updated classOrPackage ref for " << staticRefp->name());
|
||||
staticRefp->classOrPackagep(VN_AS(staticRefp->varp()->user2p(), NodeModule));
|
||||
}
|
||||
}
|
||||
|
|
@ -1457,7 +1457,7 @@ class RandomizeVisitor final : public VNVisitor {
|
|||
}
|
||||
AstVar* enumValueTabp(AstEnumDType* const nodep) {
|
||||
if (nodep->user2p()) return VN_AS(nodep->user2p(), Var);
|
||||
UINFO(9, "Construct Venumvaltab " << nodep << endl);
|
||||
UINFO(9, "Construct Venumvaltab " << nodep);
|
||||
AstNodeArrayDType* const vardtypep = new AstUnpackArrayDType{
|
||||
nodep->fileline(), nodep->dtypep(),
|
||||
new AstRange{nodep->fileline(), static_cast<int>(nodep->itemCount()), 0}};
|
||||
|
|
@ -1521,7 +1521,7 @@ class RandomizeVisitor final : public VNVisitor {
|
|||
= new AstVar{varp->fileline(), VVarType::MEMBER, varp->name() + "__Vrandc", newdtp};
|
||||
newp->isInternal(true);
|
||||
varp->addNextHere(newp);
|
||||
UINFO(9, "created " << varp << endl);
|
||||
UINFO(9, "created " << varp);
|
||||
return newp;
|
||||
}
|
||||
AstNodeStmt* createArrayForeachLoop(FileLine* const fl, AstNodeDType* const dtypep,
|
||||
|
|
@ -1997,7 +1997,7 @@ class RandomizeVisitor final : public VNVisitor {
|
|||
|
||||
iterateChildren(nodep);
|
||||
if (!nodep->user1()) return; // Doesn't need randomize, or already processed
|
||||
UINFO(9, "Define randomize() for " << nodep << endl);
|
||||
UINFO(9, "Define randomize() for " << nodep);
|
||||
nodep->baseMostClassp()->needRNG(true);
|
||||
AstFunc* const randomizep = V3Randomize::newRandomizeFunc(m_memberMap, nodep);
|
||||
AstVar* const fvarp = VN_AS(randomizep->fvarp(), Var);
|
||||
|
|
@ -2367,7 +2367,7 @@ public:
|
|||
// Randomize method class functions
|
||||
|
||||
void V3Randomize::randomizeNetlist(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{
|
||||
const RandomizeMarkVisitor markVisitor{nodep};
|
||||
RandomizeVisitor randomizeVisitor{nodep};
|
||||
|
|
|
|||
|
|
@ -74,11 +74,11 @@ class ReloopVisitor final : public VNVisitor {
|
|||
if (!m_mgAssignps.empty()) {
|
||||
const uint32_t items = m_mgIndexHi - m_mgIndexLo + 1;
|
||||
UINFO(9, "End merge iter=" << items << " " << m_mgIndexHi << ":" << m_mgIndexLo << " "
|
||||
<< m_mgOffset << " " << m_mgAssignps[0] << endl);
|
||||
<< m_mgOffset << " " << m_mgAssignps[0]);
|
||||
if (items >= static_cast<uint32_t>(v3Global.opt.reloopLimit())) {
|
||||
UINFO(6, "Reloop merging items=" << items << " " << m_mgIndexHi << ":"
|
||||
<< m_mgIndexLo << " " << m_mgOffset << " "
|
||||
<< m_mgAssignps[0] << endl);
|
||||
<< m_mgAssignps[0]);
|
||||
++m_statReloops;
|
||||
m_statReItems += items;
|
||||
|
||||
|
|
@ -212,14 +212,14 @@ class ReloopVisitor final : public VNVisitor {
|
|||
m_mgIndexHi = lindex;
|
||||
}
|
||||
UINFO(9, "Continue merge i=" << lindex << " " << m_mgIndexHi << ":" << m_mgIndexLo
|
||||
<< " " << nodep << endl);
|
||||
<< " " << nodep);
|
||||
m_mgAssignps.push_back(nodep);
|
||||
m_mgNextp = nodep->nextp();
|
||||
return;
|
||||
} else {
|
||||
UINFO(9, "End merge i="
|
||||
<< lindex << " " << m_mgIndexHi << ":" << m_mgIndexLo << " " << nodep
|
||||
<< endl); // This assign doesn't merge with previous assign,
|
||||
UINFO(9, "End merge i=" << lindex << " " << m_mgIndexHi << ":" << m_mgIndexLo
|
||||
<< " " << nodep);
|
||||
// This assign doesn't merge with previous assign,
|
||||
// but should start a new merge
|
||||
mergeEnd();
|
||||
}
|
||||
|
|
@ -237,7 +237,7 @@ class ReloopVisitor final : public VNVisitor {
|
|||
m_mgConstRp = rconstp;
|
||||
m_mgIndexLo = lindex;
|
||||
m_mgIndexHi = lindex;
|
||||
UINFO(9, "Start merge i=" << lindex << " o=" << m_mgOffset << nodep << endl);
|
||||
UINFO(9, "Start merge i=" << lindex << " o=" << m_mgOffset << nodep);
|
||||
}
|
||||
void visit(AstExprStmt* nodep) override { iterateChildren(nodep); }
|
||||
//--------------------
|
||||
|
|
@ -258,7 +258,7 @@ public:
|
|||
// Reloop class functions
|
||||
|
||||
void V3Reloop::reloopAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{ ReloopVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("reloop", 0, dumpTreeEitherLevel() >= 6);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ class SampledVisitor final : public VNVisitor {
|
|||
m_scopep->addVarsp(newvscp);
|
||||
// At the top of _eval, assign them (use valuep here as temporary storage during V3Sched)
|
||||
newvarp->valuep(new AstVarRef{flp, vscp, VAccess::READ});
|
||||
UINFO(4, "New Sampled: " << newvscp << endl);
|
||||
UINFO(4, "New Sampled: " << newvscp);
|
||||
return newvscp;
|
||||
}
|
||||
|
||||
|
|
@ -100,7 +100,7 @@ public:
|
|||
// Sampled class functions
|
||||
|
||||
void V3Sampled::sampledAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{ SampledVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("sampled", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1379,7 +1379,7 @@ void schedule(AstNetlist* netlistp) {
|
|||
// Orders a region's logic and creates the region eval function
|
||||
const auto order = [&](const std::string& name,
|
||||
const std::vector<V3Sched::LogicByScope*>& logic) -> EvalKit {
|
||||
UINFO(2, "Scheduling " << name << " #logic = " << logic.size() << endl);
|
||||
UINFO(2, "Scheduling " << name << " #logic = " << logic.size());
|
||||
AstVarScope* const trigVscp
|
||||
= scopeTopp->createTempLike("__V" + name + "Triggered", actTrigVscp);
|
||||
const auto trigMap = cloneMapWithNewTriggerReferences(actTrigMap, trigVscp);
|
||||
|
|
|
|||
|
|
@ -331,7 +331,7 @@ void colorActiveRegion(V3Graph& graph) {
|
|||
|
||||
LogicRegions partition(LogicByScope& clockedLogic, LogicByScope& combinationalLogic,
|
||||
LogicByScope& hybridLogic) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
|
||||
// Build the graph
|
||||
const std::unique_ptr<V3Graph> graphp
|
||||
|
|
|
|||
|
|
@ -222,7 +222,7 @@ public:
|
|||
} //namespace
|
||||
|
||||
VirtIfaceTriggers makeVirtIfaceTriggers(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
if (v3Global.hasVirtIfaces()) {
|
||||
VirtIfaceVisitor visitor{nodep};
|
||||
V3Global::dumpCheckGlobalTree("sched_vif", 0, dumpTreeEitherLevel() >= 6);
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ class ScopeVisitor final : public VNVisitor {
|
|||
scopename = m_aboveScopep->name() + "." + m_aboveCellp->name();
|
||||
}
|
||||
|
||||
UINFO(4, " MOD AT " << scopename << " " << nodep << endl);
|
||||
UINFO(4, " MOD AT " << scopename << " " << nodep);
|
||||
AstNode::user1ClearTree();
|
||||
|
||||
m_scopep = new AstScope{
|
||||
|
|
@ -128,7 +128,7 @@ class ScopeVisitor final : public VNVisitor {
|
|||
}
|
||||
|
||||
// Create scope for the current usage of this module
|
||||
UINFO(4, " back AT " << scopename << " " << nodep << endl);
|
||||
UINFO(4, " back AT " << scopename << " " << nodep);
|
||||
AstNode::user1ClearTree();
|
||||
m_modp = nodep;
|
||||
if (m_modp->isTop()) {
|
||||
|
|
@ -159,7 +159,7 @@ class ScopeVisitor final : public VNVisitor {
|
|||
scopename = m_aboveScopep->name() + "." + nodep->name();
|
||||
}
|
||||
|
||||
UINFO(4, " CLASS AT " << scopename << " " << nodep << endl);
|
||||
UINFO(4, " CLASS AT " << scopename << " " << nodep);
|
||||
AstNode::user1ClearTree();
|
||||
|
||||
const AstNode* const abovep
|
||||
|
|
@ -184,7 +184,7 @@ class ScopeVisitor final : public VNVisitor {
|
|||
}
|
||||
void visit(AstNodeProcedure* nodep) override {
|
||||
// Add to list of blocks under this scope
|
||||
UINFO(4, " Move " << nodep << endl);
|
||||
UINFO(4, " Move " << nodep);
|
||||
AstNode* const clonep = nodep->cloneTree(false);
|
||||
nodep->user2p(clonep);
|
||||
m_scopep->addBlocksp(clonep);
|
||||
|
|
@ -192,7 +192,7 @@ class ScopeVisitor final : public VNVisitor {
|
|||
}
|
||||
void visit(AstAssignAlias* nodep) override {
|
||||
// Add to list of blocks under this scope
|
||||
UINFO(4, " Move " << nodep << endl);
|
||||
UINFO(4, " Move " << nodep);
|
||||
AstNode* const clonep = nodep->cloneTree(false);
|
||||
nodep->user2p(clonep);
|
||||
m_scopep->addBlocksp(clonep);
|
||||
|
|
@ -200,7 +200,7 @@ class ScopeVisitor final : public VNVisitor {
|
|||
}
|
||||
void visit(AstAssignVarScope* nodep) override {
|
||||
// Copy under the scope but don't recurse
|
||||
UINFO(4, " Move " << nodep << endl);
|
||||
UINFO(4, " Move " << nodep);
|
||||
AstNode* const clonep = nodep->cloneTree(false);
|
||||
nodep->user2p(clonep);
|
||||
m_scopep->addBlocksp(clonep);
|
||||
|
|
@ -208,7 +208,7 @@ class ScopeVisitor final : public VNVisitor {
|
|||
}
|
||||
void visit(AstAssignW* nodep) override {
|
||||
// Add to list of blocks under this scope
|
||||
UINFO(4, " Move " << nodep << endl);
|
||||
UINFO(4, " Move " << nodep);
|
||||
AstNode* const clonep = nodep->cloneTree(false);
|
||||
nodep->user2p(clonep);
|
||||
m_scopep->addBlocksp(clonep);
|
||||
|
|
@ -216,7 +216,7 @@ class ScopeVisitor final : public VNVisitor {
|
|||
}
|
||||
void visit(AstAlwaysPublic* nodep) override {
|
||||
// Add to list of blocks under this scope
|
||||
UINFO(4, " Move " << nodep << endl);
|
||||
UINFO(4, " Move " << nodep);
|
||||
AstNode* const clonep = nodep->cloneTree(false);
|
||||
nodep->user2p(clonep);
|
||||
m_scopep->addBlocksp(clonep);
|
||||
|
|
@ -224,7 +224,7 @@ class ScopeVisitor final : public VNVisitor {
|
|||
}
|
||||
void visit(AstCoverToggle* nodep) override {
|
||||
// Add to list of blocks under this scope
|
||||
UINFO(4, " Move " << nodep << endl);
|
||||
UINFO(4, " Move " << nodep);
|
||||
AstNode* const clonep = nodep->cloneTree(false);
|
||||
nodep->user2p(clonep);
|
||||
m_scopep->addBlocksp(clonep);
|
||||
|
|
@ -232,7 +232,7 @@ class ScopeVisitor final : public VNVisitor {
|
|||
}
|
||||
void visit(AstCFunc* nodep) override {
|
||||
// Add to list of blocks under this scope
|
||||
UINFO(4, " CFUNC " << nodep << endl);
|
||||
UINFO(4, " CFUNC " << nodep);
|
||||
AstCFunc* const clonep = nodep->cloneTree(false);
|
||||
nodep->user2p(clonep);
|
||||
m_scopep->addBlocksp(clonep);
|
||||
|
|
@ -242,7 +242,7 @@ class ScopeVisitor final : public VNVisitor {
|
|||
}
|
||||
void visit(AstNodeFTask* nodep) override {
|
||||
// Add to list of blocks under this scope
|
||||
UINFO(4, " FTASK " << nodep << endl);
|
||||
UINFO(4, " FTASK " << nodep);
|
||||
AstNodeFTask* clonep;
|
||||
if (nodep->classMethod()) {
|
||||
// Only one scope will be created, so avoid pointless cloning
|
||||
|
|
@ -265,7 +265,7 @@ class ScopeVisitor final : public VNVisitor {
|
|||
if (ifacerefp->cellp()) scopep = VN_AS(ifacerefp->cellp()->user2p(), Scope);
|
||||
}
|
||||
AstVarScope* const varscp = new AstVarScope{nodep->fileline(), scopep, nodep};
|
||||
UINFO(6, " New scope " << varscp << endl);
|
||||
UINFO(6, " New scope " << varscp);
|
||||
if (m_aboveCellp && !m_aboveCellp->isTrace()) varscp->trace(false);
|
||||
nodep->user1p(varscp);
|
||||
if (v3Global.opt.isClocker(varscp->prettyName())) {
|
||||
|
|
@ -363,18 +363,18 @@ class ScopeCleanupVisitor final : public VNVisitor {
|
|||
}
|
||||
void visit(AstNodeFTaskRef* nodep) override {
|
||||
// The crossrefs are dealt with in V3LinkDot
|
||||
UINFO(9, " Old pkg-taskref " << nodep << endl);
|
||||
UINFO(9, " Old pkg-taskref " << nodep);
|
||||
if (nodep->classOrPackagep()) {
|
||||
// Point to the clone
|
||||
UASSERT_OBJ(nodep->taskp(), nodep, "Unlinked");
|
||||
AstNodeFTask* const newp = VN_AS(nodep->taskp()->user2p(), NodeFTask);
|
||||
UASSERT_OBJ(newp, nodep, "No clone for package function");
|
||||
nodep->taskp(newp);
|
||||
UINFO(9, " New pkg-taskref " << nodep << endl);
|
||||
UINFO(9, " New pkg-taskref " << nodep);
|
||||
} else if (!VN_IS(nodep, MethodCall)) {
|
||||
nodep->taskp(nullptr);
|
||||
VIsCached::clearCacheTree();
|
||||
UINFO(9, " New pkg-taskref " << nodep << endl);
|
||||
UINFO(9, " New pkg-taskref " << nodep);
|
||||
}
|
||||
iterateChildren(nodep);
|
||||
}
|
||||
|
|
@ -398,7 +398,7 @@ public:
|
|||
// Scope class functions
|
||||
|
||||
void V3Scope::scopeAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{
|
||||
const ScopeVisitor visitor{nodep};
|
||||
ScopeCleanupVisitor{nodep};
|
||||
|
|
|
|||
|
|
@ -211,7 +211,7 @@ public:
|
|||
if (!m_whyNotNodep) {
|
||||
m_whyNotNodep = nodep;
|
||||
if (debug() >= 5) { // LCOV_EXCL_START
|
||||
UINFO(0, "Clear optimizable: " << why);
|
||||
UINFO_PREFIX("Clear optimizable: " << why);
|
||||
if (nodep) std::cout << ": " << nodep;
|
||||
std::cout << std::endl;
|
||||
} // LCOV_EXCL_STOP
|
||||
|
|
@ -257,7 +257,7 @@ public:
|
|||
void newValue(AstNode* nodep, const AstNodeExpr* valuep) {
|
||||
if (const AstConst* const constp = VN_CAST(valuep, Const)) {
|
||||
newConst(nodep)->num().opAssign(constp->num());
|
||||
UINFO(9, " new val " << valuep->name() << " on " << nodep << endl);
|
||||
UINFO(9, " new val " << valuep->name() << " on " << nodep);
|
||||
} else if (fetchValueNull(nodep) != valuep) {
|
||||
// const_cast, as clonep() is set on valuep, but nothing should care
|
||||
setValue(nodep, newTrackedClone(const_cast<AstNodeExpr*>(valuep)));
|
||||
|
|
@ -266,7 +266,7 @@ public:
|
|||
void newOutValue(AstNode* nodep, const AstNodeExpr* valuep) {
|
||||
if (const AstConst* const constp = VN_CAST(valuep, Const)) {
|
||||
newOutConst(nodep)->num().opAssign(constp->num());
|
||||
UINFO(9, " new oval " << valuep->name() << " on " << nodep << endl);
|
||||
UINFO(9, " new oval " << valuep->name() << " on " << nodep);
|
||||
} else if (fetchOutValueNull(nodep) != valuep) {
|
||||
// const_cast, as clonep() is set on valuep, but nothing should care
|
||||
setOutValue(nodep, newTrackedClone(const_cast<AstNodeExpr*>(valuep)));
|
||||
|
|
@ -312,13 +312,13 @@ private:
|
|||
AstNodeExpr* fetchValue(AstNode* nodep) {
|
||||
AstNodeExpr* const valuep = fetchValueNull(nodep);
|
||||
UASSERT_OBJ(valuep, nodep, "No value found for node.");
|
||||
// UINFO(9, " fetch val " << *valuep << " on " << nodep << endl);
|
||||
// UINFO(9, " fetch val " << *valuep << " on " << nodep);
|
||||
return valuep;
|
||||
}
|
||||
AstConst* fetchConst(AstNode* nodep) {
|
||||
AstConst* const constp = fetchConstNull(nodep);
|
||||
UASSERT_OBJ(constp, nodep, "No value found for node.");
|
||||
// UINFO(9, " fetch num " << *constp << " on " << nodep << endl);
|
||||
// UINFO(9, " fetch num " << *constp << " on " << nodep);
|
||||
return constp;
|
||||
}
|
||||
AstConst* fetchOutConst(AstNode* nodep) {
|
||||
|
|
@ -342,12 +342,12 @@ public:
|
|||
private:
|
||||
void setValue(AstNode* nodep, AstNodeExpr* valuep) {
|
||||
UASSERT_OBJ(valuep, nodep, "Simulate setting null value");
|
||||
UINFO(9, " set val " << valuep->name() << " on " << nodep << endl);
|
||||
UINFO(9, " set val " << valuep->name() << " on " << nodep);
|
||||
m_varAux(nodep).valuep = valuep;
|
||||
}
|
||||
void setOutValue(AstNode* nodep, AstNodeExpr* valuep) {
|
||||
UASSERT_OBJ(valuep, nodep, "Simulate setting null value");
|
||||
UINFO(9, " set oval " << valuep->name() << " on " << nodep << endl);
|
||||
UINFO(9, " set oval " << valuep->name() << " on " << nodep);
|
||||
m_varAux(nodep).outValuep = valuep;
|
||||
}
|
||||
|
||||
|
|
@ -357,7 +357,7 @@ private:
|
|||
m_dataCount += nodep->width();
|
||||
}
|
||||
if (!ignorePredict && !nodep->isPredictOptimizable()) {
|
||||
// UINFO(9, " !predictopt " << nodep << endl);
|
||||
// UINFO(9, " !predictopt " << nodep);
|
||||
clearOptimizable(nodep, "Isn't predictable");
|
||||
}
|
||||
if (!nodep->isPure()) m_isImpure = true;
|
||||
|
|
@ -382,8 +382,7 @@ private:
|
|||
static std::set<VNType> s_typePrinted;
|
||||
const auto pair = s_typePrinted.emplace(nodep->type());
|
||||
if (pair.second)
|
||||
UINFO(0,
|
||||
"Unknown node type in SimulateVisitor: " << nodep->prettyTypeName() << endl);
|
||||
UINFO(0, "Unknown node type in SimulateVisitor: " << nodep->prettyTypeName());
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
@ -531,7 +530,7 @@ private:
|
|||
}
|
||||
void visit(AstNodeIf* nodep) override {
|
||||
if (jumpingOver(nodep)) return;
|
||||
UINFO(5, " IF " << nodep << endl);
|
||||
UINFO(5, " IF " << nodep);
|
||||
checkNodeInfo(nodep);
|
||||
if (m_checkOnly) {
|
||||
iterateChildrenConst(nodep);
|
||||
|
|
@ -738,7 +737,7 @@ private:
|
|||
}
|
||||
const uint32_t index = fetchConst(selp->bitp())->toUInt();
|
||||
AstNodeExpr* const valuep = newTrackedClone(fetchValue(nodep->rhsp()));
|
||||
UINFO(9, " set val[" << index << "] = " << valuep << endl);
|
||||
UINFO(9, " set val[" << index << "] = " << valuep);
|
||||
// Values are in the "real" tree under the InitArray so can eventually extract it,
|
||||
// Not in the usual setValue (via m_varAux)
|
||||
initp->addIndexValuep(index, valuep);
|
||||
|
|
@ -861,7 +860,7 @@ private:
|
|||
}
|
||||
void visit(AstNodeCase* nodep) override {
|
||||
if (jumpingOver(nodep)) return;
|
||||
UINFO(5, " CASE " << nodep << endl);
|
||||
UINFO(5, " CASE " << nodep);
|
||||
checkNodeInfo(nodep);
|
||||
if (m_checkOnly) {
|
||||
iterateChildrenConst(nodep);
|
||||
|
|
@ -929,7 +928,7 @@ private:
|
|||
if (jumpingOver(nodep)) return;
|
||||
checkNodeInfo(nodep);
|
||||
if (!m_checkOnly) {
|
||||
UINFO(5, " JUMP GO " << nodep << endl);
|
||||
UINFO(5, " JUMP GO " << nodep);
|
||||
m_jumpp = nodep;
|
||||
}
|
||||
}
|
||||
|
|
@ -940,7 +939,7 @@ private:
|
|||
checkNodeInfo(nodep);
|
||||
iterateChildrenConst(nodep);
|
||||
if (m_jumpp && m_jumpp->labelp() == nodep) {
|
||||
UINFO(5, " JUMP DONE " << nodep << endl);
|
||||
UINFO(5, " JUMP DONE " << nodep);
|
||||
m_jumpp = nullptr;
|
||||
}
|
||||
}
|
||||
|
|
@ -957,7 +956,7 @@ private:
|
|||
|
||||
void visit(AstNodeFor* nodep) override {
|
||||
// Doing lots of Whiles is slow, so only for parameters
|
||||
UINFO(5, " FOR " << nodep << endl);
|
||||
UINFO(5, " FOR " << nodep);
|
||||
if (!m_params) {
|
||||
badNodeType(nodep);
|
||||
return;
|
||||
|
|
@ -969,7 +968,7 @@ private:
|
|||
int loops = 0;
|
||||
iterateAndNextConstNull(nodep->initsp());
|
||||
while (true) {
|
||||
UINFO(5, " FOR-ITER " << nodep << endl);
|
||||
UINFO(5, " FOR-ITER " << nodep);
|
||||
iterateAndNextConstNull(nodep->condp());
|
||||
if (!optimizable()) break;
|
||||
if (!fetchConst(nodep->condp())->num().isNeqZero()) { //
|
||||
|
|
@ -991,7 +990,7 @@ private:
|
|||
void visit(AstWhile* nodep) override {
|
||||
// Doing lots of Whiles is slow, so only for parameters
|
||||
if (jumpingOver(nodep)) return;
|
||||
UINFO(5, " WHILE " << nodep << endl);
|
||||
UINFO(5, " WHILE " << nodep);
|
||||
if (!m_params) {
|
||||
badNodeType(nodep);
|
||||
return;
|
||||
|
|
@ -1002,7 +1001,7 @@ private:
|
|||
} else if (optimizable()) {
|
||||
int loops = 0;
|
||||
while (true) {
|
||||
UINFO(5, " WHILE-ITER " << nodep << endl);
|
||||
UINFO(5, " WHILE-ITER " << nodep);
|
||||
iterateAndNextConstNull(nodep->precondsp());
|
||||
if (jumpingOver(nodep)) break;
|
||||
iterateAndNextConstNull(nodep->condp());
|
||||
|
|
@ -1032,7 +1031,7 @@ private:
|
|||
void visit(AstFuncRef* nodep) override {
|
||||
if (jumpingOver(nodep)) return;
|
||||
if (!optimizable()) return; // Accelerate
|
||||
UINFO(5, " FUNCREF " << nodep << endl);
|
||||
UINFO(5, " FUNCREF " << nodep);
|
||||
checkNodeInfo(nodep);
|
||||
if (!m_params) {
|
||||
badNodeType(nodep);
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ class SliceVisitor final : public VNVisitor {
|
|||
}
|
||||
AstNodeExpr* newp;
|
||||
if (AstInitArray* const initp = VN_CAST(nodep, InitArray)) {
|
||||
UINFO(9, " cloneInitArray(" << elements << "," << elemIdx << ") " << nodep << endl);
|
||||
UINFO(9, " cloneInitArray(" << elements << "," << elemIdx << ") " << nodep);
|
||||
|
||||
auto considerOrder = [](const auto* nodep, int idxFromLeft) -> int {
|
||||
return !nodep->rangep()->ascending()
|
||||
|
|
@ -191,12 +191,12 @@ class SliceVisitor final : public VNVisitor {
|
|||
}
|
||||
if (!newp) newp = new AstConst{nodep->fileline(), 0};
|
||||
} else if (AstNodeCond* const snodep = VN_CAST(nodep, NodeCond)) {
|
||||
UINFO(9, " cloneCond(" << elements << "," << elemIdx << ") " << nodep << endl);
|
||||
UINFO(9, " cloneCond(" << elements << "," << elemIdx << ") " << nodep);
|
||||
return snodep->cloneType(snodep->condp()->cloneTree(false, needPure),
|
||||
cloneAndSel(snodep->thenp(), elements, elemIdx, needPure),
|
||||
cloneAndSel(snodep->elsep(), elements, elemIdx, needPure));
|
||||
} else if (const AstSliceSel* const snodep = VN_CAST(nodep, SliceSel)) {
|
||||
UINFO(9, " cloneSliceSel(" << elements << "," << elemIdx << ") " << nodep << endl);
|
||||
UINFO(9, " cloneSliceSel(" << elements << "," << elemIdx << ") " << nodep);
|
||||
const int leOffset = (snodep->declRange().lo()
|
||||
+ (!snodep->declRange().ascending()
|
||||
? snodep->declRange().elements() - 1 - elemIdx
|
||||
|
|
@ -204,7 +204,7 @@ class SliceVisitor final : public VNVisitor {
|
|||
newp = new AstArraySel{nodep->fileline(), snodep->fromp()->cloneTree(false, needPure),
|
||||
leOffset};
|
||||
} else if (AstExprStmt* const snodep = VN_CAST(nodep, ExprStmt)) {
|
||||
UINFO(9, " cloneExprStmt(" << elements << "," << elemIdx << ") " << nodep << endl);
|
||||
UINFO(9, " cloneExprStmt(" << elements << "," << elemIdx << ") " << nodep);
|
||||
AstNodeExpr* const resultSelp
|
||||
= cloneAndSel(snodep->resultp(), elements, elemIdx, needPure);
|
||||
if (snodep->stmtsp()) {
|
||||
|
|
@ -215,7 +215,7 @@ class SliceVisitor final : public VNVisitor {
|
|||
}
|
||||
} else if (VN_IS(nodep, NodeVarRef) || VN_IS(nodep, NodeSel) || VN_IS(nodep, CMethodHard)
|
||||
|| VN_IS(nodep, MemberSel) || VN_IS(nodep, StructSel)) {
|
||||
UINFO(9, " cloneSel(" << elements << "," << elemIdx << ") " << nodep << endl);
|
||||
UINFO(9, " cloneSel(" << elements << "," << elemIdx << ") " << nodep);
|
||||
const int leOffset = !arrayp->rangep()->ascending()
|
||||
? arrayp->rangep()->elementsConst() - 1 - elemIdx
|
||||
: elemIdx;
|
||||
|
|
@ -248,7 +248,7 @@ class SliceVisitor final : public VNVisitor {
|
|||
return false;
|
||||
}
|
||||
|
||||
UINFO(4, "Slice optimizing " << nodep << endl);
|
||||
UINFO(4, "Slice optimizing " << nodep);
|
||||
++m_statAssigns;
|
||||
|
||||
// Left and right could have different ascending/descending range,
|
||||
|
|
@ -319,7 +319,7 @@ class SliceVisitor final : public VNVisitor {
|
|||
|
||||
void expandBiOp(AstNodeBiop* nodep) {
|
||||
if (nodep->user1SetOnce()) return; // Process once
|
||||
UINFO(9, " Bi-Eq/Neq expansion " << nodep << endl);
|
||||
UINFO(9, " Bi-Eq/Neq expansion " << nodep);
|
||||
|
||||
// Only expand if lhs is an unpacked array (we assume type checks already passed)
|
||||
const AstNodeDType* const fromDtp = nodep->lhsp()->dtypep()->skipRefp();
|
||||
|
|
@ -390,7 +390,7 @@ public:
|
|||
// Link class functions
|
||||
|
||||
void V3Slice::sliceAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{ SliceVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("slice", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -294,14 +294,14 @@ private:
|
|||
}
|
||||
}
|
||||
void scoreboardPushStmt(AstNode* nodep) {
|
||||
// UINFO(9, " push " << nodep << endl);
|
||||
// UINFO(9, " push " << nodep);
|
||||
SplitLogicVertex* const vertexp = new SplitLogicVertex{&m_graph, nodep};
|
||||
m_stmtStackps.push_back(vertexp);
|
||||
UASSERT_OBJ(!nodep->user3p(), nodep, "user3p should not be used; cleared in processBlock");
|
||||
nodep->user3p(vertexp);
|
||||
}
|
||||
void scoreboardPopStmt() {
|
||||
// UINFO(9, " pop" << endl);
|
||||
// UINFO(9, " pop");
|
||||
UASSERT(!m_stmtStackps.empty(), "Stack underflow");
|
||||
m_stmtStackps.pop_back();
|
||||
}
|
||||
|
|
@ -321,7 +321,7 @@ protected:
|
|||
if (vertex.outEmpty() && vertex.is<SplitVarStdVertex>()) {
|
||||
if (debug() >= 9) {
|
||||
const SplitVarStdVertex& sVtx = static_cast<SplitVarStdVertex&>(vertex);
|
||||
UINFO(0, "Will prune deps on var " << sVtx.nodep() << endl);
|
||||
UINFO(0, "Will prune deps on var " << sVtx.nodep());
|
||||
sVtx.nodep()->dumpTree("- ");
|
||||
}
|
||||
for (V3GraphEdge& edge : vertex.inEdges()) {
|
||||
|
|
@ -344,7 +344,7 @@ protected:
|
|||
void visit(AstAssignDly* nodep) override {
|
||||
VL_RESTORER(m_inDly);
|
||||
m_inDly = true;
|
||||
UINFO(4, " ASSIGNDLY " << nodep << endl);
|
||||
UINFO(4, " ASSIGNDLY " << nodep);
|
||||
iterateChildren(nodep);
|
||||
}
|
||||
void visit(AstVarRef* nodep) override {
|
||||
|
|
@ -380,7 +380,7 @@ protected:
|
|||
|
||||
// SPEEDUP: We add duplicate edges, that should be fixed
|
||||
if (m_inDly && nodep->access().isWriteOrRW()) {
|
||||
UINFO(4, " VARREFDLY: " << nodep << endl);
|
||||
UINFO(4, " VARREFDLY: " << nodep);
|
||||
// Delayed variable is different from non-delayed variable
|
||||
if (!vscp->user2p()) {
|
||||
SplitVarPostVertex* const vpostp = new SplitVarPostVertex{&m_graph, vscp};
|
||||
|
|
@ -397,12 +397,12 @@ protected:
|
|||
if (nodep->access().isWriteOrRW()) {
|
||||
// Non-delay; need to maintain existing ordering
|
||||
// with all consumers of the signal
|
||||
UINFO(4, " VARREFLV: " << nodep << endl);
|
||||
UINFO(4, " VARREFLV: " << nodep);
|
||||
for (SplitLogicVertex* ivxp : m_stmtStackps) {
|
||||
new SplitLVEdge{&m_graph, vstdp, ivxp};
|
||||
}
|
||||
} else {
|
||||
UINFO(4, " VARREF: " << nodep << endl);
|
||||
UINFO(4, " VARREF: " << nodep);
|
||||
makeRvalueEdges(vstdp);
|
||||
}
|
||||
}
|
||||
|
|
@ -415,7 +415,7 @@ protected:
|
|||
// This is overly pessimistic; we could treat jumps as barriers, and
|
||||
// reorder everything between jumps/labels, however jumps are rare
|
||||
// in always, so the performance gain probably isn't worth the work.
|
||||
UINFO(9, " NoReordering " << nodep << endl);
|
||||
UINFO(9, " NoReordering " << nodep);
|
||||
m_noReorderWhy = "JumpGo";
|
||||
iterateChildren(nodep);
|
||||
}
|
||||
|
|
@ -425,11 +425,11 @@ protected:
|
|||
void visit(AstNode* nodep) override {
|
||||
// **** SPECIAL default type that sets PLI_ORDERING
|
||||
if (!m_stmtStackps.empty() && !nodep->isPure()) {
|
||||
UINFO(9, " NotSplittable " << nodep << endl);
|
||||
UINFO(9, " NotSplittable " << nodep);
|
||||
scoreboardPli(nodep);
|
||||
}
|
||||
if (nodep->isTimingControl()) {
|
||||
UINFO(9, " NoReordering " << nodep << endl);
|
||||
UINFO(9, " NoReordering " << nodep);
|
||||
m_noReorderWhy = "TimingControl";
|
||||
}
|
||||
iterateChildren(nodep);
|
||||
|
|
@ -453,7 +453,7 @@ protected:
|
|||
|
||||
void cleanupBlockGraph(AstNode* nodep) {
|
||||
// Transform the graph into what we need
|
||||
UINFO(5, "ReorderBlock " << nodep << endl);
|
||||
UINFO(5, "ReorderBlock " << nodep);
|
||||
m_graph.removeRedundantEdgesMax(&V3GraphEdge::followAlwaysTrue);
|
||||
|
||||
if (dumpGraphLevel() >= 9) m_graph.dumpDotFilePrefixed("reorderg_nodup", false);
|
||||
|
|
@ -536,13 +536,13 @@ protected:
|
|||
if (++newOrder != nextp->user4()) leaveAlone = false;
|
||||
}
|
||||
if (leaveAlone) {
|
||||
UINFO(6, " No changes\n");
|
||||
UINFO(6, " No changes");
|
||||
} else {
|
||||
VNRelinker replaceHandle; // Where to add the list
|
||||
AstNode* newListp = nullptr;
|
||||
for (auto it = rankMap.cbegin(); it != rankMap.cend(); ++it) {
|
||||
AstNode* const nextp = it->second;
|
||||
UINFO(6, " New order: " << nextp << endl);
|
||||
UINFO(6, " New order: " << nextp);
|
||||
if (nextp == nodep) {
|
||||
nodep->unlinkFrBack(&replaceHandle);
|
||||
} else {
|
||||
|
|
@ -573,11 +573,11 @@ protected:
|
|||
// Just one, so can't reorder. Just look for more blocks/statements.
|
||||
iterate(nodep);
|
||||
} else {
|
||||
UINFO(9, " processBlock " << nodep << endl);
|
||||
UINFO(9, " processBlock " << nodep);
|
||||
// Process block and followers
|
||||
scanBlock(nodep);
|
||||
if (m_noReorderWhy != "") { // Jump or something nasty
|
||||
UINFO(9, " NoReorderBlock because " << m_noReorderWhy << endl);
|
||||
UINFO(9, " NoReorderBlock because " << m_noReorderWhy);
|
||||
} else {
|
||||
// Reorder statements in this block
|
||||
cleanupBlockGraph(nodep);
|
||||
|
|
@ -597,7 +597,7 @@ protected:
|
|||
}
|
||||
|
||||
void visit(AstAlways* nodep) override {
|
||||
UINFO(4, " ALW " << nodep << endl);
|
||||
UINFO(4, " ALW " << nodep);
|
||||
if (debug() >= 9) nodep->dumpTree("- alwIn:: ");
|
||||
scoreboardClear();
|
||||
processBlock(nodep->stmtsp());
|
||||
|
|
@ -605,7 +605,7 @@ protected:
|
|||
}
|
||||
|
||||
void visit(AstNodeIf* nodep) override {
|
||||
UINFO(4, " IF " << nodep << endl);
|
||||
UINFO(4, " IF " << nodep);
|
||||
iterateAndNextNull(nodep->condp());
|
||||
processBlock(nodep->thensp());
|
||||
processBlock(nodep->elsesp());
|
||||
|
|
@ -650,7 +650,7 @@ private:
|
|||
= reinterpret_cast<SplitLogicVertex*>(nodep->user3p());
|
||||
const uint32_t color = vertexp->color();
|
||||
m_colors.insert(color);
|
||||
UINFO(8, " SVL " << vertexp << " has color " << color << "\n");
|
||||
UINFO(8, " SVL " << vertexp << " has color " << color);
|
||||
|
||||
// Record that all containing ifs have this color.
|
||||
for (auto it = m_ifStack.cbegin(); it != m_ifStack.cend(); ++it) {
|
||||
|
|
@ -694,7 +694,7 @@ public:
|
|||
: m_origAlwaysp{nodep}
|
||||
, m_ifColorp{ifColorp}
|
||||
, m_newBlocksp{newBlocksp} {
|
||||
UINFO(6, " splitting always " << nodep << endl);
|
||||
UINFO(6, " splitting always " << nodep);
|
||||
}
|
||||
|
||||
~EmitSplitVisitor() override = default;
|
||||
|
|
@ -922,7 +922,7 @@ protected:
|
|||
const SplitNodeVertex* const nvxp
|
||||
= static_cast<const SplitNodeVertex*>(vxp);
|
||||
UINFO(0, "Cannot prune if-node due to edge "
|
||||
<< &oedge << " pointing to node " << nvxp->nodep() << endl);
|
||||
<< &oedge << " pointing to node " << nvxp->nodep());
|
||||
nvxp->nodep()->dumpTree("- ");
|
||||
}
|
||||
|
||||
|
|
@ -956,13 +956,13 @@ protected:
|
|||
|
||||
if (m_noReorderWhy != "") {
|
||||
// We saw a jump or something else rare that we don't handle.
|
||||
UINFO(9, " NoSplitBlock because " << m_noReorderWhy << endl);
|
||||
UINFO(9, " NoSplitBlock because " << m_noReorderWhy);
|
||||
return;
|
||||
}
|
||||
|
||||
// Look across the entire tree of if/else blocks in the always,
|
||||
// and color regions that must be kept together.
|
||||
UINFO(5, "SplitVisitor @ " << nodep << endl);
|
||||
UINFO(5, "SplitVisitor @ " << nodep);
|
||||
colorAlwaysGraph();
|
||||
|
||||
// Map each AstNodeIf to the set of colors (split always blocks)
|
||||
|
|
@ -982,7 +982,7 @@ protected:
|
|||
}
|
||||
}
|
||||
void visit(AstNodeIf* nodep) override {
|
||||
UINFO(4, " IF " << nodep << endl);
|
||||
UINFO(4, " IF " << nodep);
|
||||
if (!nodep->condp()->isPure()) m_noReorderWhy = "Impure IF condition";
|
||||
{
|
||||
VL_RESTORER(m_curIfConditional);
|
||||
|
|
@ -1001,12 +1001,12 @@ private:
|
|||
// Split class functions
|
||||
|
||||
void V3Split::splitReorderAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{ ReorderVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("reorder", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
void V3Split::splitAlwaysAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{ SplitVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("split", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,13 +73,13 @@ class SplitAsCleanVisitor final : public VNVisitor {
|
|||
void visit(AstVarRef* nodep) override {
|
||||
if (nodep->access().isWriteOrRW()) {
|
||||
if (nodep->varScopep() == m_splitVscp) {
|
||||
UINFO(6, " CL VAR " << nodep << endl);
|
||||
UINFO(6, " CL VAR " << nodep);
|
||||
m_matches = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
void visit(AstNodeStmt* nodep) override {
|
||||
UINFO(6, " CL STMT " << nodep << endl);
|
||||
UINFO(6, " CL STMT " << nodep);
|
||||
const bool oldKeep = m_keepStmt;
|
||||
{
|
||||
VL_RESTORER(m_matches);
|
||||
|
|
@ -89,16 +89,16 @@ class SplitAsCleanVisitor final : public VNVisitor {
|
|||
iterateChildren(nodep);
|
||||
|
||||
if (m_keepStmt || (m_modeMatch ? m_matches : !m_matches)) {
|
||||
UINFO(6, " Keep STMT " << nodep << endl);
|
||||
UINFO(6, " Keep STMT " << nodep);
|
||||
m_keepStmt = true;
|
||||
} else {
|
||||
UINFO(6, " Delete STMT " << nodep << endl);
|
||||
UINFO(6, " Delete STMT " << nodep);
|
||||
VL_DO_DANGLING(pushDeletep(nodep->unlinkFrBack()), nodep);
|
||||
}
|
||||
}
|
||||
// If something below matches, the upper statement remains too.
|
||||
m_keepStmt = oldKeep || m_keepStmt;
|
||||
UINFO(9, " upKeep=" << m_keepStmt << " STMT " << nodep << endl);
|
||||
UINFO(9, " upKeep=" << m_keepStmt << " STMT " << nodep);
|
||||
}
|
||||
void visit(AstExprStmt* nodep) override {
|
||||
// A function call inside the splitting assignment
|
||||
|
|
@ -159,8 +159,8 @@ class SplitAsVisitor final : public VNVisitor {
|
|||
AstVarScope* const splitVscp = visitor.splitVscp();
|
||||
// Now isolate the always
|
||||
if (splitVscp) {
|
||||
UINFO(3, "Split " << nodep << endl);
|
||||
UINFO(3, " For " << splitVscp << endl);
|
||||
UINFO(3, "Split " << nodep);
|
||||
UINFO(3, " For " << splitVscp);
|
||||
// If we did this last time! Something's stuck!
|
||||
UASSERT_OBJ(splitVscp != lastSplitVscp, nodep,
|
||||
"Infinite loop in isolate_assignments removal for: "
|
||||
|
|
@ -189,7 +189,7 @@ public:
|
|||
// SplitAs class functions
|
||||
|
||||
void V3SplitAs::splitAsAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{ SplitAsVisitor{nodep}; } // Destruct before checking
|
||||
V3Global::dumpCheckGlobalTree("splitas", 0, dumpTreeEitherLevel() >= 3);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -459,9 +459,9 @@ class SplitUnpackedVarVisitor final : public VNVisitor, public SplitVarImpl {
|
|||
|
||||
void visit(AstNode* nodep) override { iterateChildren(nodep); }
|
||||
void visit(AstNodeModule* nodep) override {
|
||||
UINFO(4, "Start checking " << nodep->prettyNameQ() << "\n");
|
||||
UINFO(4, "Start checking " << nodep->prettyNameQ());
|
||||
if (!VN_IS(nodep, Module)) {
|
||||
UINFO(4, "Skip " << nodep->prettyNameQ() << "\n");
|
||||
UINFO(4, "Skip " << nodep->prettyNameQ());
|
||||
return;
|
||||
}
|
||||
UASSERT_OBJ(!m_modp, m_modp, "Nested module declaration");
|
||||
|
|
@ -522,7 +522,7 @@ class SplitUnpackedVarVisitor final : public VNVisitor, public SplitVarImpl {
|
|||
}
|
||||
}
|
||||
void visit(AstPin* nodep) override {
|
||||
UINFO(5, nodep->modVarp()->prettyNameQ() << " pin \n");
|
||||
UINFO(5, nodep->modVarp()->prettyNameQ() << " pin ");
|
||||
AstNode* const exprp = nodep->exprp();
|
||||
if (!exprp) return; // Not connected pin
|
||||
m_foundTargetVar.clear();
|
||||
|
|
@ -548,7 +548,7 @@ class SplitUnpackedVarVisitor final : public VNVisitor, public SplitVarImpl {
|
|||
if (!nodep->attrSplitVar()) return; // Nothing to do
|
||||
if (!cannotSplitReason(nodep)) {
|
||||
m_refs.registerVar(nodep);
|
||||
UINFO(4, nodep->name() << " is added to candidate list.\n");
|
||||
UINFO(4, nodep->name() << " is added to candidate list.");
|
||||
}
|
||||
}
|
||||
void visit(AstVarRef* nodep) override {
|
||||
|
|
@ -559,7 +559,7 @@ class SplitUnpackedVarVisitor final : public VNVisitor, public SplitVarImpl {
|
|||
}
|
||||
}
|
||||
void visit(AstVarXRef* nodep) override {
|
||||
UINFO(4, nodep->varp() << " Has hierarchical reference\n");
|
||||
UINFO(4, nodep->varp() << " Has hierarchical reference");
|
||||
m_forPackedSplit.m_hasXref.emplace(nodep->varp());
|
||||
}
|
||||
void visit(AstSel* nodep) override {
|
||||
|
|
@ -570,7 +570,7 @@ class SplitUnpackedVarVisitor final : public VNVisitor, public SplitVarImpl {
|
|||
if (AstVarRef* const refp = isTargetVref(nodep->fromp())) {
|
||||
const AstConst* const indexp = VN_CAST(nodep->bitp(), Const);
|
||||
if (indexp) { // OK
|
||||
UINFO(4, "add " << nodep << " for " << refp->varp()->prettyName() << "\n");
|
||||
UINFO(4, "add " << nodep << " for " << refp->varp()->prettyName());
|
||||
if (indexp->toSInt() < outerMostSizeOfUnpackedArray(refp->varp())) {
|
||||
m_refs.tryAdd(m_contextp, refp, nodep, indexp->toSInt(), m_inFTaskp);
|
||||
} else {
|
||||
|
|
@ -597,7 +597,7 @@ class SplitUnpackedVarVisitor final : public VNVisitor, public SplitVarImpl {
|
|||
nodep->declRange().ascending()};
|
||||
UASSERT_OBJ(dtypep->lo() <= selRange.lo() && selRange.hi() <= dtypep->hi(), nodep,
|
||||
"Range check for AstSliceSel must have been finished in V3Width.cpp");
|
||||
UINFO(4, "add " << nodep << " for " << refp->varp()->prettyName() << "\n");
|
||||
UINFO(4, "add " << nodep << " for " << refp->varp()->prettyName());
|
||||
m_refs.tryAdd(m_contextp, refp, nodep, nodep->declRange().hi(),
|
||||
nodep->declRange().lo(), m_inFTaskp);
|
||||
} else {
|
||||
|
|
@ -618,7 +618,7 @@ class SplitUnpackedVarVisitor final : public VNVisitor, public SplitVarImpl {
|
|||
AstVar* const varp = newVar(fl, VVarType::VAR, name, dtypep);
|
||||
// Variable will be registered in the caller side.
|
||||
UINFO(4, varp->prettyNameQ()
|
||||
<< " is created lsb:" << dtypep->lo() << " msb:" << dtypep->hi() << "\n");
|
||||
<< " is created lsb:" << dtypep->lo() << " msb:" << dtypep->hi());
|
||||
// Use AstAssign if true, otherwise AstAssignW
|
||||
const bool use_simple_assign
|
||||
= (context && VN_IS(context, NodeFTaskRef)) || (assignp && VN_IS(assignp, Assign));
|
||||
|
|
@ -629,7 +629,7 @@ class SplitUnpackedVarVisitor final : public VNVisitor, public SplitVarImpl {
|
|||
AstNodeExpr* rhsp = new AstArraySel{
|
||||
fl, newVarRef(fl, varp, !lvalue ? VAccess::WRITE : VAccess::READ), i};
|
||||
AstNode* const refp = lhsp;
|
||||
UINFO(9, "Creating assign idx:" << i << " + " << start_idx << "\n");
|
||||
UINFO(9, "Creating assign idx:" << i << " + " << start_idx);
|
||||
if (!lvalue) std::swap(lhsp, rhsp);
|
||||
AstNode* newassignp;
|
||||
if (use_simple_assign) {
|
||||
|
|
@ -684,7 +684,7 @@ class SplitUnpackedVarVisitor final : public VNVisitor, public SplitVarImpl {
|
|||
for (const auto& pair : refs) {
|
||||
UINFO(4, "In module " << m_modp->name() << " var " << pair.first->prettyNameQ()
|
||||
<< " which has " << pair.second.size()
|
||||
<< " refs will be split.\n");
|
||||
<< " refs will be split.");
|
||||
AstVar* const varp = pair.first;
|
||||
AstNode* insertp = varp;
|
||||
const AstUnpackArrayDType* const dtypep
|
||||
|
|
@ -730,8 +730,7 @@ class SplitUnpackedVarVisitor final : public VNVisitor, public SplitVarImpl {
|
|||
refp->access(), ref.ftask());
|
||||
newp = newrefp;
|
||||
refp->varp()->addNextHere(newrefp->varp());
|
||||
UINFO(4,
|
||||
"Create " << newrefp->varp()->prettyNameQ() << " for " << refp << "\n");
|
||||
UINFO(4, "Create " << newrefp->varp()->prettyNameQ() << " for " << refp);
|
||||
}
|
||||
ref.nodep()->replaceWith(newp);
|
||||
pushDeletep(ref.nodep());
|
||||
|
|
@ -760,7 +759,7 @@ class SplitUnpackedVarVisitor final : public VNVisitor, public SplitVarImpl {
|
|||
m_refs.swap(next);
|
||||
const size_t n = collapse(next);
|
||||
UINFO(4, n << " Variables are split " << trial << " th trial in "
|
||||
<< m_modp->prettyNameQ() << '\n');
|
||||
<< m_modp->prettyNameQ());
|
||||
if (trial == 0) m_numSplit += n;
|
||||
}
|
||||
doDeletes();
|
||||
|
|
@ -784,7 +783,7 @@ public:
|
|||
const std::pair<uint32_t, uint32_t> dim = nodep->dtypep()->dimensions(false);
|
||||
UINFO(7, nodep->prettyNameQ()
|
||||
<< " pub:" << nodep->isSigPublic() << " pri:" << nodep->isPrimaryIO()
|
||||
<< " io:" << nodep->isInout() << " typ:" << nodep->varType() << "\n");
|
||||
<< " io:" << nodep->isInout() << " typ:" << nodep->varType());
|
||||
const char* reason = nullptr;
|
||||
// Public variable cannot be split.
|
||||
// at least one unpacked dimension must exist
|
||||
|
|
@ -792,8 +791,7 @@ public:
|
|||
reason = "it is not an unpacked array";
|
||||
if (!reason) reason = cannotSplitVarCommonReason(nodep);
|
||||
if (reason) {
|
||||
UINFO(5,
|
||||
"Check " << nodep->prettyNameQ() << " cannot split because" << reason << ".\n");
|
||||
UINFO(5, "Check " << nodep->prettyNameQ() << " cannot split because" << reason);
|
||||
}
|
||||
return reason;
|
||||
}
|
||||
|
|
@ -980,7 +978,7 @@ class SplitPackedVarVisitor final : public VNVisitor, public SplitVarImpl {
|
|||
}
|
||||
} else { // Finally find a good candidate
|
||||
const bool inserted = m_refs.emplace(nodep, PackedVarRef{nodep}).second;
|
||||
if (inserted) UINFO(4, nodep->prettyNameQ() << " is added to candidate list.\n");
|
||||
if (inserted) UINFO(4, nodep->prettyNameQ() << " is added to candidate list.");
|
||||
}
|
||||
}
|
||||
void visit(AstVarRef* nodep) override {
|
||||
|
|
@ -995,7 +993,7 @@ class SplitPackedVarVisitor final : public VNVisitor, public SplitVarImpl {
|
|||
refit->second.append(PackedVarRefEntry{nodep, basicp->lo(), varp->width()},
|
||||
nodep->access());
|
||||
UINFO(5, varp->prettyName()
|
||||
<< " Entire bit of [" << basicp->lo() << "+:" << varp->width() << "] \n");
|
||||
<< " Entire bit of [" << basicp->lo() << "+:" << varp->width() << "]");
|
||||
}
|
||||
void visit(AstSel* nodep) override {
|
||||
const AstVarRef* const vrefp = VN_CAST(nodep->fromp(), VarRef);
|
||||
|
|
@ -1022,17 +1020,17 @@ class SplitPackedVarVisitor final : public VNVisitor, public SplitVarImpl {
|
|||
vrefp->access());
|
||||
UINFO(5, varp->prettyName()
|
||||
<< " [" << consts[0]->toSInt() << ":+" << consts[1]->toSInt()
|
||||
<< "] lsb:" << refit->second.basicp()->lo() << "\n");
|
||||
<< "] lsb:" << refit->second.basicp()->lo());
|
||||
} else {
|
||||
if (varp->attrSplitVar()) {
|
||||
warnNoSplit(vrefp->varp(), nodep, "its bit range cannot be determined statically");
|
||||
varp->attrSplitVar(false);
|
||||
}
|
||||
if (!consts[0]) {
|
||||
UINFO(4, "LSB " << nodep->lsbp() << " is expected to be constant, but not\n");
|
||||
UINFO(4, "LSB " << nodep->lsbp() << " is expected to be constant, but not");
|
||||
}
|
||||
if (!consts[1]) {
|
||||
UINFO(4, "WIDTH " << nodep->widthp() << " is expected to be constant, but not\n");
|
||||
UINFO(4, "WIDTH " << nodep->widthp() << " is expected to be constant, but not");
|
||||
}
|
||||
m_refs.erase(varp);
|
||||
iterateChildren(nodep);
|
||||
|
|
@ -1115,8 +1113,7 @@ class SplitPackedVarVisitor final : public VNVisitor, public SplitVarImpl {
|
|||
// newvar.varp()->trace(varp->isTrace());
|
||||
m_netp->typeTablep()->addTypesp(dtypep);
|
||||
varp->addNextHere(newvar.varp());
|
||||
UINFO(4, newvar.varp()->prettyNameQ()
|
||||
<< " is added for " << varp->prettyNameQ() << '\n');
|
||||
UINFO(4, newvar.varp()->prettyNameQ() << " is added for " << varp->prettyNameQ());
|
||||
}
|
||||
}
|
||||
static void updateReferences(AstVar* varp, PackedVarRef& pref,
|
||||
|
|
@ -1175,7 +1172,7 @@ class SplitPackedVarVisitor final : public VNVisitor, public SplitVarImpl {
|
|||
ref.dedup();
|
||||
UINFO(4, "In module " << m_modp->name() << " var " << varp->prettyNameQ()
|
||||
<< " which has " << ref.lhs().size() << " lhs refs and "
|
||||
<< ref.rhs().size() << " rhs refs will be split.\n");
|
||||
<< ref.rhs().size() << " rhs refs will be split.");
|
||||
std::vector<SplitNewVar> vars
|
||||
= ref.splitPlan(varp, !varp->isTrace()); // If traced, all bit must be kept
|
||||
if (vars.empty()) continue;
|
||||
|
|
@ -1347,8 +1344,7 @@ public:
|
|||
reason = "its type is unknown"; // LCOV_EXCL_LINE
|
||||
}
|
||||
if (reason) {
|
||||
UINFO(5,
|
||||
"Check " << nodep->prettyNameQ() << " cannot split because" << reason << endl);
|
||||
UINFO(5, "Check " << nodep->prettyNameQ() << " cannot split because" << reason);
|
||||
}
|
||||
return reason;
|
||||
}
|
||||
|
|
@ -1362,7 +1358,7 @@ const char* SplitVarImpl::cannotSplitPackedVarReason(const AstVar* varp) {
|
|||
// Split class functions
|
||||
|
||||
void V3SplitVar::splitVariable(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
SplitVarRefs refs;
|
||||
{
|
||||
const SplitUnpackedVarVisitor visitor{nodep};
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue