BitPat

chisel3.util.BitPat
See theBitPat companion class
object BitPat

Attributes

Companion
class
Source
BitPat.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
BitPat.type

Members list

Type members

Inherited classlikes

implicit class fromUIntToBitPatComparable(x: UInt)

Attributes

Inherited from:
BitPat$Intf (hidden)
Source
BitPatIntf.scala
Supertypes
class Object
trait Matchable
class Any

Value members

Concrete methods

def N(width: Int = ...): BitPat

Creates a BitPat of all 0 of the specified bitwidth.

Creates a BitPat of all 0 of the specified bitwidth.

Attributes

Example
val myN = BitPat.N(4)  // equivalent to BitPat("b0000")
Source
BitPat.scala
def Y(width: Int = ...): BitPat

Creates a BitPat of all 1 of the specified bitwidth.

Creates a BitPat of all 1 of the specified bitwidth.

Attributes

Example
val myY = BitPat.Y(4)  // equivalent to BitPat("b1111")
Source
BitPat.scala
def apply(n: String): BitPat

Creates a BitPat literal from a string.

Creates a BitPat literal from a string.

Value parameters

n

the literal value as a string, in binary, prefixed with 'b'

Attributes

Note

legal characters are '0', '1', and '?', as well as '_' and white space (which are ignored)

Source
BitPat.scala
def apply(x: UInt): BitPat

Allows UInts to be used where a BitPat is expected, useful for when an interface is defined with BitPats but not all cases need the partial matching capability.

Allows UInts to be used where a BitPat is expected, useful for when an interface is defined with BitPats but not all cases need the partial matching capability.

Attributes

Note

the UInt must be a literal

Source
BitPat.scala
def apply(x: EnumType): BitPat

Allows ChiselEnum to be used where a BitPat is expected.

Allows ChiselEnum to be used where a BitPat is expected.

Attributes

Source
BitPat.scala

Allows BitPats to be used where a UInt is expected.

Allows BitPats to be used where a UInt is expected.

Attributes

Note

the BitPat must not have don't care bits (will error out otherwise)

Source
BitPat.scala
def dontCare(width: Int): BitPat

Creates a BitPat of all don't cares of the specified bitwidth.

Creates a BitPat of all don't cares of the specified bitwidth.

Attributes

Example
val myDontCare = BitPat.dontCare(4)  // equivalent to BitPat("b????")
Source
BitPat.scala

Implicits

Inherited implicits

Attributes

Inherited from:
BitPat$Intf (hidden)
Source
BitPatIntf.scala