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.
Outputs the product of this
and b
.
Outputs the product of this
and b
. The resulting width is the sum of
the operands.
can generate a single-cycle multiplier, which can result in significant cycle time and area costs
Outputs the sum of this
and b
.
Outputs the sum of this
and b
. The resulting width is the max of the
operands plus 1 (should not overflow).
add (no growth) operator
add (width +1) operator
Outputs the difference of this
and b
.
Outputs the difference of this
and b
. The resulting width is the max
of the operands plus 1 (should not overflow).
subtract (no growth) operator
subtract (width +1) operator
Outputs the quotient of this
and b
.
Outputs the quotient of this
and b
.
TODO: full rules
Outputs true if this
< b
.
Outputs true if this
< b
.
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
Shift left operation
Outputs true if this
<= b
.
Outputs true if this
<= b
.
Outputs true if this
> b
.
Outputs true if this
> b
.
Outputs true if this
>= b
.
Outputs true if this
>= b
.
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
Shift right operation
Outputs the absolute value of this
.
Outputs the absolute value of this
. The resulting width is the unchanged
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.
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.
Return the binding for some bits.
Return the binding for some bits.
add (default - no growth) operator
subtract (default - no growth) operator
Returns this wire bitwise-inverted.
Creates an new instance of this type, unpacking the input Bits into structured data.
Creates an new instance of this type, unpacking the input Bits into structured data.
This performs the inverse operation of toBits.
what fromBits assigs to must have known widths
,does NOT check bit widths, may drop bits during assignment
,does NOT assign to the object this is called on, instead creates and returns a NEW object (useful in a clone-and-assign scenario)
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.
Outputs the maximum of this
and b
.
Outputs the maximum of this
and b
. The resulting width is the max of
the operands.
Outputs the minimum of this
and b
.
Outputs the minimum of this
and b
. The resulting width is the max of
the operands.
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
Default print as Decimal
Returns this wire bitwise-inverted.
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.
(Since version chisel3) Use '=/=', which avoids potential precedence problems
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