Returns ceiling(log2(x)), where x is the function argument
int log2(int x);
The most typical case for
log2
function is determining vector sizes for signals based on the maximum assigned value.
x
log2(x)
1
0
32
5
33
6