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/package.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/package.scala')
| -rw-r--r-- | src/main/scala/chisel3/package.scala | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/main/scala/chisel3/package.scala b/src/main/scala/chisel3/package.scala index 7f1ad040..b7c39bad 100644 --- a/src/main/scala/chisel3/package.scala +++ b/src/main/scala/chisel3/package.scala @@ -50,11 +50,11 @@ package object chisel3 { // scalastyle:ignore package.object.name @chiselRuntimeDeprecated @deprecated("Input(Data) should be used over Data.asInput", "chisel3") def asInput: T = Input(target) - + @chiselRuntimeDeprecated @deprecated("Output(Data) should be used over Data.asOutput", "chisel3") def asOutput: T = Output(target) - + @chiselRuntimeDeprecated @deprecated("Flipped(Data) should be used over Data.flip", "chisel3") def flip(): T = Flipped(target) @@ -152,7 +152,7 @@ package object chisel3 { // scalastyle:ignore package.object.name @chiselRuntimeDeprecated @deprecated("use n.U", "chisel3, will be removed by end of 2017") def apply(n: String): UInt = n.asUInt - + /** Create a UInt literal with fixed width. */ @chiselRuntimeDeprecated @deprecated("use n.U(width.W)", "chisel3, will be removed by end of 2017") @@ -192,7 +192,7 @@ package object chisel3 { // scalastyle:ignore package.object.name @chiselRuntimeDeprecated @deprecated("use SInt(width.W)", "chisel3, will be removed by end of 2017") def width(width: Int): SInt = apply(width.W) - + /** Create an SInt type with specified width. */ @chiselRuntimeDeprecated @deprecated("use SInt(width)", "chisel3, will be removed by end of 2017") @@ -202,7 +202,7 @@ package object chisel3 { // scalastyle:ignore package.object.name @chiselRuntimeDeprecated @deprecated("use value.S", "chisel3, will be removed by end of 2017") def apply(value: BigInt): SInt = value.asSInt - + /** Create an SInt literal with fixed width. */ @chiselRuntimeDeprecated @deprecated("use value.S(width.W)", "chisel3, will be removed by end of 2017") @@ -257,7 +257,7 @@ package object chisel3 { // scalastyle:ignore package.object.name val SeqMem = chisel3.core.SyncReadMem @deprecated("Use 'SyncReadMem'", "chisel3") type SeqMem[T <: Data] = chisel3.core.SyncReadMem[T] - + val Module = chisel3.core.Module type Module = chisel3.core.LegacyModule @@ -367,18 +367,20 @@ package object chisel3 { // scalastyle:ignore package.object.name implicit class fromIntToWidth(x: Int) extends chisel3.core.fromIntToWidth(x) implicit class fromIntToBinaryPoint(x: Int) extends chisel3.core.fromIntToBinaryPoint(x) - implicit class fromUIntToBitPatComparable(x: UInt) { + implicit class fromUIntToBitPatComparable(x: UInt) extends chisel3.SourceInfoDoc { import scala.language.experimental.macros import internal.sourceinfo.{SourceInfo, SourceInfoTransform} final def === (that: BitPat): Bool = macro SourceInfoTransform.thatArg final def =/= (that: BitPat): Bool = macro SourceInfoTransform.thatArg + /** @group SourceInfoTransformMacro */ def do_=== (that: BitPat) // scalastyle:ignore method.name (implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): Bool = that === x + /** @group SourceInfoTransformMacro */ def do_=/= (that: BitPat) // scalastyle:ignore method.name (implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): Bool = that =/= x - + final def != (that: BitPat): Bool = macro SourceInfoTransform.thatArg @chiselRuntimeDeprecated @deprecated("Use '=/=', which avoids potential precedence problems", "chisel3") |
