Chisel

Data

abstract class Data extends Node

*Data* is part of the *Node* Composite Pattern class hierarchy. It is the root of the type system which includes composites (Bundle, Vec) and atomic types (UInt, SInt, etc.).

Instances of Data are meant to help with construction and correctness of a logic graph. They will trimmed out of the graph before a *Backend* generates target code.

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

Instance Constructors

  1. new Data()

Abstract Value Members

  1. abstract def asDirectionless(): Data.this.type

    set this node as directionless

  2. abstract def asOutput(): Data.this.type

    Sets the direction (*dir*) of instances derived from Bits to OUTPUT or recursively sets members of Bundle/Vec to OUTPUT.

    Sets the direction (*dir*) of instances derived from Bits to OUTPUT or recursively sets members of Bundle/Vec to OUTPUT.

    returns

    this instance with its exact type.

  3. abstract def flatten: Array[(String, Bits)]

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): Data.this.type

    Interface required by Cat is an operator to combine data nodes together

  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 :=(that: Data): Unit

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

    Definition Classes
    Node
  8. def =/=[T <: Data](right: T): Bool

  9. final def ==(arg0: AnyRef): Boolean

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

    Definition Classes
    Any
  11. def ===[T <: Data](right: T): Bool

  12. 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
  13. def ^^(src: Node): Unit

    Definition Classes
    Node
  14. val _id: Int

    The unique id of this node

    The unique id of this node

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

    Definition Classes
    Node
  16. def apply(name: String): Data

  17. def asInput(): Data.this.type

    Return this object as an INPUT

  18. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  19. def assign(src: Node): Unit

    Definition Classes
    Node
  20. def canCSE: Boolean

    Definition Classes
    Node
  21. lazy val chiselName: String

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

    The clock for this node

    The clock for this node

    Definition Classes
    Node
  23. def clone(): Data.this.type

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

  25. def colonEquals[T <: Data](that: Iterable[T]): Unit

    Attributes
    protected
  26. def colonEquals(that: Bundle): Unit

    Attributes
    protected
  27. def colonEquals(that: Bits): Unit

    Attributes
    protected
  28. var comp: Option[proc]

  29. 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
  30. val consumers: LinkedHashSet[Node]

    nodes that consume one of my outputs

    nodes that consume one of my outputs

    Definition Classes
    Node
  31. def dblLitValue: Double

    Convert the node literal to a Double

    Convert the node literal to a Double

    Definition Classes
    Node
  32. var driveRand: Boolean

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

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

    Compare two nodes

    Compare two nodes

    that

    the node to compare with

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

    Definition Classes
    Node
  36. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  37. def flip(): Data.this.type

    Change INPUTs to OUTPUTs and visa versa

  38. def floLitValue: Float

    Convert the node literal to a Float

    Convert the node literal to a Float

    Definition Classes
    Node
  39. def fromBits(b: Bits): Data.this.type

  40. def fromNode(n: Node): Data.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.

  41. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  42. def getNode: Node

    returns

    The root node input

    Definition Classes
    Node
  43. 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

  44. def hashCode(): Int

    returns

    the unique hashCode for this node

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

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

    Attributes
    protected
  47. 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
  48. 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
  49. 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
  50. def initOf(n: String, widthfunc: (⇒ Node) ⇒ Width, ins: Iterable[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
  51. val inputs: ArrayBuffer[Node]

    The inputs that this node depends on

    The inputs that this node depends on

    Definition Classes
    Node
  52. def isDirectionless: Boolean

    check if this node is neither INPUT or OUTPUT

  53. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  54. def isIo: Boolean

    returns

    this node is an I/O Node for a module

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

    Definition Classes
    Node
  56. 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
  57. def isTopLevelIO: Boolean

    returns

    is this node I/O for the top level module

    Definition Classes
    Node
  58. var isTypeNode: Boolean

    Definition Classes
    Node
  59. 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
  60. def isUsedByClockHi: Boolean

    returns

    this node is a Register

    Definition Classes
    Node
  61. def isWired: Boolean

  62. def isZeroWidth: Boolean

    returns

    this node has zero-width

    Definition Classes
    Node
  63. val line: StackTraceElement

    The trace information for chisel for this node

    The trace information for chisel for this node

    Definition Classes
    Node
  64. def litOf: Literal

    returns

    the literal value of a node

    Definition Classes
    Node
    Exceptions thrown
    ChiselException

    if there is no literal value available

  65. 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
  66. def maybeFlatten: Seq[Node]

    Deprecated: Do not use

    Deprecated: Do not use

    Definition Classes
    Node
  67. var modified: Boolean

    Definition Classes
    Node
  68. var name: String

    Name of the instance.

    Name of the instance.

    Definition Classes
    Nameable
  69. 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

  70. 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
  71. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  72. def needWidth(): Int

    returns

    the bitWidth of the node

    Definition Classes
    Node
    Exceptions thrown
    ChiselException

    if the width is not yet defined

  73. final def notify(): Unit

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

    Definition Classes
    AnyRef
  75. def params: Parameters

  76. 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
  77. var prune: Boolean

    Definition Classes
    Node
  78. 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
  79. 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
  80. def setIsTypeNode: Unit

    make this node a type node

  81. def setIsWired(value: Boolean): Unit

  82. 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")
  83. 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
  84. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  85. def toBits(): UInt

    returns

    This node as a UInt

    Definition Classes
    Node
  86. def toBool(): Bool

    Try to convert this data to a Bool

    Try to convert this data to a Bool

    Exceptions thrown
    ChiselException

    if the width is not 1

  87. lazy val toNode: Node

    Definition Classes
    DataNode
  88. def toString(): String

    Definition Classes
    AnyRef → Any
  89. def usesInClockHi(i: Node): Boolean

    Definition Classes
    Node
  90. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Node

Inherited from Nameable

Inherited from AnyRef

Inherited from Any

Ungrouped