Vec

chisel3.Vec
See theVec companion object
sealed class Vec[T <: Data] extends Aggregate, VecLike[T]

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

  val io = IO(new Bundle {
    val in = Input(Vec(20, UInt(16.W)))
    val addr = Input(UInt(5.W))
    val out = Output(UInt(16.W))
  })
  io.out := io.in(io.addr)

Type parameters

T

type of elements

Attributes

Note
  • when multiple conflicting assignments are performed on a Vec element, the last one takes effect (unlike Mem, where the result is undefined)
  • Vecs, unlike classes in Scala's collection library, are propagated intact to FIRRTL as a vector type, which may make debugging easier
Companion
object
Source
Aggregate.scala
Graph
Supertypes
trait VecLike[T]
trait IndexedSeq[T]
trait IndexedSeqOps[T, IndexedSeq, IndexedSeq[T]]
trait IndexedSeq[T]
trait IndexedSeqOps[T, IndexedSeq, IndexedSeq[T]]
trait Seq[T]
trait SeqOps[T, IndexedSeq, IndexedSeq[T]]
trait Seq[T]
trait Equals
trait SeqOps[T, IndexedSeq, IndexedSeq[T]]
trait PartialFunction[Int, T]
trait Int => T
trait Iterable[T]
trait Iterable[T]
trait IterableFactoryDefaults[T, IndexedSeq]
trait IterableOps[T, IndexedSeq, IndexedSeq[T]]
trait IterableOnceOps[T, IndexedSeq, IndexedSeq[T]]
trait IterableOnce[T]
trait Aggregate
class Data
trait InstanceId
class Object
trait Matchable
class Any
Show all

Members list

Grouped members

connection

def :#=(producer: DontCare.type)(implicit sourceInfo: SourceInfo): Unit
Implicitly added by ConnectableVecDefault

$colonHashEq

$colonHashEq

Value parameters

producer

the right-hand-side of the connection, all members will be driving, none will be driven-to

Attributes

Inherited from:
ConnectableVecOperators
Source
package.scala
def :#=(producer: Seq[T])(implicit sourceInfo: SourceInfo): Unit
Implicitly added by ConnectableVecDefault

$colonHashEq

$colonHashEq

Value parameters

producer

the right-hand-side of the connection, all members will be driving, none will be driven-to

Attributes

Inherited from:
ConnectableVecOperators
Source
package.scala
def :<=(producer: Seq[T])(implicit sourceInfo: SourceInfo): Unit
Implicitly added by ConnectableVecDefault

$colonLessEq

$colonLessEq

Value parameters

producer

the right-hand-side of the connection; will always drive leaf connections, and never get driven by leaf connections ("aligned connection")

Attributes

Inherited from:
ConnectableVecOperators
Source
package.scala
def :<>=(producer: Seq[T])(implicit sourceInfo: SourceInfo): Unit
Implicitly added by ConnectableVecDefault

$colonLessGreaterEq

$colonLessGreaterEq

Value parameters

producer

the right-hand-side of the connection

Attributes

Inherited from:
ConnectableVecOperators
Source
package.scala
def :>=(producer: Seq[T])(implicit sourceInfo: SourceInfo): Unit
Implicitly added by ConnectableVecDefault

$colonGreaterEq

$colonGreaterEq

Value parameters

producer

the right-hand-side of the connection; will always be driven by leaf connections, and never drive leaf connections ("flipped connection")

Attributes

Inherited from:
ConnectableVecOperators
Source
package.scala
def :=(that: Seq[T])(implicit sourceInfo: SourceInfo): Unit

"The strong connect operator", assigning elements in this Vec from elements in a Seq.

"The strong connect operator", assigning elements in this Vec from elements in a Seq.

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

Attributes

Note

the length of this Vec must match the length of the input Seq

Source
Aggregate.scala
def :=(that: Vec[T])(implicit sourceInfo: SourceInfo): Unit

"The strong connect operator", assigning elements in this Vec from elements in a Vec.

"The strong connect operator", assigning elements in this Vec from elements in a Vec.

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, with the additional restriction that the relative bundle field flips must match

Attributes

Note

This is necessary in Aggregate, rather than relying on Data.:=, due to supporting the Seq

the length of this Vec must match the length of the input Vec

Source
Aggregate.scala
final def :=(that: => Data)(implicit sourceInfo: SourceInfo): Unit

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
def <>(that: Seq[T])(implicit sourceInfo: SourceInfo): Unit

The "bulk connect operator", assigning elements in this Vec from elements in a Seq.

The "bulk connect operator", assigning elements in this Vec from elements in a Seq.

For chisel3._, uses the chisel3.internal.BiConnect algorithm; sub-elements of that may end up driving sub-elements of this

  • Complicated semantics, will likely be deprecated in the future

For Chisel._, emits the FIRRTL.<- operator

  • Equivalent to this :<>= that but bundle field names and vector sizes do not have to match

Value parameters

that

the Seq to connect from

Attributes

Note

the length of this Vec and that Seq must match

Source
Aggregate.scala
def <>(that: Vec[T])(implicit sourceInfo: SourceInfo): Unit

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 that may end up driving sub-elements of this

  • See docs/src/explanations/connection-operators.md for details

For Chisel._, emits the FIRRTL.<- operator

  • Equivalent to this :<>= that without the restrictions that bundle field names and vector sizes must match

Value parameters

that

the Vec to connect from

Attributes

Note

This is necessary in Aggregate, rather than relying on Data.&lt;&gt;, due to supporting the Seq

the length of this Vec and that Vec must match

Source
Aggregate.scala
final def <>(that: => Data)(implicit sourceInfo: SourceInfo): Unit

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 :<>= that without 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

Value members

Concrete methods

def apply(idx: Int): T

Creates a statically indexed read or write accessor into the array.

Creates a statically indexed read or write accessor into the array.

Attributes

Source
Aggregate.scala
override def cloneType: this.type

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.

Definition Classes
Source
Aggregate.scala
override def containsAFlipped: Boolean

Attributes

Definition Classes
Source
Aggregate.scala
override def getElements: Seq[Data]

Returns a Seq of the immediate contents of this Aggregate, in order.

Returns a Seq of the immediate contents of this Aggregate, in order.

Attributes

Definition Classes
Source
Aggregate.scala

Default "pretty-print" implementation Analogous to printing a Seq Results in "Vec(elt0, elt1, ...)"

Default "pretty-print" implementation Analogous to printing a Seq Results in "Vec(elt0, elt1, ...)"

Attributes

Source
Aggregate.scala
override def toString: String

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
Seq -> Function1 -> Iterable -> Any
Source
Aggregate.scala
override def typeName: String

Give this Vec a default, stable desired name using the supplied Data generator's typeName

Give this Vec a default, stable desired name using the supplied Data generator's typeName

Attributes

Definition Classes
Source
Aggregate.scala

Inherited methods

final def ++[B >: T](suffix: IterableOnce[B]): IndexedSeq[B]

Attributes

Inherited from:
IterableOps
final override def ++:[B >: T](prefix: IterableOnce[B]): IndexedSeq[B]

Attributes

Definition Classes
SeqOps -> IterableOps
Inherited from:
SeqOps
final def +:[B >: T](elem: B): IndexedSeq[B]

Attributes

Inherited from:
SeqOps
final def :+[B >: T](elem: B): IndexedSeq[B]

Attributes

Inherited from:
SeqOps
final def :++[B >: T](suffix: IterableOnce[B]): IndexedSeq[B]

Attributes

Inherited from:
SeqOps
override protected def _fromUInt(that: UInt)(implicit sourceInfo: SourceInfo): Data

Return a value of this type from a UInt type. Internal implementation for asTypeOf.

Return a value of this type from a UInt type. Internal implementation for asTypeOf.

Protected so that it can be implemented by the external FixedPoint library

Attributes

Definition Classes
Inherited from:
Aggregate
Source
Aggregate.scala
final def addString(b: StringBuilder): b.type

Attributes

Inherited from:
IterableOnceOps
final def addString(b: StringBuilder, sep: String): b.type

Attributes

Inherited from:
IterableOnceOps
def addString(b: StringBuilder, start: String, sep: String, end: String): b.type

Attributes

Inherited from:
IterableOnceOps
def andThen[C](k: PartialFunction[T, C]): PartialFunction[Int, C]

Attributes

Inherited from:
PartialFunction
override def andThen[C](k: T => C): PartialFunction[Int, C]

Attributes

Definition Classes
PartialFunction -> Function1
Inherited from:
PartialFunction
def appended[B >: T](elem: B): IndexedSeq[B]

Attributes

Inherited from:
SeqOps
def appendedAll[B >: T](suffix: IterableOnce[B]): IndexedSeq[B]

Attributes

Inherited from:
SeqOps
def apply(p: UInt)(using SourceInfo): T

Attributes

Inherited from:
VecIntf (hidden)
Source
AggregateIntf.scala
def applyOrElse[A1 <: Int, B1 >: T](x: A1, default: A1 => B1): B1

Attributes

Inherited from:
PartialFunction
def asTypeOf[T <: Data](that: T)(using SourceInfo): T

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
def asUInt: UInt

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
override def autoSeed(name: String): Data.this.type

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
override def canEqual(that: Any): Boolean

Attributes

Definition Classes
IndexedSeq -> Seq -> Equals
Inherited from:
IndexedSeq
protected def checkingLitOption(checkForDontCares: Boolean): Option[BigInt]

Attributes

Inherited from:
Aggregate
Source
Aggregate.scala
def collect[B](pf: PartialFunction[T, B]): IndexedSeq[B]

Attributes

Inherited from:
IterableOps
def collectFirst[B](pf: PartialFunction[T, B]): Option[B]

Attributes

Inherited from:
IterableOnceOps
def combinations(n: Int): Iterator[IndexedSeq[T]]

Attributes

Inherited from:
SeqOps
def compose[R](k: PartialFunction[R, Int]): PartialFunction[R, T]

Attributes

Inherited from:
PartialFunction
def compose[A](g: A => Int): A => T

Attributes

Inherited from:
Function1
final override def concat[B >: T](suffix: IterableOnce[B]): IndexedSeq[B]

Attributes

Definition Classes
SeqOps -> IterableOps
Inherited from:
SeqOps
def contains[A1 >: T](elem: A1): Boolean

Attributes

Inherited from:
SeqOps
def contains(x: T)(using SourceInfo, T <:< UInt): Bool

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).

Attributes

Inherited from:
VecLikeImpl (hidden)
Source
AggregateIntf.scala
def containsSlice[B >: T](that: Seq[B]): Boolean

Attributes

Inherited from:
SeqOps
def copyToArray[B >: T](xs: Array[B], start: Int, len: Int): Int

Attributes

Inherited from:
IterableOnceOps
def copyToArray[B >: T](xs: Array[B], start: Int): Int

Attributes

Inherited from:
IterableOnceOps
def copyToArray[B >: T](xs: Array[B]): Int

Attributes

Inherited from:
IterableOnceOps
def corresponds[B](that: IterableOnce[B])(p: (T, B) => Boolean): Boolean

Attributes

Inherited from:
IterableOnceOps
def corresponds[B](that: Seq[B])(p: (T, B) => Boolean): Boolean

Attributes

Inherited from:
SeqOps
def count(p: T => Boolean): Int

Attributes

Inherited from:
IterableOnceOps
def count(p: T => Bool)(using SourceInfo): UInt

Outputs the number of elements for which p is true.

Outputs the number of elements for which p is true.

Attributes

Inherited from:
VecLikeImpl (hidden)
Source
AggregateIntf.scala
def diff[B >: T](that: Seq[B]): IndexedSeq[T]

Attributes

Inherited from:
SeqOps
def distinct: IndexedSeq[T]

Attributes

Inherited from:
SeqOps
def distinctBy[B](f: T => B): IndexedSeq[T]

Attributes

Inherited from:
SeqOps
override def drop(n: Int): IndexedSeq[T]

Attributes

Definition Classes
IndexedSeqOps -> IterableOps -> IterableOnceOps
Inherited from:
IndexedSeqOps
override def dropRight(n: Int): IndexedSeq[T]

Attributes

Definition Classes
IndexedSeqOps -> IterableOps
Inherited from:
IndexedSeqOps
def dropWhile(p: T => Boolean): IndexedSeq[T]

Attributes

Inherited from:
IterableOps
def elementWise: ElementWiseExtractor[Int, T]

Attributes

Inherited from:
PartialFunction
override def empty: IndexedSeq[T]

Attributes

Definition Classes
IterableFactoryDefaults -> IterableOps
Inherited from:
IterableFactoryDefaults
def endsWith[B >: T](that: Iterable[B]): Boolean

Attributes

Inherited from:
SeqOps
override def equals(that: Any): Boolean

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 x of type Any, x.equals(x) should return true.
  • It is symmetric: for any instances x and y of type Any, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any instances x, y, and z of type Any if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.

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

true if the receiver object is equivalent to the argument; false otherwise.

Definition Classes
VecLike -> HasId -> Seq -> Equals -> Any
Inherited from:
VecLike
Source
Aggregate.scala
def exists(p: T => Boolean): Boolean

Attributes

Inherited from:
IterableOnceOps
def exists(p: T => Bool)(using SourceInfo): Bool

Outputs true if p outputs true for at least one element.

Outputs true if p outputs true for at least one element.

Attributes

Inherited from:
VecLikeImpl (hidden)
Source
AggregateIntf.scala
def filter(pred: T => Boolean): IndexedSeq[T]

Attributes

Inherited from:
IterableOps
def filterNot(pred: T => Boolean): IndexedSeq[T]

Attributes

Inherited from:
IterableOps
def find(p: T => Boolean): Option[T]

Attributes

Inherited from:
IterableOnceOps
def findLast(p: T => Boolean): Option[T]

Attributes

Inherited from:
SeqOps
def flatMap[B](f: T => IterableOnce[B]): IndexedSeq[B]

Attributes

Inherited from:
IterableOps
def flatten[B](implicit asIterable: T => IterableOnce[B]): IndexedSeq[B]

Attributes

Inherited from:
IterableOps
def fold[A1 >: T](z: A1)(op: (A1, A1) => A1): A1

Attributes

Inherited from:
IterableOnceOps
def foldLeft[B](z: B)(op: (B, T) => B): B

Attributes

Inherited from:
IterableOnceOps
override def foldRight[B](z: B)(op: (T, B) => B): B

Attributes

Definition Classes
IndexedSeqOps -> IterableOnceOps
Inherited from:
IndexedSeqOps
def forall(p: T => Boolean): Boolean

Attributes

Inherited from:
IterableOnceOps
def forall(p: T => Bool)(using SourceInfo): Bool

Outputs true if p outputs true for every element.

Outputs true if p outputs true for every element.

Attributes

Inherited from:
VecLikeImpl (hidden)
Source
AggregateIntf.scala
def foreach[U](f: T => U): Unit

Attributes

Inherited from:
IterableOnceOps
protected def fromSpecific(coll: IterableOnce[T]): IndexedSeq[T]

Attributes

Inherited from:
IterableFactoryDefaults
final def getWidth: Int

Returns the width, in bits, if currently known.

Returns the width, in bits, if currently known.

Attributes

Inherited from:
Data
Source
Data.scala
def groupBy[K](f: T => K): Map[K, IndexedSeq[T]]

Attributes

Inherited from:
IterableOps
def groupMap[K, B](key: T => K)(f: T => B): Map[K, IndexedSeq[B]]

Attributes

Inherited from:
IterableOps
def groupMapReduce[K, B](key: T => K)(f: T => B)(reduce: (B, B) => B): Map[K, B]

Attributes

Inherited from:
IterableOps
def grouped(size: Int): Iterator[IndexedSeq[T]]

Attributes

Inherited from:
IterableOps
def hasSeed: Boolean

Attributes

Returns

Whether either autoName or suggestName has been called

Inherited from:
HasId (hidden)
Source
Builder.scala
override def hashCode: Int

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
VecLike -> HasId -> Seq -> Any
Inherited from:
VecLike
Source
Aggregate.scala
override def head: T

Attributes

Definition Classes
IndexedSeqOps -> IterableOps
Inherited from:
IndexedSeqOps
override def headOption: Option[T]

Attributes

Definition Classes
IndexedSeqOps -> IterableOps
Inherited from:
IndexedSeqOps
def indexOf[B >: T](elem: B): Int

Attributes

Inherited from:
SeqOps
def indexOf[B >: T](elem: B, from: Int): Int

Attributes

Inherited from:
SeqOps
def indexOfSlice[B >: T](that: Seq[B]): Int

Attributes

Inherited from:
SeqOps
def indexOfSlice[B >: T](that: Seq[B], from: Int): Int

Attributes

Inherited from:
SeqOps
def indexWhere(p: T => Boolean): Int

Attributes

Inherited from:
SeqOps
def indexWhere(p: T => Boolean, from: Int): Int

Attributes

Inherited from:
SeqOps
def indexWhere(p: T => Bool)(using SourceInfo): UInt

Outputs the index of the first element for which p outputs true.

Outputs the index of the first element for which p outputs true.

Attributes

Inherited from:
VecLikeImpl (hidden)
Source
AggregateIntf.scala
def indices: Range

Attributes

Inherited from:
SeqOps
def init: IndexedSeq[T]

Attributes

Inherited from:
IterableOps
def inits: Iterator[IndexedSeq[T]]

Attributes

Inherited from:
IterableOps
def instanceName: String

Attributes

Inherited from:
HasId (hidden)
Source
Builder.scala
def intersect[B >: T](that: Seq[B]): IndexedSeq[T]

Attributes

Inherited from:
SeqOps
def isDefinedAt(idx: Int): Boolean

Attributes

Inherited from:
SeqOps
override def isEmpty: Boolean

Attributes

Definition Classes
SeqOps -> IterableOnceOps
Inherited from:
SeqOps
def isLit: Boolean

Attributes

Inherited from:
Data
Source
Data.scala
override def isTraversableAgain: Boolean

Attributes

Definition Classes
IterableOps -> IterableOnceOps
Inherited from:
IterableOps
final def isWidthKnown: Boolean

Returns whether the width is currently known.

Returns whether the width is currently known.

Attributes

Inherited from:
Data
Source
Data.scala
override def iterableFactory: SeqFactory[IndexedSeq]

Attributes

Definition Classes
IndexedSeq -> IndexedSeq -> Seq -> Seq -> Iterable -> Iterable -> IterableOps
Inherited from:
IndexedSeq
def iterator: Iterator[T]

Attributes

Inherited from:
IndexedSeqOps
override def knownSize: Int

Attributes

Definition Classes
IndexedSeqOps -> IterableOnce
Inherited from:
IndexedSeqOps
override def last: T

Attributes

Definition Classes
IndexedSeqOps -> IterableOps
Inherited from:
IndexedSeqOps
def lastIndexOf[B >: T](elem: B, end: Int = ...): Int

Attributes

Inherited from:
SeqOps
def lastIndexOfSlice[B >: T](that: Seq[B]): Int

Attributes

Inherited from:
SeqOps
def lastIndexOfSlice[B >: T](that: Seq[B], end: Int): Int

Attributes

Inherited from:
SeqOps
def lastIndexWhere(p: T => Boolean): Int

Attributes

Inherited from:
SeqOps
def lastIndexWhere(p: T => Boolean, end: Int): Int

Attributes

Inherited from:
SeqOps
def lastIndexWhere(p: T => Bool)(using SourceInfo): UInt

Outputs the index of the last element for which p outputs true.

Outputs the index of the last element for which p outputs true.

Attributes

Inherited from:
VecLikeImpl (hidden)
Source
AggregateIntf.scala
def lastOption: Option[T]

Attributes

Inherited from:
IterableOps
def lazyZip[B](that: Iterable[B]): LazyZip2[T, B, Iterable.this.type]

Attributes

Inherited from:
Iterable
final override def lengthCompare(that: Iterable[_]): Int

Attributes

Definition Classes
IndexedSeqOps -> SeqOps
Inherited from:
IndexedSeqOps
final override def lengthCompare(len: Int): Int

Attributes

Definition Classes
IndexedSeqOps -> SeqOps
Inherited from:
IndexedSeqOps
final def lengthIs: SizeCompareOps

Attributes

Inherited from:
SeqOps
def lift: Int => Option[T]

Attributes

Inherited from:
PartialFunction
override def litOption: Option[BigInt]

Return an Aggregate's literal value if it is a literal, None otherwise. If any element of the aggregate is not a literal (or DontCare), the result isn't a literal.

Return an Aggregate's literal value if it is a literal, None otherwise. If any element of the aggregate is not a literal (or DontCare), the result isn't a literal.

Attributes

Returns

an Aggregate's literal value if it is a literal, None otherwise.

Note

DontCare is allowed and will be replaced with 0. Use litValue to disallow DontCare.

Definition Classes
Inherited from:
Aggregate
Source
Aggregate.scala
override def litValue: BigInt

Return an Aggregate's literal value if it is a literal, otherwise an exception is thrown. If any element of the aggregate is not a literal with a defined width, the result isn't a literal.

Return an Aggregate's literal value if it is a literal, otherwise an exception is thrown. If any element of the aggregate is not a literal with a defined width, the result isn't a literal.

Attributes

Returns

an Aggregate's literal value if it is a literal, exception otherwise.

Definition Classes
Inherited from:
Aggregate
Source
Aggregate.scala
override def map[B](f: T => B): IndexedSeq[B]

Attributes

Definition Classes
IndexedSeqOps -> IterableOps -> IterableOnceOps
Inherited from:
IndexedSeqOps
def max[B >: T](implicit ord: Ordering[B]): T

Attributes

Inherited from:
IterableOnceOps
def maxBy[B](f: T => B)(implicit ord: Ordering[B]): T

Attributes

Inherited from:
IterableOnceOps
def maxByOption[B](f: T => B)(implicit ord: Ordering[B]): Option[T]

Attributes

Inherited from:
IterableOnceOps
def maxOption[B >: T](implicit ord: Ordering[B]): Option[T]

Attributes

Inherited from:
IterableOnceOps
def min[B >: T](implicit ord: Ordering[B]): T

Attributes

Inherited from:
IterableOnceOps
def minBy[B](f: T => B)(implicit ord: Ordering[B]): T

Attributes

Inherited from:
IterableOnceOps
def minByOption[B](f: T => B)(implicit ord: Ordering[B]): Option[T]

Attributes

Inherited from:
IterableOnceOps
def minOption[B >: T](implicit ord: Ordering[B]): Option[T]

Attributes

Inherited from:
IterableOnceOps
final def mkString: String

Attributes

Inherited from:
IterableOnceOps
final def mkString(sep: String): String

Attributes

Inherited from:
IterableOnceOps
final def mkString(start: String, sep: String, end: String): String

Attributes

Inherited from:
IterableOnceOps
protected def newSpecificBuilder: Builder[T, IndexedSeq[T]]

Attributes

Inherited from:
IterableFactoryDefaults
def nonEmpty: Boolean

Attributes

Inherited from:
IterableOnceOps
def onlyIndexWhere(p: T => Bool)(using SourceInfo): UInt

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.

Attributes

Note

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)

Inherited from:
VecLikeImpl (hidden)
Source
AggregateIntf.scala
def orElse[A1 <: Int, B1 >: T](that: PartialFunction[A1, B1]): PartialFunction[A1, B1]

Attributes

Inherited from:
PartialFunction
def padTo[B >: T](len: Int, elem: B): IndexedSeq[B]

Attributes

Inherited from:
SeqOps
def parentModName: String

Attributes

Inherited from:
HasId (hidden)
Source
Builder.scala
def parentPathName: String

Attributes

Inherited from:
HasId (hidden)
Source
Builder.scala
def partition(p: T => Boolean): (IndexedSeq[T], IndexedSeq[T])

Attributes

Inherited from:
IterableOps
def partitionMap[A1, A2](f: T => Either[A1, A2]): (IndexedSeq[A1], IndexedSeq[A2])

Attributes

Inherited from:
IterableOps
def patch[B >: T](from: Int, other: IterableOnce[B], replaced: Int): IndexedSeq[B]

Attributes

Inherited from:
SeqOps
def pathName: String

Attributes

Inherited from:
HasId (hidden)
Source
Builder.scala
def permutations: Iterator[IndexedSeq[T]]

Attributes

Inherited from:
SeqOps
override def prepended[B >: T](elem: B): IndexedSeq[B]

Attributes

Definition Classes
IndexedSeqOps -> SeqOps
Inherited from:
IndexedSeqOps
def prependedAll[B >: T](prefix: IterableOnce[B]): IndexedSeq[B]

Attributes

Inherited from:
SeqOps
def product[B >: T](implicit num: Numeric[B]): B

Attributes

Inherited from:
IterableOnceOps
def reduce[B >: T](op: (B, B) => B): B

Attributes

Inherited from:
IterableOnceOps
def reduceLeft[B >: T](op: (B, T) => B): B

Attributes

Inherited from:
IterableOnceOps
def reduceLeftOption[B >: T](op: (B, T) => B): Option[B]

Attributes

Inherited from:
IterableOnceOps
def reduceOption[B >: T](op: (B, B) => B): Option[B]

Attributes

Inherited from:
IterableOnceOps
def reduceRight[B >: T](op: (T, B) => B): B

Attributes

Inherited from:
IterableOnceOps
def reduceRightOption[B >: T](op: (T, B) => B): Option[B]

Attributes

Inherited from:
IterableOnceOps
def reduceTree(redOp: (T, T) => T, layerOp: T => T = ...)(using SourceInfo): T

A reduce operation in a tree like structure instead of sequentially

A reduce operation in a tree like structure instead of sequentially

Attributes

Example

A pipelined adder tree

val sumOut = inputNums.reduceTree(
 (a: T, b: T) => RegNext(a + b),
 (a: T) => RegNext(a)
)
Inherited from:
VecIntf (hidden)
Source
AggregateIntf.scala
override def reverse: IndexedSeq[T]

Attributes

Definition Classes
IndexedSeqOps -> SeqOps
Inherited from:
IndexedSeqOps
override def reverseIterator: Iterator[T]

Attributes

Definition Classes
IndexedSeqOps -> SeqOps
Inherited from:
IndexedSeqOps
override protected def reversed: Iterable[T]

Attributes

Definition Classes
IndexedSeqOps -> IterableOnceOps
Inherited from:
IndexedSeqOps
def runWith[U](action: T => U): Int => Boolean

Attributes

Inherited from:
PartialFunction
override def sameElements[B >: T](o: IterableOnce[B]): Boolean

Attributes

Definition Classes
IndexedSeq -> SeqOps
Inherited from:
IndexedSeq
def scala$collection$SeqOps$$super$concat[B >: T](suffix: IterableOnce[B]): IndexedSeq[B]

Attributes

Inherited from:
SeqOps
def scala$collection$SeqOps$$super$sizeCompare(that: Iterable[_]): Int

Attributes

Inherited from:
SeqOps

Attributes

Inherited from:
SeqOps

Attributes

Inherited from:
IndexedSeq
def scala$collection$immutable$IndexedSeq$$super$sameElements[B >: T](that: IterableOnce[B]): Boolean

Attributes

Inherited from:
IndexedSeq
def scala$collection$immutable$IndexedSeqOps$$super$slice(from: Int, until: Int): IndexedSeq[T]

Attributes

Inherited from:
IndexedSeqOps
def scan[B >: T](z: B)(op: (B, B) => B): IndexedSeq[B]

Attributes

Inherited from:
IterableOps
def scanLeft[B](z: B)(op: (B, T) => B): IndexedSeq[B]

Attributes

Inherited from:
IterableOps
def scanRight[B](z: B)(op: (T, B) => B): IndexedSeq[B]

Attributes

Inherited from:
IterableOps
override def search[B >: T](elem: B, from: Int, to: Int)(implicit ord: Ordering[B]): SearchResult

Attributes

Definition Classes
IndexedSeqOps -> SeqOps
Inherited from:
IndexedSeqOps
override def search[B >: T](elem: B)(implicit ord: Ordering[B]): SearchResult

Attributes

Definition Classes
IndexedSeqOps -> SeqOps
Inherited from:
IndexedSeqOps
def segmentLength(p: T => Boolean, from: Int): Int

Attributes

Inherited from:
SeqOps
final def segmentLength(p: T => Boolean): Int

Attributes

Inherited from:
SeqOps
final override def size: Int

Attributes

Definition Classes
SeqOps -> IterableOnceOps
Inherited from:
SeqOps
final override def sizeCompare(that: Iterable[_]): Int

Attributes

Definition Classes
SeqOps -> IterableOps
Inherited from:
SeqOps
final override def sizeCompare(otherSize: Int): Int

Attributes

Definition Classes
SeqOps -> IterableOps
Inherited from:
SeqOps
final def sizeIs: SizeCompareOps

Attributes

Inherited from:
IterableOps
override def slice(from: Int, until: Int): IndexedSeq[T]

Attributes

Definition Classes
IndexedSeqOps -> IndexedSeqOps -> IterableOps -> IterableOnceOps
Inherited from:
IndexedSeqOps
def sliding(size: Int, step: Int): Iterator[IndexedSeq[T]]

Attributes

Inherited from:
IterableOps
def sliding(size: Int): Iterator[IndexedSeq[T]]

Attributes

Inherited from:
IterableOps
def sortBy[B](f: T => B)(implicit ord: Ordering[B]): IndexedSeq[T]

Attributes

Inherited from:
SeqOps
def sortWith(lt: (T, T) => Boolean): IndexedSeq[T]

Attributes

Inherited from:
SeqOps
def sorted[B >: T](implicit ord: Ordering[B]): IndexedSeq[T]

Attributes

Inherited from:
SeqOps
def span(p: T => Boolean): (IndexedSeq[T], IndexedSeq[T])

Attributes

Inherited from:
IterableOps
override def splitAt(n: Int): (IndexedSeq[T], IndexedSeq[T])

Attributes

Definition Classes
IterableOps -> IterableOnceOps
Inherited from:
IterableOps
def startsWith[B >: T](that: IterableOnce[B], offset: Int = ...): Boolean

Attributes

Inherited from:
SeqOps
override def stepper[S <: Stepper[_]](implicit shape: StepperShape[T, S]): S & EfficientSplit

Attributes

Definition Classes
IndexedSeqOps -> IterableOnce
Inherited from:
IndexedSeqOps
def suggestName(seed: => String): HasId.this.type

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
def sum[B >: T](implicit num: Numeric[B]): B

Attributes

Inherited from:
IterableOnceOps
def tail: IndexedSeq[T]

Attributes

Inherited from:
IterableOps
def tails: Iterator[IndexedSeq[T]]

Attributes

Inherited from:
IterableOps
override def take(n: Int): IndexedSeq[T]

Attributes

Definition Classes
IndexedSeqOps -> IterableOps -> IterableOnceOps
Inherited from:
IndexedSeqOps
override def takeRight(n: Int): IndexedSeq[T]

Attributes

Definition Classes
IndexedSeqOps -> IterableOps
Inherited from:
IndexedSeqOps
def takeWhile(p: T => Boolean): IndexedSeq[T]

Attributes

Inherited from:
IterableOps
override def tapEach[U](f: T => U): IndexedSeq[T]

Attributes

Definition Classes
IterableOps -> IterableOnceOps
Inherited from:
IterableOps
def to[C1](factory: Factory[T, C1]): C1

Attributes

Inherited from:
IterableOnceOps

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
def toArray[B >: T : ClassTag]: Array[B]

Attributes

Inherited from:
IterableOnceOps
final def toBuffer[B >: T]: Buffer[B]

Attributes

Inherited from:
IterableOnceOps
final override def toIndexedSeq: IndexedSeq[T]

Attributes

Definition Classes
IndexedSeq -> IterableOnceOps
Inherited from:
IndexedSeq
def toList: List[T]

Attributes

Inherited from:
IterableOnceOps
def toMap[K, V](implicit ev: T <:< (K, V)): Map[K, V]

Attributes

Inherited from:
IterableOnceOps
final def toNamed: ComponentName

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
final def toRelativeTarget(root: Option[BaseModule]): ReferenceTarget

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 root is defined, and has not finished elaboration, this must be called within atModuleBodyEnd.

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 root is defined, and has not finished elaboration, this must be called within atModuleBodyEnd.

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
final override def toSeq: Seq.this.type

Attributes

Definition Classes
Seq -> IterableOnceOps
Inherited from:
Seq
def toSet[B >: T]: Set[B]

Attributes

Inherited from:
IterableOnceOps

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
def toVector: Vector[T]

Attributes

Inherited from:
IterableOnceOps
def transpose[B](implicit asIterable: T => Iterable[B]): IndexedSeq[IndexedSeq[B]]

Attributes

Inherited from:
IterableOps
def unapply(a: Int): Option[T]

Attributes

Inherited from:
PartialFunction
def unzip[A1, A2](implicit asPair: T => (A1, A2)): (IndexedSeq[A1], IndexedSeq[A2])

Attributes

Inherited from:
IterableOps
def unzip3[A1, A2, A3](implicit asTriple: T => (A1, A2, A3)): (IndexedSeq[A1], IndexedSeq[A2], IndexedSeq[A3])

Attributes

Inherited from:
IterableOps
def updated[B >: T](index: Int, elem: B): IndexedSeq[B]

Attributes

Inherited from:
SeqOps
override def view: IndexedSeqView[T]

Attributes

Definition Classes
IndexedSeqOps -> SeqOps -> IterableOps
Inherited from:
IndexedSeqOps
final def widthOption: Option[Int]

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
def withFilter(p: T => Boolean): WithFilter[T, IndexedSeq]

Attributes

Inherited from:
IterableOps
def zip[B](that: IterableOnce[B]): IndexedSeq[(T, B)]

Attributes

Inherited from:
IterableOps
def zipAll[A1 >: T, B](that: Iterable[B], thisElem: A1, thatElem: B): IndexedSeq[(A1, B)]

Attributes

Inherited from:
IterableOps
def zipWithIndex: IndexedSeq[(T, Int)]

Attributes

Inherited from:
IterableOps

Deprecated and Inherited methods

final def /:[B](z: B)(op: (B, T) => B): B

Attributes

Deprecated
[Since version 2.13.0] Use foldLeft instead of /:
Inherited from:
IterableOnceOps
final def :\[B](z: B)(op: (T, B) => B): B

Attributes

Deprecated
[Since version 2.13.0] Use foldRight instead of :\\
Inherited from:
IterableOnceOps
def aggregate[B](z: => B)(seqop: (B, T) => B, combop: (B, B) => B): B

Attributes

Deprecated
[Since version 2.13.0] For sequential collections, prefer `foldLeft(z)(seqop)`. For parallel collections, use `ParIterableLike#aggregate`.
Inherited from:
IterableOnceOps
def companion: IterableFactory[IndexedSeq]

Attributes

Deprecated
[Since version 2.13.0] Use iterableFactory instead
Inherited from:
IterableOps
final def copyToBuffer[B >: T](dest: Buffer[B]): Unit

Attributes

Deprecated
[Since version 2.13.0] Use `dest ++= coll` instead
Inherited from:
IterableOnceOps
def hasDefiniteSize: Boolean

Attributes

Deprecated
[Since version 2.13.0] Check .knownSize instead of .hasDefiniteSize for more actionable information (see scaladoc for details)
Inherited from:
IterableOnceOps
final def prefixLength(p: T => Boolean): Int

Attributes

Deprecated
[Since version 2.13.0] Use segmentLength instead of prefixLength
Inherited from:
SeqOps
final def repr: IndexedSeq[T]

Attributes

Deprecated
[Since version 2.13.0] Use coll instead of repr in a collection implementation, use the collection value itself from the outside
Inherited from:
IterableOps
def reverseMap[B](f: T => B): IndexedSeq[B]

Attributes

Deprecated
[Since version 2.13.0] Use .reverseIterator.map(f).to(...) instead of .reverseMap(f)
Inherited from:
SeqOps
def seq: Iterable.this.type

Attributes

Deprecated
[Since version 2.13.0] Iterable.seq always returns the iterable itself
Inherited from:
Iterable
final def toIterable: Iterable.this.type

Attributes

Deprecated
[Since version 2.13.7] toIterable is internal and will be made protected; its name is similar to `toList` or `toSeq`, but it doesn\'t copy non-immutable collections
Inherited from:
Iterable
final def toIterator: Iterator[T]

Attributes

Deprecated
[Since version 2.13.0] Use .iterator instead of .toIterator
Inherited from:
IterableOnceOps
final def toStream: Stream[T]

Attributes

Deprecated
[Since version 2.13.0] Use .to(LazyList) instead of .toStream
Inherited from:
IterableOnceOps
final def toTraversable: Iterable[T]

Attributes

Deprecated
[Since version 2.13.0] toTraversable is internal and will be made protected; its name is similar to `toList` or `toSeq`, but it doesn\'t copy non-immutable collections
Inherited from:
IterableOps
final def union[B >: T](that: Seq[B]): IndexedSeq[B]

Attributes

Deprecated
[Since version 2.13.0] Use `concat` instead
Inherited from:
SeqOps
override def view(from: Int, until: Int): IndexedSeqView[T]

Attributes

Deprecated
[Since version 2.13.0] Use .view.slice(from, until) instead of .view(from, until)
Definition Classes
IndexedSeqOps -> IterableOps
Inherited from:
IndexedSeqOps

Concrete fields

val length: Int

Attributes

Source
Aggregate.scala