Generate verilog file with different file name

34 views
Skip to first unread message

Chin Tsai

unread,
Nov 16, 2023, 5:32:47 PM11/16/23
to chisel-users
Hello,

If I do
(new chisel3.stage.ChiselStage).emitVerilog(new Foo)
It generates a file called Foo.v

Is it possible to generate verilog file of a module with a name other than module's name?

Thanks


Jack Koenig

unread,
Nov 16, 2023, 8:53:48 PM11/16/23
to chisel...@googlegroups.com
Hello,

You can use command-line argument -o. Since you're using class chisel3.stage.ChiselStage, I assume you're using Chisel 3.6.0 or older:

(new chisel3.stage.ChiselStage).emitVerilog(new Foo, Array("-o", "<outputfilename>.v"))

In Chisel 5.0 and newer, you use firtoolOpts (since firtool is doing the actual Verilog emission):

circt.stage.ChiselStage.emitSystemVerilogFile(new Foo, firtoolOpts = Array("-o", "<outputfilename>.v"))

--
You received this message because you are subscribed to the Google Groups "chisel-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chisel-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/chisel-users/bcd4f3ca-9267-4738-b2ab-e86cf50b4c4cn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages