Class

spinal.core

Bits

Related Doc: package core

Permalink

class Bits extends BitVector with DataPrimitives[Bits] with BaseTypePrimitives[Bits] with BitwiseOp[Bits]

The Bits type corresponds to a vector of bits that does not convey any arithmetic meaning.

Example:
  1. val myBits1 = Bits(32 bits)
    val myBits2 = B(25, 8 bits)
    val myBits3 = B"8'xFF"
    val myBits4 = B"1001_0011
See also

Bits Documentation

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Bits
  2. BitwiseOp
  3. BaseTypePrimitives
  4. DataPrimitives
  5. BitVector
  6. Widthable
  7. WidthProvider
  8. BaseType
  9. Expression
  10. StatementDoubleLinkedContainer
  11. DoubleLinkedContainer
  12. DeclarationStatement
  13. LeafStatement
  14. Statement
  15. BaseNode
  16. ExpressionContainer
  17. Data
  18. InComponent
  19. OverridedEqualsHashCode
  20. SpinalTagReady
  21. Assignable
  22. NameableByComponent
  23. Nameable
  24. OwnableRef
  25. ContextUser
  26. ScalaLocated
  27. GlobalDataUser
  28. AnyRef
  29. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Bits()

    Permalink

Type Members

  1. abstract type RefOwnerType

    Permalink
    Definition Classes
    OwnableRef
  2. type T = Bits

    Permalink

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

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

    Definition Classes
    BitsBitVector

Value Members

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

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

    Permalink

    Concatenation between two Bits

    Concatenation between two Bits

    right

    a Bits to append

    returns

    a new Bits of width (w(this) + w(right))

    Example:
    1. val myBits2 = bits1 ## bits2
  3. def ##(right: Data): Bits

    Permalink

    Concatenation between two signals

    Concatenation between two signals

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

    Permalink
    Definition Classes
    AnyRef → Any
  5. def #*(count: Int): Bits

    Permalink
    Definition Classes
    BitsData
  6. def &(right: Bits): Bits

    Permalink

    Bitwise AND operator

    Bitwise AND operator

    Definition Classes
    BitsBitwiseOp
  7. def :=(value: String): Unit

    Permalink
  8. def :=(rangesValue: (Any, Any), _rangesValues: (Any, Any)*): Unit

    Permalink

    Assign a range value to a Bits

    Assign a range value to a Bits

    rangesValue

    The first range value

    _rangesValues

    Others range values

    Example:
    1. core.io.interrupt = (0 -> uartCtrl.io.interrupt, 1 -> timerCtrl.io.interrupt, default -> false)
  9. def :=(that: Bits)(implicit loc: Location): Unit

    Permalink

    Standard hardware assignment, equivalent to <= in VHDL/Verilog

    Standard hardware assignment, equivalent to <= in VHDL/Verilog

    Definition Classes
    DataPrimitives
  10. def <<(that: UInt): Bits

    Permalink

    Logical shift left (output width will increase of w(this) + max(that) bits

  11. def <<(that: Int): Bits

    Permalink

    Logical shift left (output width will increase)

    Logical shift left (output width will increase)

    that

    the number of shift

    returns

    a Bits of width : w(this) + that bits

    Example:
    1. val result = myBits << 4
  12. def <>(that: Bits)(implicit loc: Location): Unit

    Permalink

    Automatic connection between two hardware signals or two bundles of the same type.

    Automatic connection between two hardware signals or two bundles of the same type.

    Direction is inferred by using signal direction (in/out). (Similar behavior to :=)

    Definition Classes
    DataPrimitives
  13. def =/=(that: Bits): Bool

    Permalink

    isNotEqualTo comparison between two SpinalHDL data

    isNotEqualTo comparison between two SpinalHDL data

    Definition Classes
    DataPrimitives
  14. def =/=(that: MaskedLiteral): Bool

    Permalink

    BitVector is not equal to MaskedLiteral

    BitVector is not equal to MaskedLiteral

    Definition Classes
    BitVector
  15. def =::=(that: Bits): Bool

    Permalink
    Definition Classes
    DataPrimitives
  16. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  17. def ===(that: Bits): Bool

    Permalink

    isEqualTo comparison between two SpinalHDL data

    isEqualTo comparison between two SpinalHDL data

    Definition Classes
    DataPrimitives
  18. def ===(that: MaskedLiteral): Bool

    Permalink

    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

    Definition Classes
    BitVector
    Example:
    1. val myBool = myBits === M"0-1"
  19. def >>(that: UInt): Bits

    Permalink

    Logical shift right (output width == input width)

  20. def >>(that: Int): Bits

    Permalink

    Logical shift right (output width will decrease)

    Logical shift right (output width will decrease)

    that

    the number of shift

    returns

    a Bits of width : w(this) - that bits

    Example:
    1. val result = myBits >> 4
  21. def IFparent: Data

    Permalink
    Definition Classes
    Data
  22. def \(that: Bits): Bits

    Permalink

    Use as \= to have the same behavioral as VHDL variable

    Use as \= to have the same behavioral as VHDL variable

    Definition Classes
    DataPrimitives
  23. def ^(right: Bits): Bits

    Permalink

    Bitwise XOR operator

    Bitwise XOR operator

    Definition Classes
    BitsBitwiseOp
  24. var _spinalTags: LinkedHashSet[SpinalTag]

    Permalink
    Definition Classes
    SpinalTagReady
  25. def addAttribute(attribute: Attribute): Bits.this.type

    Permalink
    Definition Classes
    BaseTypeDataSpinalTagReady
  26. def addAttribute(name: String, value: Int): Bits.this.type

    Permalink
    Definition Classes
    SpinalTagReady
  27. def addAttribute(name: String, value: String): Bits.this.type

    Permalink
    Definition Classes
    SpinalTagReady
  28. def addAttribute(name: String): Bits.this.type

    Permalink
    Definition Classes
    SpinalTagReady
  29. def addTag[T <: SpinalTag](spinalTag: T): Bits.this.type

    Permalink
    Definition Classes
    SpinalTagReady
  30. def addTags(h: SpinalTag, tail: SpinalTag*): Bits.this.type

    Permalink
    Definition Classes
    SpinalTagReady
  31. def addTags[T <: SpinalTag](tags: Iterable[T]): Bits.this.type

    Permalink
    Definition Classes
    SpinalTagReady
  32. var algoIncrementale: Int

    Permalink
    Definition Classes
    BaseNode
  33. var algoInt: Int

    Permalink
    Definition Classes
    BaseNode
  34. def aliasAs[T <: Data](t: HardType[T]): T

    Permalink

    Return a instance of the paramter which alias this.Bits in both read and assignments accesses.

    Return a instance of the paramter which alias this.Bits in both read and assignments accesses. Usefull for union like data structures.

    t

    The type in which the alias will be

    returns

    The alias

  35. def allowDirectionLessIo(): Bits.this.type

    Permalink

    Allow a signal of an io Bundle to be directionless.

    Allow a signal of an io Bundle to be directionless.

    Definition Classes
    Data
    See also

    IO Bundle Error Documentation

  36. def allowOverride(): Bits.this.type

    Permalink

    Allow a signal to be overridden.

    Allow a signal to be overridden.

    Definition Classes
    Data
    See also

    Assignment overlap Error Documentation

  37. def allowPartialyAssigned(): Bits.this.type

    Permalink

    Allow a register to be partially assigned

    Allow a register to be partially assigned

    Definition Classes
    Data
  38. def allowPruning(): Bits.this.type

    Permalink
    Definition Classes
    Data
  39. def allowSimplifyIt(): Bits.this.type

    Permalink
    Definition Classes
    BaseTypeData
  40. def allowUnsetRegToAvoidLatch(): Bits.this.type

    Permalink

    Allow a register to have only an init (no assignments)

    Allow a register to have only an init (no assignments)

    Definition Classes
    Data
    See also

    "Register with only init" Error Documentation

  41. def andMask(that: Bool): Bits.this.type

    Permalink
    Definition Classes
    BitVector
  42. def andR: Bool

    Permalink

    Hardware logical AND of all bits

    Hardware logical AND of all bits

    Equivalent to this.asBits === ((BigInt(1) << getWidth) - 1).

    Definition Classes
    BitVector
  43. def apply(offset: UInt, bitCount: BitCount): Bits.this.type

    Permalink

    Return a range of bits at offset and of width bitCount

    Return a range of bits at offset and of width bitCount

    Definition Classes
    BitsBitVector
    Example:
    1. val myBool = myBits(myUInt, 2 bits)
  44. def apply(offset: Int, bitCount: BitCount): Bits.this.type

    Permalink

    Return a range of bits at offset and of width bitCount

    Return a range of bits at offset and of width bitCount

    Definition Classes
    BitsBitVector
    Example:
    1. val myBool = myBits(3, 2 bits)
  45. def apply(bitId: UInt): Bool

    Permalink

    Return the bit at index bitId

    Return the bit at index bitId

    Definition Classes
    BitsBitVector
    Example:
    1. val myBool = myBits(myUInt)
  46. def apply(bitId: Int): Bool

    Permalink

    Return the bit at index bitId

    Return the bit at index bitId

    Definition Classes
    BitsBitVector
    Example:
    1. val myBool = myBits(3)
  47. def apply(range: Range): Bits.this.type

    Permalink

    Return a range of bits

    Return a range of bits

    Definition Classes
    BitVector
    Example:
    1. val myBool = myBits(3 downto 1)
  48. def as[T <: Data](dataType: HardType[T]): T

    Permalink
    Definition Classes
    Data
  49. def asBits: Bits

    Permalink

    Cast signal to Bits

    Cast signal to Bits

    Definition Classes
    BitsData
  50. def asBool: Bool

    Permalink

    Return this.lsb

    Return this.lsb

    Definition Classes
    BitVector
  51. def asBools: Vec[Bool]

    Permalink

    Cast the BitVector into a vector of Bool

    Cast the BitVector into a vector of Bool

    Definition Classes
    BitVector
  52. def asData: Data

    Permalink
    Definition Classes
    Data
  53. def asInOut(): Bits.this.type

    Permalink

    Set a signal as inout

    Set a signal as inout

    Definition Classes
    BaseTypeData
  54. def asInput(): Bits.this.type

    Permalink

    Set a data as input

    Set a data as input

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

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

    Permalink

    Set a data as output

    Set a data as output

    Definition Classes
    BaseTypeData
  57. def asSInt: SInt

    Permalink

    Cast a Bits to a SInt

    Cast a Bits to a SInt

    returns

    a SInt data

    Example:
    1. val mySInt = myBits.asSInt
  58. def asUInt: UInt

    Permalink

    Cast a Bits to an UInt

    Cast a Bits to an UInt

    returns

    an UInt data

    Example:
    1. val myUInt = myBits.asUInt
  59. def assignDontCare(): Bits.this.type

    Permalink
    Definition Classes
    BitsData
  60. def assignDontCareToUnasigned(): Bits.this.type

    Permalink
    Definition Classes
    Data
  61. def assignFormalRandom(kind: RandomExpKind): Unit

    Permalink
    Definition Classes
    BitsData
  62. final def assignFrom(that: AnyRef, target: AnyRef = this)(implicit loc: Location): Unit

    Permalink
    Definition Classes
    Data
  63. def assignFromBits(bits: Bits, hi: Int, lo: Int): Unit

    Permalink
    Definition Classes
    BitsData
  64. def assignFromBits(bits: Bits): Unit

    Permalink
    Definition Classes
    BitsData
  65. def assignFromBits(bits: Bits, offset: Int, bitCount: BitCount): Unit

    Permalink
    Definition Classes
    Data
  66. def assignFromImpl(that: AnyRef, target: AnyRef, kind: AnyRef)(implicit loc: Location): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    BaseTypeAssignable
  67. def bitsRange: Range

    Permalink
    Definition Classes
    BitVector
  68. def cldCount: Int

    Permalink
    Definition Classes
    DoubleLinkedContainer
  69. def clearAll(): Bits.this.type

    Permalink

    Clear all bits

    Clear all bits

    Definition Classes
    BitVectorData
  70. var clockDomain: ClockDomain

    Permalink
    Definition Classes
    BaseType
  71. def clone(): Bits.this.type

    Permalink
    Definition Classes
    BitVectorBaseTypeData → AnyRef
  72. def component: Component

    Permalink
    Definition Classes
    ContextUser
  73. final def compositAssignFrom(that: AnyRef, target: AnyRef, kind: AnyRef)(implicit loc: Location): Unit

    Permalink
    Definition Classes
    Assignable
  74. var compositeAssign: Assignable

    Permalink
    Definition Classes
    Assignable
  75. def copyDirectionOf(that: Bits): Unit

    Permalink
    Definition Classes
    DataPrimitives
  76. def copyDirectionOfImpl(that: Data): Bits.this.type

    Permalink
    Definition Classes
    BaseTypeData
  77. def default(that: ⇒ Bits): Bits

    Permalink

    Set a default value to a signal.

    Set a default value to a signal.

    Definition Classes
    DataPrimitives
    See also

    example of usage for Bits

  78. def dirString(): String

    Permalink
    Definition Classes
    Data
  79. def dlcAppend(that: AssignmentStatement): Bits.this.type

    Permalink
    Definition Classes
    DoubleLinkedContainer
  80. def dlcForeach[T >: AssignmentStatement](func: (T) ⇒ Unit): Unit

    Permalink
    Definition Classes
    DoubleLinkedContainer
  81. def dlcHasOnlyOne: Boolean

    Permalink
    Definition Classes
    DoubleLinkedContainer
  82. var dlcHead: AssignmentStatement

    Permalink
    Definition Classes
    DoubleLinkedContainer
  83. def dlcIsEmpty: Boolean

    Permalink
    Definition Classes
    DoubleLinkedContainer
  84. var dlcLast: AssignmentStatement

    Permalink
    Definition Classes
    DoubleLinkedContainer
  85. def dlcPrepend(that: AssignmentStatement): Bits.this.type

    Permalink
    Definition Classes
    DoubleLinkedContainer
  86. def dontSimplifyIt(): Bits.this.type

    Permalink
    Definition Classes
    BaseTypeData
  87. def drop(n: Int): Bits

    Permalink

    Drop lowest n bits

    Drop lowest n bits

    returns

    data10bits(9 downto 4)

    Definition Classes
    BitVector
    Example:
    1. val res = data10bits.drop(4)
  88. def dropHigh(n: Int): Bits

    Permalink

    Drop highest n bits

    Drop highest n bits

    returns

    data10bits(5 downto 0)

    Definition Classes
    BitVector
    Example:
    1. val res = data10bits.dropHigh(4)
  89. def dropLow(n: Int): Bits

    Permalink
    Definition Classes
    BitVector
  90. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  91. def equals(obj: Any): Boolean

    Permalink
    Definition Classes
    OverridedEqualsHashCode → AnyRef → Any
  92. def existsTag(cond: (SpinalTag) ⇒ Boolean): Boolean

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

    Permalink
    Definition Classes
    SpinalTagReady
  94. def findTag(cond: (SpinalTag) ⇒ Boolean): Option[SpinalTag]

    Permalink
    Definition Classes
    SpinalTagReady
  95. def flatten: Seq[BaseType]

    Permalink
    Definition Classes
    BaseTypeData
  96. def flattenForeach(body: (BaseType) ⇒ Unit): Unit

    Permalink
    Definition Classes
    BaseTypeData
  97. def flattenLocalName: Seq[String]

    Permalink
    Definition Classes
    BaseTypeData
  98. def flip(): Bits.this.type

    Permalink

    Flip the direction of the signal.

    Flip the direction of the signal.

    in and out are swapped, inout stay the same.

    Definition Classes
    Data
  99. def foreachClockDomain(func: (ClockDomain) ⇒ Unit): Unit

    Permalink
    Definition Classes
    BaseTypeStatement
  100. def foreachDrivingExpression(func: (Expression) ⇒ Unit): Unit

    Permalink
    Definition Classes
    ExpressionContainer
  101. def foreachExpression(func: (Expression) ⇒ Unit): Unit

    Permalink
  102. def foreachReflectableNameables(doThat: (Any) ⇒ Unit): Unit

    Permalink
    Definition Classes
    Nameable
  103. def foreachStatements(func: (AssignmentStatement) ⇒ Unit): Unit

    Permalink
  104. def foreachTag(body: (SpinalTag) ⇒ Unit): Unit

    Permalink
    Definition Classes
    SpinalTagReady
  105. def freeze(): Bits.this.type

    Permalink
    Definition Classes
    BaseTypeData
  106. def getAheadValue(): Bits.this.type

    Permalink

    For a register, get the value it will have at the next clock, as a combinational signal.

    For a register, get the value it will have at the next clock, as a combinational signal.

    Definition Classes
    BaseTypeData
  107. def getAllTrue: Bits.this.type

    Permalink
    Definition Classes
    BitsBitVector
  108. def getBitsWidth: Int

    Permalink

    Return the width of the data

    Return the width of the data

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

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  110. def getComponent(): Component

    Permalink
    Definition Classes
    DataInComponentNameableByComponent
  111. def getComponents(): Seq[Component]

    Permalink

    Get current component with all parents

    Get current component with all parents

    Definition Classes
    InComponent
  112. def getDirection: IODirection

    Permalink
    Definition Classes
    Data
  113. def getDisplayName(): String

    Permalink
    Definition Classes
    Nameable
  114. def getDrivingReg(reportError: Boolean = true): Bits.this.type

    Permalink
    Definition Classes
    BaseType
  115. def getInstanceCounter: Int

    Permalink
    Definition Classes
    ContextUser
  116. def getMode: Byte

    Permalink
    Attributes
    protected
    Definition Classes
    Nameable
  117. def getMuxType[T <: Data](list: TraversableOnce[T]): HardType[T]

    Permalink
    Definition Classes
    BitVectorData
  118. def getName(default: String): String

    Permalink
    Definition Classes
    NameableByComponentNameable
  119. def getName(): String

    Permalink
    Definition Classes
    NameableByComponentNameable
  120. def getPartialName(): String

    Permalink
    Definition Classes
    Nameable
  121. def getPath(from: Component, to: Component): Seq[Component]

    Permalink
    Definition Classes
    NameableByComponent
  122. def getRealSource: Any

    Permalink
    Definition Classes
    Assignable
  123. def getRealSourceNoRec: Any

    Permalink
    Definition Classes
    DataAssignable
  124. def getRefOwnersChain(): List[Any]

    Permalink
    Definition Classes
    OwnableRef
  125. def getRootParent: Data

    Permalink
    Definition Classes
    Data
  126. def getRtlPath(separator: String = "/"): String

    Permalink
    Definition Classes
    Data
  127. def getScalaLocationLong: String

    Permalink
    Definition Classes
    ScalaLocated
  128. def getScalaLocationShort: String

    Permalink
    Definition Classes
    ScalaLocated
  129. def getScalaTrace(): Throwable

    Permalink
    Definition Classes
    ScalaLocated
  130. def getSingleDriver: Option[Bits.this.type]

    Permalink
    Definition Classes
    BaseType
  131. def getTag[T <: SpinalTag](clazz: Class[T]): Option[T]

    Permalink
    Definition Classes
    SpinalTagReady
  132. def getTags(): LinkedHashSet[SpinalTag]

    Permalink
    Definition Classes
    SpinalTagReady
  133. def getTypeObject: TypeBits.type

    Permalink
    Definition Classes
    BitsExpression
  134. def getWidth: Int

    Permalink
    Definition Classes
    WidthableWidthProvider
  135. def getWidthNoInferation: Int

    Permalink

    Return the width

    Return the width

    Definition Classes
    BitVector
  136. def getWidthStringNoInferation: String

    Permalink
    Definition Classes
    BitVector
  137. def getZero: Bits.this.type

    Permalink

    Create a signal set to 0

    Create a signal set to 0

    Definition Classes
    BitsData
  138. def getZeroUnconstrained: Bits.this.type

    Permalink
    Definition Classes
    BitsBitVector
  139. var globalData: GlobalData

    Permalink
    Definition Classes
    GlobalDataUser
  140. def hasAssignement: Boolean

    Permalink
    Definition Classes
    BaseType
  141. def hasDataAssignment: Boolean

    Permalink
    Definition Classes
    BaseType
  142. def hasInit: Boolean

    Permalink

    Does the base type have initial value

    Does the base type have initial value

    Definition Classes
    BaseType
  143. def hasOnlyOneStatement: Boolean

    Permalink
  144. def hasTag[T <: SpinalTag](clazz: Class[T]): Boolean

    Permalink
    Definition Classes
    SpinalTagReady
  145. def hasTag(spinalTag: SpinalTag): Boolean

    Permalink
    Definition Classes
    SpinalTagReady
  146. def hashCode(): Int

    Permalink
    Definition Classes
    OverridedEqualsHashCode → AnyRef → Any
  147. def head: AssignmentStatement

    Permalink
  148. def high: Int

    Permalink

    Return the upper bound

    Return the upper bound

    Definition Classes
    BitVector
  149. def init(that: Bits): Bits

    Permalink

    Set initial value of the signal

    Set initial value of the signal

    Definition Classes
    DataPrimitives
  150. final def initFrom(that: AnyRef, target: AnyRef = this): Unit

    Permalink
    Definition Classes
    Data
  151. def initNull(that: Bits): Bits

    Permalink
    Definition Classes
    DataPrimitives
  152. def initZero(): Bits

    Permalink
    Definition Classes
    DataPrimitives
  153. def initial(that: Bits): Bits

    Permalink
    Definition Classes
    BaseTypePrimitives
  154. def initialFrom(that: AnyRef, target: AnyRef = this): Unit

    Permalink
    Definition Classes
    BaseType
  155. def insertNext(s: Statement): Unit

    Permalink
    Definition Classes
    Statement
  156. def instanceAttributes(language: Language): Iterable[Attribute]

    Permalink
    Definition Classes
    SpinalTagReady
  157. def instanceAttributes: Iterable[Attribute]

    Permalink
    Definition Classes
    SpinalTagReady
  158. def isAnalog: Boolean

    Permalink
    Definition Classes
    BaseTypeData
  159. def isComb: Boolean

    Permalink
    Definition Classes
    BaseTypeData
  160. def isCompletelyUnnamed: Boolean

    Permalink
    Definition Classes
    Nameable
  161. def isDirectionLess: Boolean

    Permalink
    Definition Classes
    Data
  162. def isEmptyOfTag: Boolean

    Permalink
    Definition Classes
    SpinalTagReady
  163. def isFrozen(): Boolean

    Permalink
    Definition Classes
    BaseType
  164. def isInOut: Boolean

    Permalink
    Definition Classes
    Data
  165. def isInput: Boolean

    Permalink
    Definition Classes
    Data
  166. def isInputOrInOut: Boolean

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

    Permalink
    Definition Classes
    Any
  168. final def isNamed: Boolean

    Permalink
    Definition Classes
    Nameable
  169. def isOutput: Boolean

    Permalink
    Definition Classes
    Data
  170. def isOutputOrInOut: Boolean

    Permalink
    Definition Classes
    Data
  171. def isPriorityApplicable(namePriority: Byte): Boolean

    Permalink
    Definition Classes
    Nameable
  172. def isReg: Boolean

    Permalink
    Definition Classes
    BaseTypeData
  173. def isRegOnAssign: Boolean

    Permalink
    Definition Classes
    BitVectorData
  174. def isTypeNode: Boolean

    Permalink

    Is the baseType a node

    Is the baseType a node

    Definition Classes
    BaseType
  175. def isUnknown: Bool

    Permalink
    Definition Classes
    BitVector
  176. def isUnnamed: Boolean

    Permalink
    Definition Classes
    NameableByComponentNameable
  177. def isUsingResetSignal: Boolean

    Permalink

    Is the basetype using reset signal

    Is the basetype using reset signal

    Definition Classes
    BaseType
  178. def isUsingSoftResetSignal: Boolean

    Permalink

    Is the basetype using soft reset signal

    Is the basetype using soft reset signal

    Definition Classes
    BaseType
  179. def isVital: Boolean

    Permalink

    Check if the baseType is vital

    Check if the baseType is vital

    Definition Classes
    BaseType
  180. var lastScopeStatement: Statement

    Permalink
    Definition Classes
    Statement
  181. def lsb: Bool

    Permalink

    Return the least significant bit

    Return the least significant bit

    Definition Classes
    BitVector
  182. def msb: Bool

    Permalink

    Return the most significant bit

    Return the most significant bit

    Definition Classes
    BitVector
  183. def mux[T2 <: Data](mappings: (Any, T2)*): T2

    Permalink

    Use a SpinalHDL data as a selector for a mux.

    Use a SpinalHDL data as a selector for a mux.

    Definition Classes
    BaseType
    See also

    Bitwise selection Documentation

  184. def muxDc[T2 <: Data](mappings: (Any, T2)*): T2

    Permalink

    Version of SpinalHDL mux that allows Don't Care.

    Version of SpinalHDL mux that allows Don't Care.

    Definition Classes
    BaseType
    See also

    Bitwise selection Documentation

  185. def muxList[T2 <: Data](defaultValue: T2, mappings: Seq[(Any, T2)]): T2

    Permalink

    Use a scala.Seq of SpinalHDL data as mux inputs.

    Use a scala.Seq of SpinalHDL data as mux inputs.

    Definition Classes
    BaseType
    See also

    Bitwise selection Documentation

  186. def muxList[T2 <: Data](mappings: Seq[(Any, T2)]): T2

    Permalink

    Use a scala.Seq of SpinalHDL data as mux inputs.

    Use a scala.Seq of SpinalHDL data as mux inputs.

    Definition Classes
    BaseType
    See also

    Bitwise selection Documentation

  187. def muxListDc[T2 <: Data](mappings: Seq[(Any, T2)]): T2

    Permalink

    Version of SpinalHDL muxList that allows Don't Care.

    Version of SpinalHDL muxList that allows Don't Care.

    Definition Classes
    BaseType
    See also

    Bitwise selection Documentation

  188. var name: String

    Permalink
    Definition Classes
    Nameable
  189. var nameableRef: Nameable

    Permalink
    Attributes
    protected
    Definition Classes
    Nameable
  190. def nandR: Bool

    Permalink

    Hardware logical NAND of all bits

    Hardware logical NAND of all bits

    Definition Classes
    BitVector
  191. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  192. def newExtract(offset: UInt, size: Int, extract: BitVectorRangedAccessFloating)(implicit loc: Location): Bits.this.type

    Permalink

    Extract a range of bits of the BitVector

    Extract a range of bits of the BitVector

    Definition Classes
    BitVector
  193. def newExtract(hi: Int, lo: Int, accessFactory: ⇒ BitVectorRangedAccessFixed): Bits.this.type

    Permalink

    Extract a range of bits of the BitVector

    Extract a range of bits of the BitVector

    Definition Classes
    BitVector
  194. def newExtract(bitId: UInt, extract: BitVectorBitAccessFloating): Bool

    Permalink

    Extract a bit of the BitVector

    Extract a bit of the BitVector

    Definition Classes
    BitVector
  195. def newExtract(bitId: Int, extract: BitVectorBitAccessFixed): Bool

    Permalink

    Extract a bit of the BitVector

    Extract a bit of the BitVector

    Definition Classes
    BitVector
  196. var nextScopeStatement: Statement

    Permalink
    Definition Classes
    Statement
  197. def noBackendCombMerge(): Bits.this.type

    Permalink

    Put the combinatorial logic driving this signal in a separate process

    Put the combinatorial logic driving this signal in a separate process

    Definition Classes
    Data
  198. def noCombLoopCheck(): Bits.this.type

    Permalink

    Disable combinatorial loop checking for this Data

    Disable combinatorial loop checking for this Data

    Definition Classes
    Data
    See also

    Combinatorial loop Error Documentation

  199. def norR: Bool

    Permalink

    Hardware logical NOR of all bits

    Hardware logical NOR of all bits

    Definition Classes
    BitVector
  200. def normalizeInputs: Unit

    Permalink
    Definition Classes
    BaseTypeExpressionContainer
  201. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  202. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  203. def nxorR: Bool

    Permalink

    Hardware logical NXOR of all bits

    Hardware logical NXOR of all bits

    Definition Classes
    BitVector
  204. def onEachAttributes(doIt: (Attribute) ⇒ Unit): Unit

    Permalink
    Definition Classes
    SpinalTagReady
  205. def opName: String

    Permalink
    Definition Classes
    BitsExpression
  206. def orMask(that: Bool): Bits.this.type

    Permalink
    Definition Classes
    BitVector
  207. def orR: Bool

    Permalink

    Hardware logical OR of all bits

    Hardware logical OR of all bits

    Equivalent to this.asBits =/= 0.

    Definition Classes
    BitVector
  208. def overrideLocalName(name: String): Bits.this.type

    Permalink
    Definition Classes
    Nameable
  209. var parent: Data

    Permalink
    Definition Classes
    Data
  210. var parentScope: ScopeStatement

    Permalink
    Definition Classes
    ContextUser
  211. def pull(propagateName: Boolean): Bits.this.type

    Permalink
    Definition Classes
    Data
  212. def pull(): Bits.this.type

    Permalink

    Pull a signal to the top level (use for debugging)

    Pull a signal to the top level (use for debugging)

    Definition Classes
    Data
  213. def purify(): Bits.this.type

    Permalink
    Definition Classes
    Data
  214. def randBoot(u: Unit): Bits.this.type

    Permalink

    Useful for register that doesn't need a reset value in RTL, but need a random value for simulation (avoid x-propagation)

    Useful for register that doesn't need a reset value in RTL, but need a random value for simulation (avoid x-propagation)

    Definition Classes
    Data
  215. var refOwner: RefOwnerType

    Permalink
    Definition Classes
    OwnableRef
  216. def reflectNames(): Unit

    Permalink
    Definition Classes
    Nameable
  217. def remapClockDomain(func: (ClockDomain) ⇒ ClockDomain): Unit

    Permalink
    Definition Classes
    BaseTypeStatement
  218. def remapDrivingExpressions(func: (Expression) ⇒ Expression): Unit

    Permalink
    Definition Classes
    ExpressionContainer
  219. def remapExpressions(func: (Expression) ⇒ Expression): Unit

    Permalink
  220. def removeAssignments(data: Boolean = true, init: Boolean = true, initial: Boolean = true): Bits.this.type

    Permalink

    Remove all assignments of the base type

    Remove all assignments of the base type

    Definition Classes
    BaseTypeData
  221. def removeDataAssignments(): Bits.this.type

    Permalink
    Definition Classes
    Data
  222. def removeInitAssignments(): Bits.this.type

    Permalink
    Definition Classes
    Data
  223. def removeStatement(): Unit

    Permalink
    Definition Classes
    BaseTypeStatement
  224. def removeStatementFromScope(): Unit

    Permalink
    Definition Classes
    Statement
  225. def removeTag(spinalTag: SpinalTag): Bits.this.type

    Permalink
    Definition Classes
    SpinalTagReady
  226. def removeTags(tags: Iterable[SpinalTag]): Bits.this.type

    Permalink
    Definition Classes
    SpinalTagReady
  227. def resize(width: BitCount): Bits

    Permalink

    Return a resized representation of x.

    Return a resized representation of x.

    If enlarged, it is extended with zero padding at MSB as necessary.

    Definition Classes
    BitsBitVector
  228. def resize(width: Int): Bits

    Permalink

    Return a resized representation of x.

    Return a resized representation of x.

    If enlarged, it is extended with zero padding at MSB as necessary.

    returns

    a resized bitVector

    Definition Classes
    BitsBitVector
  229. def resizeFactory: Resize

    Permalink
    Definition Classes
    BitsBitVector
  230. def resizeLeft(width: Int): Bits

    Permalink

    Resize by keeping MSB at the same place If the final size is bigger than the original size, the leftmost bits are filled with zeroes if the final size is smaller, only width MSB are kept

    Resize by keeping MSB at the same place If the final size is bigger than the original size, the leftmost bits are filled with zeroes if the final size is smaller, only width MSB are kept

    width

    Final width

    returns

    Resized bits vector

  231. def resized: Bits.this.type

    Permalink

    Return a version of the signal which is allowed to be automatically resized where needed.

    Return a version of the signal which is allowed to be automatically resized where needed.

    The resize operation is deferred until the point of assignment later. The resize may widen or truncate, retaining the LSB.

    Definition Classes
    Data
    See also

    Width checking Documentation

  232. def reversed: Bits.this.type

    Permalink
    Definition Classes
    BitsBitVector
  233. def rootIF(): Interface

    Permalink

    root interface

    root interface

    Definition Classes
    Data
  234. def rootIFList(): List[Interface]

    Permalink
    Definition Classes
    Data
  235. def rootIFrec(now: Data, lastRoot: List[Interface]): List[Interface]

    Permalink
    Definition Classes
    Data
  236. def rootScopeStatement: ScopeStatement

    Permalink
    Definition Classes
    BaseTypeStatement
  237. def rotateLeft(that: Int): Bits

    Permalink

    Left rotation of that bits

    Left rotation of that bits

    Definition Classes
    BitsBitVector
  238. def rotateLeft(that: UInt): T

    Permalink

    Left rotation of that Bits

    Left rotation of that Bits

    Definition Classes
    BitVector
  239. def rotateRight(that: Int): Bits

    Permalink

    Right rotation of that bits

    Right rotation of that bits

    Definition Classes
    BitsBitVector
  240. def rotateRight(that: UInt): T

    Permalink

    Right rotation of that Bits

    Right rotation of that Bits

    Definition Classes
    BitVector
  241. var scalaTrace: Throwable

    Permalink
    Definition Classes
    ScalaLocated
  242. def setAll(): Bits.this.type

    Permalink

    Set all bits

    Set all bits

    Definition Classes
    BitsBitVectorData
  243. def setAllTo(value: Bool): Bits.this.type

    Permalink

    Set all bits to value

    Set all bits to value

    Definition Classes
    BitVector
  244. def setAllTo(value: Boolean): Bits.this.type

    Permalink

    Set all bits to value

    Set all bits to value

    Definition Classes
    BitVector
  245. def setAsAnalog(): Bits.this.type

    Permalink
    Definition Classes
    BaseTypeData
  246. def setAsComb(): Bits.this.type

    Permalink

    Set baseType to Combinatorial

    Set baseType to Combinatorial

    Definition Classes
    BaseTypeData
  247. def setAsDirectionLess(): Bits.this.type

    Permalink

    Remove the direction (in, out, inout) to a signal

    Remove the direction (in, out, inout) to a signal

    Definition Classes
    BaseTypeData
  248. def setAsReg(): Bits.this.type

    Permalink

    Set baseType to reg

    Set baseType to reg

    Definition Classes
    BaseTypeData
  249. def setAsTypeNode(): Bits.this.type

    Permalink

    Set baseType to Node

    Set baseType to Node

    Definition Classes
    BaseType
  250. def setAsVital(): Bits.this.type

    Permalink

    Set the baseType to vital

    Set the baseType to vital

    Definition Classes
    BaseType
  251. def setCompositeName(nameable: Nameable, postfix: String, namePriority: Byte): Bits.this.type

    Permalink
    Definition Classes
    Nameable
  252. def setCompositeName(nameable: Nameable, postfix: String, weak: Boolean): Bits.this.type

    Permalink
    Definition Classes
    Nameable
  253. def setCompositeName(nameable: Nameable, postfix: String): Bits.this.type

    Permalink
    Definition Classes
    Nameable
  254. def setCompositeName(nameable: Nameable, namePriority: Byte): Bits.this.type

    Permalink
    Definition Classes
    Nameable
  255. def setCompositeName(nameable: Nameable, weak: Boolean): Bits.this.type

    Permalink
    Definition Classes
    Nameable
  256. def setCompositeName(nameable: Nameable): Bits.this.type

    Permalink
    Definition Classes
    Nameable
  257. def setLambdaName(isNameBody: ⇒ Boolean)(nameGen: ⇒ String): Bits.this.type

    Permalink
    Definition Classes
    Nameable
  258. def setName(name: String, namePriority: Byte): Bits.this.type

    Permalink
    Definition Classes
    Nameable
  259. def setName(name: String, weak: Boolean): Bits.this.type

    Permalink
    Definition Classes
    Nameable
  260. def setName(name: String): Bits.this.type

    Permalink
    Definition Classes
    Nameable
  261. def setNameAsWeak(): Bits.this.type

    Permalink
    Definition Classes
    Nameable
  262. def setOutputAsReg(): Bits.this.type

    Permalink

    Recursively set baseType to reg only for output

    Recursively set baseType to reg only for output

    Definition Classes
    Data
  263. def setPartialName(name: String, namePriority: Byte, owner: Any): Bits.this.type

    Permalink
    Definition Classes
    Nameable
  264. def setPartialName(name: String, namePriority: Byte): Bits.this.type

    Permalink
    Definition Classes
    Nameable
  265. def setPartialName(name: String, weak: Boolean): Bits.this.type

    Permalink
    Definition Classes
    Nameable
  266. def setPartialName(owner: Nameable, name: String, namePriority: Byte): Bits.this.type

    Permalink
    Definition Classes
    Nameable
  267. def setPartialName(owner: Nameable, name: String, weak: Boolean): Bits.this.type

    Permalink
    Definition Classes
    Nameable
  268. def setPartialName(name: String): Bits.this.type

    Permalink
    Definition Classes
    Nameable
  269. def setPartialName(owner: Nameable, name: String): Bits.this.type

    Permalink
    Definition Classes
    Nameable
  270. def setPartialName(owner: Nameable): Bits.this.type

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

    Permalink
    Definition Classes
    OwnableRef
  272. def setScalaLocated(source: ScalaLocated): Bits.this.type

    Permalink
    Definition Classes
    ScalaLocated
  273. def setWeakName(name: String): Bits.this.type

    Permalink
    Definition Classes
    Nameable
  274. def setWidth(width: Int): Bits.this.type

    Permalink

    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

    Definition Classes
    BitVector
  275. def simplifyNode: Expression

    Permalink
    Definition Classes
    Expression
  276. def sliceBy(divisor: List[Int]): List[Bits]

    Permalink
    Definition Classes
    BitVector
  277. def sliceBy(divisor: Int*): List[Bits]

    Permalink

    apart by a list of width

    apart by a list of width

    returns

    (List(A(1 downto 0), A(2 downto 4), A(9 downto 3))

    Definition Classes
    BitVector
    Example:
    1. val res = A.sliceBy(2, 3, 5)
      val res = A.sliceBy(List(2, 3, 5))
  278. def spinalTags: LinkedHashSet[SpinalTag]

    Permalink
    Definition Classes
    SpinalTagReady
  279. def splitAt(n: Int): (Bits, Bits)

    Permalink

    Split at n st bits

    Split at n st bits

    returns

    (data10bits(8 downto 4), data10bits(3 downto 0))

    Definition Classes
    BitVector
    Example:
    1. val res = data10bits.splitAt(4)
  280. def stabilized(func: (Expression) ⇒ Expression, seed: Expression): Expression

    Permalink
    Definition Classes
    ExpressionContainer
  281. def subdivideIn(sliceWidth: BitCount): Vec[T]

    Permalink
    Definition Classes
    BitVector
  282. def subdivideIn(sliceCount: SlicesCount): Vec[T]

    Permalink
    Definition Classes
    BitVector
  283. def subdivideIn(sliceWidth: BitCount, strict: Boolean): Vec[T]

    Permalink

    Split the BitVector into slice of x bits

    Split the BitVector into slice of x bits

    sliceWidth

    the width of the slice

    strict

    allow subdivideIn to generate vectors with varying size

    returns

    a Vector of slices

    Definition Classes
    BitVector
    Example:
    1. val res = myBits.subdivideIn(3 bits)
  284. def subdivideIn(sliceCount: SlicesCount, strict: Boolean): Vec[T]

    Permalink

    Split the BitVector into x slice

    Split the BitVector into x slice

    sliceCount

    the width of the slice

    strict

    allow subdivideIn to generate vectors with varying size

    returns

    a Vector of slices

    Definition Classes
    BitVector
    Example:
    1. val res = myBits.subdivideIn(3 slices)
  285. def switchAssign[T2 <: BaseType](sel: T2)(mappings: (Any, Bits)*): Unit

    Permalink
    Definition Classes
    DataPrimitives
  286. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  287. def take(n: Int): Bits

    Permalink

    Take lowest n bits

    Take lowest n bits

    returns

    data10bits(3 downto 0)

    Definition Classes
    BitVector
    Example:
    1. val res = data10bits.take(4)
  288. def takeHigh(n: Int): Bits

    Permalink

    Take highest n bits

    Take highest n bits

    returns

    data10bits(9 downto 6)

    Definition Classes
    BitVector
    Example:
    1. val res = data10bits.takeHigh(4)
  289. def takeLow(n: Int): Bits

    Permalink
    Definition Classes
    BitVector
  290. def toDataType[T <: Data](dataType: T): T

    Permalink

    Cast a Bits to a given data type

    Cast a Bits to a given data type

    dataType

    the wanted data type

    returns

    a new data type assign with the value of Bits

    Example:
    1. val myUInt = myBits.toDataType(UInt)
  291. def toIo(): Bits.this.type

    Permalink
    Definition Classes
    Data
  292. def toMuxInput[T <: Data](muxOutput: T): T

    Permalink
    Definition Classes
    Data
  293. def toString(): String

    Permalink
    Definition Classes
    BitVectorBaseTypeExpressionNameable → AnyRef → Any
  294. def toStringMultiLine(): String

    Permalink
    Definition Classes
    BaseNode
  295. def toStringRec(level: Int = 1): String

    Permalink
    Definition Classes
    Expression
  296. def unary_~: Bits

    Permalink

    Inverse bitwise operator

    Inverse bitwise operator

    Definition Classes
    BitsBitwiseOp
  297. def unfreeze(): Bits.this.type

    Permalink
    Definition Classes
    BaseTypeData
  298. def unsetName(): Bits.this.type

    Permalink
    Definition Classes
    Nameable
  299. def valueRange: Range

    Permalink
  300. final def wait(arg0: Long, arg1: Int): Unit

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  302. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  303. def walkDrivingExpressions(func: (Expression) ⇒ Unit): Unit

    Permalink
    Definition Classes
    ExpressionContainer
  304. def walkExpression(func: (Expression) ⇒ Unit): Unit

    Permalink
    Definition Classes
    ExpressionContainer
  305. def walkExpressionPostorder(func: (Expression) ⇒ Unit): Unit

    Permalink
    Definition Classes
    ExpressionContainer
  306. def walkParentTreeStatements(func: (TreeStatement) ⇒ Unit): Unit

    Permalink
    Definition Classes
    Statement
  307. def walkParentTreeStatementsUntilRootScope(func: (TreeStatement) ⇒ Unit): Unit

    Permalink
    Definition Classes
    Statement
  308. def walkRemapDrivingExpressions(func: (Expression) ⇒ Expression): Unit

    Permalink
    Definition Classes
    ExpressionContainer
  309. def walkRemapExpressions(func: (Expression) ⇒ Expression): Unit

    Permalink
    Definition Classes
    ExpressionContainer
  310. def wrapCast[T <: BaseType](result: T, node: Cast): T

    Permalink
    Definition Classes
    BaseType
  311. def wrapNext(): Bits.this.type

    Permalink
    Definition Classes
    Data
  312. def xorMask(that: Bool): Bits.this.type

    Permalink
    Definition Classes
    BitVector
  313. def xorR: Bool

    Permalink

    Hardware logical XOR of all bits

    Hardware logical XOR of all bits

    Equivalent to this.asBools.reduce(_ ^ _).

    Definition Classes
    BitVector
  314. def |(right: Bits): Bits

    Permalink

    Bitwise OR operator

    Bitwise OR operator

    Definition Classes
    BitsBitwiseOp
  315. def |<<(that: UInt): Bits

    Permalink

    Logical shift left (output width == input width)

  316. def |<<(that: Int): Bits

    Permalink

    Logical shift left (output width == input width)

  317. def |>>(that: UInt): Bits

    Permalink

    Logical shift Right (output width == input width)

  318. def |>>(that: Int): Bits

    Permalink

    Logical shift right (output width == input width)

    Logical shift right (output width == input width)

    that

    the number of shift

    returns

    a Bits of width : w(this)

    Example:
    1. val result = myBits |>> 4

Deprecated Value Members

  1. def asDirectionLess(): Bits.this.type

    Permalink
    Definition Classes
    Data
    Annotations
    @deprecated
    Deprecated

    (Since version ???) use setAsDirectionLess instead

  2. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

  3. def genIf(cond: Boolean): Bits.this.type

    Permalink

    Generate this if condition is true

    Generate this if condition is true

    Definition Classes
    Data
    Annotations
    @deprecated
    Deprecated

    does not work with <>, use 'someBool generate Type()' or 'if(condition) Type() else null' instead

  4. def range: Range

    Permalink

    Return the range

    Return the range

    Definition Classes
    BitVector
    Annotations
    @deprecated
    Deprecated

    Use bitsRange instead

Inherited from BitwiseOp[Bits]

Inherited from BaseTypePrimitives[Bits]

Inherited from DataPrimitives[Bits]

Inherited from BitVector

Inherited from Widthable

Inherited from WidthProvider

Inherited from BaseType

Inherited from Expression

Inherited from DeclarationStatement

Inherited from LeafStatement

Inherited from Statement

Inherited from BaseNode

Inherited from ExpressionContainer

Inherited from Data

Inherited from InComponent

Inherited from OverridedEqualsHashCode

Inherited from SpinalTagReady

Inherited from Assignable

Inherited from NameableByComponent

Inherited from Nameable

Inherited from OwnableRef

Inherited from ContextUser

Inherited from ScalaLocated

Inherited from GlobalDataUser

Inherited from AnyRef

Inherited from Any

Ungrouped