mirror of
https://github.com/verilator/verilator.git
synced 2025-01-31 18:54:03 +00:00
Fix extra dot names, and missing __PVT in functions
git-svn-id: file://localhost/svn/verilator/trunk/verilator@756 77ca24e4-aefa-0310-84f0-b9a241c72d87
This commit is contained in:
parent
ce10dbd11c
commit
1c0b6d7ef3
2
Changes
2
Changes
@ -3,7 +3,7 @@ Revision history for Verilator
|
|||||||
The contributors that suggested a given feature are shown in []. [by ...]
|
The contributors that suggested a given feature are shown in []. [by ...]
|
||||||
indicates the contributor was also the author of the fix; Thanks!
|
indicates the contributor was also the author of the fix; Thanks!
|
||||||
|
|
||||||
* Verilator 3.600 08/26/2006
|
* Verilator 3.600 08/28/2006
|
||||||
|
|
||||||
** Support dotted cross-hierarchy variable and task references.
|
** Support dotted cross-hierarchy variable and task references.
|
||||||
|
|
||||||
|
@ -60,10 +60,9 @@ private:
|
|||||||
nodep->iterateChildren(*this);
|
nodep->iterateChildren(*this);
|
||||||
}
|
}
|
||||||
virtual void visit(AstModule* nodep, AstNUser*) {
|
virtual void visit(AstModule* nodep, AstNUser*) {
|
||||||
//VV***** We reset all userp() on each module!!!
|
|
||||||
AstNode::userClearTree();
|
|
||||||
m_modp = nodep;
|
m_modp = nodep;
|
||||||
nodep->iterateChildren(*this);
|
nodep->iterateChildren(*this);
|
||||||
|
m_modp = NULL;
|
||||||
}
|
}
|
||||||
// Add __PVT__ to names of local signals
|
// Add __PVT__ to names of local signals
|
||||||
virtual void visit(AstVar* nodep, AstNUser*) {
|
virtual void visit(AstVar* nodep, AstNUser*) {
|
||||||
@ -106,6 +105,7 @@ private:
|
|||||||
: (nodep->aboveScopep()->name()+"."+nodep->aboveCellp()->name()));
|
: (nodep->aboveScopep()->name()+"."+nodep->aboveCellp()->name()));
|
||||||
nodep->user(1);
|
nodep->user(1);
|
||||||
}
|
}
|
||||||
|
nodep->iterateChildren(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------
|
//--------------------
|
||||||
|
@ -156,13 +156,13 @@ private:
|
|||||||
//int debug() { return 9; }
|
//int debug() { return 9; }
|
||||||
|
|
||||||
// METHODS
|
// METHODS
|
||||||
AstVarScope* createVarScope(AstVar* invarp, const string& namePrefix) {
|
AstVarScope* createVarScope(AstVar* invarp, const string& name) {
|
||||||
// We could create under either the ref's scope or the ftask's scope.
|
// We could create under either the ref's scope or the ftask's scope.
|
||||||
// It shouldn't matter, as they are only local variables.
|
// It shouldn't matter, as they are only local variables.
|
||||||
// We choose to do it under whichever called this function, which results
|
// We choose to do it under whichever called this function, which results
|
||||||
// in more cache locality.
|
// in more cache locality.
|
||||||
AstVar* newvarp = new AstVar (invarp->fileline(), AstVarType::BLOCKTEMP,
|
AstVar* newvarp = new AstVar (invarp->fileline(), AstVarType::BLOCKTEMP,
|
||||||
namePrefix+"__"+invarp->shortName(), invarp);
|
name, invarp);
|
||||||
newvarp->funcLocal(false);
|
newvarp->funcLocal(false);
|
||||||
m_modp->addStmtp(newvarp);
|
m_modp->addStmtp(newvarp);
|
||||||
AstVarScope* newvscp = new AstVarScope (newvarp->fileline(), m_scopep, newvarp);
|
AstVarScope* newvscp = new AstVarScope (newvarp->fileline(), m_scopep, newvarp);
|
||||||
@ -186,6 +186,8 @@ private:
|
|||||||
for (AstNode* stmtp = newbodysp; stmtp; pinp=nextpinp, stmtp=nextstmtp) {
|
for (AstNode* stmtp = newbodysp; stmtp; pinp=nextpinp, stmtp=nextstmtp) {
|
||||||
nextstmtp = stmtp->nextp();
|
nextstmtp = stmtp->nextp();
|
||||||
if (AstVar* portp = stmtp->castVar()) {
|
if (AstVar* portp = stmtp->castVar()) {
|
||||||
|
portp->unlinkFrBack(); // Remove it from the clone (not original)
|
||||||
|
pushDeletep(portp);
|
||||||
if (portp->isIO()) {
|
if (portp->isIO()) {
|
||||||
if (pinp==NULL) {
|
if (pinp==NULL) {
|
||||||
refp->v3error("Too few arguments in function call");
|
refp->v3error("Too few arguments in function call");
|
||||||
@ -197,8 +199,6 @@ private:
|
|||||||
//
|
//
|
||||||
nextpinp = pinp->nextp();
|
nextpinp = pinp->nextp();
|
||||||
pinp->unlinkFrBack(); // Relinked to assignment below
|
pinp->unlinkFrBack(); // Relinked to assignment below
|
||||||
portp->unlinkFrBack(); // Remove it from the clone (not original)
|
|
||||||
pushDeletep(portp);
|
|
||||||
//
|
//
|
||||||
if (portp->isTristate()) {
|
if (portp->isTristate()) {
|
||||||
refp->v3error("Unsupported: Inouts in functions/tasks");
|
refp->v3error("Unsupported: Inouts in functions/tasks");
|
||||||
@ -347,6 +347,7 @@ private:
|
|||||||
m_lastStmtp = NULL;
|
m_lastStmtp = NULL;
|
||||||
m_modNCalls = 0;
|
m_modNCalls = 0;
|
||||||
nodep->iterateChildren(*this);
|
nodep->iterateChildren(*this);
|
||||||
|
m_modp = NULL;
|
||||||
}
|
}
|
||||||
virtual void visit(AstScope* nodep, AstNUser*) {
|
virtual void visit(AstScope* nodep, AstNUser*) {
|
||||||
m_scopep = nodep;
|
m_scopep = nodep;
|
||||||
|
@ -236,6 +236,7 @@ void process () {
|
|||||||
v3Global.rootp()->dumpTreeFile(v3Global.debugFilename("task.tree"));
|
v3Global.rootp()->dumpTreeFile(v3Global.debugFilename("task.tree"));
|
||||||
|
|
||||||
// Add __PVT's
|
// Add __PVT's
|
||||||
|
// After V3Task so task internal variables will get renamed
|
||||||
V3Name::nameAll(v3Global.rootp());
|
V3Name::nameAll(v3Global.rootp());
|
||||||
//v3Global.rootp()->dumpTreeFile(v3Global.debugFilename("name.tree"));
|
//v3Global.rootp()->dumpTreeFile(v3Global.debugFilename("name.tree"));
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
//**********************************************************************
|
//**********************************************************************
|
||||||
//**** Version and host name
|
//**** Version and host name
|
||||||
|
|
||||||
#define DTVERSION "Verilator 3.600 08/26/2006"
|
#define DTVERSION "Verilator 3.600 08/28/2006"
|
||||||
|
|
||||||
//**********************************************************************
|
//**********************************************************************
|
||||||
//**** Functions
|
//**** Functions
|
||||||
|
Loading…
Reference in New Issue
Block a user