chisel icon indicating copy to clipboard operation
chisel copied to clipboard

How to generate "only" verilog file when useing emitVerilog api

Open Chiwawachiwawa opened this issue 1 year ago • 1 comments

Hi,Sorry for a dummy question , how can I translate my Chisel(3.6.0) codes to only verilog files without systemverilog files when useing emitVerilog!! thanks a lot!!

Chiwawachiwawa avatar Dec 30 '23 21:12 Chiwawachiwawa

The SystemVerilog output should be fine for all backend tools. If you need more control, you can use some of the LoweringOptions here, likely, enabling disallowLocalVariables to avoid automatic logic. The default emission option avoids all things which may be controversial, e.g., there is no always_comb/always_ff emission unless you opt in.

Part of the problem here is that Chisel has constructs which are fundamentally not representable in Verilog. Specifically, Chisel has assert, assume, and cover. Hence, even though Chisel 3.6 was claiming to emit "Verilog", it was emitting SystemVerilog. (As soon as you emit a single SystemVerilog construct, the entire thing is SystemVerilog.) Chisel 5 stops pretending that it was emitting Verilog and calls it what it is.

On Sat, Dec 30, 2023 at 4:54 PM Rei_Fu_Zhang @.***> wrote:

Hi,Sorry for a dummy question , how can I translate my Chisel(3.6.0) codes to only verilog files without systemverilog files when useing emitVerilog!! thanks a lot!!

— Reply to this email directly, view it on GitHub https://github.com/chipsalliance/chisel/issues/3706, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHYVIV7NY22KA3IFLHN25DYMCESPAVCNFSM6AAAAABBHYY2NWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGA3DAOBWGYZTAMY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

seldridge avatar Jan 24 '24 04:01 seldridge