summaryrefslogtreecommitdiff
path: root/src/main/scala/chisel3/util/Cat.scala
diff options
context:
space:
mode:
authorJim Lawson2016-09-23 16:50:39 -0700
committerJim Lawson2016-09-23 16:50:39 -0700
commit3e174cc55be350a06e6e95ac6505a77167bd5a29 (patch)
tree01813d93be83432a7c13fed6b1f56d9b9b942ca0 /src/main/scala/chisel3/util/Cat.scala
parent9c88d767e04ac25ab72380c39f30e39c83abf563 (diff)
parent785620b1403d827986bf60c2a001d8d6f71eed72 (diff)
Merge branch 'master' into gsdt
Diffstat (limited to 'src/main/scala/chisel3/util/Cat.scala')
-rw-r--r--src/main/scala/chisel3/util/Cat.scala13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/main/scala/chisel3/util/Cat.scala b/src/main/scala/chisel3/util/Cat.scala
index 469bf9ab..ba12a7d4 100644
--- a/src/main/scala/chisel3/util/Cat.scala
+++ b/src/main/scala/chisel3/util/Cat.scala
@@ -6,16 +6,15 @@ import chisel3._
import chisel3.core.SeqUtils
object Cat {
- /** Combine data elements together
- * @param a Data to combine with
- * @param r any number of other Data elements to be combined in order
- * @return A UInt which is all of the bits combined together
+ /** Concatenates the argument data elements, in argument order, together.
*/
def apply[T <: Bits](a: T, r: T*): UInt = apply(a :: r.toList)
- /** Combine data elements together
- * @param r any number of other Data elements to be combined in order
- * @return A UInt which is all of the bits combined together
+ /** Concatenates the data elements of the input sequence, in reverse sequence order, together.
+ * The first element of the sequence forms the most significant bits, while the last element
+ * in the sequence forms the least significant bits.
+ *
+ * Equivalent to r(0) ## r(1) ## ... ## r(n-1).
*/
def apply[T <: Bits](r: Seq[T]): UInt = SeqUtils.asUInt(r.reverse)
}