Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IntrinsicModule: deprecate in favor of intrinsic expressions. #4060

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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(",")
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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] = {
Expand Down
29 changes: 1 addition & 28 deletions docs/src/explanations/intrinsics.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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)
}
```
Loading