diff options
| author | Megan Wachs | 2021-04-28 10:57:13 -0700 |
|---|---|---|
| committer | GitHub | 2021-04-28 17:57:13 +0000 |
| commit | 9fdea534f83578f745ec22cc7e530105f9fd67f7 (patch) | |
| tree | 0b55e1d133215cb848ac5d3bdb78c2f362d95edc | |
| parent | 6deb379b1d8bafc81a605f60476bf0f24eac60b4 (diff) | |
Cookbook: clean up desiredName example (#1886)
* Cookbook: clean up desiredName example
* Update cookbook.md
| -rw-r--r-- | docs/src/cookbooks/cookbook.md | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/docs/src/cookbooks/cookbook.md b/docs/src/cookbooks/cookbook.md index 290a6c82..1b47ad14 100644 --- a/docs/src/cookbooks/cookbook.md +++ b/docs/src/cookbooks/cookbook.md @@ -447,16 +447,13 @@ class Salt extends Module { } ``` -Elaborating the Chisel module `Salt` yields our "desire name" for `Salt` and `Coffee` in the output Verilog: -```scala mdoc:passthrough -import chisel3.stage.{ChiselStage, ChiselGeneratorAnnotation} -import firrtl.annotations.DeletedAnnotation -import firrtl.EmittedVerilogCircuitAnnotation - -(new ChiselStage) - .execute(Array("-X", "verilog"), Seq(ChiselGeneratorAnnotation(() => new Salt))) - .collectFirst{ case DeletedAnnotation(_, a: EmittedVerilogCircuitAnnotation) => a.value.value } - .foreach(a => println(s"""|```verilog - |$a - |```""".stripMargin)) +Elaborating the Chisel module `Salt` yields our "desired names" for `Salt` and `Coffee` in the output Verilog: +```scala mdoc:silent +import chisel3.stage.ChiselStage + +ChiselStage.emitVerilog(new Salt) +``` + +```scala mdoc:verilog +ChiselStage.emitVerilog(new Salt) ``` |
