$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:
parent
fd4b849091
commit
e92c4638ed
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue