spinal.core

BitVector

Related Doc: package core

abstract class BitVector extends BaseType with Widthable with CheckWidth

BitVector is a family of types for storing multiple bits of information in a single value. This type has three subtypes that can be used to model different behaviours:

See also

BitVector Documentation

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. BitVector
  2. CheckWidth
  3. Widthable
  4. WidthProvider
  5. BaseType
  6. AssignementTreePart
  7. Data
  8. Assignable
  9. NameableByComponent
  10. Nameable
  11. OwnableRef
  12. Node
  13. SpinalTagReady
  14. ScalaLocated
  15. ContextUser
  16. GlobalDataUser
  17. AnyRef
  18. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new BitVector()

Type Members

  1. abstract type RefOwnerType

    Definition Classes
    OwnableRef
  2. abstract type T <: BitVector

    Used to know the data type of the children class of BitVector

Abstract Value Members

  1. abstract def apply(offset: UInt, bitCount: BitCount): BitVector.this.type

    Return a range of bits at offset and of width bitCount

    Return a range of bits at offset and of width bitCount

    Example:
    1. val myBool = myBits(myUInt, 2 bits)
  2. abstract def apply(offset: Int, bitCount: BitCount): BitVector.this.type

    Return a range of bits at offset and of width bitCount

    Return a range of bits at offset and of width bitCount

    Example:
    1. val myBool = myBits(3, 2 bits)
  3. abstract def apply(bitId: UInt): Bool

    Return the bit at index bitId

    Return the bit at index bitId

    Example:
    1. val myBool = myBits(myUInt)
  4. abstract def apply(bitId: Int): Bool

    Return the bit at index bitId

    Return the bit at index bitId

    Example:
    1. val myBool = myBits(3)
  5. abstract def asBits: Bits

    Definition Classes
    Data
  6. abstract def assignFromBits(bits: Bits, hi: Int, low: Int): Unit

    Definition Classes
    Data
  7. abstract def assignFromBits(bits: Bits): Unit

    Definition Classes
    Data
  8. abstract def getAllToBoolNode(): AllByBool

    Attributes
    protected
  9. abstract def getZero: BitVector.this.type

    Definition Classes
    Data
  10. abstract def getZeroUnconstrained(): BitVector.this.type

  11. abstract def resize(width: Int): BitVector.this.type

    Resize the bitVector to width

    Resize the bitVector to width

    returns

    a resized bitVector

    Example:
    1. val res = myBits.resize(10)
  12. abstract def rotateLeft(that: Int): T

    Left rotation of that bits

  13. abstract def rotateRight(that: Int): T

    Right rotation of that bits

Concrete Value Members

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

    Definition Classes
    AnyRef → Any
  2. def ##(right: Data): Bits

    Definition Classes
    Data
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. def =/=(that: MaskedLiteral): Bool

    BitVector is not equal to MaskedLiteral

  5. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  6. def ===(that: MaskedLiteral): Bool

    Compare a BitVector with a MaskedLiteral (M"110--0")

    Compare a BitVector with a MaskedLiteral (M"110--0")

    that

    the maskedLiteral

    returns

    a Bool data containing the result of the comparison

    Example:
    1. val myBool = myBits === M"0-1"
  7. var _spinalTags: Set[SpinalTag]

    Definition Classes
    SpinalTagReady
  8. def addAttribute(attribute: Attribute): BitVector.this.type

    Definition Classes
    BaseTypeDataSpinalTagReady
  9. def addAttribute(name: String, value: String): BitVector.this.type

    Definition Classes
    SpinalTagReady
  10. def addAttribute(name: String): BitVector.this.type

    Definition Classes
    SpinalTagReady
  11. def addTag(spinalTag: SpinalTag): BitVector.this.type

    Definition Classes
    SpinalTagReady
  12. def addTags(tags: Iterable[SpinalTag]): BitVector.this.type

    Definition Classes
    SpinalTagReady
  13. def allowPruning(): Unit

    Definition Classes
    Data
  14. def allowSimplifyIt(): BitVector.this.type

    Definition Classes
    BaseTypeData
  15. def andR: Bool

    Logical AND of all bits

  16. def apply(range: Range): BitVector.this.type

    Return a range of bits

    Return a range of bits

    Example:
    1. val myBool = myBits(3 downto 1)
  17. def apply(hi: Int, lo: Int): BitVector.this.type

    Return a range of bits form hi index to lo index

    Return a range of bits form hi index to lo index

    Example:
    1. val myBool = myBits(3, 1)
  18. def asBools: Vec[Bool]

    Cast the BitVector into a Vector of Bool

    Cast the BitVector into a Vector of Bool

    returns

    a vector of Bool

  19. def asData: Data

    Definition Classes
    Data
  20. def asDirectionLess(): BitVector.this.type

    Definition Classes
    BaseTypeData
  21. def asInput(): BitVector.this.type

    Definition Classes
    BaseTypeData
  22. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  23. def asOutput(): BitVector.this.type

    Definition Classes
    BaseTypeData
  24. def assignDontCare(): BitVector.this.type

    Definition Classes
    BitVectorBaseTypeData
  25. final def assignFrom(that: AnyRef, conservative: Boolean): Unit

    Definition Classes
    Assignable
  26. def assignFromBits(bits: Bits, offset: Int, bitCount: BitCount): Unit

    Definition Classes
    Data
  27. var assignementThrowable: Throwable

    Definition Classes
    BaseType
  28. def clearAll(): Unit

    Clear all bits

  29. def clone(): BitVector.this.type

    Definition Classes
    BitVectorBaseTypeData → AnyRef
  30. var component: Component

    Definition Classes
    ContextUser
  31. var compositeAssign: Assignable

    Definition Classes
    Assignable
  32. val consumers: ArrayBuffer[Node]

    Definition Classes
    Node
  33. var defaultValue: BaseType

    Definition Classes
    BaseType
  34. def dontSimplifyIt(): BitVector.this.type

    Definition Classes
    BaseTypeData
  35. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  36. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  37. def existsTag(cond: (SpinalTag) ⇒ Boolean): Boolean

    Definition Classes
    SpinalTagReady
  38. def filterTag(cond: (SpinalTag) ⇒ Boolean): Iterable[SpinalTag]

    Definition Classes
    SpinalTagReady
  39. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  40. def findTag(cond: (SpinalTag) ⇒ Boolean): Option[SpinalTag]

    Definition Classes
    SpinalTagReady
  41. def flatten: Seq[BaseType]

    Definition Classes
    BaseTypeData
  42. def flattenLocalName: Seq[String]

    Definition Classes
    BaseTypeData
  43. def flip(): BitVector.this.type

    Definition Classes
    Data
  44. def forEachNameables(doThat: (Any) ⇒ Unit): Unit

    Definition Classes
    Nameable
  45. def genIf(cond: Boolean): BitVector.this.type

    Definition Classes
    Data
  46. def getAssignementContext(id: Int): Throwable

    Definition Classes
    BaseTypeAssignementTreePart
  47. def getBitsWidth: Int

    Definition Classes
    BitVectorData
  48. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  49. def getComponent(): Component

    Definition Classes
    DataNameableByComponent
  50. def getComponents(): Seq[Component]

    Definition Classes
    Data
  51. def getDisplayName(): String

    Definition Classes
    Nameable
  52. def getDrivingReg: BitVector.this.type

    Definition Classes
    BaseType
  53. def getInput(id: Int): Node

    Definition Classes
    BaseTypeNode
  54. def getInputs: Iterator[Node]

    Definition Classes
    BaseTypeNode
  55. def getInputsCount: Int

    Definition Classes
    BaseTypeNode
  56. def getInstanceCounter: Int

    Definition Classes
    ContextUser
  57. def getName(): String

    Definition Classes
    NameableByComponentNameable
  58. def getName(default: String): String

    Definition Classes
    Nameable
  59. def getRefOwnersChain(): List[Any]

    Definition Classes
    OwnableRef
  60. def getRootParent: Data

    Definition Classes
    Data
  61. def getScalaLocationLong: String

    Definition Classes
    ScalaLocated
  62. def getScalaLocationShort: String

    Definition Classes
    ScalaLocated
  63. def getTag[T <: SpinalTag](clazz: Class[T]): Option[T]

    Definition Classes
    SpinalTagReady
  64. def getWidth: Int

    Definition Classes
    WidthableWidthProvider
  65. def getWidthNoInferation: Int

    Return the width

  66. def getWidthStringNoInferation: String

  67. val globalData: GlobalData

    Definition Classes
    GlobalDataUser
  68. def hasTag(spinalTag: SpinalTag): Boolean

    Definition Classes
    SpinalTagReady
  69. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  70. def high: Int

    Return the upper bound

  71. var input: Node

    Definition Classes
    BaseType
  72. def instanceAndSyncNodeAttributes: Iterable[Attribute]

    Definition Classes
    BaseType
  73. def instanceAttributes: Iterable[Attribute]

    Definition Classes
    SpinalTagReady
  74. def isDelay: Boolean

    Definition Classes
    BaseType
  75. def isDirectionLess: Boolean

    Definition Classes
    Data
  76. def isEmptyOfTag: Boolean

    Definition Classes
    SpinalTagReady
  77. def isInput: Boolean

    Definition Classes
    Data
  78. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  79. def isNamed: Boolean

    Definition Classes
    Nameable
  80. def isOutput: Boolean

    Definition Classes
    Data
  81. def isReg: Boolean

    Definition Classes
    BaseTypeData
  82. def isUnnamed: Boolean

    Definition Classes
    Nameable
  83. def keep(): BitVector.this.type

    Definition Classes
    Data
  84. def lsb: Bool

    Return the least significant bit

  85. def msb: Bool

    Return the most significant bit

  86. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  87. def newExtract(offset: UInt, size: Int, extract: ExtractBitsVectorFloating): BitVector.this.type

    Extract a range of bits of the BitVector

  88. def newExtract(hi: Int, lo: Int, extract: ExtractBitsVectorFixed): BitVector.this.type

    Extract a range of bits of the BitVector

  89. def newExtract(bitId: UInt, extract: ExtractBoolFloating): Bool

    Extract a bit of the BitVector

  90. def newExtract(bitId: Int, extract: ExtractBoolFixed): Bool

    Extract a bit of the BitVector

  91. final def notify(): Unit

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

    Definition Classes
    AnyRef
  93. def onEachAttributes(doIt: (Attribute) ⇒ Unit): Unit

    Definition Classes
    SpinalTagReady
  94. def onEachInput(doThat: (Node) ⇒ Unit): Unit

    Definition Classes
    BaseTypeNode
  95. def onEachInput(doThat: (Node, Int) ⇒ Unit): Unit

    Definition Classes
    BaseTypeNode
  96. def orR: Bool

    Logical OR of all bits

  97. var parent: Data

    Definition Classes
    Data
  98. def pull(): BitVector.this.type

    Definition Classes
    Data
  99. def randBoot(): BitVector.this.type

    Definition Classes
    Data
  100. def range: Range

    Return the range

  101. var refOwner: RefOwnerType

    Definition Classes
    OwnableRef
  102. def removeAssignements(): Unit

    Definition Classes
    BaseType
  103. def removeTag(spinalTag: SpinalTag): BitVector.this.type

    Definition Classes
    SpinalTagReady
  104. def removeTags(tags: Iterable[SpinalTag]): BitVector.this.type

    Definition Classes
    SpinalTagReady
  105. def resized: BitVector.this.type

    Definition Classes
    Data
  106. def rotateLeft(that: UInt): T

    Left rotation of that Bits

  107. def rotateRight(that: UInt): T

    Right rotation of that Bits

  108. def setAll(): Unit

    Set all bits

  109. def setAllTo(value: Bool): Unit

    Set all bits to value

  110. def setAllTo(value: Boolean): Unit

    Set all bits to value

  111. def setAssignementContext(id: Int, that: Throwable): Unit

    Definition Classes
    BaseTypeAssignementTreePart
  112. def setCompositeName(nameable: Nameable, postfix: String, weak: Boolean): BitVector.this.type

    Definition Classes
    Nameable
  113. def setCompositeName(nameable: Nameable, postfix: String): BitVector.this.type

    Definition Classes
    Nameable
  114. def setCompositeName(nameable: Nameable, weak: Boolean): BitVector.this.type

    Definition Classes
    Nameable
  115. def setCompositeName(nameable: Nameable): BitVector.this.type

    Definition Classes
    Nameable
  116. def setInput(id: Int, node: Node): Unit

    Definition Classes
    BaseTypeNode
  117. def setName(name: String, weak: Boolean = false): BitVector.this.type

    Definition Classes
    Nameable
  118. def setPartialName(name: String, weak: Boolean): BitVector.this.type

    Definition Classes
    Nameable
  119. def setPartialName(owner: Nameable, name: String, weak: Boolean): BitVector.this.type

    Definition Classes
    Nameable
  120. def setPartialName(name: String): BitVector.this.type

    Definition Classes
    Nameable
  121. def setPartialName(owner: Nameable, name: String): BitVector.this.type

    Definition Classes
    Nameable
  122. def setRefOwner(that: Any): Unit

    Definition Classes
    OwnableRef
  123. def setWeakName(name: String): BitVector.this.type

    Definition Classes
    Nameable
  124. def setWidth(width: Int): BitVector.this.type

    Set the width of the BitVector

    Set the width of the BitVector

    width

    the width of the data

    returns

    the BitVector of a given size

  125. def simplifyNode: Unit

    Definition Classes
    Node
  126. def spinalTags: Set[SpinalTag]

    Definition Classes
    SpinalTagReady
  127. def subdivideIn(sliceWidth: BitCount): Vec[T]

    Split the BitVector into slice of x bits * @example

    Split the BitVector into slice of x bits * @example

    val res = myBits.subdiviedIn(3 bits)
    sliceWidth

    the width of the slice

    returns

    a Vector of slices

  128. def subdivideIn(sliceCount: SlicesCount): Vec[T]

    Split the BitVector into x slice

    Split the BitVector into x slice

    sliceCount

    the width of the slice

    returns

    a Vector of slices

    Example:
    1. val res = myBits.subdiviedIn(3 slices)
  129. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  130. def toString(): String

    Definition Classes
    BitVectorBaseTypeNameableNode → AnyRef → Any
  131. def unsetName(): Unit

    Definition Classes
    Nameable
  132. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  135. def wrapCast[T <: BaseType](result: T, node: Cast): T

    Definition Classes
    BaseType
  136. def xorR: Bool

    Logical XOR of all bits

Deprecated Value Members

  1. def unused: Unit

    Definition Classes
    Data
    Annotations
    @deprecated
    Deprecated

    use allowPruning instead

Inherited from CheckWidth

Inherited from Widthable

Inherited from WidthProvider

Inherited from BaseType

Inherited from AssignementTreePart

Inherited from Data

Inherited from Assignable

Inherited from NameableByComponent

Inherited from Nameable

Inherited from OwnableRef

Inherited from Node

Inherited from SpinalTagReady

Inherited from ScalaLocated

Inherited from ContextUser

Inherited from GlobalDataUser

Inherited from AnyRef

Inherited from Any

Ungrouped