$clog2() should return an integer value.

The constant $clog2() was returning a value that had an integer
width, but it did not have the sign bit set. This could result
in incorrect math expressions. This patch sets the sign bit for
the constant $clog2() result.
(cherry picked from commit bc60536eb9)
This commit is contained in:
Cary R 2009-10-13 16:38:53 -07:00 committed by Stephen Williams
parent fd4b849091
commit e92c4638ed
1 changed files with 1 additions and 0 deletions

View File

@ -1703,6 +1703,7 @@ NetExpr* evaluate_clog2(NetExpr*&arg_)
res = integer_width;
verinum tmp (res, integer_width);
tmp.has_sign(true);
NetEConst*rtn = new NetEConst(tmp);
return rtn;
}