A data type for booleans, defined as a single bit indicating true or false.
Attributes
- Companion
- object
- Source
- Bits.scala
- Graph
-
- Supertypes
Members list
Grouped members
Comparison
Dynamic not equals operator
Dynamic not equals operator
Value parameters
- that
-
a hardware $coll
Attributes
- Returns
-
a hardware Bool asserted if this $coll is not equal to
that - Inherited from:
- UIntIntf (hidden)
- Source
- BitsIntf.scala
Dynamic equals operator
Dynamic equals operator
Value parameters
- that
-
a hardware $coll
Attributes
- Returns
-
a hardware Bool asserted if this $coll is equal to
that - Inherited from:
- UIntIntf (hidden)
- Source
- BitsIntf.scala
Arithmetic
Multiplication operator
Multiplication operator
Value parameters
- that
-
a hardware SInt
Attributes
- Returns
-
the product of this $coll and
that$sumWidth $singleCycleMul - Inherited from:
- UIntIntf (hidden)
- Source
- BitsIntf.scala
Addition operator (constant width)
Addition operator (constant width)
Value parameters
- that
-
a hardware $coll
Attributes
- Returns
-
the sum of this $coll and
that$maxWidth - Inherited from:
- UIntIntf (hidden)
- Source
- BitsIntf.scala
Addition operator (expanding width)
Addition operator (expanding width)
Value parameters
- that
-
a hardware $coll
Attributes
- Returns
-
the sum of this $coll and
that$maxWidthPlusOne - Inherited from:
- UIntIntf (hidden)
- Source
- BitsIntf.scala
Subtraction operator (constant width)
Subtraction operator (constant width)
Value parameters
- that
-
a hardware $coll
Attributes
- Returns
-
the difference of this $coll less
that$maxWidth - Inherited from:
- UIntIntf (hidden)
- Source
- BitsIntf.scala
Subtraction operator (increasing width)
Subtraction operator (increasing width)
Value parameters
- that
-
a hardware $coll
Attributes
- Returns
-
the difference of this $coll less
that$maxWidthPlusOne - Inherited from:
- UIntIntf (hidden)
- Source
- BitsIntf.scala
Maximum operator
Maximum operator
Value parameters
- that
-
a $numType
Attributes
- Returns
-
a $numType with a value equal to the maximum value of this $coll and
that$maxWidth - Inherited from:
- NumIntf (hidden)
- Source
- NumIntf.scala
Minimum operator
Minimum operator
Value parameters
- that
-
a hardware $coll
Attributes
- Returns
-
a $numType with a value equal to the minimum value of this $coll and
that$maxWidth - Inherited from:
- NumIntf (hidden)
- Source
- NumIntf.scala
Unary negation (constant width)
Unary negation (constant width)
Attributes
- Returns
-
a $coll equal to zero minus this $coll $constantWidth
- Inherited from:
- UIntIntf (hidden)
- Source
- BitsIntf.scala
Unary negation (constant width)
Unary negation (constant width)
Attributes
- Returns
-
a $coll equal to zero minus this $coll shifted right by one. $constantWidth
- Deprecated
-
[Since version Chisel 6.8.0]Use unary_- which has the same behavior - Inherited from:
- UIntIntf (hidden)
- Source
- BitsIntf.scala
Bitwise
Concatenation operator
Concatenation operator
Value parameters
- that
-
a hardware component
Attributes
- Returns
-
this element concatenated to the most significant end of
that$sumWidth - Inherited from:
- BitsIntf (hidden)
- Source
- BitsIntf.scala
Bitwise and operator
Bitwise and operator
Value parameters
- that
-
a hardware element
Attributes
- Returns
-
the bitwise and of this element and
that - Inherited from:
- BoolIntf (hidden)
- Source
- BitsIntf.scala
Bitwise and operator
Bitwise and operator
Value parameters
- that
-
a hardware $coll
Attributes
- Returns
-
the bitwise and of this $coll and
that$maxWidth - Inherited from:
- UIntIntf (hidden)
- Source
- BitsIntf.scala
Bitwise exclusive or (xor) operator
Bitwise exclusive or (xor) operator
Value parameters
- that
-
a hardware element
Attributes
- Returns
-
the bitwise xor of this element and
that - Inherited from:
- BoolIntf (hidden)
- Source
- BitsIntf.scala
Bitwise exclusive or (xor) operator
Bitwise exclusive or (xor) operator
Value parameters
- that
-
a hardware $coll
Attributes
- Returns
-
the bitwise xor of this $coll and
that$maxWidth - Inherited from:
- UIntIntf (hidden)
- Source
- BitsIntf.scala
And reduction operator
And reduction operator
Attributes
- Returns
-
a hardware Bool resulting from every bit of this $coll and'd together
- Inherited from:
- UIntIntf (hidden)
- Source
- BitsIntf.scala
Head operator
Head operator
Value parameters
- n
-
the number of bits to take
Attributes
- Returns
-
The
nmost significant bits of this element - Inherited from:
- BitsIntf (hidden)
- Source
- BitsIntf.scala
Or reduction operator
Or reduction operator
Attributes
- Returns
-
a hardware Bool resulting from every bit of this $coll or'd together
- Inherited from:
- UIntIntf (hidden)
- Source
- BitsIntf.scala
Pad operator
Pad operator
Value parameters
- that
-
the width to pad to
Attributes
- Returns
-
this @coll zero padded up to width
that. Ifthatis less than the width of the original component, this method returns the original component. - Note
-
For SInts only, this will do sign extension.
- Inherited from:
- BitsIntf (hidden)
- Source
- BitsIntf.scala
Tail operator
Tail operator
Value parameters
- n
-
the number of bits to remove
Attributes
- Returns
-
This element with the
nmost significant bits removed. - Inherited from:
- BitsIntf (hidden)
- Source
- BitsIntf.scala
Unary not
Unary not
Attributes
- Returns
-
a hardware Bool asserted if this $coll equals zero
- Inherited from:
- UIntIntf (hidden)
- Source
- BitsIntf.scala
Exclusive or (xor) reduction operator
Exclusive or (xor) reduction operator
Attributes
- Returns
-
a hardware Bool resulting from every bit of this $coll xor'd together
- Inherited from:
- UIntIntf (hidden)
- Source
- BitsIntf.scala
Bitwise or operator
Bitwise or operator
Value parameters
- that
-
a hardware element
Attributes
- Returns
-
the bitwise or of this element and
that - Inherited from:
- BoolIntf (hidden)
- Source
- BitsIntf.scala
Bitwise or operator
Bitwise or operator
Value parameters
- that
-
a hardware $coll
Attributes
- Returns
-
the bitwise or of this $coll and
that$maxWidth - Inherited from:
- UIntIntf (hidden)
- Source
- BitsIntf.scala
connection
The "strong connect" operator.
The "strong connect" operator.
For chisel3._, this operator is mono-directioned; all sub-elements of this will be driven by sub-elements of that.
- Equivalent to
this :#= that
For Chisel._, this operator connections bi-directionally via emitting the FIRRTL.<=
- Equivalent to
this :<>= that
Value parameters
- that
-
the Data to connect from
Attributes
- Inherited from:
- Data
- Source
- Data.scala
The "bulk connect operator", assigning elements in this Vec from elements in a Vec.
The "bulk connect operator", assigning elements in this Vec from elements in a Vec.
For chisel3._, uses the chisel3.internal.BiConnect algorithm; sub-elements of thatmay end up driving sub-elements ofthis`
- Complicated semantics, hard to write quickly, will likely be deprecated in the future
For Chisel._, emits the FIRRTL.<- operator
- Equivalent to
this :<>= thatwithout the restrictions that bundle field names and vector sizes must match
Value parameters
- that
-
the Data to connect from
Attributes
- Inherited from:
- Data
- Source
- Data.scala
Logical
Logical and operator
Logical and operator
Value parameters
- that
-
a hardware element
Attributes
- Returns
-
the logical and of this element and
that - Note
-
this is equivalent to Bool.&
- Inherited from:
- BoolIntf (hidden)
- Source
- BitsIntf.scala
Logical or operator
Logical or operator
Value parameters
- that
-
a hardware element
Attributes
- Returns
-
the logical or of this element and
that - Note
-
this is equivalent to Bool.|)
- Inherited from:
- BoolIntf (hidden)
- Source
- BitsIntf.scala
Value members
Concrete methods
Convert to a scala.Boolean
Convert to a scala.Option of scala.Boolean
Returns a string representation of the object.
Returns a string representation of the object.
The default representation is platform dependent.
Attributes
- Returns
-
a string representation of the object.
- Definition Classes
-
UInt -> Any
- Source
- Bits.scala
Give this Bool a stable typeName for Verilog name generation. Specifying a Bool's width in its type name isn't necessary
Give this Bool a stable typeName for Verilog name generation. Specifying a Bool's width in its type name isn't necessary
Attributes
- Definition Classes
- Source
- Bits.scala
Inherited methods
Attributes
- Definition Classes
-
UIntIntf
- Inherited from:
- UIntIntf (hidden)
- Source
- BitsIntf.scala
Attributes
- Definition Classes
-
UIntIntf
- Inherited from:
- UIntIntf (hidden)
- Source
- BitsIntf.scala
Attributes
- Definition Classes
-
UIntIntf
- Inherited from:
- UIntIntf (hidden)
- Source
- BitsIntf.scala
Attributes
- Definition Classes
-
UIntIntf
- Inherited from:
- UIntIntf (hidden)
- Source
- BitsIntf.scala
Attributes
- Definition Classes
-
UIntIntf
- Inherited from:
- UIntIntf (hidden)
- Source
- BitsIntf.scala
Attributes
- Definition Classes
-
UIntIntf
- Inherited from:
- UIntIntf (hidden)
- Source
- BitsIntf.scala
Attributes
- Definition Classes
-
UIntIntf
- Inherited from:
- UIntIntf (hidden)
- Source
- BitsIntf.scala
Attributes
- Definition Classes
-
UIntIntf
- Inherited from:
- UIntIntf (hidden)
- Source
- BitsIntf.scala
Attributes
- Definition Classes
-
UIntIntf
- Inherited from:
- UIntIntf (hidden)
- Source
- BitsIntf.scala
Attributes
- Definition Classes
-
UIntIntf
- Inherited from:
- UIntIntf (hidden)
- Source
- BitsIntf.scala
Attributes
- Definition Classes
-
UIntIntf
- Inherited from:
- UIntIntf (hidden)
- Source
- BitsIntf.scala
Attributes
- Definition Classes
-
UIntIntf
- Inherited from:
- UIntIntf (hidden)
- Source
- BitsIntf.scala
Attributes
- Definition Classes
-
UIntIntf
- Inherited from:
- UIntIntf (hidden)
- Source
- BitsIntf.scala
Attributes
- Definition Classes
-
UIntIntf
- Inherited from:
- UIntIntf (hidden)
- Source
- BitsIntf.scala
Attributes
- Definition Classes
-
UIntIntf
- Inherited from:
- UIntIntf (hidden)
- Source
- BitsIntf.scala
Attributes
- Inherited from:
- UIntIntf (hidden)
- Source
- BitsIntf.scala
Returns a subset of bits on this element from hi to lo (inclusive), statically addressed.
Returns a subset of bits on this element from hi to lo (inclusive), statically addressed.
Value parameters
- x
-
the high bit
- y
-
the low bit
Attributes
- Returns
-
a hardware component contain the requested bits
- Example
-
myBits = 0x5 = 0b101 myBits(1,0) => 0b01 // extracts the two least significant bits - Inherited from:
- BitsIntf (hidden)
- Source
- BitsIntf.scala
Returns a subset of bits on this element from hi to lo (inclusive), statically addressed.
Returns a subset of bits on this element from hi to lo (inclusive), statically addressed.
Value parameters
- x
-
the high bit
- y
-
the low bit
Attributes
- Returns
-
a hardware component contain the requested bits
- Example
-
myBits = 0x5 = 0b101 myBits(1,0) => 0b01 // extracts the two least significant bits - Inherited from:
- BitsIntf (hidden)
- Source
- BitsIntf.scala
Returns the specified bit on this wire as a Bool, dynamically addressed.
Returns the specified bit on this wire as a Bool, dynamically addressed.
Value parameters
- x
-
a hardware component whose value will be used for dynamic addressing
Attributes
- Returns
-
the specified bit
- Inherited from:
- BitsIntf (hidden)
- Source
- BitsIntf.scala
Returns the specified bit on this element as a Bool, statically addressed.
Returns the specified bit on this element as a Bool, statically addressed.
Value parameters
- x
-
an index
Attributes
- Returns
-
the specified bit
- Inherited from:
- BitsIntf (hidden)
- Source
- BitsIntf.scala
Attributes
- Inherited from:
- BoolIntf (hidden)
- Source
- BitsIntf.scala
Attributes
- Definition Classes
-
BoolIntf -> ToBoolable
- Inherited from:
- BoolIntf (hidden)
- Source
- BitsIntf.scala
Returns the contents of this wire as a scala.collection.Seq of Bool.
Returns the contents of this wire as a scala.collection.Seq of Bool.
Attributes
- Inherited from:
- BitsIntf (hidden)
- Source
- BitsIntf.scala
Reinterprets this element as a clock
Reinterprets this element as a clock
Attributes
- Inherited from:
- BoolIntf (hidden)
- Source
- BitsIntf.scala
Attributes
- Inherited from:
- ResetIntf (hidden)
- Source
- BitsIntf.scala
Attributes
- Definition Classes
-
UIntIntf
- Inherited from:
- UIntIntf (hidden)
- Source
- BitsIntf.scala
Does a reinterpret cast of the bits in this node into the format that provides. Returns a new Wire of that type. Does not modify existing nodes.
Does a reinterpret cast of the bits in this node into the format that provides. Returns a new Wire of that type. Does not modify existing nodes.
x.asTypeOf(that) performs the inverse operation of x := that.toBits.
Attributes
- Note
-
bit widths are NOT checked, may pad or drop bits from input
that should have known widths
- Inherited from:
- DataIntf (hidden)
- Source
- DataIntf.scala
Reinterpret cast to UInt.
Reinterpret cast to UInt.
Attributes
- Note
-
value not guaranteed to be preserved: for example, a SInt of width 3 and value -1 (0b111) would become an UInt with value 7
Aggregates are recursively packed with the first element appearing in the least-significant bits of the result.
- Inherited from:
- DataIntf (hidden)
- Source
- DataIntf.scala
Takes the last seed suggested. Multiple calls to this function will take the last given seed, unless this HasId is a module port (see overridden method in Data.scala).
Takes the last seed suggested. Multiple calls to this function will take the last given seed, unless this HasId is a module port (see overridden method in Data.scala).
If the final computed name conflicts with the final name of another signal, the final name may get uniquified by appending a digit at the end of the name.
Is a lower priority than suggestName, in that regardless of whether autoSeed was called, suggestName will always take precedence if it was called.
Value parameters
- seed
-
Seed for the name of this component
Attributes
- Returns
-
this object
- Definition Classes
-
Data -> HasId
- Inherited from:
- Data
- Source
- Data.scala
Conditionally set or clear a bit
Conditionally set or clear a bit
Value parameters
- dat
-
set if true, clear if false
- off
-
a dynamic offset
Attributes
- Returns
-
a hrdware $coll with bit
offset or cleared based on the value ofdat$unchangedWidth - Inherited from:
- UIntIntf (hidden)
- Source
- BitsIntf.scala
Internal API; Chisel users should look at chisel3.chiselTypeOf(...).
Internal API; Chisel users should look at chisel3.chiselTypeOf(...).
cloneType must be defined for any Chisel object extending Data. It is responsible for constructing a basic copy of the object being cloned.
Attributes
- Returns
-
a copy of the object.
- Inherited from:
- Bits
- Source
- Bits.scala
Attributes
- Definition Classes
- Inherited from:
- Element
- Source
- Element.scala
Compares the receiver object (this) with the argument object (that) for equivalence.
Compares the receiver object (this) with the argument object (that) for equivalence.
Any implementation of this method should be an equivalence relation:
- It is reflexive: for any instance
xof typeAny,x.equals(x)should returntrue. - It is symmetric: for any instances
xandyof typeAny,x.equals(y)should returntrueif and only ify.equals(x)returnstrue. - It is transitive: for any instances
x,y, andzof typeAnyifx.equals(y)returnstrueandy.equals(z)returnstrue, thenx.equals(z)should returntrue.
If you override this method, you should verify that your implementation remains an equivalence relation. Additionally, when overriding this method it is usually necessary to override hashCode to ensure that objects which are "equal" (o1.equals(o2) returns true) hash to the same scala.Int. (o1.hashCode.equals(o2.hashCode)).
Value parameters
- that
-
the object to compare against this object for equality.
Attributes
- Returns
-
trueif the receiver object is equivalent to the argument;falseotherwise. - Definition Classes
-
HasId -> Any
- Inherited from:
- HasId (hidden)
- Source
- Builder.scala
Returns the specified bit on this wire as a Bool, dynamically addressed.
Returns the specified bit on this wire as a Bool, dynamically addressed.
Value parameters
- x
-
a hardware component whose value will be used for dynamic addressing
Attributes
- Returns
-
the specified bit
- Inherited from:
- BitsIntf (hidden)
- Source
- BitsIntf.scala
Returns the specified bit on this element as a Bool, statically addressed.
Returns the specified bit on this element as a Bool, statically addressed.
Value parameters
- x
-
an index
Attributes
- Returns
-
the specified bit
- Inherited from:
- BitsIntf (hidden)
- Source
- BitsIntf.scala
Returns the width, in bits, if currently known.
Attributes
- Returns
-
Whether either autoName or suggestName has been called
- Inherited from:
- HasId (hidden)
- Source
- Builder.scala
Calculates a hash code value for the object.
Calculates a hash code value for the object.
The default hashing algorithm is platform dependent.
Note that it is allowed for two objects to have identical hash codes (o1.hashCode.equals(o2.hashCode)) yet not be equal (o1.equals(o2) returns false). A degenerate implementation could always return 0. However, it is required that if two objects are equal (o1.equals(o2) returns true) that they have identical hash codes (o1.hashCode.equals(o2.hashCode)). Therefore, when overriding this method, be sure to verify that the behavior is consistent with the equals method.
Attributes
- Returns
-
the hash code value for this object.
- Definition Classes
-
HasId -> Any
- Inherited from:
- HasId (hidden)
- Source
- Builder.scala
Logical implication
Logical implication
Value parameters
- that
-
a boolean signal
Attributes
- Returns
-
|| that
- Inherited from:
- BoolIntf (hidden)
- Source
- BitsIntf.scala
Attributes
- Inherited from:
- HasId (hidden)
- Source
- Builder.scala
Attributes
- Inherited from:
- Data
- Source
- Data.scala
Returns whether the width is currently known.
If this is a literal that is representable as bits, returns the value as a BigInt. If not a literal, or not representable as bits (for example, is or contains Analog), returns None.
If this is a literal that is representable as bits, returns the value as a BigInt. If not a literal, or not representable as bits (for example, is or contains Analog), returns None.
Attributes
- Definition Classes
- Inherited from:
- Element
- Source
- Element.scala
Returns the literal value if this is a literal that is representable as bits, otherwise crashes.
Returns the literal value if this is a literal that is representable as bits, otherwise crashes.
Attributes
- Inherited from:
- Data
- Source
- Data.scala
Attributes
- Inherited from:
- Element
- Source
- Element.scala
Attributes
- Inherited from:
- HasId (hidden)
- Source
- Builder.scala
Attributes
- Inherited from:
- HasId (hidden)
- Source
- Builder.scala
Attributes
- Inherited from:
- HasId (hidden)
- Source
- Builder.scala
Attributes
- Inherited from:
- UIntIntf (hidden)
- Source
- BitsIntf.scala
Circular shift to the left
Circular shift to the left
Value parameters
- that
-
number of bits to rotate
Attributes
- Returns
-
UInt of same width rotated left n bits
- Inherited from:
- UIntIntf (hidden)
- Source
- BitsIntf.scala
Attributes
- Inherited from:
- UIntIntf (hidden)
- Source
- BitsIntf.scala
Circular shift to the right
Circular shift to the right
Value parameters
- that
-
number of bits to rotate
Attributes
- Returns
-
UInt of same width rotated right n bits
- Inherited from:
- UIntIntf (hidden)
- Source
- BitsIntf.scala
Takes the first seed suggested. Multiple calls to this function will be ignored. If the final computed name conflicts with another name, it may get uniquified by appending a digit at the end.
Takes the first seed suggested. Multiple calls to this function will be ignored. If the final computed name conflicts with another name, it may get uniquified by appending a digit at the end.
Is a higher priority than autoSeed, in that regardless of whether autoSeed was called, suggestName will always take precedence.
Value parameters
- seed
-
The seed for the name of this component
Attributes
- Returns
-
this object
- Inherited from:
- HasId (hidden)
- Source
- Builder.scala
Grab the bottom n bits. Return 0.U(0.W) if n==0.
Grab the bottom n bits. Return 0.U(0.W) if n==0.
Attributes
- Inherited from:
- BitsIntf (hidden)
- Source
- BitsIntf.scala
Returns a FIRRTL IsMember that refers to the absolute path to this object in the elaborated hardware graph
Returns a FIRRTL IsMember that refers to the absolute path to this object in the elaborated hardware graph
Attributes
- Inherited from:
- NamedComponent (hidden)
- Source
- Builder.scala
Returns a FIRRTL ComponentName that references this object
Returns a FIRRTL ComponentName that references this object
Attributes
- Note
-
Should not be called until circuit elaboration is complete
- Inherited from:
- NamedComponent (hidden)
- Source
- Builder.scala
Default print as Decimal
Returns a FIRRTL ReferenceTarget that references this object, relative to an optional root.
Returns a FIRRTL ReferenceTarget that references this object, relative to an optional root.
If root is defined, the target is a hierarchical path starting from root.
If root is not defined, the target is a hierarchical path equivalent to toAbsoluteTarget.
Attributes
- Note
-
If
rootis defined, and has not finished elaboration, this must be called withinatModuleBodyEnd.The NamedComponent must be a descendant of
root, if it is defined.This doesn't have special handling for Views.
- Inherited from:
- NamedComponent (hidden)
- Source
- Builder.scala
Returns a FIRRTL ReferenceTarget that references this object, relative to an optional root.
Returns a FIRRTL ReferenceTarget that references this object, relative to an optional root.
If root is defined, the target is a hierarchical path starting from root.
If root is not defined, the target is a hierarchical path equivalent to toAbsoluteTarget.
Attributes
- Note
-
If
rootis defined, and has not finished elaboration, this must be called withinatModuleBodyEnd.The NamedComponent must be a descendant of
root, if it is defined.This doesn't have special handling for Views.
- Inherited from:
- NamedComponent (hidden)
- Source
- Builder.scala
Returns a FIRRTL ReferenceTarget that references this object
Returns a FIRRTL ReferenceTarget that references this object
Attributes
- Note
-
Should not be called until circuit elaboration is complete
- Inherited from:
- NamedComponent (hidden)
- Source
- Builder.scala
Attributes
- Definition Classes
-
BoolIntf
- Inherited from:
- BoolIntf (hidden)
- Source
- BitsIntf.scala
Attributes
- Inherited from:
- Element
- Source
- Element.scala
Returns Some(width) if the width is known, else None.
Returns Some(width) if the width is known, else None.
Attributes
- Inherited from:
- Data
- Source
- Data.scala
Zero extend as SInt
Zero extend as SInt
Attributes
- Returns
-
an SInt equal to this $coll with an additional zero in its most significant bit
- Note
-
The width of the returned SInt is
width of this+1. - Inherited from:
- UIntIntf (hidden)
- Source
- BitsIntf.scala