Fix task inlining under , bug589.
This commit is contained in:
parent
e68afa53a8
commit
4c7f051247
2
Changes
2
Changes
|
|
@ -9,6 +9,8 @@ indicates the contributor was also the author of the fix; Thanks!
|
||||||
|
|
||||||
**** Fix non-integer vpi_get_value, bug587. [Rich Porter]
|
**** Fix non-integer vpi_get_value, bug587. [Rich Porter]
|
||||||
|
|
||||||
|
**** Fix task inlining under $display, bug589. [Holger Waechtler]
|
||||||
|
|
||||||
|
|
||||||
* Verilator 3.843 2012/12/01
|
* Verilator 3.843 2012/12/01
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1913,7 +1913,7 @@ public:
|
||||||
bool hidden() const { return m_hidden; }
|
bool hidden() const { return m_hidden; }
|
||||||
};
|
};
|
||||||
|
|
||||||
struct AstDisplay : public AstNode {
|
struct AstDisplay : public AstNodeStmt {
|
||||||
// Parents: stmtlist
|
// Parents: stmtlist
|
||||||
// Children: file which must be a varref
|
// Children: file which must be a varref
|
||||||
// Children: SFORMATF to generate print string
|
// Children: SFORMATF to generate print string
|
||||||
|
|
@ -1921,7 +1921,7 @@ private:
|
||||||
AstDisplayType m_displayType;
|
AstDisplayType m_displayType;
|
||||||
public:
|
public:
|
||||||
AstDisplay(FileLine* fileline, AstDisplayType dispType, const string& text, AstNode* filep, AstNode* exprsp)
|
AstDisplay(FileLine* fileline, AstDisplayType dispType, const string& text, AstNode* filep, AstNode* exprsp)
|
||||||
: AstNode (fileline) {
|
: AstNodeStmt (fileline) {
|
||||||
setOp1p(new AstSFormatF(fileline,text,true,exprsp));
|
setOp1p(new AstSFormatF(fileline,text,true,exprsp));
|
||||||
setNOp3p(filep);
|
setNOp3p(filep);
|
||||||
m_displayType = dispType;
|
m_displayType = dispType;
|
||||||
|
|
@ -1976,11 +1976,11 @@ struct AstSFormat : public AstNode {
|
||||||
void lhsp(AstNode* nodep) { setOp3p(nodep); }
|
void lhsp(AstNode* nodep) { setOp3p(nodep); }
|
||||||
};
|
};
|
||||||
|
|
||||||
struct AstSysIgnore : public AstNode {
|
struct AstSysIgnore : public AstNodeStmt {
|
||||||
// Parents: stmtlist
|
// Parents: stmtlist
|
||||||
// Children: varrefs or exprs
|
// Children: varrefs or exprs
|
||||||
AstSysIgnore(FileLine* fileline, AstNode* exprsp)
|
AstSysIgnore(FileLine* fileline, AstNode* exprsp)
|
||||||
: AstNode (fileline) { addNOp1p(exprsp); }
|
: AstNodeStmt (fileline) { addNOp1p(exprsp); }
|
||||||
ASTNODE_NODE_FUNCS(SysIgnore, SYSIGNORE)
|
ASTNODE_NODE_FUNCS(SysIgnore, SYSIGNORE)
|
||||||
virtual string verilogKwd() const { return "$ignored"; }
|
virtual string verilogKwd() const { return "$ignored"; }
|
||||||
virtual bool isGateOptimizable() const { return false; } // Though deleted before opt
|
virtual bool isGateOptimizable() const { return false; } // Though deleted before opt
|
||||||
|
|
|
||||||
|
|
@ -979,9 +979,13 @@ private:
|
||||||
// Iterate into the FTask we are calling. Note it may be under a different
|
// Iterate into the FTask we are calling. Note it may be under a different
|
||||||
// scope then the caller, so we need to restore state.
|
// scope then the caller, so we need to restore state.
|
||||||
AstScope* oldscopep = m_scopep;
|
AstScope* oldscopep = m_scopep;
|
||||||
|
InsertMode prevInsMode = m_insMode;
|
||||||
|
AstNode* prevInsStmtp = m_insStmtp;
|
||||||
m_scopep = m_statep->getScope(nodep);
|
m_scopep = m_statep->getScope(nodep);
|
||||||
nodep->accept(*this);
|
nodep->accept(*this);
|
||||||
m_scopep = oldscopep;
|
m_scopep = oldscopep;
|
||||||
|
m_insMode = prevInsMode;
|
||||||
|
m_insStmtp = prevInsStmtp;
|
||||||
}
|
}
|
||||||
void insertBeforeStmt(AstNode* nodep, AstNode* newp) {
|
void insertBeforeStmt(AstNode* nodep, AstNode* newp) {
|
||||||
// See also AstNode::addBeforeStmt; this predates that function
|
// See also AstNode::addBeforeStmt; this predates that function
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue