Fix using short parameter names on negative params, bug1022.

This commit is contained in:
Wilson Snyder 2016-01-20 22:09:11 -05:00
parent 29daa58222
commit e061eb3003
2 changed files with 7 additions and 4 deletions

View File

@ -9,6 +9,8 @@ indicates the contributor was also the author of the fix; Thanks!
**** Fix stats file containing multiple unroll entries, bug1020. [Johan Bjork]
**** Fix using short parameter names on negative params, bug1022. [Duraid Madina]
* Verilator 3.880 2015-12-19

View File

@ -474,12 +474,13 @@ void ParamVisitor::visitCell(AstCell* nodep) {
// Setting parameter to its default value. Just ignore it.
// This prevents making additional modules, and makes coverage more
// obvious as it won't show up under a unique module page name.
} else if (!constp->num().isDouble() && !constp->num().isString()
&& !constp->num().isFourState() && !constp->num().isNegative()) {
longname += "_" + paramSmallName(nodep->modp(),pinp->modVarp())+constp->num().ascii(false);
} else if (constp->num().isDouble()
|| constp->num().isString()
|| constp->num().isFourState()) {
longname += "_" + paramSmallName(nodep->modp(),pinp->modVarp())+paramValueNumber(constp);
any_overrides = true;
} else {
longname += "_" + paramSmallName(nodep->modp(),pinp->modVarp())+paramValueNumber(constp);
longname += "_" + paramSmallName(nodep->modp(),pinp->modVarp())+constp->num().ascii(false);
any_overrides = true;
}
}