-
-
Notifications
You must be signed in to change notification settings - Fork 7
Linting
Gonzalo Larumbe edited this page Feb 20, 2023
·
9 revisions
Any of the following linters:
- Verilator
- Icarus Verilog
- Verible
- Slang
- Svlint
- Cadence HAL
After installing, make sure that it is available on the $PATH:
which verilator
/usr/bin/verilator
By default some linters (e.g. verilator
, svlint
) will look for modules in the list of current open Verilog files and directories to perform linting.
Others, such as verible
, will only lint current file without trying to find instance module definitions in other files. verible
offers the option of configuring rules through customization of variable verilog-ext-flycheck-verible-rules
, according to its syntax.
For example, the following snippet disables the lint checks for rule line-length
and enables checks for parameter-type-name-style
:
(setq verilog-ext-flycheck-verible-rules '("-line-length"
"+parameter-type-name-style"))
-
verilog-ext-flycheck-mode-toggle
is bound by default to C-c C-f. - If run with
prefix-arg
C-u C-c C-f it allows selection of current active linter. This is particularly useful if switching between RTL and Verification code- Verilator is quite effective for RTL code but does not support SystemVerilog verification constructs
- Verible can be very useful for one-file linting for Verification files, but might be less efective than others for RTL