summaryrefslogtreecommitdiff
path: root/src/main/scala/chisel3/util
diff options
context:
space:
mode:
authorSchuyler Eldridge2018-09-07 16:54:05 -0400
committerGitHub2018-09-07 16:54:05 -0400
commitc6144dc8354965722b3edc5c2a34892a78c5afee (patch)
treeb553e0cfb4f9133dcf90fecc61cfe4a4f7836380 /src/main/scala/chisel3/util
parent69d247becb5d66c566ba4face2852516dd28cde2 (diff)
parenta5de2b79a93e5acda2cf07bf37534e6782055960 (diff)
Merge pull request #873 from seldridge/issue-872
API Documentation Improvements
Diffstat (limited to 'src/main/scala/chisel3/util')
-rw-r--r--src/main/scala/chisel3/util/BitPat.scala4
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)