summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/scala/Chisel/BitPat.scala3
-rw-r--r--src/main/scala/Chisel/Bits.scala1
2 files changed, 3 insertions, 1 deletions
diff --git a/src/main/scala/Chisel/BitPat.scala b/src/main/scala/Chisel/BitPat.scala
index b4138992..a1bf1985 100644
--- a/src/main/scala/Chisel/BitPat.scala
+++ b/src/main/scala/Chisel/BitPat.scala
@@ -75,5 +75,6 @@ object BitPat {
sealed class BitPat(val value: BigInt, val mask: BigInt, width: Int) {
def getWidth: Int = width
def === (other: UInt): Bool = UInt(value) === (other & UInt(mask))
- def != (other: UInt): Bool = !(this === other)
+ def =/= (other: UInt): Bool = !(this === other)
+ def != (other: UInt): Bool = this =/= other
}
diff --git a/src/main/scala/Chisel/Bits.scala b/src/main/scala/Chisel/Bits.scala
index d6bef0d0..57d88244 100644
--- a/src/main/scala/Chisel/Bits.scala
+++ b/src/main/scala/Chisel/Bits.scala
@@ -321,6 +321,7 @@ sealed class UInt private[Chisel] (dir: Direction, width: Width, lit: Option[ULi
def === (that: BitPat): Bool = that === this
def != (that: BitPat): Bool = that != this
+ def =/= (that: BitPat): Bool = that =/= this
/** Returns this UInt as a [[SInt]] with an additional zero in the MSB.
*/