chisel3.util.signedBitLength
Attributes
-
Source
-
Math.scala
-
Graph
-
-
Supertypes
-
class Object
trait Matchable
class Any
-
Self type
-
Members list
Return the number of bits required to encode a specific value, assuming a sign bit is required.
Return the number of bits required to encode a specific value, assuming a sign bit is required.
Basically, 0 for 0, 1 for -1, and n.bitLength + 1 for everything else. This reflects the Chisel assumption that a zero width wire has a value of 0.
Value parameters
-
in
-
- the number to be encoded.
Attributes
-
Returns
-
- an Int representing the number of bits to encode.
-
Source
-
Math.scala