google / xls

XLS: Accelerated HW Synthesis
http://google.github.io/xls/
Apache License 2.0
1.15k stars 164 forks source link

Run generated verilog through verilog formatter #186

Open meheff opened 3 years ago

meheff commented 3 years ago

Verible verilog formatter would probably do the trick:

https://google.github.io/verible/verilog_format.html

Likely invocation:

verible-verilog-format /tmp/foo.v --try_wrap_long_lines

meheff commented 2 years ago

@taktoa This will cause a wrinkle in Verilog line tracking. I think it can be handled by analyzing the preformatted and postformatted Verilog and mutating the LineInfo accordingly. I imagine the formatter is just adding/removing white space.

hzeller commented 1 month ago

Verible would break up very long lines to be shorter. In which way is the line information used ? Is it passed in a side-channel to tools that consume the generated verilog ?