Fix internal error when params get non-constants. [Johan Wouters]

git-svn-id: file://localhost/svn/verilator/trunk/verilator@1031 77ca24e4-aefa-0310-84f0-b9a241c72d87
This commit is contained in:
Wilson Snyder 2008-04-17 15:47:16 +00:00
parent 61e876e4bf
commit ab83717b7d
2 changed files with 3 additions and 0 deletions

View File

@ -15,6 +15,8 @@ indicates the contributor was also the author of the fix; Thanks!
**** Fix multiple .v files being read in random order. [Stefan Thiede]
**** Fix internal error when params get non-constants. [Johan Wouters]
* Verilator 3.661 2008/04/04
*** The --enable-defenv configure option added in 3.660 is now the default.

View File

@ -254,6 +254,7 @@ void ParamVisitor::visit(AstCell* nodep, AstNUser*) {
if (!constp) {
//if (debug()) pinp->dumpTree(cout,"error:");
pinp->v3error("Can't convert defparam value to constant: Param "<<pinp->name()<<" of "<<nodep->prettyName());
pinp->exprp()->replaceWith(new AstConst(pinp->fileline(), V3Number(pinp->fileline(), pinp->width(), 0)));
} else {
longname += "_" + paramSmallName(nodep->modp(),pinp->modVarp())+constp->num().ascii(false);
}