====== $clog2() ====== ^N^$clog2(N)^ |0|0| |1|0| |2|1| |3|2| |4|2| |5|3| |6|3| |7|3| |8|3| |9|4| parameter max_value = xxx; parameter bus_width = $clog2(max_malue + 1); logic [(bus_width-1):0] yyy;