From c2096bdad9af49d4f0e684771565b7bb7c531b7b Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Thu, 16 Jul 2015 17:29:17 -0700 Subject: Generalize unary ! to work on Bits Necessary for backwards compatibility. --- src/main/scala/Core.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/main/scala/Core.scala b/src/main/scala/Core.scala index c823aa41..28a76663 100644 --- a/src/main/scala/Core.scala +++ b/src/main/scala/Core.scala @@ -697,6 +697,7 @@ abstract class Bits(dirArg: Direction, width: Int) extends Element(dirArg, width def != (other: Bits): Bool = compop(NotEqualOp, other) def <= (other: Bits): Bool = compop(LessEqOp, other) def >= (other: Bits): Bool = compop(GreaterEqOp, other) + def unary_! : Bool = this === Bits(0) private def bits_redop(op: PrimOp): Bool = { val d = new Bool(dir) @@ -912,7 +913,6 @@ class Bool(dir: Direction) extends UInt(dir, 1) { def || (that: Bool): Bool = this | that def && (that: Bool): Bool = this & that - def unary_! : Bool = ~this } object Bool { def apply(dir: Direction) : Bool = -- cgit v1.2.3