class Bits extends BitVector with DataPrimitives[Bits] with BitwiseOp[Bits]
The Bits type corresponds to a vector of bits that does not convey any arithmetic meaning.
val myBits1 = Bits(32 bits) val myBits2 = B(25, 8 bits) val myBits3 = B"8'xFF" val myBits4 = B"1001_0011
- See also
- Alphabetic
- By Inheritance
- Bits
- BitwiseOp
- DataPrimitives
- BitVector
- Widthable
- WidthProvider
- BaseType
- Expression
- StatementDoubleLinkedContainer
- DoubleLinkedContainer
- DeclarationStatement
- LeafStatement
- Statement
- BaseNode
- ExpressionContainer
- Data
- SpinalTagReady
- Assignable
- NameableByComponent
- Nameable
- OwnableRef
- ContextUser
- ScalaLocated
- GlobalDataUser
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Bits()
Type Members
-
abstract
type
RefOwnerType
- Definition Classes
- OwnableRef
-
type
T = Bits
Used to know the data type of the children class of BitVector
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
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))
val myBits2 = bits1 ## bits2
Example: -
def
##(right: Data): Bits
Concatenation between two data
Concatenation between two data
- Definition Classes
- Data
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
&(right: Bits): Bits
Logical AND operator
-
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
core.io.interrupt = (0 -> uartCtrl.io.interrupt, 1 -> timerCtrl.io.interrupt, default -> false)
Example: -
def
:=(that: Bits): Unit
Assign a data to this
Assign a data to this
- Definition Classes
- DataPrimitives
-
def
<<(that: UInt): Bits
Logical shift left (output width will increase of w(this) + max(that) bits
-
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
val result = myBits << 4
Example: -
def
<>(that: Bits): Unit
Auto connection between two data
Auto connection between two data
- Definition Classes
- DataPrimitives
-
def
=/=(that: Bits): Bool
- Definition Classes
- DataPrimitives
-
def
=/=(that: MaskedLiteral): Bool
BitVector is not equal to MaskedLiteral
BitVector is not equal to MaskedLiteral
- Definition Classes
- BitVector
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
===(that: Bits): Bool
Comparison between two data
Comparison between two data
- Definition Classes
- DataPrimitives
-
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
val myBool = myBits === M"0-1"
Example: -
def
>>(that: UInt): Bits
Logical shift right (output width == input width)
-
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
val result = myBits >> 4
Example: -
def
\(that: Bits): Bits
Use as \= to have the same behavioral thant VHDL variable
Use as \= to have the same behavioral thant VHDL variable
- Definition Classes
- DataPrimitives
-
def
^(right: Bits): Bits
Logical XOR operator
-
val
_spinalTags: Set[SpinalTag]
- Definition Classes
- SpinalTagReady
-
def
addAttribute(attribute: Attribute): Bits.this.type
- Definition Classes
- BaseType → Data → SpinalTagReady
-
def
addAttribute(name: String, value: String): Bits.this.type
- Definition Classes
- SpinalTagReady
-
def
addAttribute(name: String): Bits.this.type
- Definition Classes
- SpinalTagReady
-
def
addTag[T <: SpinalTag](spinalTag: T): Bits.this.type
- Definition Classes
- SpinalTagReady
-
def
addTags[T <: SpinalTag](tags: Iterable[T]): Bits.this.type
- Definition Classes
- SpinalTagReady
-
val
algoIncrementale: Int
- Definition Classes
- BaseNode
-
val
algoInt: Int
- Definition Classes
- BaseNode
-
def
allowDirectionLessIo: Bits.this.type
- Definition Classes
- Data
-
def
allowOverride: Bits.this.type
Allow a data to be overrided
Allow a data to be overrided
- Definition Classes
- Data
-
def
allowPruning(): Bits.this.type
- Definition Classes
- Data
- def allowSimplifyIt(): Bits.this.type
-
def
allowUnsetRegToAvoidLatch: Bits.this.type
- Definition Classes
- Data
-
def
andR: Bool
Logical AND of all bits
Logical AND of all bits
- Definition Classes
- BitVector
-
def
apply(offset: UInt, bitCount: BitCount): Bits.this.type
Return a range of bits at offset and of width bitCount
-
def
apply(offset: Int, bitCount: BitCount): Bits.this.type
Return a range of bits at offset and of width bitCount
-
def
apply(bitId: UInt): Bool
Return the bit at index bitId
-
def
apply(bitId: Int): Bool
Return the bit at index bitId
-
def
apply(range: Range): Bits.this.type
Return a range of bits
Return a range of bits
- Definition Classes
- BitVector
val myBool = myBits(3 downto 1)
Example: -
def
as[T <: Data](dataType: HardType[T]): T
- Definition Classes
- Data
-
def
asBits: Bits
Cast data to Bits
-
def
asBool: Bool
- Definition Classes
- BitVector
-
def
asBools: Vec[Bool]
Cast the BitVector into a Vector of Bool
-
def
asData: Data
- Definition Classes
- Data
-
def
asInOut(): Bits.this.type
set a data as inout
-
def
asInput(): Bits.this.type
Set a data as input
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
asOutput(): Bits.this.type
Set a data as output
-
def
asSInt: SInt
Cast a Bits to a SInt
Cast a Bits to a SInt
- returns
a SInt data
val mySInt = myBits.asSInt
Example: -
def
asUInt: UInt
Cast a Bits to an UInt
Cast a Bits to an UInt
- returns
an UInt data
val myUInt = myBits.asUInt
Example: - def assignDontCare(): Bits.this.type
-
final
def
assignFrom(that: AnyRef, target: AnyRef = this): Unit
- Definition Classes
- Data
- def assignFromBits(bits: Bits, hi: Int, lo: Int): Unit
- def assignFromBits(bits: Bits): Unit
-
def
assignFromBits(bits: Bits, offset: Int, bitCount: BitCount): Unit
- Definition Classes
- Data
-
def
clearAll(): Bits.this.type
Clear all bits
Clear all bits
- Definition Classes
- BitVector
-
var
clockDomain: ClockDomain
- Definition Classes
- BaseType
- def clone(): Bits.this.type
-
def
component: Component
- Definition Classes
- ContextUser
-
final
def
compositAssignFrom(that: AnyRef, target: AnyRef, kind: AnyRef): Unit
- Definition Classes
- Assignable
-
val
compositeAssign: Assignable
- Definition Classes
- Assignable
-
def
default(that: ⇒ Bits): Bits
Set a default value to a data
Set a default value to a data
- Definition Classes
- DataPrimitives
-
def
dirString(): String
- Definition Classes
- Data
-
def
dlcAppend(that: AssignmentStatement): Bits.this.type
- Definition Classes
- DoubleLinkedContainer
-
def
dlcForeach[T >: AssignmentStatement](func: (T) ⇒ Unit): Unit
- Definition Classes
- DoubleLinkedContainer
-
def
dlcHasOnlyOne: Boolean
- Definition Classes
- DoubleLinkedContainer
-
val
dlcHead: AssignmentStatement
- Definition Classes
- DoubleLinkedContainer
-
def
dlcIsEmpty: Boolean
- Definition Classes
- DoubleLinkedContainer
-
val
dlcLast: AssignmentStatement
- Definition Classes
- DoubleLinkedContainer
-
def
dlcPrepend(that: AssignmentStatement): Bits.this.type
- Definition Classes
- DoubleLinkedContainer
- def dontSimplifyIt(): Bits.this.type
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
existsTag(cond: (SpinalTag) ⇒ Boolean): Boolean
- Definition Classes
- SpinalTagReady
-
def
filterTag(cond: (SpinalTag) ⇒ Boolean): Iterable[SpinalTag]
- Definition Classes
- SpinalTagReady
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
findTag(cond: (SpinalTag) ⇒ Boolean): Option[SpinalTag]
- Definition Classes
- SpinalTagReady
- def flatten: Seq[BaseType]
- def flattenForeach(body: (BaseType) ⇒ Unit): Unit
- def flattenLocalName: Seq[String]
-
def
flip(): Bits.this.type
flip the direction of the data
flip the direction of the data
- Definition Classes
- Data
- def foreachClockDomain(func: (ClockDomain) ⇒ Unit): Unit
-
def
foreachDrivingExpression(func: (Expression) ⇒ Unit): Unit
- Definition Classes
- ExpressionContainer
-
def
foreachExpression(func: (Expression) ⇒ Unit): Unit
- Definition Classes
- DeclarationStatement → ExpressionContainer
-
def
foreachReflectableNameables(doThat: (Any) ⇒ Unit): Unit
- Definition Classes
- Nameable
-
def
foreachStatements(func: (AssignmentStatement) ⇒ Unit): Unit
- Definition Classes
- StatementDoubleLinkedContainer
-
def
genIf(cond: Boolean): Bits.this.type
Generate this if condition is true
Generate this if condition is true
- Definition Classes
- Data
- def getAllTrue: Bits.this.type
-
def
getBitsWidth: Int
Return the width of the data
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
getComponent(): Component
- Definition Classes
- Data → NameableByComponent
-
def
getComponents(): Seq[Component]
Get current component with all parents
Get current component with all parents
- Definition Classes
- Data
-
def
getDisplayName(): String
- Definition Classes
- Nameable
-
def
getDrivingReg: Bits.this.type
- Definition Classes
- BaseType
-
def
getInstanceCounter: Int
- Definition Classes
- ContextUser
-
def
getMode: Byte
- Attributes
- protected
- Definition Classes
- Nameable
-
def
getName(default: String): String
- Definition Classes
- NameableByComponent → Nameable
-
def
getName(): String
- Definition Classes
- Nameable
-
def
getRealSource: Any
- Definition Classes
- Assignable
-
def
getRealSourceNoRec: Any
- Definition Classes
- Data → Assignable
-
def
getRefOwnersChain(): List[Any]
- Definition Classes
- OwnableRef
-
def
getRootParent: Data
- Definition Classes
- Data
-
def
getScalaLocationLong: String
- Definition Classes
- ScalaLocated
-
def
getScalaLocationShort: String
- Definition Classes
- ScalaLocated
-
def
getScalaTrace(): Throwable
- Definition Classes
- ScalaLocated
-
def
getSingleDriver: Option[Bits.this.type]
- Definition Classes
- BaseType
-
def
getTag[T <: SpinalTag](clazz: Class[T]): Option[T]
- Definition Classes
- SpinalTagReady
-
def
getTags(): Set[SpinalTag]
- Definition Classes
- SpinalTagReady
-
def
getTypeObject: TypeBits.type
- Definition Classes
- Bits → Expression
-
def
getWidth: Int
- Definition Classes
- Widthable → WidthProvider
-
def
getWidthNoInferation: Int
Return the width
Return the width
- Definition Classes
- BitVector
-
def
getWidthStringNoInferation: String
- Definition Classes
- BitVector
-
def
getZero: Bits.this.type
Create a data set to 0
- def getZeroUnconstrained: Bits.this.type
-
val
globalData: GlobalData
- Definition Classes
- GlobalDataUser
-
def
hasAssignement: Boolean
- Definition Classes
- BaseType
-
def
hasInit: Boolean
Does the base type have initial value
Does the base type have initial value
- Definition Classes
- BaseType
-
def
hasOnlyOneStatement: Boolean
- Definition Classes
- StatementDoubleLinkedContainer
-
def
hasTag[T <: SpinalTag](clazz: Class[T]): Boolean
- Definition Classes
- SpinalTagReady
-
def
hasTag(spinalTag: SpinalTag): Boolean
- Definition Classes
- SpinalTagReady
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
head: AssignmentStatement
- Definition Classes
- StatementDoubleLinkedContainer
-
def
high: Int
Return the upper bound
Return the upper bound
- Definition Classes
- BitVector
-
def
init(that: Bits): Bits
Set inital value to a data
Set inital value to a data
- Definition Classes
- DataPrimitives
-
final
def
initFrom(that: AnyRef, target: AnyRef = this): Unit
- Definition Classes
- Data
-
def
insertNext(s: Statement): Unit
- Definition Classes
- Statement
-
def
instanceAttributes(language: Language): Iterable[Attribute]
- Definition Classes
- SpinalTagReady
-
def
instanceAttributes: Iterable[Attribute]
- Definition Classes
- SpinalTagReady
- def isAnalog: Boolean
- def isComb: Boolean
-
def
isDirectionLess: Boolean
- Definition Classes
- Data
-
def
isEmptyOfTag: Boolean
- Definition Classes
- SpinalTagReady
-
def
isInOut: Boolean
- Definition Classes
- Data
-
def
isInput: Boolean
- Definition Classes
- Data
-
def
isInputOrInOut: Boolean
- Definition Classes
- Data
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isNamed: Boolean
- Definition Classes
- NameableByComponent → Nameable
-
def
isOutput: Boolean
- Definition Classes
- Data
-
def
isOutputOrInOut: Boolean
- Definition Classes
- Data
-
def
isPriorityApplicable(namePriority: Byte): Boolean
- Definition Classes
- Nameable
- def isReg: Boolean
-
def
isTypeNode: Boolean
Is the baseType a node
Is the baseType a node
- Definition Classes
- BaseType
-
def
isUnnamed: Boolean
- Definition Classes
- Nameable
-
def
isUsingResetSignal: Boolean
Is the basetype using reset signal
Is the basetype using reset signal
- Definition Classes
- BaseType
-
def
isUsingSoftResetSignal: Boolean
Is the basetype using soft reset signal
Is the basetype using soft reset signal
- Definition Classes
- BaseType
-
def
isVital: Boolean
Check if the baseType is vital
Check if the baseType is vital
- Definition Classes
- BaseType
-
def
keep(): Bits.this.type
- Definition Classes
- Data
-
val
lastScopeStatement: Statement
- Definition Classes
- Statement
-
def
lsb: Bool
Return the least significant bit
Return the least significant bit
- Definition Classes
- BitVector
-
def
msb: Bool
Return the most significant bit
Return the most significant bit
- Definition Classes
- BitVector
-
def
mux[T2 <: Data](mappings: (Any, T2)*): T2
- Definition Classes
- BaseType
-
def
muxList[T2 <: Data](defaultValue: T2, mappings: Seq[(Any, T2)]): T2
- Definition Classes
- BaseType
-
def
muxList[T2 <: Data](mappings: Seq[(Any, T2)]): T2
- Definition Classes
- BaseType
-
def
muxListDc[T2 <: Data](mappings: Seq[(Any, T2)]): T2
- Definition Classes
- BaseType
-
val
name: String
- Attributes
- protected
- Definition Classes
- Nameable
-
val
nameableRef: Nameable
- Attributes
- protected
- Definition Classes
- Nameable
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
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
-
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
-
def
newExtract(bitId: UInt, extract: BitVectorBitAccessFloating): Bool
Extract a bit of the BitVector
Extract a bit of the BitVector
- Definition Classes
- BitVector
-
def
newExtract(bitId: Int, extract: BitVectorBitAccessFixed): Bool
Extract a bit of the BitVector
Extract a bit of the BitVector
- Definition Classes
- BitVector
-
val
nextScopeStatement: Statement
- Definition Classes
- Statement
-
def
noBackendCombMerge: Bits.this.type
- Definition Classes
- Data
-
def
noCombLoopCheck: Bits.this.type
- Definition Classes
- Data
-
def
normalizeInputs: Unit
- Definition Classes
- BaseType → ExpressionContainer
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
onEachAttributes(doIt: (Attribute) ⇒ Unit): Unit
- Definition Classes
- SpinalTagReady
-
def
opName: String
- Definition Classes
- Bits → Expression
-
def
orR: Bool
Logical OR of all bits
Logical OR of all bits
- Definition Classes
- BitVector
-
val
parent: Data
- Definition Classes
- Data
-
val
parentScope: ScopeStatement
- Definition Classes
- ContextUser
-
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
-
def
purify(): Bits.this.type
- Definition Classes
- Data
-
def
randBoot(): Bits.this.type
Usefull for register that doesn't need a reset value in RTL, but need a randome value for simulation (avoid x-propagation)
Usefull for register that doesn't need a reset value in RTL, but need a randome value for simulation (avoid x-propagation)
- Definition Classes
- Data
-
def
range: Range
Return the range
Return the range
- Definition Classes
- BitVector
-
val
refOwner: RefOwnerType
- Definition Classes
- OwnableRef
- Annotations
- @dontName()
-
def
reflectNames(): Unit
- Definition Classes
- Nameable
-
def
remapDrivingExpressions(func: (Expression) ⇒ Expression): Unit
- Definition Classes
- ExpressionContainer
-
def
remapExpressions(func: (Expression) ⇒ Expression): Unit
- Definition Classes
- DeclarationStatement → ExpressionContainer
-
def
removeAssignments(): Bits.this.type
Remove all assignements of the base type
- def removeStatement(): Unit
-
def
removeStatementFromScope(): Unit
- Definition Classes
- Statement
-
def
removeTag(spinalTag: SpinalTag): Bits.this.type
- Definition Classes
- SpinalTagReady
-
def
removeTags(tags: Iterable[SpinalTag]): Bits.this.type
- Definition Classes
- SpinalTagReady
- def resize(width: BitCount): Bits
-
def
resize(width: Int): Bits
Resize the bitVector to width
- def resizeFactory: Resize
-
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
-
def
resized: Bits.this.type
Resized data regarding target
Resized data regarding target
- Definition Classes
- Data
- def rootScopeStatement: ScopeStatement
-
def
rotateLeft(that: Int): Bits
Left rotation of that bits
-
def
rotateLeft(that: UInt): T
Left rotation of that Bits
Left rotation of that Bits
- Definition Classes
- BitVector
-
def
rotateRight(that: Int): Bits
Right rotation of that bits
-
def
rotateRight(that: UInt): T
Right rotation of that Bits
Right rotation of that Bits
- Definition Classes
- BitVector
-
def
setAll(): Bits.this.type
Set all bits
-
def
setAllTo(value: Bool): Bits.this.type
Set all bits to value
Set all bits to value
- Definition Classes
- BitVector
-
def
setAllTo(value: Boolean): Bits.this.type
Set all bits to value
Set all bits to value
- Definition Classes
- BitVector
- def setAsAnalog(): Bits.this.type
-
def
setAsComb(): Bits.this.type
Set baseType to Combinatorial
-
def
setAsDirectionLess(): Bits.this.type
remove the direction (in,out,inout) to a data
-
def
setAsReg(): Bits.this.type
Set baseType to reg
-
def
setAsTypeNode(): Bits.this.type
Set baseType to Node
Set baseType to Node
- Definition Classes
- BaseType
-
def
setAsVital(): Bits.this.type
Set the baseType to vital
Set the baseType to vital
- Definition Classes
- BaseType
-
def
setCompositeName(nameable: Nameable, postfix: String, namePriority: Byte): Bits.this.type
- Definition Classes
- Nameable
-
def
setCompositeName(nameable: Nameable, postfix: String, weak: Boolean): Bits.this.type
- Definition Classes
- Nameable
-
def
setCompositeName(nameable: Nameable, postfix: String): Bits.this.type
- Definition Classes
- Nameable
-
def
setCompositeName(nameable: Nameable, namePriority: Byte): Bits.this.type
- Definition Classes
- Nameable
-
def
setCompositeName(nameable: Nameable, weak: Boolean): Bits.this.type
- Definition Classes
- Nameable
-
def
setCompositeName(nameable: Nameable): Bits.this.type
- Definition Classes
- Nameable
-
def
setName(name: String, namePriority: Byte): Bits.this.type
- Definition Classes
- Nameable
-
def
setName(name: String, weak: Boolean): Bits.this.type
- Definition Classes
- Nameable
-
def
setName(name: String): Bits.this.type
- Definition Classes
- Nameable
-
def
setPartialName(name: String, namePriority: Byte): Bits.this.type
- Definition Classes
- Nameable
-
def
setPartialName(name: String, weak: Boolean): Bits.this.type
- Definition Classes
- Nameable
-
def
setPartialName(owner: Nameable, name: String, namePriority: Byte): Bits.this.type
- Definition Classes
- Nameable
-
def
setPartialName(owner: Nameable, name: String, weak: Boolean): Bits.this.type
- Definition Classes
- Nameable
-
def
setPartialName(name: String): Bits.this.type
- Definition Classes
- Nameable
-
def
setPartialName(owner: Nameable, name: String): Bits.this.type
- Definition Classes
- Nameable
-
def
setRefOwner(that: Any): Unit
- Definition Classes
- OwnableRef
-
def
setScalaLocated(source: ScalaLocated): Bits.this.type
- Definition Classes
- ScalaLocated
-
def
setWeakName(name: String): Bits.this.type
- Definition Classes
- Nameable
-
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
-
def
simplifyNode: Expression
- Definition Classes
- Expression
-
def
spinalTags: Set[SpinalTag]
- Definition Classes
- SpinalTagReady
-
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
- Definition Classes
- BitVector
-
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
- Definition Classes
- BitVector
val res = myBits.subdiviedIn(3 slices)
Example: -
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
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
val myUInt = myBits.toDataType(UInt)
Example: -
def
toString(): String
- Definition Classes
- BitVector → BaseType → Expression → Nameable → AnyRef → Any
-
def
toStringMultiLine(): String
- Definition Classes
- BaseNode
-
def
unary_~: Bits
Inverse bitwise operator
-
def
unsetName(): Bits.this.type
- Definition Classes
- Nameable
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
walkDrivingExpressions(func: (Expression) ⇒ Unit): Unit
- Definition Classes
- ExpressionContainer
-
def
walkExpression(func: (Expression) ⇒ Unit): Unit
- Definition Classes
- ExpressionContainer
-
def
walkParentTreeStatements(func: (TreeStatement) ⇒ Unit): Unit
- Definition Classes
- Statement
-
def
walkParentTreeStatementsUntilRootScope(func: (TreeStatement) ⇒ Unit): Unit
- Definition Classes
- Statement
-
def
walkRemapDrivingExpressions(func: (Expression) ⇒ Expression): Unit
- Definition Classes
- ExpressionContainer
-
def
walkRemapExpressions(func: (Expression) ⇒ Expression): Unit
- Definition Classes
- ExpressionContainer
-
def
wrapCast[T <: BaseType](result: T, node: Cast): T
- Definition Classes
- BaseType
-
def
xorR: Bool
Logical XOR of all bits
Logical XOR of all bits
- Definition Classes
- BitVector
-
def
|(right: Bits): Bits
Logical OR operator
-
def
|<<(that: UInt): Bits
Logical shift left (output width == input width)
-
def
|<<(that: Int): Bits
Logical shift left (output width == input width)
-
def
|>>(that: UInt): Bits
Logical shift Right (output width == input width)
-
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)
val result = myBits |>> 4
Example: