mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 10:03:44 +02:00
Internals: UINFO now includes newline itself. No functional change.
This commit is contained in:
+20
-20
@@ -147,7 +147,7 @@ private:
|
||||
void convertAssignWToAlways() {
|
||||
// Wire assigns must become always statements to deal with insertion
|
||||
// of multiple statements. Perhaps someday make all wassigns into always's?
|
||||
UINFO(5, " IM_WireRep " << m_assignwp << endl);
|
||||
UINFO(5, " IM_WireRep " << m_assignwp);
|
||||
m_assignwp->convertToAlways();
|
||||
VL_DO_CLEAR(pushDeletep(m_assignwp), m_assignwp = nullptr);
|
||||
}
|
||||
@@ -182,7 +182,7 @@ private:
|
||||
for (AstNode* stmtp = nodep->varsp(); stmtp; stmtp = stmtp->nextp()) {
|
||||
if (AstVarScope* const vscp = VN_CAST(stmtp, VarScope)) {
|
||||
if (vscp->varp()->isFuncLocal() || vscp->varp()->isUsedLoopIdx()) {
|
||||
UINFO(9, " funcvsc " << vscp << endl);
|
||||
UINFO(9, " funcvsc " << vscp);
|
||||
m_varToScopeMap.emplace(std::make_pair(nodep, vscp->varp()), vscp);
|
||||
}
|
||||
}
|
||||
@@ -217,7 +217,7 @@ private:
|
||||
const AstArg* const argp = itr.second;
|
||||
if (const AstNodeExpr* const pinp = argp->exprp()) {
|
||||
if ((portp->isRef() || portp->isConstRef()) && !VN_IS(pinp, VarRef)) {
|
||||
UINFO(9, "No function inline due to ref " << pinp << endl);
|
||||
UINFO(9, "No function inline due to ref " << pinp);
|
||||
taskVtxp->noInline(true);
|
||||
}
|
||||
}
|
||||
@@ -225,7 +225,7 @@ private:
|
||||
}
|
||||
}
|
||||
void visit(AstNodeFTask* nodep) override {
|
||||
UINFO(9, " TASK " << nodep << endl);
|
||||
UINFO(9, " TASK " << nodep);
|
||||
VL_RESTORER(m_curVxp);
|
||||
m_curVxp = getFTaskVertex(nodep);
|
||||
if (nodep->dpiImport()) m_curVxp->noInline(true);
|
||||
@@ -489,8 +489,8 @@ class TaskVisitor final : public VNVisitor {
|
||||
if (!pinp) {
|
||||
// Too few arguments in function call
|
||||
} else {
|
||||
UINFO(9, " Port " << portp << endl);
|
||||
UINFO(9, " pin " << pinp << endl);
|
||||
UINFO(9, " Port " << portp);
|
||||
UINFO(9, " pin " << pinp);
|
||||
if (inlineTask) {
|
||||
pushDeletep(pinp->unlinkFrBack()); // Cloned in assignment below
|
||||
VL_DO_DANGLING(argp->unlinkFrBack()->deleteTree(), argp); // Args no longer needed
|
||||
@@ -629,7 +629,7 @@ class TaskVisitor final : public VNVisitor {
|
||||
}
|
||||
// Create function output variables
|
||||
if (outvscp) {
|
||||
// UINFO(0, "setflag on " << funcp->fvarp() << " to " << outvscp << endl);
|
||||
// UINFO(0, "setflag on " << funcp->fvarp() << " to " << outvscp);
|
||||
refp->taskp()->fvarp()->user2p(outvscp);
|
||||
}
|
||||
// Replace variable refs
|
||||
@@ -1463,7 +1463,7 @@ class TaskVisitor final : public VNVisitor {
|
||||
// Includes handling AstMethodCall, AstNew
|
||||
UASSERT_OBJ(nodep->taskp(), nodep, "Unlinked?");
|
||||
iterateIntoFTask(nodep->taskp()); // First, do hierarchical funcs
|
||||
UINFO(4, " FTask REF " << nodep << endl);
|
||||
UINFO(4, " FTask REF " << nodep);
|
||||
if (debug() >= 9) nodep->dumpTree("- inlfunc: ");
|
||||
UASSERT_OBJ(m_scopep, nodep, "func ref not under scope");
|
||||
const string namePrefix = ((VN_IS(nodep, FuncRef) ? "__Vfunc_" : "__Vtask_")
|
||||
@@ -1518,10 +1518,10 @@ class TaskVisitor final : public VNVisitor {
|
||||
nodep->unlinkFrBack();
|
||||
VL_DO_DANGLING(nodep->deleteTree(), nodep);
|
||||
}
|
||||
UINFO(4, " FTask REF Done.\n");
|
||||
UINFO(4, " FTask REF Done.");
|
||||
}
|
||||
void visit(AstNodeFTask* nodep) override {
|
||||
UINFO(4, " visitFTask " << nodep << endl);
|
||||
UINFO(4, " visitFTask " << nodep);
|
||||
VL_RESTORER(m_insStmtp);
|
||||
m_insStmtp = nodep->stmtsp(); // Might be null if no statements, but we won't use it
|
||||
if (!nodep->user1SetOnce()) { // Just one creation needed per function
|
||||
@@ -1568,7 +1568,7 @@ class TaskVisitor final : public VNVisitor {
|
||||
if (nodep->isFunction()) {
|
||||
if (AstVar* const portp = VN_CAST(nodep->fvarp(), Var)) {
|
||||
AstVarScope* const vscp = m_statep->findVarScope(m_scopep, portp);
|
||||
UINFO(9, " funcremovevsc " << vscp << endl);
|
||||
UINFO(9, " funcremovevsc " << vscp);
|
||||
VL_DO_DANGLING(pushDeletep(vscp->unlinkFrBack()), vscp);
|
||||
}
|
||||
}
|
||||
@@ -1576,7 +1576,7 @@ class TaskVisitor final : public VNVisitor {
|
||||
nextp = stmtp->nextp();
|
||||
if (AstVar* const portp = VN_CAST(stmtp, Var)) {
|
||||
AstVarScope* const vscp = m_statep->findVarScope(m_scopep, portp);
|
||||
UINFO(9, " funcremovevsc " << vscp << endl);
|
||||
UINFO(9, " funcremovevsc " << vscp);
|
||||
VL_DO_DANGLING(pushDeletep(vscp->unlinkFrBack()), vscp);
|
||||
}
|
||||
}
|
||||
@@ -1654,7 +1654,7 @@ V3TaskConnects V3Task::taskConnects(AstNodeFTaskRef* nodep, AstNode* taskStmtsp,
|
||||
// func calls are made right in C)
|
||||
// Missing pin/expr? We return (pinvar, nullptr)
|
||||
// Extra pin/expr? We clean it up
|
||||
UINFO(9, "taskConnects " << nodep << endl);
|
||||
UINFO(9, "taskConnects " << nodep);
|
||||
std::map<const std::string, int> nameToIndex;
|
||||
V3TaskConnects tconnects;
|
||||
UASSERT_OBJ(nodep->taskp(), nodep, "unlinked");
|
||||
@@ -1755,7 +1755,7 @@ V3TaskConnects V3Task::taskConnects(AstNodeFTaskRef* nodep, AstNode* taskStmtsp,
|
||||
if (!VN_IS(newvaluep, Const)) {
|
||||
if (statep) {
|
||||
portp->pinNum(i + 1); // Make sure correct, will use to build name
|
||||
UINFO(9, "taskConnects arg wrapper needed " << portp->valuep() << endl);
|
||||
UINFO(9, "taskConnects arg wrapper needed " << portp->valuep());
|
||||
argWrap.emplace(portp);
|
||||
} else { // statep = nullptr, called too late or otherwise to handle args
|
||||
// Problem otherwise is we might have a varref, task
|
||||
@@ -1774,7 +1774,7 @@ V3TaskConnects V3Task::taskConnects(AstNodeFTaskRef* nodep, AstNode* taskStmtsp,
|
||||
newvaluep = newvaluep->cloneTree(true);
|
||||
// To avoid problems with callee needing to know to deleteTree
|
||||
// or not, we make this into a pin
|
||||
UINFO(9, "Default pin for " << portp << endl);
|
||||
UINFO(9, "Default pin for " << portp);
|
||||
AstArg* const newp = new AstArg{nodep->fileline(), portp->name(), newvaluep};
|
||||
if (tconnects[i].second) { // Have a "nullptr" pin already defined for it
|
||||
VL_DO_CLEAR(tconnects[i].second->unlinkFrBack()->deleteTree(),
|
||||
@@ -1784,9 +1784,9 @@ V3TaskConnects V3Task::taskConnects(AstNodeFTaskRef* nodep, AstNode* taskStmtsp,
|
||||
reorganize = true;
|
||||
}
|
||||
if (tconnects[i].second) {
|
||||
UINFO(9, "Connect " << portp << " -> " << tconnects[i].second << endl);
|
||||
UINFO(9, "Connect " << portp << " -> " << tconnects[i].second);
|
||||
} else {
|
||||
UINFO(9, "Connect " << portp << " -> NONE" << endl);
|
||||
UINFO(9, "Connect " << portp << " -> NONE");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1812,12 +1812,12 @@ V3TaskConnects V3Task::taskConnects(AstNodeFTaskRef* nodep, AstNode* taskStmtsp,
|
||||
nodep->dumpTree("- ftref-out: ");
|
||||
for (int i = 0; i < tpinnum; ++i) {
|
||||
UINFO(0, " pin " << i << " pin=" << cvtToHex(tconnects[i].first)
|
||||
<< " conn=" << cvtToHex(tconnects[i].second) << endl);
|
||||
<< " conn=" << cvtToHex(tconnects[i].second));
|
||||
}
|
||||
} // LCOV_EXCL_STOP
|
||||
|
||||
if (!argWrap.empty()) {
|
||||
UINFO(9, "Arg wrapper generation " << nodep << endl);
|
||||
UINFO(9, "Arg wrapper generation " << nodep);
|
||||
// Create wrapper function with default argument settings.
|
||||
// Needed because the default needs symbol table of the called function.
|
||||
taskConnectWrap(nodep, tconnects, statep, argWrap);
|
||||
@@ -2042,7 +2042,7 @@ string V3Task::assignDpiToInternal(const string& lhsName, AstVar* varp) {
|
||||
}
|
||||
|
||||
void V3Task::taskAll(AstNetlist* nodep) {
|
||||
UINFO(2, __FUNCTION__ << ": " << endl);
|
||||
UINFO(2, __FUNCTION__ << ":");
|
||||
{
|
||||
TaskStateVisitor visitors{nodep};
|
||||
const TaskVisitor visitor{nodep, &visitors};
|
||||
|
||||
Reference in New Issue
Block a user