From f1c63223307c60cb2400ae2f665ba490478894f7 Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Sun, 2 Aug 2015 21:38:57 -0700 Subject: Move comparison operators to UInt/SInt --- src/main/scala/Chisel/utils.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/scala/Chisel/utils.scala') diff --git a/src/main/scala/Chisel/utils.scala b/src/main/scala/Chisel/utils.scala index 90c59e9d..1e024b11 100644 --- a/src/main/scala/Chisel/utils.scala +++ b/src/main/scala/Chisel/utils.scala @@ -138,7 +138,7 @@ object is { def apply(v: Iterable[Bits])(block: => Unit): Unit = { val keys = switchKeys if (keys.isEmpty) ChiselError.error("The 'is' keyword may not be used outside of a switch.") - else if (!v.isEmpty) when (v.map(_ === keys.top).reduce(_||_)) { block } + else if (!v.isEmpty) when (v.map(_.toBits === keys.top.toBits).reduce(_||_)) { block } } } -- cgit v1.2.3