diff --git a/build.sbt b/build.sbt index 37b439c73ab..4c87bd90fb2 100644 --- a/build.sbt +++ b/build.sbt @@ -66,7 +66,8 @@ lazy val warningSuppression = Seq( "msg=undefined in comment for method cf in class PrintableHelper:s", // This is deprecated for external users but not internal use "cat=deprecation&origin=firrtl\\.options\\.internal\\.WriteableCircuitAnnotation:s", - "cat=deprecation&origin=chisel3\\.util\\.experimental\\.BoringUtils.*:s" + "cat=deprecation&origin=chisel3\\.util\\.experimental\\.BoringUtils.*:s", + "cat=deprecation&origin=chisel3\\.experimental\\.IntrinsicModule:s" ).mkString(",") ) diff --git a/core/src/main/scala/chisel3/experimental/IntrinsicModule.scala b/core/src/main/scala/chisel3/experimental/IntrinsicModule.scala index 046b947b300..f1f2efd52f9 100644 --- a/core/src/main/scala/chisel3/experimental/IntrinsicModule.scala +++ b/core/src/main/scala/chisel3/experimental/IntrinsicModule.scala @@ -11,6 +11,7 @@ private[chisel3] abstract class BaseIntrinsicModule(intrinsicName: String) exten val intrinsic = intrinsicName } +@deprecated("use Intrinsic and IntrinsicExpr instead, intrinsic modules are deprecated", "Chisel 7.0.0") abstract class IntrinsicModule(intrinsicName: String, val params: Map[String, Param] = Map.empty[String, Param]) extends BaseIntrinsicModule(intrinsicName) { private[chisel3] override def generateComponent(): Option[Component] = { diff --git a/docs/src/explanations/intrinsics.md b/docs/src/explanations/intrinsics.md index 2435db893c4..131dc994208 100644 --- a/docs/src/explanations/intrinsics.md +++ b/docs/src/explanations/intrinsics.md @@ -16,11 +16,6 @@ available is documented by an implementation. The `Intrinsic` and `IntrinsicExpr` can be used to create intrinsic statements and expressions. -Modules defined as an `IntrinsicModule` will be instantiated as normal modules, -but the intrinsic field communicates to the compiler what functionality to use to -implement the module. Implementations may not be actual modules, the module -nature of intrinsics is merely for instantiation purposes. - ### Parameterization Parameters can be passed as an argument to the IntModule constructor. @@ -36,28 +31,6 @@ import chisel3._ ```scala mdoc:compile-only class Foo extends RawModule { - val myresult = IntrinsicExpr("MyIntrinsic", UInt(32.W), "STRING" -> "test")(3.U, 5.U) -} -``` - -### IntrinsicModule Example - -This following creates an intrinsic module for the intrinsic named -"OtherIntrinsic". It takes a parameter named "STRING" and has one bundle port. - -```scala mdoc:invisible -import chisel3._ -``` - -```scala mdoc:compile-only -import chisel3.experimental.IntrinsicModule - -class ExampleIntrinsicModule(str: String) extends IntrinsicModule( - "OtherIntrinsic", - Map("STRING" -> str)) { - val foo = IO(new Bundle() { - val in = Input(UInt()) - val out = Output(UInt(32.W)) - }) + val myresult = IntrinsicExpr("MyIntrinsic", UInt(32.W), "STRING" -> "test")(3.U, 5.U) } ```