diff options
| author | Andrew Waterman | 2015-07-16 17:29:17 -0700 |
|---|---|---|
| committer | Andrew Waterman | 2015-07-16 17:29:17 -0700 |
| commit | c2096bdad9af49d4f0e684771565b7bb7c531b7b (patch) | |
| tree | e651b466209f867591773b4896f8a9529a406281 /src | |
| parent | eeded3dadd42fc2fd64736f6e61026a56000021d (diff) | |
Generalize unary ! to work on Bits
Necessary for backwards compatibility.
Diffstat (limited to 'src')
| -rw-r--r-- | src/main/scala/Core.scala | 2 |
1 files changed, 1 insertions, 1 deletions
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 = |
