Packages

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

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. Protected

Instance Constructors

  1. new Bits()

Type Members

  1. abstract type RefOwnerType
    Definition Classes
    OwnableRef
  2. type T = Bits

    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
    Definition Classes
    AnyRef → Any
  2. def ##(right: Bits): Bits

    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

    Concatenation between two data

    Concatenation between two data

    Definition Classes
    Data
  4. final def ##: Int
    Definition Classes
    AnyRef → Any
  5. def &(right: Bits): Bits

    Logical AND operator

    Logical AND operator

    Definition Classes
    BitsBitwiseOp
  6. def :=(value: String): Unit
  7. def :=(rangesValue: (Any, Any), _rangesValues: (Any, Any)*): Unit

    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)
  8. def :=(that: Bits): Unit

    Assign a data to this

    Assign a data to this

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

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

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

    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
  11. def <>(that: Bits): Unit

    Auto connection between two data

    Auto connection between two data

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

    BitVector is not equal to MaskedLiteral

    BitVector is not equal to MaskedLiteral

    Definition Classes
    BitVector
  14. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  15. def ===(that: Bits): Bool

    Comparison between two data

    Comparison between two data

    Definition Classes
    DataPrimitives
  16. 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

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

    Logical shift right (output width == input width)

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

    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
  19. def \(that: Bits): Bits

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

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

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

    Logical XOR operator

    Logical XOR operator

    Definition Classes
    BitsBitwiseOp
  21. val _spinalTags: LinkedHashSet[SpinalTag]
    Definition Classes
    SpinalTagReady
  22. def addAttribute(attribute: Attribute): Bits.this.type
    Definition Classes
    BaseTypeDataSpinalTagReady
  23. def addAttribute(name: String, value: Int): Bits.this.type
    Definition Classes
    SpinalTagReady
  24. def addAttribute(name: String, value: String): Bits.this.type
    Definition Classes
    SpinalTagReady
  25. def addAttribute(name: String): Bits.this.type
    Definition Classes
    SpinalTagReady
  26. def addTag[T <: SpinalTag](spinalTag: T): Bits.this.type
    Definition Classes
    SpinalTagReady
  27. def addTags[T <: SpinalTag](tags: Iterable[T]): Bits.this.type
    Definition Classes
    SpinalTagReady
  28. val algoIncrementale: Int
    Definition Classes
    BaseNode
  29. val algoInt: Int
    Definition Classes
    BaseNode
  30. def allowDirectionLessIo: Bits.this.type
    Definition Classes
    Data
  31. def allowOverride: Bits.this.type

    Allow a data to be overrided

    Allow a data to be overrided

    Definition Classes
    Data
  32. def allowPartialyAssigned: Bits.this.type
    Definition Classes
    Data
  33. def allowPruning(): Bits.this.type
    Definition Classes
    Data
  34. def allowSimplifyIt(): Bits.this.type
    Definition Classes
    BaseTypeData
  35. def allowUnsetRegToAvoidLatch: Bits.this.type
    Definition Classes
    Data
  36. def andMask(that: Bool): Bits.this.type
    Definition Classes
    BitVector
  37. def andR: Bool

    Logical AND of all bits

    Logical AND of all bits

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

    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)
  39. def apply(offset: Int, bitCount: BitCount): Bits.this.type

    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)
  40. def apply(bitId: UInt): Bool

    Return the bit at index bitId

    Return the bit at index bitId

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

    Return the bit at index bitId

    Return the bit at index bitId

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

    Return a range of bits

    Return a range of bits

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

    Cast data to Bits

    Cast data to Bits

    Definition Classes
    BitsData
  45. def asBool: Bool
    Definition Classes
    BitVector
  46. 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

    Definition Classes
    BitVector
  47. def asData: Data
    Definition Classes
    Data
  48. def asInOut(): Bits.this.type

    set a data as inout

    set a data as inout

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

    Set a data as input

    Set a data as input

    Definition Classes
    BaseTypeData
  50. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  51. def asOutput(): Bits.this.type

    Set a data as output

    Set a data as output

    Definition Classes
    BaseTypeData
  52. def asSInt: SInt

    Cast a Bits to a SInt

    Cast a Bits to a SInt

    returns

    a SInt data

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

    Cast a Bits to an UInt

    Cast a Bits to an UInt

    returns

    an UInt data

    Example:
    1. val myUInt = myBits.asUInt
  54. def assignDontCare(): Bits.this.type
    Definition Classes
    BitsData
  55. def assignFormalRandom(kind: RandomExpKind): Unit
    Definition Classes
    BitsData
  56. final def assignFrom(that: AnyRef, target: AnyRef = this): Unit
    Definition Classes
    Data
  57. def assignFromBits(bits: Bits, hi: Int, lo: Int): Unit
    Definition Classes
    BitsData
  58. def assignFromBits(bits: Bits): Unit
    Definition Classes
    BitsData
  59. def assignFromBits(bits: Bits, offset: Int, bitCount: BitCount): Unit
    Definition Classes
    Data
  60. def bitsRange: Range
    Definition Classes
    BitVector
  61. def cldCount: Int
    Definition Classes
    DoubleLinkedContainer
  62. def clearAll(): Bits.this.type

    Clear all bits

    Clear all bits

    Definition Classes
    BitVector
  63. var clockDomain: ClockDomain
    Definition Classes
    BaseType
  64. def clone(): Bits.this.type
    Definition Classes
    BitVectorBaseTypeData → AnyRef
  65. def component: Component
    Definition Classes
    ContextUser
  66. final def compositAssignFrom(that: AnyRef, target: AnyRef, kind: AnyRef): Unit
    Definition Classes
    Assignable
  67. val compositeAssign: Assignable
    Definition Classes
    Assignable
  68. def copyDirectionOf(that: Bits): Unit
    Definition Classes
    DataPrimitives
  69. def copyDirectionOfImpl(that: Data): Bits.this.type
    Definition Classes
    BaseTypeData
  70. def default(that: => Bits): Bits

    Set a default value to a data

    Set a default value to a data

    Definition Classes
    DataPrimitives
  71. def dirString(): String
    Definition Classes
    Data
  72. def dlcAppend(that: AssignmentStatement): Bits.this.type
    Definition Classes
    DoubleLinkedContainer
  73. def dlcForeach[T >: AssignmentStatement](func: (T) => Unit): Unit
    Definition Classes
    DoubleLinkedContainer
  74. def dlcHasOnlyOne: Boolean
    Definition Classes
    DoubleLinkedContainer
  75. val dlcHead: AssignmentStatement
    Definition Classes
    DoubleLinkedContainer
  76. def dlcIsEmpty: Boolean
    Definition Classes
    DoubleLinkedContainer
  77. val dlcLast: AssignmentStatement
    Definition Classes
    DoubleLinkedContainer
  78. def dlcPrepend(that: AssignmentStatement): Bits.this.type
    Definition Classes
    DoubleLinkedContainer
  79. def dontSimplifyIt(): Bits.this.type
    Definition Classes
    BaseTypeData
  80. def drop(n: Int): Bits

    Drop lowerst n bits

    Drop lowerst n bits

    returns

    data10bits(9 downto 4)

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

    Drop highest n bits

    Drop highest n bits

    returns

    data10bits(5 downto 0)

    Definition Classes
    BitVector
    Example:
    1. val res = data10bits.dropHigh(4)
  82. def dropLow(n: Int): Bits
    Definition Classes
    BitVector
  83. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  84. def equals(obj: Any): Boolean
    Definition Classes
    OverridedEqualsHashCode → AnyRef → Any
  85. def existsTag(cond: (SpinalTag) => Boolean): Boolean
    Definition Classes
    SpinalTagReady
  86. def filterTag(cond: (SpinalTag) => Boolean): Iterable[SpinalTag]
    Definition Classes
    SpinalTagReady
  87. def findTag(cond: (SpinalTag) => Boolean): Option[SpinalTag]
    Definition Classes
    SpinalTagReady
  88. def flatten: Seq[BaseType]
    Definition Classes
    BaseTypeData
  89. def flattenForeach(body: (BaseType) => Unit): Unit
    Definition Classes
    BaseTypeData
  90. def flattenLocalName: Seq[String]
    Definition Classes
    BaseTypeData
  91. def flip(): Bits.this.type

    flip the direction of the data

    flip the direction of the data

    Definition Classes
    Data
  92. def foreachClockDomain(func: (ClockDomain) => Unit): Unit
    Definition Classes
    BaseTypeStatement
  93. def foreachDrivingExpression(func: (Expression) => Unit): Unit
    Definition Classes
    ExpressionContainer
  94. def foreachExpression(func: (Expression) => Unit): Unit
  95. def foreachReflectableNameables(doThat: (Any) => Unit): Unit
    Definition Classes
    Nameable
  96. def foreachStatements(func: (AssignmentStatement) => Unit): Unit
  97. def foreachTag(body: (SpinalTag) => Unit): Unit
    Definition Classes
    SpinalTagReady
  98. def freeze(): Bits.this.type
    Definition Classes
    BaseTypeData
  99. def genIf(cond: Boolean): Bits.this.type

    Generate this if condition is true

    Generate this if condition is true

    Definition Classes
    Data
  100. def getAheadValue(): Bits.this.type
    Definition Classes
    BaseTypeData
  101. def getAllTrue: Bits.this.type
    Definition Classes
    BitsBitVector
  102. def getBitsWidth: Int

    Return the width of the data

    Return the width of the data

    Definition Classes
    BitVectorData
  103. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  104. def getComponent(): Component
    Definition Classes
    DataInComponentNameableByComponent
  105. def getComponents(): Seq[Component]

    Get current component with all parents

    Get current component with all parents

    Definition Classes
    InComponent
  106. def getDirection: IODirection
    Definition Classes
    Data
  107. def getDisplayName(): String
    Definition Classes
    Nameable
  108. def getDrivingReg: Bits.this.type
    Definition Classes
    BaseType
  109. def getInstanceCounter: Int
    Definition Classes
    ContextUser
  110. def getMode: Byte
    Attributes
    protected
    Definition Classes
    Nameable
  111. def getName(default: String): String
    Definition Classes
    NameableByComponentNameable
  112. def getName(): String
    Definition Classes
    NameableByComponentNameable
  113. def getPartialName(): String
    Definition Classes
    Nameable
  114. def getRealSource: Any
    Definition Classes
    Assignable
  115. def getRealSourceNoRec: Any
    Definition Classes
    DataAssignable
  116. def getRefOwnersChain(): List[Any]
    Definition Classes
    OwnableRef
  117. def getRootParent: Data
    Definition Classes
    Data
  118. def getRtlPath(separator: String = "/"): String
    Definition Classes
    Data
  119. def getScalaLocationLong: String
    Definition Classes
    ScalaLocated
  120. def getScalaLocationShort: String
    Definition Classes
    ScalaLocated
  121. def getScalaTrace(): Throwable
    Definition Classes
    ScalaLocated
  122. def getSingleDriver: Option[Bits.this.type]
    Definition Classes
    BaseType
  123. def getTag[T <: SpinalTag](clazz: Class[T]): Option[T]
    Definition Classes
    SpinalTagReady
  124. def getTags(): LinkedHashSet[SpinalTag]
    Definition Classes
    SpinalTagReady
  125. def getTypeObject: TypeBits
    Definition Classes
    BitsExpression
  126. def getWidth: Int
    Definition Classes
    WidthableWidthProvider
  127. def getWidthNoInferation: Int

    Return the width

    Return the width

    Definition Classes
    BitVector
  128. def getWidthStringNoInferation: String
    Definition Classes
    BitVector
  129. def getZero: Bits.this.type

    Create a data set to 0

    Create a data set to 0

    Definition Classes
    BitsData
  130. def getZeroUnconstrained: Bits.this.type
    Definition Classes
    BitsBitVector
  131. val globalData: GlobalData
    Definition Classes
    GlobalDataUser
  132. def hasAssignement: Boolean
    Definition Classes
    BaseType
  133. def hasDataAssignment: Boolean
    Definition Classes
    BaseType
  134. def hasInit: Boolean

    Does the base type have initial value

    Does the base type have initial value

    Definition Classes
    BaseType
  135. def hasOnlyOneStatement: Boolean
  136. def hasTag[T <: SpinalTag](clazz: Class[T]): Boolean
    Definition Classes
    SpinalTagReady
  137. def hasTag(spinalTag: SpinalTag): Boolean
    Definition Classes
    SpinalTagReady
  138. def hashCode(): Int
    Definition Classes
    OverridedEqualsHashCode → AnyRef → Any
  139. def head: AssignmentStatement
  140. def high: Int

    Return the upper bound

    Return the upper bound

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

    Set initial value to a data

    Set initial value to a data

    Definition Classes
    DataPrimitives
  142. final def initFrom(that: AnyRef, target: AnyRef = this): Unit
    Definition Classes
    Data
  143. def initial(that: Bits): Bits
    Definition Classes
    BaseTypePrimitives
  144. def initialFrom(that: AnyRef, target: AnyRef = this): Unit
    Definition Classes
    BaseType
  145. def insertNext(s: Statement): Unit
    Definition Classes
    Statement
  146. def instanceAttributes(language: Language): Iterable[Attribute]
    Definition Classes
    SpinalTagReady
  147. def instanceAttributes: Iterable[Attribute]
    Definition Classes
    SpinalTagReady
  148. def isAnalog: Boolean
    Definition Classes
    BaseTypeData
  149. def isComb: Boolean
    Definition Classes
    BaseTypeData
  150. def isCompletelyUnnamed: Boolean
    Definition Classes
    Nameable
  151. def isDirectionLess: Boolean
    Definition Classes
    Data
  152. def isEmptyOfTag: Boolean
    Definition Classes
    SpinalTagReady
  153. def isFrozen(): Boolean
    Definition Classes
    BaseType
  154. def isInOut: Boolean
    Definition Classes
    Data
  155. def isInput: Boolean
    Definition Classes
    Data
  156. def isInputOrInOut: Boolean
    Definition Classes
    Data
  157. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  158. def isNamed: Boolean
    Definition Classes
    NameableByComponentNameable
  159. def isOutput: Boolean
    Definition Classes
    Data
  160. def isOutputOrInOut: Boolean
    Definition Classes
    Data
  161. def isPriorityApplicable(namePriority: Byte): Boolean
    Definition Classes
    Nameable
  162. def isReg: Boolean
    Definition Classes
    BaseTypeData
  163. def isTypeNode: Boolean

    Is the baseType a node

    Is the baseType a node

    Definition Classes
    BaseType
  164. def isUnnamed: Boolean
    Definition Classes
    Nameable
  165. def isUsingResetSignal: Boolean

    Is the basetype using reset signal

    Is the basetype using reset signal

    Definition Classes
    BaseType
  166. def isUsingSoftResetSignal: Boolean

    Is the basetype using soft reset signal

    Is the basetype using soft reset signal

    Definition Classes
    BaseType
  167. def isVital: Boolean

    Check if the baseType is vital

    Check if the baseType is vital

    Definition Classes
    BaseType
  168. val lastScopeStatement: Statement
    Definition Classes
    Statement
  169. def lsb: Bool

    Return the least significant bit

    Return the least significant bit

    Definition Classes
    BitVector
  170. def msb: Bool

    Return the most significant bit

    Return the most significant bit

    Definition Classes
    BitVector
  171. def mux[T2 <: Data](mappings: (Any, T2)*): T2
    Definition Classes
    BaseType
  172. def muxList[T2 <: Data](defaultValue: T2, mappings: Seq[(Any, T2)]): T2
    Definition Classes
    BaseType
  173. def muxList[T2 <: Data](mappings: Seq[(Any, T2)]): T2
    Definition Classes
    BaseType
  174. def muxListDc[T2 <: Data](mappings: Seq[(Any, T2)]): T2
    Definition Classes
    BaseType
  175. val name: String
    Definition Classes
    Nameable
  176. val nameableRef: Nameable
    Attributes
    protected
    Definition Classes
    Nameable
    Annotations
    @DontName()
  177. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  178. def newExtract(offset: UInt, size: Int, extract: BitVectorRangedAccessFloating): Bits.this.type

    Extract a range of bits of the BitVector

    Extract a range of bits of the BitVector

    Definition Classes
    BitVector
  179. def newExtract(hi: Int, lo: Int, accessFactory: => BitVectorRangedAccessFixed): Bits.this.type

    Extract a range of bits of the BitVector

    Extract a range of bits of the BitVector

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

    Extract a bit of the BitVector

    Extract a bit of the BitVector

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

    Extract a bit of the BitVector

    Extract a bit of the BitVector

    Definition Classes
    BitVector
  182. val nextScopeStatement: Statement
    Definition Classes
    Statement
  183. def noBackendCombMerge: Bits.this.type
    Definition Classes
    Data
  184. def noCombLoopCheck: Bits.this.type
    Definition Classes
    Data
  185. def normalizeInputs: Unit
    Definition Classes
    BaseTypeExpressionContainer
  186. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  187. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  188. def onEachAttributes(doIt: (Attribute) => Unit): Unit
    Definition Classes
    SpinalTagReady
  189. def opName: String
    Definition Classes
    BitsExpression
  190. def orMask(that: Bool): Bits.this.type
    Definition Classes
    BitVector
  191. def orR: Bool

    Logical OR of all bits

    Logical OR of all bits

    Definition Classes
    BitVector
  192. def overrideLocalName(name: String): Bits.this.type
    Definition Classes
    Nameable
  193. val parent: Data
    Definition Classes
    Data
  194. val parentScope: ScopeStatement
    Definition Classes
    ContextUser
  195. def pull(propagateName: Boolean): Bits.this.type
    Definition Classes
    Data
  196. def pull(): Bits.this.type

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

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

    Definition Classes
    Data
  197. def purify(): Bits.this.type
    Definition Classes
    Data
  198. def randBoot(u: Unit): Bits.this.type

    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
  199. val refOwner: RefOwnerType
    Definition Classes
    OwnableRef
    Annotations
    @DontName()
  200. def reflectNames(): Unit
    Definition Classes
    Nameable
  201. def remapDrivingExpressions(func: (Expression) => Expression): Unit
    Definition Classes
    ExpressionContainer
  202. def remapExpressions(func: (Expression) => Expression): Unit
  203. def removeAssignments(): Bits.this.type

    Remove all assignments of the base type

    Remove all assignments of the base type

    Definition Classes
    BaseTypeData
  204. def removeStatement(): Unit
    Definition Classes
    BaseTypeStatement
  205. def removeStatementFromScope(): Unit
    Definition Classes
    Statement
  206. def removeTag(spinalTag: SpinalTag): Bits.this.type
    Definition Classes
    SpinalTagReady
  207. def removeTags(tags: Iterable[SpinalTag]): Bits.this.type
    Definition Classes
    SpinalTagReady
  208. def resize(width: BitCount): Bits
    Definition Classes
    BitsBitVector
  209. def resize(width: Int): Bits

    Resize the bitVector to width

    Resize the bitVector to width

    returns

    a resized bitVector

    Definition Classes
    BitsBitVector
    Example:
    1. val res = myBits.resize(10)
  210. def resizeFactory: Resize
    Definition Classes
    BitsBitVector
  211. def resizeLeft(width: Int): Bits

    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

  212. def resized: Bits.this.type

    Resized data regarding target

    Resized data regarding target

    Definition Classes
    Data
  213. def reversed: Bits
  214. def rootScopeStatement: ScopeStatement
    Definition Classes
    BaseTypeStatement
  215. def rotateLeft(that: Int): Bits

    Left rotation of that bits

    Left rotation of that bits

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

    Left rotation of that Bits

    Left rotation of that Bits

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

    Right rotation of that bits

    Right rotation of that bits

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

    Right rotation of that Bits

    Right rotation of that Bits

    Definition Classes
    BitVector
  219. val scalaTrace: Throwable
    Definition Classes
    ScalaLocated
  220. def setAll(): Bits.this.type

    Set all bits

    Set all bits

    Definition Classes
    BitsBitVector
  221. def setAllTo(value: Bool): Bits.this.type

    Set all bits to value

    Set all bits to value

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

    Set all bits to value

    Set all bits to value

    Definition Classes
    BitVector
  223. def setAsAnalog(): Bits.this.type
    Definition Classes
    BaseTypeData
  224. def setAsComb(): Bits.this.type

    Set baseType to Combinatorial

    Set baseType to Combinatorial

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

    remove the direction (in,out,inout) to a data

    remove the direction (in,out,inout) to a data

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

    Set baseType to reg

    Set baseType to reg

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

    Set baseType to Node

    Set baseType to Node

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

    Set the baseType to vital

    Set the baseType to vital

    Definition Classes
    BaseType
  229. def setCompositeName(nameable: Nameable, postfix: String, namePriority: Byte): Bits.this.type
    Definition Classes
    Nameable
  230. def setCompositeName(nameable: Nameable, postfix: String, weak: Boolean): Bits.this.type
    Definition Classes
    Nameable
  231. def setCompositeName(nameable: Nameable, postfix: String): Bits.this.type
    Definition Classes
    Nameable
  232. def setCompositeName(nameable: Nameable, namePriority: Byte): Bits.this.type
    Definition Classes
    Nameable
  233. def setCompositeName(nameable: Nameable, weak: Boolean): Bits.this.type
    Definition Classes
    Nameable
  234. def setCompositeName(nameable: Nameable): Bits.this.type
    Definition Classes
    Nameable
  235. def setName(name: String, namePriority: Byte): Bits.this.type
    Definition Classes
    Nameable
  236. def setName(name: String, weak: Boolean): Bits.this.type
    Definition Classes
    Nameable
  237. def setName(name: String): Bits.this.type
    Definition Classes
    Nameable
  238. def setNameAsWeak(): Bits.this.type
    Definition Classes
    Nameable
  239. def setPartialName(name: String, namePriority: Byte, owner: Any): Bits.this.type
    Definition Classes
    Nameable
  240. def setPartialName(name: String, namePriority: Byte): Bits.this.type
    Definition Classes
    Nameable
  241. def setPartialName(name: String, weak: Boolean): Bits.this.type
    Definition Classes
    Nameable
  242. def setPartialName(owner: Nameable, name: String, namePriority: Byte): Bits.this.type
    Definition Classes
    Nameable
  243. def setPartialName(owner: Nameable, name: String, weak: Boolean): Bits.this.type
    Definition Classes
    Nameable
  244. def setPartialName(name: String): Bits.this.type
    Definition Classes
    Nameable
  245. def setPartialName(owner: Nameable, name: String): Bits.this.type
    Definition Classes
    Nameable
  246. def setRefOwner(that: Any): Unit
    Definition Classes
    OwnableRef
  247. def setScalaLocated(source: ScalaLocated): Bits.this.type
    Definition Classes
    ScalaLocated
  248. def setWeakName(name: String): Bits.this.type
    Definition Classes
    Nameable
  249. def setWidth(width: Int): Bits.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

    Definition Classes
    BitVector
  250. def simplifyNode: Expression
    Definition Classes
    Expression
  251. def sliceBy(divisor: List[Int]): List[Bits]
    Definition Classes
    BitVector
  252. def sliceBy(divisor: Int*): List[Bits]

    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))
  253. def spinalTags: LinkedHashSet[SpinalTag]
    Definition Classes
    SpinalTagReady
  254. def splitAt(n: Int): (Bits, Bits)

    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)
  255. def stabilized(func: (Expression) => Expression, seed: Expression): Expression
    Definition Classes
    ExpressionContainer
  256. def subdivideIn(sliceWidth: BitCount): Vec[T]
    Definition Classes
    BitVector
  257. def subdivideIn(sliceCount: SlicesCount): Vec[T]
    Definition Classes
    BitVector
  258. def subdivideIn(sliceWidth: BitCount, strict: Boolean): 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

    Definition Classes
    BitVector
  259. def subdivideIn(sliceCount: SlicesCount, strict: Boolean): 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

    Definition Classes
    BitVector
    Example:
    1. val res = myBits.subdiviedIn(3 slices)
  260. def swichAssign[T2 <: BaseType](sel: T2)(mappings: (Any, Bits)*): Unit
    Definition Classes
    DataPrimitives
  261. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  262. def take(n: Int): Bits

    Take lowerst n bits

    Take lowerst n bits

    returns

    data10bits(3 downto 0)

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

    Take highest n bits

    Take highest n bits

    returns

    data10bits(9 downto 6)

    Definition Classes
    BitVector
    Example:
    1. val res = data10bits.takeHigh(4)
  264. def takeLow(n: Int): Bits
    Definition Classes
    BitVector
  265. def toDataType[T <: Data](dataType: T): T

    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)
  266. def toIo(): Bits.this.type
    Definition Classes
    Data
  267. def toString(): String
    Definition Classes
    BitVectorBaseTypeExpressionNameable → AnyRef → Any
  268. def toStringMultiLine(): String
    Definition Classes
    BaseNode
  269. def toStringRec(level: Int = 1): String
    Definition Classes
    Expression
  270. def unary_~: Bits

    Inverse bitwise operator

    Inverse bitwise operator

    Definition Classes
    BitsBitwiseOp
  271. def unfreeze(): Bits.this.type
    Definition Classes
    BaseTypeData
  272. def unsetName(): Bits.this.type
    Definition Classes
    Nameable
  273. def valueRange: Range
  274. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  275. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  276. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  277. def walkDrivingExpressions(func: (Expression) => Unit): Unit
    Definition Classes
    ExpressionContainer
  278. def walkExpression(func: (Expression) => Unit): Unit
    Definition Classes
    ExpressionContainer
  279. def walkExpressionPostorder(func: (Expression) => Unit): Unit
    Definition Classes
    ExpressionContainer
  280. def walkParentTreeStatements(func: (TreeStatement) => Unit): Unit
    Definition Classes
    Statement
  281. def walkParentTreeStatementsUntilRootScope(func: (TreeStatement) => Unit): Unit
    Definition Classes
    Statement
  282. def walkRemapDrivingExpressions(func: (Expression) => Expression): Unit
    Definition Classes
    ExpressionContainer
  283. def walkRemapExpressions(func: (Expression) => Expression): Unit
    Definition Classes
    ExpressionContainer
  284. def wrapCast[T <: BaseType](result: T, node: Cast): T
    Definition Classes
    BaseType
  285. def wrapNext(): Bits.this.type
    Definition Classes
    Data
  286. def xorR: Bool

    Logical XOR of all bits

    Logical XOR of all bits

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

    Logical OR operator

    Logical OR operator

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

    Logical shift left (output width == input width)

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

    Logical shift left (output width == input width)

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

    Logical shift Right (output width == input width)

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

    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
    Definition Classes
    Data
    Annotations
    @deprecated
    Deprecated

    (Since version ???) use setAsDirectionLess instead

  2. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated
  3. def range: Range

    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 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