question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

emitVerilog on the ChiselStage object

See original GitHub issue

Type of issue: feature request

Impact: API addition (no impact on existing code)

emitVerilog on the ChiselStage companion object should generate a Verilog file (like the class function).

Furthermore, having the args in the object method would be nice too, as one most of the time wants to specify the target folder.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
schoeberlcommented, May 5, 2021

I would propose to have then two methods: emitVerilog() to write a file (returning nothing, i.e., Unit) and getVerilog() returning just the string. Where to put it? Maybe on an object Chisel3? However, this is a method that does something with a (new) module. So logically it should be a method on Module.

0reactions
schoeberlcommented, May 21, 2021

Could we move stage.* into core? In that case we could simple call the relevant functions from RawModule.

Read more comments on GitHub >

github_iconTop Results From Across the Web

how to set generated directory of emitVerilog? - Stack Overflow
Set the arguments as a call to the ChiselStage . Below is an example. This will put the Verilog and FIRRTL in the...
Read more >
chisel3/ChiselStage.scala at master - GitHub
chisel3/src/main/scala/chisel3/stage/ChiselStage.scala ... final def emitVerilog( ... object ChiselMain extends StageMain(new ChiselStage).
Read more >
chisel3.stage.ChiselStage - Chisel/FIRRTL
class ChiselStage extends Stage with PreservesAll[Phase] ... final def emitVerilog(gen: ⇒ RawModule, args: Array[String] = Array.empty, ...
Read more >
freechipsproject/chisel3 - Gitter
seldridge Frederick HONG (Gitter): emitVerilog is a helper utility to run ChiselStage.execute with specific parameters. Internally, Chisel converts command line ...
Read more >
import chisel3.stage.ChiselStage // z = s ? i1 : i0 class Mux2[T
... io.s) } println((new ChiselStage).emitVerilog(new MuxTest(9, 8))) - Scastie ... object Mux2 { ... println((new ChiselStage).emitVerilog(new MuxTest(9, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found