summaryrefslogtreecommitdiff
path: root/chiselFrontend/src/main/scala/chisel3/core/SeqUtils.scala
diff options
context:
space:
mode:
authorducky2016-11-16 18:31:24 -0800
committerducky2016-11-21 13:26:56 -0800
commit15a8d3818a1b185051b260ffc82da1fb4a60a45e (patch)
treeccfc4e7cb11f9ef5e367c28b721a630e27abd51e /chiselFrontend/src/main/scala/chisel3/core/SeqUtils.scala
parentcd6eb41275381a4399a8a88c886110d276bb805c (diff)
Break out deprecated literal constructors, refactor all the things!
Diffstat (limited to 'chiselFrontend/src/main/scala/chisel3/core/SeqUtils.scala')
-rw-r--r--chiselFrontend/src/main/scala/chisel3/core/SeqUtils.scala4
1 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 558dea7a..da4f2d94 100644
--- a/chiselFrontend/src/main/scala/chisel3/core/SeqUtils.scala
+++ b/chiselFrontend/src/main/scala/chisel3/core/SeqUtils.scala
@@ -30,7 +30,7 @@ private[chisel3] object SeqUtils {
def count(in: Seq[Bool]): UInt = macro SourceInfoTransform.inArg
def do_count(in: Seq[Bool])(implicit sourceInfo: SourceInfo): UInt = in.size match {
- case 0 => UInt(0)
+ case 0 => 0.U
case 1 => in.head
case n => count(in take n/2) +& count(in drop n/2)
}
@@ -57,7 +57,7 @@ private[chisel3] object SeqUtils {
if (in.tail.isEmpty) {
in.head._2
} else {
- val masked = for ((s, i) <- in) yield Mux(s, i.asUInt, UInt(0))
+ val masked = for ((s, i) <- in) yield Mux(s, i.asUInt, 0.U)
val width = in.map(_._2.width).reduce(_ max _)
in.head._2.cloneTypeWidth(width).fromBits(masked.reduceLeft(_|_))
}