OHToUInt

chisel3.util.OHToUInt
object OHToUInt

Returns the bit position of the sole high bit of the input bitvector.

Inverse operation of UIntToOH.

Attributes

Note

assumes exactly one high bit, results undefined otherwise

Example
OHToUInt("b0100".U) // results in 2.U
Source
OneHot.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
OHToUInt.type

Members list

Value members

Concrete methods

def apply(in: Seq[Bool]): UInt

Attributes

Source
OneHot.scala
def apply(in: Vec[Bool]): UInt

Attributes

Source
OneHot.scala
def apply(in: Bits): UInt

Attributes

Source
OneHot.scala
def apply(in: Bits, width: Int): UInt

Attributes

Source
OneHot.scala