sealed class Vec[T <: Data] extends Aggregate with 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)
- T
type of elements
- 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
- Alphabetic
- By Inheritance
- Vec
- VecLike
- IndexedSeq
- IndexedSeqOps
- IndexedSeq
- IndexedSeqOps
- Seq
- SeqOps
- Seq
- Equals
- SeqOps
- PartialFunction
- Function1
- Iterable
- Iterable
- IterableFactoryDefaults
- IterableOps
- IterableOnceOps
- IterableOnce
- Aggregate
- Data
- SourceInfoDoc
- NamedComponent
- HasId
- InstanceId
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ++[B >: T](suffix: IterableOnce[B]): IndexedSeq[B]
- Definition Classes
- IterableOps
- Annotations
- @inline()
- final def ++:[B >: T](prefix: IterableOnce[B]): IndexedSeq[B]
- Definition Classes
- SeqOps → IterableOps
- Annotations
- @inline()
- final def +:[B >: T](elem: B): IndexedSeq[B]
- Definition Classes
- SeqOps
- Annotations
- @inline()
- final def :+[B >: T](elem: B): IndexedSeq[B]
- Definition Classes
- SeqOps
- Annotations
- @inline()
- final def :++[B >: T](suffix: IterableOnce[B]): IndexedSeq[B]
- Definition Classes
- SeqOps
- Annotations
- @inline()
- def :=(that: Vec[T])(implicit sourceInfo: SourceInfo, moduleCompileOptions: CompileOptions): 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 ofthat
.- 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
- Equivalent to
- def :=(that: Seq[T])(implicit sourceInfo: SourceInfo, moduleCompileOptions: CompileOptions): 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 ofthat
.- Equivalent to
this :#= that
For Chisel._, this operator connections bi-directionally via emitting the FIRRTL.<=
- Equivalent to
this :<>= that
- Note
the length of this Vec must match the length of the input Seq
- Equivalent to
- final def :=(that: => Data)(implicit sourceInfo: SourceInfo, connectionCompileOptions: CompileOptions): 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 ofthat
.- Equivalent to
this :#= that
For Chisel._, this operator connections bi-directionally via emitting the FIRRTL.<=
- Equivalent to
this :<>= that
- that
the Data to connect from
- Definition Classes
- Data
- Equivalent to
- def <>(that: Vec[T])(implicit sourceInfo: SourceInfo, moduleCompileOptions: CompileOptions): 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 ofthat
may end up driving sub-elements ofthis
- 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
- that
the Vec to connect from
- def <>(that: Seq[T])(implicit sourceInfo: SourceInfo, moduleCompileOptions: CompileOptions): 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 ofthat
may end up driving sub-elements ofthis
- 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
- that
the Seq to connect from
- Note
the length of this Vec and that Seq must match
- final def <>(that: => Data)(implicit sourceInfo: SourceInfo, connectionCompileOptions: CompileOptions): 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 of
this- 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
- that
the Data to connect from
- Definition Classes
- Data
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def addString(b: StringBuilder): b.type
- Definition Classes
- IterableOnceOps
- Annotations
- @inline()
- final def addString(b: StringBuilder, sep: String): b.type
- Definition Classes
- IterableOnceOps
- Annotations
- @inline()
- def addString(b: StringBuilder, start: String, sep: String, end: String): b.type
- Definition Classes
- IterableOnceOps
- def andThen[C](k: PartialFunction[T, C]): PartialFunction[Int, C]
- Definition Classes
- PartialFunction
- def andThen[C](k: (T) => C): PartialFunction[Int, C]
- Definition Classes
- PartialFunction → Function1
- def appended[B >: T](elem: B): IndexedSeq[B]
- Definition Classes
- SeqOps
- def appendedAll[B >: T](suffix: IterableOnce[B]): IndexedSeq[B]
- Definition Classes
- SeqOps
- 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.
- Definition Classes
- Vec → SeqOps → Function1
- macro def apply(p: UInt): T
Creates a dynamically indexed read or write accessor into the array.
- def applyOrElse[A1 <: Int, B1 >: T](x: A1, default: (A1) => B1): B1
- Definition Classes
- PartialFunction
- def applyPreferredMaxLength: Int
- Attributes
- protected
- Definition Classes
- IndexedSeq
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- macro def asTypeOf[T <: Data](that: T): T
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.
- Definition Classes
- Data
- Note
bit widths are NOT checked, may pad or drop bits from input
,that should have known widths
- final macro def asUInt: UInt
Reinterpret cast to UInt.
Reinterpret cast to UInt.
- Definition Classes
- Data
- 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.
- def autoSeed(name: String): Vec.this.type
Takes the last seed suggested.
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.
- returns
this object
- Definition Classes
- Data → HasId
- def binding: Option[Binding]
- def binding_=(target: Binding): Unit
- Attributes
- protected
- Definition Classes
- Data
- def canEqual(that: Any): Boolean
- Definition Classes
- IndexedSeq → Seq → Equals
- def circuitName: String
- Attributes
- protected
- Definition Classes
- HasId
- def className: String
- Attributes
- protected[this]
- Definition Classes
- Iterable
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def cloneType: Vec.this.type
Internal API; Chisel users should look at chisel3.chiselTypeOf(...).
- final def coll: Vec.this.type
- Attributes
- protected
- Definition Classes
- Iterable → IterableOps
- def collect[B](pf: PartialFunction[T, B]): IndexedSeq[B]
- Definition Classes
- IterableOps → IterableOnceOps
- def collectFirst[B](pf: PartialFunction[T, B]): Option[B]
- Definition Classes
- IterableOnceOps
- def combinations(n: Int): Iterator[IndexedSeq[T]]
- Definition Classes
- SeqOps
- def compose[R](k: PartialFunction[R, Int]): PartialFunction[R, T]
- Definition Classes
- PartialFunction
- def compose[A](g: (A) => Int): (A) => T
- Definition Classes
- Function1
- Annotations
- @unspecialized()
- final def concat[B >: T](suffix: IterableOnce[B]): IndexedSeq[B]
- Definition Classes
- SeqOps → IterableOps
- Annotations
- @inline()
- macro def contains(x: T)(implicit ev: <:<[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).
- Definition Classes
- VecLike
- def contains[A1 >: T](elem: A1): Boolean
- Definition Classes
- SeqOps
- def containsSlice[B >: T](that: Seq[B]): Boolean
- Definition Classes
- SeqOps
- def copyToArray[B >: T](xs: Array[B], start: Int, len: Int): Int
- Definition Classes
- IterableOnceOps
- def copyToArray[B >: T](xs: Array[B], start: Int): Int
- Definition Classes
- IterableOnceOps
- Annotations
- @deprecatedOverriding()
- def copyToArray[B >: T](xs: Array[B]): Int
- Definition Classes
- IterableOnceOps
- Annotations
- @deprecatedOverriding()
- def corresponds[B](that: Seq[B])(p: (T, B) => Boolean): Boolean
- Definition Classes
- SeqOps
- def corresponds[B](that: IterableOnce[B])(p: (T, B) => Boolean): Boolean
- Definition Classes
- IterableOnceOps
- macro def count(p: (T) => Bool): UInt
Outputs the number of elements for which p is true.
Outputs the number of elements for which p is true.
- Definition Classes
- VecLike
- def count(p: (T) => Boolean): Int
- Definition Classes
- IterableOnceOps
- def diff[B >: T](that: Seq[B]): IndexedSeq[T]
- Definition Classes
- SeqOps
- def distinct: IndexedSeq[T]
- Definition Classes
- SeqOps
- def distinctBy[B](f: (T) => B): IndexedSeq[T]
- Definition Classes
- SeqOps
- def do_apply(p: UInt)(implicit compileOptions: CompileOptions): T
- def do_asTypeOf[T <: Data](that: T)(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): T
- Definition Classes
- Data
- def do_asUInt(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): UInt
- def do_contains(x: T)(implicit sourceInfo: SourceInfo, ev: <:<[T, UInt], compileOptions: CompileOptions): Bool
- Definition Classes
- VecLike
- def do_count(p: (T) => Bool)(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): UInt
- Definition Classes
- VecLike
- def do_exists(p: (T) => Bool)(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): Bool
- Definition Classes
- VecLike
- def do_forall(p: (T) => Bool)(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): Bool
- Definition Classes
- VecLike
- def do_indexWhere(p: (T) => Bool)(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): UInt
- Definition Classes
- VecLike
- def do_lastIndexWhere(p: (T) => Bool)(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): UInt
- Definition Classes
- VecLike
- def do_onlyIndexWhere(p: (T) => Bool)(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): UInt
- Definition Classes
- VecLike
- def do_reduceTree(redOp: (T, T) => T, layerOp: (T) => T = (x: T) => x)(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): T
- def drop(n: Int): IndexedSeq[T]
- Definition Classes
- IndexedSeqOps → IterableOps → IterableOnceOps
- def dropRight(n: Int): IndexedSeq[T]
- Definition Classes
- IndexedSeqOps → IterableOps
- def dropWhile(p: (T) => Boolean): IndexedSeq[T]
- Definition Classes
- IterableOps → IterableOnceOps
- def elementWise: ElementWiseExtractor[Int, T]
- Definition Classes
- PartialFunction
- def empty: IndexedSeq[T]
- Definition Classes
- IterableFactoryDefaults → IterableOps
- def endsWith[B >: T](that: Iterable[B]): Boolean
- Definition Classes
- SeqOps
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(that: Any): Boolean
- Definition Classes
- VecLike → HasId → Seq → Equals → AnyRef → Any
- macro def exists(p: (T) => Bool): Bool
Outputs true if p outputs true for at least one element.
Outputs true if p outputs true for at least one element.
- Definition Classes
- VecLike
- def exists(p: (T) => Boolean): Boolean
- Definition Classes
- IterableOnceOps
- def filter(pred: (T) => Boolean): IndexedSeq[T]
- Definition Classes
- IterableOps → IterableOnceOps
- def filterNot(pred: (T) => Boolean): IndexedSeq[T]
- Definition Classes
- IterableOps → IterableOnceOps
- def find(p: (T) => Boolean): Option[T]
- Definition Classes
- IterableOnceOps
- def findLast(p: (T) => Boolean): Option[T]
- Definition Classes
- SeqOps
- def flatMap[B](f: (T) => IterableOnce[B]): IndexedSeq[B]
- Definition Classes
- IterableOps → IterableOnceOps
- def flatten[B](implicit asIterable: (T) => IterableOnce[B]): IndexedSeq[B]
- Definition Classes
- IterableOps → IterableOnceOps
- def fold[A1 >: T](z: A1)(op: (A1, A1) => A1): A1
- Definition Classes
- IterableOnceOps
- def foldLeft[B](z: B)(op: (B, T) => B): B
- Definition Classes
- IterableOnceOps
- def foldRight[B](z: B)(op: (T, B) => B): B
- Definition Classes
- IndexedSeqOps → IterableOnceOps
- macro def forall(p: (T) => Bool): Bool
Outputs true if p outputs true for every element.
Outputs true if p outputs true for every element.
- Definition Classes
- VecLike
- def forall(p: (T) => Boolean): Boolean
- Definition Classes
- IterableOnceOps
- def foreach[U](f: (T) => U): Unit
- Definition Classes
- IterableOnceOps
- def fromSpecific(coll: IterableOnce[T]): IndexedSeq[T]
- Attributes
- protected
- Definition Classes
- IterableFactoryDefaults → IterableOps
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def getElements: Seq[Data]
Returns a Seq of the immediate contents of this Aggregate, in order.
- final def getWidth: Int
Returns the width, in bits, if currently known.
Returns the width, in bits, if currently known.
- Definition Classes
- Data
- def groupBy[K](f: (T) => K): Map[K, IndexedSeq[T]]
- Definition Classes
- IterableOps
- def groupMap[K, B](key: (T) => K)(f: (T) => B): Map[K, IndexedSeq[B]]
- Definition Classes
- IterableOps
- def groupMapReduce[K, B](key: (T) => K)(f: (T) => B)(reduce: (B, B) => B): Map[K, B]
- Definition Classes
- IterableOps
- def grouped(size: Int): Iterator[IndexedSeq[T]]
- Definition Classes
- IterableOps
- def hasSeed: Boolean
- returns
Whether either autoName or suggestName has been called
- Definition Classes
- HasId
- def hashCode(): Int
- Definition Classes
- VecLike → HasId → Seq → AnyRef → Any
- def head: T
- Definition Classes
- IndexedSeqOps → IterableOps
- def headOption: Option[T]
- Definition Classes
- IndexedSeqOps → IterableOps
- def indexOf[B >: T](elem: B): Int
- Definition Classes
- SeqOps
- Annotations
- @deprecatedOverriding()
- def indexOf[B >: T](elem: B, from: Int): Int
- Definition Classes
- SeqOps
- def indexOfSlice[B >: T](that: Seq[B]): Int
- Definition Classes
- SeqOps
- Annotations
- @deprecatedOverriding()
- def indexOfSlice[B >: T](that: Seq[B], from: Int): Int
- Definition Classes
- SeqOps
- macro def indexWhere(p: (T) => Bool): 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.
- Definition Classes
- VecLike
- def indexWhere(p: (T) => Boolean): Int
- Definition Classes
- SeqOps
- Annotations
- @deprecatedOverriding()
- def indexWhere(p: (T) => Boolean, from: Int): Int
- Definition Classes
- SeqOps
- def indices: Range
- Definition Classes
- SeqOps
- def init: IndexedSeq[T]
- Definition Classes
- IterableOps
- def inits: Iterator[IndexedSeq[T]]
- Definition Classes
- IterableOps
- def instanceName: String
- Definition Classes
- HasId → InstanceId
- def intersect[B >: T](that: Seq[B]): IndexedSeq[T]
- Definition Classes
- SeqOps
- def isDefinedAt(idx: Int): Boolean
- Definition Classes
- SeqOps
- def isEmpty: Boolean
- Definition Classes
- SeqOps → IterableOnceOps
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isLit: Boolean
- Definition Classes
- Data
- def isTraversableAgain: Boolean
- Definition Classes
- IterableOps → IterableOnceOps
- final def isWidthKnown: Boolean
Returns whether the width is currently known.
Returns whether the width is currently known.
- Definition Classes
- Data
- def iterableFactory: SeqFactory[IndexedSeq]
- Definition Classes
- IndexedSeq → IndexedSeq → Seq → Seq → Iterable → Iterable → IterableOps
- def iterator: Iterator[T]
- Definition Classes
- IndexedSeqOps → IterableOnce
- def knownSize: Int
- Definition Classes
- IndexedSeqOps → IterableOnce
- def last: T
- Definition Classes
- IndexedSeqOps → IterableOps
- def lastIndexOf[B >: T](elem: B, end: Int): Int
- Definition Classes
- SeqOps
- def lastIndexOfSlice[B >: T](that: Seq[B]): Int
- Definition Classes
- SeqOps
- Annotations
- @deprecatedOverriding()
- def lastIndexOfSlice[B >: T](that: Seq[B], end: Int): Int
- Definition Classes
- SeqOps
- macro def lastIndexWhere(p: (T) => Bool): 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.
- Definition Classes
- VecLike
- def lastIndexWhere(p: (T) => Boolean): Int
- Definition Classes
- SeqOps
- Annotations
- @deprecatedOverriding()
- def lastIndexWhere(p: (T) => Boolean, end: Int): Int
- Definition Classes
- SeqOps
- def lastOption: Option[T]
- Definition Classes
- IterableOps
- def lazyZip[B](that: Iterable[B]): LazyZip2[T, B, Vec.this.type]
- Definition Classes
- Iterable
- val length: Int
- Definition Classes
- Vec → SeqOps
- final def lengthCompare(that: Iterable[_]): Int
- Definition Classes
- IndexedSeqOps → SeqOps
- final def lengthCompare(len: Int): Int
- Definition Classes
- IndexedSeqOps → SeqOps
- final def lengthIs: SizeCompareOps
- Definition Classes
- SeqOps
- Annotations
- @inline()
- def lift: (Int) => Option[T]
- Definition Classes
- PartialFunction
- def litOption: Option[BigInt]
Return an Aggregate's literal value if it is a literal, None otherwise.
- def litValue: BigInt
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.
- Definition Classes
- Data
- def map[B](f: (T) => B): IndexedSeq[B]
- Definition Classes
- IndexedSeqOps → IterableOps → IterableOnceOps
- def max[B >: T](implicit ord: Ordering[B]): T
- Definition Classes
- IterableOnceOps
- def maxBy[B](f: (T) => B)(implicit cmp: Ordering[B]): T
- Definition Classes
- IterableOnceOps
- def maxByOption[B](f: (T) => B)(implicit cmp: Ordering[B]): Option[T]
- Definition Classes
- IterableOnceOps
- def maxOption[B >: T](implicit ord: Ordering[B]): Option[T]
- Definition Classes
- IterableOnceOps
- def min[B >: T](implicit ord: Ordering[B]): T
- Definition Classes
- IterableOnceOps
- def minBy[B](f: (T) => B)(implicit cmp: Ordering[B]): T
- Definition Classes
- IterableOnceOps
- def minByOption[B](f: (T) => B)(implicit cmp: Ordering[B]): Option[T]
- Definition Classes
- IterableOnceOps
- def minOption[B >: T](implicit ord: Ordering[B]): Option[T]
- Definition Classes
- IterableOnceOps
- final def mkString: String
- Definition Classes
- IterableOnceOps
- Annotations
- @inline()
- final def mkString(sep: String): String
- Definition Classes
- IterableOnceOps
- Annotations
- @inline()
- final def mkString(start: String, sep: String, end: String): String
- Definition Classes
- IterableOnceOps
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def newSpecificBuilder: Builder[T, IndexedSeq[T]]
- Attributes
- protected
- Definition Classes
- IterableFactoryDefaults → IterableOps
- def nonEmpty: Boolean
- Definition Classes
- IterableOnceOps
- Annotations
- @deprecatedOverriding()
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def occCounts[B](sq: Seq[B]): Map[B, Int]
- Attributes
- protected[collection]
- Definition Classes
- SeqOps
- macro def onlyIndexWhere(p: (T) => Bool): 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.
- Definition Classes
- VecLike
- 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)
- def orElse[A1 <: Int, B1 >: T](that: PartialFunction[A1, B1]): PartialFunction[A1, B1]
- Definition Classes
- PartialFunction
- def padTo[B >: T](len: Int, elem: B): IndexedSeq[B]
- Definition Classes
- SeqOps
- def parentModName: String
- Definition Classes
- HasId → InstanceId
- def parentPathName: String
- Definition Classes
- HasId → InstanceId
- def partition(p: (T) => Boolean): (IndexedSeq[T], IndexedSeq[T])
- Definition Classes
- IterableOps
- def partitionMap[A1, A2](f: (T) => Either[A1, A2]): (IndexedSeq[A1], IndexedSeq[A2])
- Definition Classes
- IterableOps
- def patch[B >: T](from: Int, other: IterableOnce[B], replaced: Int): IndexedSeq[B]
- Definition Classes
- SeqOps
- def pathName: String
- Definition Classes
- HasId → InstanceId
- def permutations: Iterator[IndexedSeq[T]]
- Definition Classes
- SeqOps
- def prepended[B >: T](elem: B): IndexedSeq[B]
- Definition Classes
- IndexedSeqOps → SeqOps
- def prependedAll[B >: T](prefix: IterableOnce[B]): IndexedSeq[B]
- Definition Classes
- SeqOps
- def product[B >: T](implicit num: Numeric[B]): B
- Definition Classes
- IterableOnceOps
- def reduce[B >: T](op: (B, B) => B): B
- Definition Classes
- IterableOnceOps
- def reduceLeft[B >: T](op: (B, T) => B): B
- Definition Classes
- IterableOnceOps
- def reduceLeftOption[B >: T](op: (B, T) => B): Option[B]
- Definition Classes
- IterableOnceOps
- def reduceOption[B >: T](op: (B, B) => B): Option[B]
- Definition Classes
- IterableOnceOps
- def reduceRight[B >: T](op: (T, B) => B): B
- Definition Classes
- IterableOnceOps
- def reduceRightOption[B >: T](op: (T, B) => B): Option[B]
- Definition Classes
- IterableOnceOps
- macro def reduceTree(redOp: (T, T) => T, layerOp: (T) => T): T
A reduce operation in a tree like structure instead of sequentially
A reduce operation in a tree like structure instead of sequentially
A pipelined adder tree
val sumOut = inputNums.reduceTree( (a: T, b: T) => RegNext(a + b), (a: T) => RegNext(a) )
Example: - macro def reduceTree(redOp: (T, T) => T): T
A reduce operation in a tree like structure instead of sequentially
A reduce operation in a tree like structure instead of sequentially
An adder tree
val sumOut = inputNums.reduceTree((a: T, b: T) => (a + b))
Example: - def reverse: IndexedSeq[T]
- Definition Classes
- IndexedSeqOps → SeqOps
- def reverseIterator: Iterator[T]
- Definition Classes
- IndexedSeqOps → SeqOps
- def reversed: Iterable[T]
- Attributes
- protected
- Definition Classes
- IndexedSeqOps → IterableOnceOps
- def runWith[U](action: (T) => U): (Int) => Boolean
- Definition Classes
- PartialFunction
- def sameElements[B >: T](o: IterableOnce[B]): Boolean
- Definition Classes
- IndexedSeq → SeqOps
- def scan[B >: T](z: B)(op: (B, B) => B): IndexedSeq[B]
- Definition Classes
- IterableOps
- def scanLeft[B](z: B)(op: (B, T) => B): IndexedSeq[B]
- Definition Classes
- IterableOps → IterableOnceOps
- def scanRight[B](z: B)(op: (T, B) => B): IndexedSeq[B]
- Definition Classes
- IterableOps
- def search[B >: T](elem: B, from: Int, to: Int)(implicit ord: Ordering[B]): SearchResult
- Definition Classes
- IndexedSeqOps → SeqOps
- def search[B >: T](elem: B)(implicit ord: Ordering[B]): SearchResult
- Definition Classes
- IndexedSeqOps → SeqOps
- def segmentLength(p: (T) => Boolean, from: Int): Int
- Definition Classes
- SeqOps
- final def segmentLength(p: (T) => Boolean): Int
- Definition Classes
- SeqOps
- final def size: Int
- Definition Classes
- SeqOps → IterableOnceOps
- final def sizeCompare(that: Iterable[_]): Int
- Definition Classes
- SeqOps → IterableOps
- final def sizeCompare(otherSize: Int): Int
- Definition Classes
- SeqOps → IterableOps
- final def sizeIs: SizeCompareOps
- Definition Classes
- IterableOps
- Annotations
- @inline()
- def slice(from: Int, until: Int): IndexedSeq[T]
- Definition Classes
- IndexedSeqOps → IndexedSeqOps → IterableOps → IterableOnceOps
- def sliding(size: Int, step: Int): Iterator[IndexedSeq[T]]
- Definition Classes
- IterableOps
- def sliding(size: Int): Iterator[IndexedSeq[T]]
- Definition Classes
- IterableOps
- def sortBy[B](f: (T) => B)(implicit ord: Ordering[B]): IndexedSeq[T]
- Definition Classes
- SeqOps
- def sortWith(lt: (T, T) => Boolean): IndexedSeq[T]
- Definition Classes
- SeqOps
- def sorted[B >: T](implicit ord: Ordering[B]): IndexedSeq[T]
- Definition Classes
- SeqOps
- def span(p: (T) => Boolean): (IndexedSeq[T], IndexedSeq[T])
- Definition Classes
- IterableOps → IterableOnceOps
- def splitAt(n: Int): (IndexedSeq[T], IndexedSeq[T])
- Definition Classes
- IterableOps → IterableOnceOps
- def startsWith[B >: T](that: IterableOnce[B], offset: Int): Boolean
- Definition Classes
- SeqOps
- def stepper[S <: Stepper[_]](implicit shape: StepperShape[T, S]): S with EfficientSplit
- Definition Classes
- IndexedSeqOps → IterableOnce
- def stringPrefix: String
- Attributes
- protected[this]
- Definition Classes
- IndexedSeq → Seq → Iterable
- def suggestName(seed: => String): Vec.this.type
Takes the first seed suggested.
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 whetherautoSeed
was called, suggestName will always take precedence.- seed
The seed for the name of this component
- returns
this object
- Definition Classes
- HasId
- def sum[B >: T](implicit num: Numeric[B]): B
- Definition Classes
- IterableOnceOps
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def tail: IndexedSeq[T]
- Definition Classes
- IterableOps
- def tails: Iterator[IndexedSeq[T]]
- Definition Classes
- IterableOps
- def take(n: Int): IndexedSeq[T]
- Definition Classes
- IndexedSeqOps → IterableOps → IterableOnceOps
- def takeRight(n: Int): IndexedSeq[T]
- Definition Classes
- IndexedSeqOps → IterableOps
- def takeWhile(p: (T) => Boolean): IndexedSeq[T]
- Definition Classes
- IterableOps → IterableOnceOps
- def tapEach[U](f: (T) => U): IndexedSeq[T]
- Definition Classes
- IterableOps → IterableOnceOps
- def to[C1](factory: Factory[T, C1]): C1
- Definition Classes
- IterableOnceOps
- final def toAbsoluteTarget: ReferenceTarget
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
- Definition Classes
- NamedComponent → InstanceId
- def toArray[B >: T](implicit arg0: ClassTag[B]): Array[B]
- Definition Classes
- IterableOnceOps
- final def toBuffer[B >: T]: Buffer[B]
- Definition Classes
- IterableOnceOps
- Annotations
- @inline()
- final def toIndexedSeq: IndexedSeq[T]
- Definition Classes
- IndexedSeq → IterableOnceOps
- def toList: List[T]
- Definition Classes
- IterableOnceOps
- def toMap[K, V](implicit ev: <:<[T, (K, V)]): Map[K, V]
- Definition Classes
- IterableOnceOps
- final def toNamed: ComponentName
Returns a FIRRTL ComponentName that references this object
Returns a FIRRTL ComponentName that references this object
- Definition Classes
- NamedComponent → InstanceId
- Note
Should not be called until circuit elaboration is complete
- def toPrintable: Printable
Default "pretty-print" implementation Analogous to printing a Seq Results in "Vec(elt0, elt1, ...)"
- final def toSeq: Vec.this.type
- Definition Classes
- Seq → IterableOnceOps
- def toSet[B >: T]: Set[B]
- Definition Classes
- IterableOnceOps
- def toString(): String
- Definition Classes
- Vec → Seq → Function1 → Iterable → AnyRef → Any
- final def toTarget: ReferenceTarget
Returns a FIRRTL ReferenceTarget that references this object
Returns a FIRRTL ReferenceTarget that references this object
- Definition Classes
- NamedComponent → InstanceId
- Note
Should not be called until circuit elaboration is complete
- def toVector: Vector[T]
- Definition Classes
- IterableOnceOps
- def transpose[B](implicit asIterable: (T) => Iterable[B]): IndexedSeq[IndexedSeq[B]]
- Definition Classes
- IterableOps
- def unapply(a: Int): Option[T]
- Definition Classes
- PartialFunction
- def unzip[A1, A2](implicit asPair: (T) => (A1, A2)): (IndexedSeq[A1], IndexedSeq[A2])
- Definition Classes
- IterableOps
- def unzip3[A1, A2, A3](implicit asTriple: (T) => (A1, A2, A3)): (IndexedSeq[A1], IndexedSeq[A2], IndexedSeq[A3])
- Definition Classes
- IterableOps
- def updated[B >: T](index: Int, elem: B): IndexedSeq[B]
- Definition Classes
- SeqOps
- def view: IndexedSeqView[T]
- Definition Classes
- IndexedSeqOps → SeqOps → IterableOps
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- 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.
- Definition Classes
- Data
- def withFilter(p: (T) => Boolean): WithFilter[T, [_]IndexedSeq[_]]
- Definition Classes
- IterableOps
- def zip[B](that: IterableOnce[B]): IndexedSeq[(T, B)]
- Definition Classes
- IterableOps
- def zipAll[A1 >: T, B](that: Iterable[B], thisElem: A1, thatElem: B): IndexedSeq[(A1, B)]
- Definition Classes
- IterableOps
- def zipWithIndex: IndexedSeq[(T, Int)]
- Definition Classes
- IterableOps → IterableOnceOps
Deprecated Value Members
- final def /:[B](z: B)(op: (B, T) => B): B
- Definition Classes
- IterableOnceOps
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.13.0) Use foldLeft instead of /:
- final def :\[B](z: B)(op: (T, B) => B): B
- Definition Classes
- IterableOnceOps
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.13.0) Use foldRight instead of :\
- def aggregate[B](z: => B)(seqop: (B, T) => B, combop: (B, B) => B): B
- Definition Classes
- IterableOnceOps
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0)
aggregate
is not relevant for sequential collections. UsefoldLeft(z)(seqop)
instead.
- def companion: IterableFactory[[_]IndexedSeq[_]]
- Definition Classes
- IterableOps
- Annotations
- @deprecated @deprecatedOverriding() @inline()
- Deprecated
(Since version 2.13.0) Use iterableFactory instead
- final def copyToBuffer[B >: T](dest: Buffer[B]): Unit
- Definition Classes
- IterableOnceOps
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.13.0) Use
dest ++= coll
instead
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
- def hasDefiniteSize: Boolean
- Definition Classes
- IterableOnceOps
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Check .knownSize instead of .hasDefiniteSize for more actionable information (see scaladoc for details)
- final def prefixLength(p: (T) => Boolean): Int
- Definition Classes
- SeqOps
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.13.0) Use segmentLength instead of prefixLength
- final def repr: IndexedSeq[T]
- Definition Classes
- IterableOps
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Use coll instead of repr in a collection implementation, use the collection value itself from the outside
- def reverseMap[B](f: (T) => B): IndexedSeq[B]
- Definition Classes
- SeqOps
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Use .reverseIterator.map(f).to(...) instead of .reverseMap(f)
- def seq: Vec.this.type
- Definition Classes
- Iterable
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Iterable.seq always returns the iterable itself
- final def toIterable: Vec.this.type
- Definition Classes
- Iterable → IterableOps
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.7) toIterable is internal and will be made protected; its name is similar to
toList
ortoSeq
, but it doesn't copy non-immutable collections
- final def toIterator: Iterator[T]
- Definition Classes
- IterableOnceOps
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.13.0) Use .iterator instead of .toIterator
- final def toStream: Stream[T]
- Definition Classes
- IterableOnceOps
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.13.0) Use .to(LazyList) instead of .toStream
- final def toTraversable: Traversable[T]
- Definition Classes
- IterableOps
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) toTraversable is internal and will be made protected; its name is similar to
toList
ortoSeq
, but it doesn't copy non-immutable collections
- final def union[B >: T](that: Seq[B]): IndexedSeq[B]
- Definition Classes
- SeqOps
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.13.0) Use
concat
instead
- def view(from: Int, until: Int): IndexedSeqView[T]
- Definition Classes
- IndexedSeqOps → IterableOps
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Use .view.slice(from, until) instead of .view(from, until)