summaryrefslogtreecommitdiff
path: root/src/main/scala/chisel3/util
diff options
context:
space:
mode:
authorJim Lawson2016-06-22 11:27:45 -0700
committerJim Lawson2016-06-22 11:27:45 -0700
commit47a8b0c8318a3bfe6e86da3398cd67dbfadd8758 (patch)
tree89736c4eae2550cbdb5f64ca4dd2865bc79c481d /src/main/scala/chisel3/util
parent3026dd214f3db3308eaf8f876d0fc03f75c577d3 (diff)
parent70a41e5aed5dc3bc52133aecf46049a5946d33fe (diff)
Merge branch 'master' into renamechisel3
Diffstat (limited to 'src/main/scala/chisel3/util')
-rw-r--r--src/main/scala/chisel3/util/Mux.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/scala/chisel3/util/Mux.scala b/src/main/scala/chisel3/util/Mux.scala
index 07a34f9b..9956a7e3 100644
--- a/src/main/scala/chisel3/util/Mux.scala
+++ b/src/main/scala/chisel3/util/Mux.scala
@@ -40,7 +40,7 @@ object MuxLookup {
* @param mapping a sequence to search of keys and values
* @return the value found or the default if not
*/
- def apply[S <: UInt, T <: Bits] (key: S, default: T, mapping: Seq[(S, T)]): T = {
+ def apply[S <: UInt, T <: Data] (key: S, default: T, mapping: Seq[(S, T)]): T = {
var res = default
for ((k, v) <- mapping.reverse)
res = Mux(k === key, v, res)
@@ -54,7 +54,7 @@ object MuxCase {
/** @param default the default value if none are enabled
* @param mapping a set of data values with associated enables
* @return the first value in mapping that is enabled */
- def apply[T <: Bits] (default: T, mapping: Seq[(Bool, T)]): T = {
+ def apply[T <: Data] (default: T, mapping: Seq[(Bool, T)]): T = {
var res = default
for ((t, v) <- mapping.reverse){
res = Mux(t, v, res)