summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Waterman2016-07-31 17:05:21 -0700
committerAndrew Waterman2016-07-31 17:25:49 -0700
commit8b66107bffac270be16196d5a852cf3e6808fb0a (patch)
treeef5f97945eb501cd483317d87607244461847f08
parent54cd58cbb435170dd2ed67dafe1cb1d769a799e8 (diff)
Fix two deprecation warnings
-rw-r--r--chiselFrontend/src/main/scala/chisel3/core/SeqUtils.scala2
-rw-r--r--src/main/scala/chisel3/util/OneHot.scala2
2 files changed, 2 insertions, 2 deletions
diff --git a/chiselFrontend/src/main/scala/chisel3/core/SeqUtils.scala b/chiselFrontend/src/main/scala/chisel3/core/SeqUtils.scala
index 0872ec41..63bcc87f 100644
--- a/chiselFrontend/src/main/scala/chisel3/core/SeqUtils.scala
+++ b/chiselFrontend/src/main/scala/chisel3/core/SeqUtils.scala
@@ -47,7 +47,7 @@ private[chisel3] object SeqUtils {
if (in.tail.isEmpty) {
in.head._2
} else {
- val masked = for ((s, i) <- in) yield Mux(s, i.toBits, Bits(0))
+ val masked = for ((s, i) <- in) yield Mux(s, i.asUInt, UInt(0))
val width = in.map(_._2.width).reduce(_ max _)
in.head._2.cloneTypeWidth(width).fromBits(masked.reduceLeft(_|_))
}
diff --git a/src/main/scala/chisel3/util/OneHot.scala b/src/main/scala/chisel3/util/OneHot.scala
index abede61e..7e04a8d7 100644
--- a/src/main/scala/chisel3/util/OneHot.scala
+++ b/src/main/scala/chisel3/util/OneHot.scala
@@ -11,7 +11,7 @@ import chisel3._
* This is the inverse of [[Chisel.UIntToOH UIntToOH]]*/
object OHToUInt {
def apply(in: Seq[Bool]): UInt = apply(Cat(in.reverse), in.size)
- def apply(in: Vec[Bool]): UInt = apply(in.toBits, in.size)
+ def apply(in: Vec[Bool]): UInt = apply(in.asUInt, in.size)
def apply(in: Bits): UInt = apply(in, in.getWidth)
def apply(in: Bits, width: Int): UInt = {