$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.
This commit is contained in:
parent
d9d8d4b093
commit
bc60536eb9
|
|
@ -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