当前位置: 首页>>代码示例>>C++>>正文


C++ UINFO函数代码示例

本文整理汇总了C++中UINFO函数的典型用法代码示例。如果您正苦于以下问题:C++ UINFO函数的具体用法?C++ UINFO怎么用?C++ UINFO使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了UINFO函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: iteratorNodep

void V3Hashed::erase(iterator it) {
    AstNode* nodep = iteratorNodep(it);
    UINFO(8,"   erase "<<nodep<<endl);
    if (!nodep->user4p()) nodep->v3fatalSrc("Called removeNode on non-hashed node");
    m_hashMmap.erase(it);
    nodep->user4p(NULL);   // So we don't allow removeNode again
}
开发者ID:phb,项目名称:verilator-asserts,代码行数:7,代码来源:V3Hashed.cpp

示例2: visit

    virtual void visit(AstVarRef* nodep, AstNUser*) {
	if (nodep->lvalue()) {
	    AstVarScope* vscp = nodep->varScopep();
	    if (nodep->varp()->isSigPublic()) {
		// Public signals shouldn't be changed, pli code might be messing with them
		scoreboardPli(nodep);
	    }
	    // If another lvalue in this node, give up optimizing.
	    // We could just not optimize this variable, but we've already marked the
	    // other variable as optimizable, so we can instead pretend it's a PLI node.
	    if (m_stmtVscp) {
		UINFO(5, "   Multiple lvalues in one statement: "<<nodep<<endl);
		scoreboardPli(nodep);  // This will set m_stmtInPli
	    }
	    m_stmtVscp = vscp;
	    // Find, or make new Vertex
	    GaterVarVertex* vertexp = (GaterVarVertex*)(vscp->user1p());
	    if (!vertexp) {
		vertexp = new GaterVarVertex(&m_graph, vscp);
		vscp->user1p(vertexp);
	    }
	    new GaterEdge(&m_graph, m_aboveVertexp, vertexp, m_aboveTrue);
	    if (m_stmtInPli) {
		new GaterEdge(&m_graph, m_pliVertexp, vertexp, VU_PLI);
	    }
	}
    }
开发者ID:torc-isi,项目名称:torc,代码行数:27,代码来源:V3ClkGater.cpp

示例3: visit

    // VISITORS
    virtual void visit(AstNodeModule* nodep, AstNUser*) {
	UINFO(4," MOD   "<<nodep<<endl);
	m_modp = nodep;
	m_constXCvt = true;
	nodep->iterateChildren(*this);
	m_modp = NULL;
    }
开发者ID:torc-isi,项目名称:torc,代码行数:8,代码来源:V3Unknown.cpp

示例4: moveVars

    void moveVars() {
	for (vector<AstVar*>::iterator it = m_varps.begin(); it != m_varps.end(); ++it) {
	    AstVar* nodep = *it;
	    if (nodep->valuep()) clearOptimizable(nodep,"HasInitValue");
	    if (!VarFlags(nodep).m_stdFuncAsn) clearStdOptimizable(nodep,"NoStdAssign");
	    VarFlags flags (nodep);
	    if ((nodep->isMovableToBlock() // Blocktemp
		 || !flags.m_notStd)	// Or used only in block
		&& !flags.m_notOpt	// Optimizable
		&& nodep->user1p()) {	// Single cfunc
		// We don't need to test for tracing; it would be in the tracefunc if it was needed
		UINFO(4,"  ModVar->BlkVar "<<nodep<<endl);
		++m_statLocVars;
		AstCFunc* newfuncp = nodep->user1p()->castCFunc();
		nodep->unlinkFrBack();
		newfuncp->addInitsp(nodep);
		// Done
		flags.m_done = true;
		flags.setNodeFlags(nodep);
	    } else {
		clearOptimizable(nodep, "NotDone");
	    }
	}
	m_varps.clear();
    }
开发者ID:mballance,项目名称:verilator-svtnt,代码行数:25,代码来源:V3Localize.cpp

示例5: visit

    virtual void visit(AstVarRef* nodep) {
	if (!VarFlags(nodep->varp()).m_notOpt) {
	    if (!m_cfuncp) {	// Not in function, can't optimize
		clearOptimizable(nodep->varp(), "BVnofunc");
	    }
	    else {
		// If we're scoping down to it, it isn't really in the same block
		if (!nodep->hierThis()) clearOptimizable(nodep->varp(),"HierRef");
		// Allow a variable to appear in only a single function
		AstNode* oldfunc = nodep->varp()->user1p();
		if (!oldfunc) {
		    UINFO(4,"      BVnewref "<<nodep<<endl);
		    nodep->varp()->user1p(m_cfuncp); // Remember where it was used
		} else if (m_cfuncp == oldfunc) {
		    // Same usage
		} else {
		    // Used in multiple functions
		    clearOptimizable(nodep->varp(),"BVmultiF");
		}
		// First varref in function must be assignment found earlier
		AstVarRef* firstasn = (AstVarRef*)(nodep->varp()->user4p());
		if (firstasn && nodep!=firstasn) {
		    clearStdOptimizable(nodep->varp(),"notFirstAsn");
		    nodep->varp()->user4p(NULL);
		}
	    }
	}
	// No iterate; Don't want varrefs under it
    }
开发者ID:mballance,项目名称:verilator-svtnt,代码行数:29,代码来源:V3Localize.cpp

示例6: visit

    // VISITORS
    virtual void visit(AstNodeModule* nodep, AstNUser*) {
	m_stmtCnt = 0;
	m_modp = nodep;
	m_modp->user2(CIL_MAYBE);
	if (m_modp->castIface()) {
	    // Inlining an interface means we no longer have a cell handle to resolve to.
	    // If inlining moves post-scope this can perhaps be relaxed.
	    cantInline("modIface",true);
	}
	if (m_modp->modPublic()) cantInline("modPublic",false);
	//
	nodep->iterateChildren(*this);
	//
	bool userinline = nodep->user1();
	int allowed = nodep->user2();
	int refs = nodep->user3();
	// Should we automatically inline this module?
	// inlineMult = 2000 by default.  If a mod*#instances is < this # nodes, can inline it
	bool doit = ((allowed == CIL_NOTSOFT || allowed == CIL_MAYBE)
		     && (userinline
			 || ((allowed == CIL_MAYBE)
			     && (refs==1
				 || m_stmtCnt < INLINE_MODS_SMALLER
				 || v3Global.opt.inlineMult() < 1
				 || refs*m_stmtCnt < v3Global.opt.inlineMult()))));
	// Packages aren't really "under" anything so they confuse this algorithm
	if (nodep->castPackage()) doit = false;
	UINFO(4, " Inline="<<doit<<" Possible="<<allowed<<" Usr="<<userinline<<" Refs="<<refs<<" Stmts="<<m_stmtCnt
	      <<"  "<<nodep<<endl);
	nodep->user1(doit);
	m_modp = NULL;
    }
开发者ID:grg,项目名称:verilator,代码行数:33,代码来源:V3Inline.cpp

示例7: visit

    // VISITORS
    virtual void visit(AstAlways* nodep, AstNUser*) {
	UINFO(4,"   ALW   "<<nodep<<endl);
	if (debug()>=9) nodep->dumpTree(cout,"   alwIn:: ");
	scoreboardClear();
	processBlock(nodep->bodysp());
	if (debug()>=9) nodep->dumpTree(cout,"   alwOut: ");
    }
开发者ID:phb,项目名称:verilator-asserts,代码行数:8,代码来源:V3Split.cpp

示例8: UINFO

void V3GenClk::genClkAll(AstNetlist* nodep) {
    UINFO(2,__FUNCTION__<<": "<<endl);
    {
        GenClkReadVisitor visitor (nodep);
    }  // Destruct before checking
    V3Global::dumpCheckGlobalTree("genclk", 0, v3Global.opt.dumpTreeLevel(__FILE__) >= 3);
}
开发者ID:jeras,项目名称:verilator,代码行数:7,代码来源:V3GenClk.cpp

示例9: UINFO

void V3Localize::localizeAll(AstNetlist* nodep) {
    UINFO(2,__FUNCTION__<<": "<<endl);
    LocalizeVisitor visitor (nodep);
    // Fix up hiernames
    LocalizeDehierVisitor dvisitor (nodep);
    V3Global::dumpCheckGlobalTree("localize.tree", 0, v3Global.opt.dumpTreeLevel(__FILE__) >= 6);
}
开发者ID:mballance,项目名称:verilator-svtnt,代码行数:7,代码来源:V3Localize.cpp

示例10: visitEqNeqCase

    void visitEqNeqCase(AstNodeBiop* nodep) {
	UINFO(4," N/EQCASE->EQ "<<nodep<<endl);
	V3Const::constifyEdit(nodep->lhsp());  // lhsp may change
	V3Const::constifyEdit(nodep->rhsp());  // rhsp may change
	if (nodep->lhsp()->castConst() && nodep->rhsp()->castConst()) {
	    // Both sides are constant, node can be constant
	    V3Const::constifyEdit(nodep); nodep=NULL;
	    return;
	} else {
	    AstNode* lhsp = nodep->lhsp()->unlinkFrBack();
	    AstNode* rhsp = nodep->rhsp()->unlinkFrBack();
	    AstNode* newp;
	    // If we got ==1'bx it can never be true (but 1'bx==1'bx can be!)
	    if (((lhsp->castConst() && lhsp->castConst()->num().isFourState())
		 || (rhsp->castConst() && rhsp->castConst()->num().isFourState()))) {
		V3Number num (nodep->fileline(), 1, (nodep->castEqCase()?0:1));
		newp = new AstConst (nodep->fileline(), num);
		lhsp->deleteTree(); lhsp=NULL;
		rhsp->deleteTree(); rhsp=NULL;
	    } else {
		if (nodep->castEqCase())
		newp = new AstEq (nodep->fileline(), lhsp, rhsp);
		else newp = new AstNeq (nodep->fileline(), lhsp, rhsp);
	    }
	    nodep->replaceWith(newp);
	    nodep->deleteTree(); nodep=NULL;
	    // Iterate tree now that we may have gotten rid of Xs
	    newp->iterateChildren(*this);
	}
    }
开发者ID:torc-isi,项目名称:torc,代码行数:30,代码来源:V3Unknown.cpp

示例11: visit

    virtual void visit(AstNodeModule* nodep, AstNUser*) {
	UINFO(4," MOD   "<<nodep<<endl);
	m_modp = nodep;
	m_modNFuncs = 0;
	m_hashed.clear();
	// Compute hash of all statement trees in the function
	m_state = STATE_HASH;
	nodep->iterateChildren(*this);
	m_state = STATE_IDLE;
	if (debug()>=9) {
	    m_hashed.dumpFilePrefixed("combine");
	}
	// Walk the hashes removing empty functions
	if (emptyFunctionDeletion()) {
	    walkEmptyFuncs();
	}
	// Walk the hashes looking for duplicate functions
	if (duplicateFunctionCombine()) {
	    walkDupFuncs();
	}
	// Walk the statements looking for large replicated code sections
	if (statementCombine()) {
	    m_state = STATE_DUP;
	    nodep->iterateChildren(*this);
	    m_state = STATE_IDLE;
	}
	m_modp = NULL;
    }
开发者ID:torc-isi,项目名称:torc,代码行数:28,代码来源:V3Combine.cpp

示例12: visit

    virtual void visit(AstNodeFTaskRef* nodep, AstNUser*) {
	// Track what scope it was originally under so V3LinkDot can resolve it
	string newname = m_cellp->name();
	if (nodep->inlinedDots() != "") { newname += "." + nodep->inlinedDots(); }
	nodep->inlinedDots(newname);
	UINFO(8,"   "<<nodep<<endl);
	nodep->iterateChildren(*this);
    }
开发者ID:duythanhphan,项目名称:verilator,代码行数:8,代码来源:V3Inline.cpp

示例13: newDfaVertex

    DfaVertex* newDfaVertex(DfaVertex* nfaTemplatep=NULL) {
	DfaVertex* vertexp = new DfaVertex (graphp());
	vertexp->color(1);  // Mark as dfa
	if (nfaTemplatep && nfaTemplatep->start()) vertexp->start(true);
	if (nfaTemplatep && nfaTemplatep->accepting()) vertexp->accepting(true);
	UINFO(9, "        New "<<vertexp<<endl);
	return vertexp;
    }
开发者ID:VarunKoyyalagunta,项目名称:verilator,代码行数:8,代码来源:V3GraphDfa.cpp

示例14: visit

    virtual void visit(AstCell* nodep, AstNUser*) {
	UINFO(4,"  CELL   "<<nodep<<endl);
	m_cellp = nodep;
	//VV*****  We reset user1p() on each cell!!!
	AstNode::user1ClearTree();
	nodep->iterateChildren(*this);
	m_cellp = NULL;
    }
开发者ID:toddstrader,项目名称:verilator-integer-array,代码行数:8,代码来源:V3Inst.cpp

示例15: cantUnroll

    // VISITORS
    bool cantUnroll(AstNode* nodep, const char* reason) {
	if (m_generate) {
	    nodep->v3error("Unsupported: Can't unroll generate for; "<<reason);
	}
	UINFO(3,"   Can't Unroll: "<<reason<<" :"<<nodep<<endl);
	V3Stats::addStatSum(string("Unrolling gave up, ")+reason, 1);
	return false;
    }
开发者ID:VarunKoyyalagunta,项目名称:verilator,代码行数:9,代码来源:V3Unroll.cpp


注:本文中的UINFO函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。