Chisel
Compute Log2 with truncation of a UInt in hardware using a Mux Tree An alternative interpretation is it computes the minimum number of bits needed to represent x
data_out := Log2(data_in)
Truncation is used so Log2(UInt(12412)) = 13
Compute the Log2 on the least significant n bits of x
Compute Log2 with truncation of a UInt in hardware using a Mux Tree An alternative interpretation is it computes the minimum number of bits needed to represent x
Truncation is used so Log2(UInt(12412)) = 13