Log2
chisel3.util.Log2
object Log2
Returns the base-2 integer logarithm of an UInt.
Attributes
- Note
-
The result is truncated, so e.g. Log2(13.U) === 3.U
- Example
-
Log2(8.U) // evaluates to 3.U Log2(13.U) // evaluates to 3.U (truncation) Log2(myUIntWire) - Source
- CircuitMath.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Log2.type
Members list
In this article