summaryrefslogtreecommitdiff
path: root/docs/src/cookbooks
diff options
context:
space:
mode:
authorJack Koenig2020-11-11 13:13:54 -0800
committerGitHub2020-11-11 21:13:54 +0000
commite6192ea75ce0d840b4b51a376921c2feecaa3b46 (patch)
tree31b1b50cca00cbc4c0e30d0fd52e0cd4a4a55c37 /docs/src/cookbooks
parent9f1d6cbb79ac9b9f9e2cad5f294ca5d195aeac14 (diff)
Add custom mdoc modifier for emitted Verilog (#1666)
Diffstat (limited to 'docs/src/cookbooks')
-rw-r--r--docs/src/cookbooks/naming.md11
1 files changed, 6 insertions, 5 deletions
diff --git a/docs/src/cookbooks/naming.md b/docs/src/cookbooks/naming.md
index 4caabaff..098ea898 100644
--- a/docs/src/cookbooks/naming.md
+++ b/docs/src/cookbooks/naming.md
@@ -5,7 +5,6 @@ section: "chisel3"
---
```scala mdoc:invisible
-import chisel3.internal.plugin._
import chisel3._
import chisel3.experimental.prefix
import chisel3.experimental.noPrefix
@@ -57,8 +56,9 @@ class ExampleNoPrefix extends MultiIOModule {
out := add
}
-
-println(ChiselStage.emitVerilog(new ExampleNoPrefix))
+```
+```scala mdoc:verilog
+ChiselStage.emitVerilog(new ExampleNoPrefix)
```
### I am still not getting the name I want. For example, inlining an instance changes my name!
@@ -88,8 +88,9 @@ class MyLeaf extends MultiIOModule {
val out = IO(Output(UInt(3.W)))
out := in
}
-
-println(ChiselStage.emitVerilog(new WrapperExample))
+```
+```scala mdoc:verilog
+ChiselStage.emitVerilog(new WrapperExample)
```
This can be used to rename instances and non-aggregate typed signals.