log2Floor

chisel3.util.log2Floor
object log2Floor

Compute the log2 of a Scala integer, rounded down.

Can be useful in computing the next-smallest power of two.

Attributes

Example
log2Floor(1)  // returns 0
log2Floor(2)  // returns 1
log2Floor(3)  // returns 1
log2Floor(4)  // returns 2
Source
Math.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
log2Floor.type

Members list

Value members

Concrete methods

def apply(in: BigInt): Int

Attributes

Source
Math.scala
def apply(in: Int): Int

Attributes

Source
Math.scala