Strong bulk connect, assigning elements in this Vec from elements in a Seq.
Strong bulk connect, assigning elements in this Vec from elements in a Seq.
the length of this Vec must match the length of the input Seq
Strong bulk connect, assigning elements in this Vec from elements in a Seq.
Strong bulk connect, assigning elements in this Vec from elements in a Seq.
the length of this Vec must match the length of the input Seq
Creates a statically indexed read or write accessor into the array.
Creates a statically indexed read or write accessor into the array.
Creates a dynamically indexed read or write accessor into the array.
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.
Outputs true if the vector contains at least one element equal to x (using the === operator).
Outputs true if the vector contains at least one element equal to x (using the === operator).
Outputs the number of elements for which p is true.
Outputs the number of elements for which p is true.
Outputs true if p outputs true for at least one element.
Outputs true if p outputs true for at least one element.
Outputs true if p outputs true for every element.
Outputs true if p outputs true for every element.
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 a Seq of the immediate contents of this Aggregate, in order.
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.
Outputs the index of the first element for which p outputs true.
Outputs the index of the first element for which p outputs true.
Returns whether the width is currently known.
Returns whether the width is currently known.
Outputs the index of the last element for which p outputs true.
Outputs the index of the last element for which p outputs true.
Outputs the index of the element for which p outputs true, assuming that the there is exactly one such element.
Outputs the index of the element for which p outputs true, assuming that the there is exactly one such element.
The implementation may be more efficient than a priority mux, but incorrect results are possible if there is not exactly one true element.
the assumption that there is only one element for which p outputs true is NOT checked (useful in cases where the condition doesn't always hold, but the results are not used in those cases)
(Changed in version 2.9.0) The behavior of scanRight
has changed. The previous behavior can be reproduced with scanRight.reverse.
Default "pretty-print" implementation Analogous to printing a Seq Results in "Vec(elt0, elt1, ...)"
(Changed in version 2.9.0) transpose
throws an IllegalArgumentException
if collections are not uniformly sized.
Returns Some(width) if the width is known, else None.
Returns Some(width) if the width is known, else None.
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()
A vector (array) of Data elements. Provides hardware versions of various collection transformation functions found in software array implementations.
Careful consideration should be given over the use of Vec vs Seq or some other scala collection. In general Vec only needs to be used when there is a need to express the hardware collection in a Reg or IO Bundle or when access to elements of the array is indexed via a hardware signal.
Example of indexing into a Vec using a hardware address and where the Vec is defined in an IO Bundle
type of elements