diff options
Diffstat (limited to 'src/main/scala/chisel3/util/BitPat.scala')
| -rw-r--r-- | src/main/scala/chisel3/util/BitPat.scala | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/main/scala/chisel3/util/BitPat.scala b/src/main/scala/chisel3/util/BitPat.scala index 33b9f173..54ded155 100644 --- a/src/main/scala/chisel3/util/BitPat.scala +++ b/src/main/scala/chisel3/util/BitPat.scala @@ -94,7 +94,13 @@ sealed class BitPat(val value: BigInt, val mask: BigInt, width: Int) { @deprecated("Use '=/=', which avoids potential precedence problems", "chisel3") def != (that: UInt): Bool = macro SourceInfoTransform.thatArg - def do_=== (that: UInt)(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): Bool = value.asUInt === (that & mask.asUInt) // scalastyle:ignore method.name - def do_=/= (that: UInt)(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): Bool = !(this === that) // scalastyle:ignore method.name - def do_!= (that: UInt)(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): Bool = this =/= that // scalastyle:ignore method.name + def do_=== (that: UInt)(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): Bool = { // scalastyle:ignore method.name + value.asUInt === (that & mask.asUInt) + } + def do_=/= (that: UInt)(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): Bool = { // scalastyle:ignore method.name + !(this === that) + } + def do_!= (that: UInt)(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): Bool = { // scalastyle:ignore method.name + this =/= that + } } |
