diff options
| author | Schuyler Eldridge | 2018-08-14 11:39:28 -0400 |
|---|---|---|
| committer | Schuyler Eldridge | 2018-09-07 15:42:21 -0400 |
| commit | 57e8774c34fc28dd34cdec5e8a1bf82f3cd4e0cd (patch) | |
| tree | 6b5e4c1661e889706e50e937276a45277fc4f0a4 /src/main/scala/chisel3/util/BitPat.scala | |
| parent | be7927eeefde1a4616bc6762fab410931304ec6b (diff) | |
Put do_* methods in SourceInfoTransformMacro group
This places all do_* methods (and two unary methods in SInt and FixedPoint
that act like do_* methods) inside the ScalaDoc group
"SourceInfoTransformMacro". Classes/objects which need information about
this group have an additional bare trait mixed in, `SourceInfoDoc`, that
provides information about the group and its priority.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
Diffstat (limited to 'src/main/scala/chisel3/util/BitPat.scala')
| -rw-r--r-- | src/main/scala/chisel3/util/BitPat.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/scala/chisel3/util/BitPat.scala b/src/main/scala/chisel3/util/BitPat.scala index 6ff08bea..6cba497e 100644 --- a/src/main/scala/chisel3/util/BitPat.scala +++ b/src/main/scala/chisel3/util/BitPat.scala @@ -88,15 +88,17 @@ object BitPat { * "b10001".U === BitPat("b101??") // evaluates to false.B * }}} */ -sealed class BitPat(val value: BigInt, val mask: BigInt, width: Int) { +sealed class BitPat(val value: BigInt, val mask: BigInt, width: Int) extends SourceInfoDoc { def getWidth: Int = width def === (that: UInt): Bool = macro SourceInfoTransform.thatArg def =/= (that: UInt): Bool = macro SourceInfoTransform.thatArg + /** @group SourceInfoTransformMacro */ def do_=== (that: UInt) // scalastyle:ignore method.name (implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): Bool = { value.asUInt === (that & mask.asUInt) } + /** @group SourceInfoTransformMacro */ def do_=/= (that: UInt) // scalastyle:ignore method.name (implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): Bool = { !(this === that) |
