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 -.
| Flag | Description |
|---|---|
-i, --in-place | Write the result back to the file instead of stdout |
--log <log-dir> | Write per-pass logs to <log-dir>, for debugging |
-h, --help | Print usage |
--version | Print 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 placeExit codes
| Code | Meaning |
|---|---|
0 | Success |
1 | Usage error (unknown option, no file, or more than one file), or file not found, or cannot be read or written |
2 | Safety check failed: formatting would have changed more than whitespace |