summaryrefslogtreecommitdiff
path: root/src/main/scala/chisel3/util/Conditional.scala
diff options
context:
space:
mode:
authorJim Lawson2016-07-06 09:31:47 -0700
committerJim Lawson2016-07-18 15:49:45 -0700
commit12810b5efe6a8f872fbc1c63cdfb835ca354624f (patch)
tree1fe4d0666e28f15880bbaf164592bd2bba1eff7c /src/main/scala/chisel3/util/Conditional.scala
parentc5f9ea3133ef363ff8944e17d94fea79767b6bed (diff)
Update Chisel -> chisel3 references.
Diffstat (limited to 'src/main/scala/chisel3/util/Conditional.scala')
-rw-r--r--src/main/scala/chisel3/util/Conditional.scala8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/scala/chisel3/util/Conditional.scala b/src/main/scala/chisel3/util/Conditional.scala
index 9cab25ef..6218feb0 100644
--- a/src/main/scala/chisel3/util/Conditional.scala
+++ b/src/main/scala/chisel3/util/Conditional.scala
@@ -3,13 +3,15 @@
/** Conditional blocks.
*/
-package Chisel
+package chisel3.util
import scala.language.reflectiveCalls
import scala.language.experimental.macros
import scala.reflect.runtime.universe._
import scala.reflect.macros.blackbox._
+import chisel3._
+
/** This is identical to [[Chisel.when when]] with the condition inverted */
object unless { // scalastyle:ignore object.name
def apply(c: Bool)(block: => Unit) {
@@ -59,7 +61,9 @@ object switch { // scalastyle:ignore object.name
def impl(c: Context)(cond: c.Tree)(x: c.Tree): c.Tree = { import c.universe._
val sc = c.universe.internal.reificationSupport.freshTermName("sc")
def extractIsStatement(tree: Tree): List[c.universe.Tree] = tree match {
- case q"Chisel.is.apply( ..$params )( ..$body )" => List(q"$sc.is( ..$params )( ..$body )")
+ // TODO: remove when Chisel compatibility package is removed
+ case q"Chisel.`package`.is.apply( ..$params )( ..$body )" => List(q"$sc.is( ..$params )( ..$body )")
+ case q"chisel3.util.is.apply( ..$params )( ..$body )" => List(q"$sc.is( ..$params )( ..$body )")
case b => throw new Exception(s"Cannot include blocks that do not begin with is() in switch.")
}
val q"..$body" = x