diff options
| author | Jim Lawson | 2016-06-20 11:08:46 -0700 |
|---|---|---|
| committer | Jim Lawson | 2016-06-20 11:08:46 -0700 |
| commit | d408d73a171535bd7c2ba9d0037c194022b8a62f (patch) | |
| tree | 81885a99ec56e89532bc3fa338f22b163dcc4d1f /src/main/scala/chisel3/util/Cat.scala | |
| parent | b5a534914795d9d17f4dfe623525f1b804e4c60f (diff) | |
Rename chisel3 package.
Diffstat (limited to 'src/main/scala/chisel3/util/Cat.scala')
| -rw-r--r-- | src/main/scala/chisel3/util/Cat.scala | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/main/scala/chisel3/util/Cat.scala b/src/main/scala/chisel3/util/Cat.scala new file mode 100644 index 00000000..b47da706 --- /dev/null +++ b/src/main/scala/chisel3/util/Cat.scala @@ -0,0 +1,21 @@ +// See LICENSE for license details. + +package chisel.util + +import chisel._ +import chisel.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 + */ + 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 + */ + def apply[T <: Bits](r: Seq[T]): UInt = SeqUtils.asUInt(r.reverse) +} |
