Support wide public task outputs.

git-svn-id: file://localhost/svn/verilator/trunk/verilator@810 77ca24e4-aefa-0310-84f0-b9a241c72d87
This commit is contained in:
Wilson Snyder
2006-10-05 14:53:17 +00:00
parent e471a34323
commit 318a6e348c
7 changed files with 35 additions and 18 deletions
+11 -4
View File
@@ -102,9 +102,16 @@ public:
if (AstVar* portp = stmtp->castVar()) {
if (portp->isIO() && !portp->isFuncReturn()) {
if (args != "") args+= ", ";
args += portp->cType();
if (portp->isOutput()) args += "&";
args += " "+portp->name();
if (portp->isWide()) {
if (portp->isInOnly()) args += "const ";
args += portp->cType();
args += " (& "+portp->name();
args += ")["+cvtToStr(portp->widthWords())+"]";
} else {
args += portp->cType();
if (portp->isOutput()) args += "&";
args += " "+portp->name();
}
}
}
}
@@ -707,7 +714,7 @@ void EmitCStmts::emitVarDecl(AstVar* nodep, const string& prefixIfImp) {
else if (nodep->isOutput()) puts("sc_out<");
else nodep->v3fatalSrc("Unknown type");
puts(nodep->cType());
puts(nodep->scType());
puts(">\t");
}
puts(nodep->name());