Chisel

Bits

abstract class Bits extends Data with proc

Base class for built-in Chisel types Bits and SInt.

Source
Bits.scala
Linear Supertypes
proc, Data, Node, Nameable, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Bits
  2. proc
  3. Data
  4. Node
  5. Nameable
  6. AnyRef
  7. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Bits()

Abstract Value Members

  1. abstract def fromInt(x: Int): Bits.this.type

Concrete Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. def ##[T <: Data](right: T): Bits.this.type

    Cat bits together to into a single data object with the width of both combined

    Cat bits together to into a single data object with the width of both combined

    Definition Classes
    BitsData
  4. def ##(b: Node): Node

    The cat operator to combine two values

    The cat operator to combine two values

    0x5 ## 0x3 => 0x53
    b

    Node to cat after

    returns

    a new node as the combination of both this node and b

    Definition Classes
    Node
  5. final def ##(): Int

    Definition Classes
    AnyRef → Any
  6. def %(b: Bits): Bits

  7. def &(b: Bits): Bits.this.type

    Bitwise and

  8. def *(b: Bits): Bits

  9. def +(b: Bits): Bits

  10. def -(b: Bits): Bits

  11. def /(b: Bits): Bits

  12. def :=(that: Data): Unit

    Definition Classes
    Data
  13. def <<(b: UInt): Bits.this.type

    Shift left operation

  14. def <>(src: Node): Unit

    Connect I/O of modules with the same name

    Connect I/O of modules with the same name

    src

    Node to attempt to connect to this instantiation

    Definition Classes
    BitsNode
  15. def =/=(that: BitPat): Bool

  16. def =/=(b: Bits): Bool

    not equal to

  17. def =/=[T <: Data](right: T): Bool

    Definition Classes
    Data
  18. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  19. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  20. def ===(that: BitPat): Bool

  21. def ===[T <: Data](right: T): Bool

    Definition Classes
    BitsData
  22. def W0Wtransform(): Unit

    Eliminate any zero-width wires attached to this node

    Eliminate any zero-width wires attached to this node

    returns

    if the node was modified

    Definition Classes
    Node
  23. def ^(b: Bits): Bits.this.type

    Bitwise xor

  24. def ^^(src: Node): Unit

    Definition Classes
    Node
  25. val _id: Int

    The unique id of this node

    The unique id of this node

    Definition Classes
    Node
  26. def _isComplementOf(x: Node): Boolean

    Definition Classes
    Node
  27. def andR(): Bool

    reduction and, and all bits together

  28. final def apply(range: (Int, Int)): UInt

    Extract a range of bits, inclusive from hi to lo

  29. final def apply(hi: UInt, lo: UInt): UInt

    Extract a range of bits, inclusive from hi to lo

  30. final def apply(hi: Int, lo: Int): UInt

    Extract a range of bits, inclusive from hi to lo

    Extract a range of bits, inclusive from hi to lo

    myBits = 0x5, myBits(1,0) => 0x3
  31. final def apply(bit: UInt): Bool

    Extract a single bit at position 'bit' as a Bool

  32. final def apply(bit: Int): Bool

    Extract a single Bool at index *bit*.

  33. def apply(name: String): Data

    Definition Classes
    BitsData
  34. def asDirectionless(): Bits.this.type

    Set this Bits instantiation to be neither of INPUT or OUTPUT

    Set this Bits instantiation to be neither of INPUT or OUTPUT

    Definition Classes
    BitsData
  35. def asInput(): Bits.this.type

    Set this Bits instatiation to be an INPUT

    Set this Bits instatiation to be an INPUT

    Definition Classes
    BitsData
  36. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  37. def asOutput(): Bits.this.type

    Set this Bits instatiation to be an OUTPUT

    Set this Bits instatiation to be an OUTPUT

    returns

    this instance with its exact type.

    Definition Classes
    BitsData
  38. final def asSInt(): SInt

  39. final def asTypeFor(node: Node): Bits.this.type

    assigns this instance as the data type for *node*.

    assigns this instance as the data type for *node*.

    Attributes
    protected[Chisel]
  40. final def asUInt(): UInt

  41. def assign(src: Node): Unit

    Definition Classes
    BitsNode
  42. def bitSet(off: UInt, dat: UInt): Bits.this.type

    Set bit 'off' in data dat

    Set bit 'off' in data dat

    off

    which bit to set

    dat

    A UInt in which to set the bit

  43. def canCSE: Boolean

    Definition Classes
    Node
  44. lazy val chiselName: String

    Definition Classes
    Node
  45. var clock: Option[Clock]

    The clock for this node

    The clock for this node

    Definition Classes
    Node
  46. def clone(): Bits.this.type

    Definition Classes
    Data → AnyRef
  47. def cloneType(): Bits.this.type

    Copy this instantiation of the Chisel Data type with all parameters such as width and I/O direction the same

    Copy this instantiation of the Chisel Data type with all parameters such as width and I/O direction the same

    Definition Classes
    BitsData
  48. def colonEquals(that: Bits): Unit

    Assignment operator

    Assignment operator

    Attributes
    protected
    Definition Classes
    BitsData
  49. def colonEquals[T <: Data](that: Seq[T]): Unit

    Attributes
    protected
    Definition Classes
    Data
  50. def colonEquals(that: Bundle): Unit

    Attributes
    protected
    Definition Classes
    Data
  51. var comp: Option[proc]

    Definition Classes
    Data
  52. def componentOf: Module

    Get the module that this node is a part of or the top module if not assigned yet

    Get the module that this node is a part of or the top module if not assigned yet

    returns

    The module that this node is a part of

    Definition Classes
    Node
  53. val consumers: LinkedHashSet[Node]

    nodes that consume one of my outputs

    nodes that consume one of my outputs

    Definition Classes
    Node
  54. def create(dir: IODirection, width: Int): Unit

  55. def dblLitValue: Double

    Convert the node literal to a Double

    Convert the node literal to a Double

    Definition Classes
    Node
  56. def default: proc

    Attributes
    protected
    Definition Classes
    proc
  57. def defaultMissing: Boolean

    Attributes
    protected
    Definition Classes
    proc
  58. def defaultRequired: Boolean

    Definition Classes
    Bitsproc
  59. var dir: IODirection

  60. def doProcAssign(src: Node, cond: Bool): Unit

    Attributes
    protected[Chisel]
    Definition Classes
    proc
  61. var driveRand: Boolean

    Definition Classes
    Node
  62. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  63. def equals(that: Any): Boolean

    Compare two nodes

    Compare two nodes

    that

    the node to compare with

    Definition Classes
    Node → AnyRef → Any
  64. def equalsForCSE(x: Node): Boolean

    Definition Classes
    Node
  65. def error(b: Bits): Bits

    Error shown when operation is not defined

    Error shown when operation is not defined

    Exceptions thrown
    ChiselException

    if the operation is not defined

  66. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  67. def flatten: Array[(String, Bits)]

    Definition Classes
    BitsData
  68. def flip(): Bits.this.type

    Change INPUT to OUTPUT and OUTPUT to INPUT

    Change INPUT to OUTPUT and OUTPUT to INPUT

    Definition Classes
    BitsData
  69. def floLitValue: Float

    Convert the node literal to a Float

    Convert the node literal to a Float

    Definition Classes
    Node
  70. def forceMatchingWidths: Unit

    Force the width of this nodes input to have the same width this if known if input node width is known force width of this node

    Force the width of this nodes input to have the same width this if known if input node width is known force width of this node

    Definition Classes
    BitsNode
  71. def fromBits(b: Bits): Bits.this.type

    Definition Classes
    Data
  72. def fromNode(n: Node): Bits.this.type

    Factory method to create and assign a leaf-type instance out of a subclass of *Node* instance which we have lost the concrete type.

    Factory method to create and assign a leaf-type instance out of a subclass of *Node* instance which we have lost the concrete type.

    Definition Classes
    Data
  73. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  74. def getNode: Node

    returns

    The root node input

    Definition Classes
    BitsNode
  75. def getWidth(): Int

    returns

    the width or number of bits used by this node

    Definition Classes
    Node
    Exceptions thrown
    ChiselException

    if the width of the node is unknown

  76. def hashCode(): Int

    returns

    the unique hashCode for this node

    Definition Classes
    Node → AnyRef → Any
  77. def hashCodeForCSE: Int

    Definition Classes
    Node
  78. def illegalAssignment(that: Any): Unit

    Attributes
    protected
    Definition Classes
    Data
  79. def infer: Boolean

    Called while we're walking the graph inferring the width of nodes.

    Called while we're walking the graph inferring the width of nodes. We return true if we should continue to walk the graph, either because there's a node whose width we don't know, or because we updated a node's width.

    Definition Classes
    Node
  80. def init(n: String, w: Int, ins: Node*): Node

    Init the node and calculate its width and add inputs to the node

    Init the node and calculate its width and add inputs to the node

    n

    name of node

    w

    the bit width of the node

    ins

    Nodes that are inputs to this node

    Definition Classes
    Node
  81. def init(n: String, widthFunc: (⇒ Node) ⇒ Width, ins: Node*): Node

    Init the node and calculate its width and add inputs to the node

    Init the node and calculate its width and add inputs to the node

    n

    name of node

    widthFunc

    the function to use to calculate the width of the node

    ins

    Nodes that are inputs to this node

    Definition Classes
    Node
  82. def initOf(n: String, widthfunc: (⇒ Node) ⇒ Width, ins: Seq[Node]): Node

    Init the node and calculate its width and add inputs to the node

    Init the node and calculate its width and add inputs to the node

    n

    name of node

    widthfunc

    the function to use to calculate the width of the node

    ins

    Nodes that are inputs to this node

    Definition Classes
    Node
  83. val inputs: ArrayBuffer[Node]

    The inputs that this node depends on

    The inputs that this node depends on

    Definition Classes
    Node
  84. def isDirectionless: Boolean

    returns

    this instantiation is neither of INPUT or OUTPUT

    Definition Classes
    BitsData
  85. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  86. def isIo: Boolean

    returns

    this node is an I/O Node for a module

    Definition Classes
    Node
  87. def isIo_=(isIo: Boolean): Unit

    Attributes
    protected[Chisel]
    Definition Classes
    Node
  88. final def isLit: Boolean

    This function determines if a node is a literal, a fixed value

    This function determines if a node is a literal, a fixed value

    Definition Classes
    Node
  89. def isTopLevelIO: Boolean

    returns

    is this node I/O for the top level module

    Definition Classes
    Node
  90. var isTypeNode: Boolean

    Definition Classes
    Node
  91. def isTypeOnly: Boolean

    Chisel3 - type-only nodes (no data - no initialization or assignment) This is used to determine which nodes must be Wire() wrapped, and whether Wire() wrapping of the node is legal or not.

    Chisel3 - type-only nodes (no data - no initialization or assignment) This is used to determine which nodes must be Wire() wrapped, and whether Wire() wrapping of the node is legal or not.

    Definition Classes
    DataNode
  92. def isUsedByClockHi: Boolean

    returns

    this node is a Register

    Definition Classes
    Node
  93. def isWired: Boolean

    Definition Classes
    Data
  94. def isZeroWidth: Boolean

    returns

    this node has zero-width

    Definition Classes
    Node
  95. val line: StackTraceElement

    The trace information for chisel for this node

    The trace information for chisel for this node

    Definition Classes
    Node
  96. def litOf: Literal

    returns

    the literal value of a node

    Definition Classes
    Node
    Exceptions thrown
    ChiselException

    if there is no literal value available

  97. def litValue(default: BigInt = BigInt(-1)): BigInt

    returns

    the literal value of the node as a BigInt

    Bool(true).litValue() => BigInt(1)
    Definition Classes
    Node
  98. def matchWidth(w: Width): Node

    Definition Classes
    BitsNode
  99. def maybeFlatten: Seq[Node]

    Deprecated: Do not use

    Deprecated: Do not use

    Definition Classes
    Node
  100. var modified: Boolean

    Definition Classes
    Node
  101. def muxes: Seq[Mux]

    Attributes
    protected[Chisel]
    Definition Classes
    proc
  102. var name: String

    Name of the instance.

    Name of the instance.

    Definition Classes
    Nameable
  103. def nameIt(path: String, isNamingIo: Boolean): Unit

    name this node

    name this node

    Definition Classes
    DataNode
    Note

    use setName in Node rather than this directly

  104. var named: Boolean

    named is used to indicate that name was set explicitly and should not be overriden

    named is used to indicate that name was set explicitly and should not be overriden

    Definition Classes
    Nameable
  105. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  106. def needWidth(): Int

    returns

    the bitWidth of the node

    Definition Classes
    Node
    Exceptions thrown
    ChiselException

    if the width is not yet defined

  107. final def newBinaryOp(right: Bits, opName: String): Bits.this.type

    Attributes
    protected
  108. final def newLogicalOp(right: Bits, opName: String): Bool

    Attributes
    protected
  109. final def newReductionOp(opName: String): Bool

    Attributes
    protected
  110. final def newUnaryOp(opName: String): Bits.this.type

    Attributes
    protected
  111. def next: Node

    Attributes
    protected[Chisel]
    Definition Classes
    proc
  112. def nextOpt: Option[Node]

    Attributes
    protected[Chisel]
    Definition Classes
    proc
  113. final def notify(): Unit

    Definition Classes
    AnyRef
  114. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  115. def orR(): Bool

    reduction or, or all bits together

  116. def params: Parameters

    Definition Classes
    Data
  117. def printTree(writer: PrintStream, depth: Int = 4, indent: String = ""): Unit

    Prints all members of a node and recursively its inputs up to a certain depth level This method is purely used for debugging

    Prints all members of a node and recursively its inputs up to a certain depth level This method is purely used for debugging

    Definition Classes
    Node
  118. def procAssign(src: Node): Unit

    Definition Classes
    Bitsproc
  119. var procAssigned: Boolean

    Attributes
    protected
    Definition Classes
    proc
  120. var prune: Boolean

    Definition Classes
    Node
  121. def replaceTree(newNode: Node): Unit

    Replace the subtree starting from this node with the indicated replacement

    Replace the subtree starting from this node with the indicated replacement

    newNode

    The node to start tree from

    Definition Classes
    Node
  122. def review(): Unit

    Review a node for optimization possibilities if its children have been updated

    Review a node for optimization possibilities if its children have been updated

    Definition Classes
    Node
  123. def setDefault(src: Node): Unit

    Attributes
    protected
    Definition Classes
    proc
  124. def setIsTypeNode: Unit

    make this node a type node

    make this node a type node

    Definition Classes
    Data
  125. def setIsWired(value: Boolean): Unit

    Definition Classes
    Data
  126. def setName(n: String): Unit

    Set the name of this module to the string 'n'

    Set the name of this module to the string 'n'

    Definition Classes
    Nameable
    Example:
    1. my.io.node.setName("MY_IO_NODE")
  127. def setWidth(w: Int): Unit

    Force the bit width of a node

    Force the bit width of a node

    w

    the bit width to force

    Definition Classes
    Node
  128. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  129. def toBits(): UInt

    returns

    This node as a UInt

    Definition Classes
    Node
  130. def toBool(): Bool

    Try to convert this data to a Bool

    Try to convert this data to a Bool

    Definition Classes
    Data
    Exceptions thrown
    ChiselException

    if the width is not 1

  131. def toBools: Vec[Bool]

    Split up this bits instantiation to a Vec of Bools

  132. lazy val toNode: Node

    Definition Classes
    DataNode
  133. def toSInt(): SInt

  134. def toString(): String

    Definition Classes
    Bits → AnyRef → Any
  135. def toUInt(): UInt

  136. def unary_~(): Bits.this.type

    invert all bits with ~

  137. def usesInClockHi(i: Node): Boolean

    Definition Classes
    Node
  138. def verifyMuxes: Unit

    Attributes
    protected[Chisel]
    Definition Classes
    proc
  139. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  140. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  141. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  142. def xorR(): Bool

    reduction xor, xor all bits together

  143. def |(b: Bits): Bits.this.type

    Bitwise or

Deprecated Value Members

  1. def !=(that: BitPat): Bool

    Annotations
    @deprecated
    Deprecated

    (Since version 3) Use =/= rather than != for chisel comparison

  2. def !=(b: Bits): Bool

    Annotations
    @deprecated
    Deprecated

    (Since version 3) Use =/= rather than != for chisel comparison

Inherited from proc

Inherited from Data

Inherited from Node

Inherited from Nameable

Inherited from AnyRef

Inherited from Any

Ungrouped