Returns this wire concatenated with other
, where this wire forms the
most significant part and other
forms the least significant part.
Returns this wire concatenated with other
, where this wire forms the
most significant part and other
forms the least significant part.
The width of the output is sum of the inputs.
Returns this wire dynamically left shifted by the specified amount, inserting zeros into the least significant bits.
Returns this wire dynamically left shifted by the specified amount, inserting zeros into the least significant bits.
The width of the output is pow(2, width(other))
larger than the input.
Returns this wire statically left shifted by the specified amount, inserting zeros into the least significant bits.
Returns this wire statically left shifted by the specified amount, inserting zeros into the least significant bits.
The width of the output is other
larger than the input.
Shift left operation
Returns this wire dynamically right shifted by the specified amount, inserting zeros into the most significant bits.
Returns this wire dynamically right shifted by the specified amount, inserting zeros into the most significant bits.
The width of the output is the same as the input.
Returns this wire statically right shifted by the specified amount, inserting zeros into the most significant bits.
Returns this wire statically right shifted by the specified amount, inserting zeros into the most significant bits.
The width of the output is the same as the input.
Shift right operation
Returns a subset of bits on this wire from hi
to lo
(inclusive),
statically addressed.
Returns a subset of bits on this wire from hi
to lo
(inclusive),
statically addressed.
myBits = 0x5 = 0b101 myBits(1,0) => 0b01 // extracts the two least significant bits
Returns the specified bit on this wire as a Bool, dynamically addressed.
Returns the specified bit on this wire as a Bool, statically addressed.
Returns the specified bit on this wire as a Bool, statically addressed.
convenience method allowing direct use of Ints without implicits
Returns the specified bit on this wire as a Bool, statically addressed.
Reinterpret cast as a FixedPoint.
Reinterpret cast as a FixedPoint.
value not guaranteed to be preserved: for example, an UInt of width 3 and value 7 (0b111) would become a FixedInt with value -1, the interpretation of the number is also affected by the specified binary point. Caution advised
Reinterpret cast to a SInt.
Reinterpret cast to a SInt.
value not guaranteed to be preserved: for example, an UInt of width 3 and value 7 (0b111) would become a SInt with value -1
Does a reinterpret cast of the bits in this node into the format that provides.
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.
that should have known widths
,bit widths are NOT checked, may pad or drop bits from input
Reinterpret cast to UInt.
Reinterpret cast to UInt.
Aggregates are recursively packed with the first element appearing in the least-significant bits of the result.
,value not guaranteed to be preserved: for example, a SInt of width 3 and value -1 (0b111) would become an UInt with value 7
chiselCloneType is called at the top-level of a clone chain.
chiselCloneType is called at the top-level of a clone chain. It calls the client's cloneType() method to construct a basic copy of the object being cloned, then performs any fixups required to reconstruct the appropriate core state of the cloned object.
a copy of the object with appropriate core state.
cloneType must be defined for any Chisel object extending Data.
cloneType must be defined for any Chisel object extending Data. It is responsible for constructing a basic copy of the object being cloned. If cloneType needs to recursively clone elements of an object, it should call the cloneType methods on those elements.
a copy of the object.
Returns the width, in bits, if currently known.
Returns the width, in bits, if currently known.
java.util.NoSuchElementException
if the width is not known.
Returns whether the width is currently known.
Returns whether the width is currently known.
Returns this wire zero padded up to the specified width.
Returns this wire zero padded up to the specified width.
for SInts only, this does sign extension
Casts this object to a Bool
Casts this object to a Bool
Width must be known and equal to 1
Default print as Decimal
Returns this wire bitwise-inverted.
Returns Some(width) if the width is known, else None.
Returns Some(width) if the width is known, else None.
Reinterpret cast to Bits.
Reinterpret cast to Bits.
(Since version chisel3) Use asUInt, which does the same thing but returns a more concrete type
Packs the value of this object as plain Bits.
Packs the value of this object as plain Bits.
This performs the inverse operation of fromBits(Bits).
(Since version chisel3) Best alternative, .asUInt()
(Since version chisel3) Use asSInt, which makes the reinterpret cast more explicit
(Since version chisel3) Use asUInt, which makes the reinterpret cast more explicit
A data type for values represented by a single bitvector. Provides basic bitwise operations.