forked from github/verilator
Cast as scope always under topscopes - no func change
git-svn-id: file://localhost/svn/verilator/trunk/verilator@765 77ca24e4-aefa-0310-84f0-b9a241c72d87
This commit is contained in:
parent
81d2329e88
commit
268f0544be
@ -450,7 +450,7 @@ public:
|
||||
virtual void accept(AstNVisitor& v, AstNUser* vup=NULL) { v.visit(this,vup); }
|
||||
AstNode* stmtsp() const { return op1p()->castNode(); }
|
||||
void addStmtsp(AstNode* nodep) { addOp1p(nodep); }
|
||||
AstNode* scopep() const { return op2p()->castNode(); } // op1 = AstVarScope's
|
||||
AstScope* scopep() const { return op2p()->castScope(); } // op1 = AstVarScope's
|
||||
};
|
||||
|
||||
struct AstVarScope : public AstNode {
|
||||
|
@ -101,7 +101,7 @@ private:
|
||||
// Clearing
|
||||
AstNode::userClearTree();
|
||||
// Create the change detection function
|
||||
AstScope* scopep = nodep->scopep()->castScope();
|
||||
AstScope* scopep = nodep->scopep();
|
||||
if (!scopep) nodep->v3fatalSrc("No scope found on top level, perhaps you have no statements?\n");
|
||||
m_scopetopp = scopep;
|
||||
// Create change detection function
|
||||
|
@ -180,7 +180,7 @@ private:
|
||||
virtual void visit(AstTopScope* nodep, AstNUser*) {
|
||||
UINFO(4," TOPSCOPE "<<nodep<<endl);
|
||||
m_topScopep=nodep;
|
||||
m_scopep = nodep->scopep()->castScope();
|
||||
m_scopep = nodep->scopep();
|
||||
if (!m_scopep) nodep->v3fatalSrc("No scope found on top level, perhaps you have no statements?\n");
|
||||
//VV***** We reset all userp()
|
||||
AstNode::userClearTree();
|
||||
|
@ -84,7 +84,7 @@ private:
|
||||
virtual void visit(AstTopScope* nodep, AstNUser*) {
|
||||
AstNode::user2ClearTree(); // userp() used on entire tree
|
||||
|
||||
AstScope* scopep = nodep->scopep()->castScope();
|
||||
AstScope* scopep = nodep->scopep();
|
||||
if (!scopep) nodep->v3fatalSrc("No scope found on top level");
|
||||
m_scopetopp = scopep;
|
||||
|
||||
|
@ -169,7 +169,7 @@ private:
|
||||
AstNode::user3ClearTree(); // userp() used on entire tree
|
||||
AstNode::user4ClearTree(); // userp() used on entire tree
|
||||
|
||||
AstScope* scopep = nodep->scopep()->castScope();
|
||||
AstScope* scopep = nodep->scopep();
|
||||
if (!scopep) nodep->v3fatalSrc("TopScope has no scope\n");
|
||||
AstCFunc* evalp = NULL;
|
||||
for (AstNode* searchp = scopep->blocksp(); searchp; searchp=searchp->nextp()) {
|
||||
|
@ -410,7 +410,7 @@ private:
|
||||
m_graph.clear();
|
||||
m_activep = NULL;
|
||||
m_topScopep = nodep;
|
||||
m_scopetopp = nodep->scopep()->castScope();
|
||||
m_scopetopp = nodep->scopep();
|
||||
// Find sentree's
|
||||
m_finder.main(m_topScopep);
|
||||
// ProcessDomainsIterate will use these when it needs to move
|
||||
|
@ -522,7 +522,7 @@ private:
|
||||
nodep->iterateChildren(*this);
|
||||
}
|
||||
virtual void visit(AstTopScope* nodep, AstNUser*) {
|
||||
AstScope* scopep = nodep->scopep()->castScope();
|
||||
AstScope* scopep = nodep->scopep();
|
||||
if (!scopep) nodep->v3fatalSrc("No scope found on top level");
|
||||
m_highScopep = scopep;
|
||||
nodep->iterateChildren(*this);
|
||||
|
@ -71,7 +71,7 @@ private:
|
||||
|
||||
// VISITORS
|
||||
virtual void visit(AstTopScope* nodep, AstNUser*) {
|
||||
m_scopetopp = nodep->scopep()->castScope();
|
||||
m_scopetopp = nodep->scopep();
|
||||
// The container for m_traceFuncp must be made first
|
||||
{
|
||||
AstCFunc* funcp = new AstCFunc(nodep->fileline(), "traceInitThis", m_scopetopp);
|
||||
|
@ -643,6 +643,7 @@ private:
|
||||
}
|
||||
virtual void visit(AstNodeFTaskRef* nodep, AstNUser* vup) {
|
||||
// Function hasn't been widthed, so make it so.
|
||||
if (!nodep->taskp()) nodep->v3fatalSrc("Unlinked");
|
||||
if (nodep->taskp()->width()==0) {
|
||||
if (m_taskDepth > 100) {
|
||||
nodep->v3error("Unsupported: Recursive function or task call\n");
|
||||
|
Loading…
Reference in New Issue
Block a user