Skip to content

Formatter CLI ​

lazyverilog-fmt formats one SystemVerilog file. See CLI tools to build it.

bash
lazyverilog-fmt [-i|--in-place] [--log <log-dir>] [--] <file>

One file per run. -- ends the options, for a file whose name starts with -.

FlagDescription
-i, --in-placeWrite the result back to the file instead of stdout
--log <log-dir>Write per-pass logs to <log-dir>, for debugging
-h, --helpPrint usage
--versionPrint the version

It reads [format] from the nearest lazyverilog.toml above the file, and uses defaults if there is none. See Formatter options.

bash
./build/lazyverilog-fmt rtl/m_alu.sv        # to stdout
./build/lazyverilog-fmt -i rtl/m_alu.sv     # in place

Exit codes ​

CodeMeaning
0Success
1Usage error (unknown option, no file, or more than one file), or file not found, or cannot be read or written
2Safety check failed: formatting would have changed more than whitespace

Released under the MIT License. Themed with Catppuccin.