Return the number of bits required to encode a specific value, assuming no sign bit is required.
Return the number of bits required to encode a specific value, assuming no sign bit is required.
Basically, n.bitLength
. NOTE: This will return 0 for a value of 0.
This reflects the Chisel assumption that a zero width wire has a value of 0.
- the number to be encoded.
- an Int representing the number of bits to encode.