From 9fdea534f83578f745ec22cc7e530105f9fd67f7 Mon Sep 17 00:00:00 2001 From: Megan Wachs Date: Wed, 28 Apr 2021 10:57:13 -0700 Subject: Cookbook: clean up desiredName example (#1886) * Cookbook: clean up desiredName example * Update cookbook.md--- docs/src/cookbooks/cookbook.md | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'docs') 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) ``` -- cgit v1.2.3