From 96fa1eb6add6d75633a2614327e4252376f3989d Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Thu, 26 May 2016 18:52:08 -0700 Subject: [PATCH] Add UInt->BitPat implicit conversion This will be removed from Chisel3, so we're putting it here to maintain compatibility. --- rocket/src/main/scala/util.scala | 1 + 1 file changed, 1 insertion(+) diff --git a/rocket/src/main/scala/util.scala b/rocket/src/main/scala/util.scala index c0b89bd1..1dd6eac1 100644 --- a/rocket/src/main/scala/util.scala +++ b/rocket/src/main/scala/util.scala @@ -8,6 +8,7 @@ import scala.math._ import cde.{Parameters, Field} object Util { + implicit def uintToBitPat(x: UInt): BitPat = BitPat(x) implicit def intToUInt(x: Int): UInt = UInt(x) implicit def booleanToBool(x: Boolean): Bits = Bool(x) implicit def intSeqToUIntSeq(x: Seq[Int]): Seq[UInt] = x.map(UInt(_))