Question

Using verilator for linting, how can I turn off linting for one of my verilog files.

The manual states that a configuration file with the following context can be used for this cause

`verilator_config
lint_off -file "dont_lint_me.v"

Where do I provide this configuration file as an input to verilator? Do I include it in one of my other verilog files (won't my (non-verilator) compiler and synthesizer be angry with this code)?

The manual also states:

Take remaining text up the the next `verilog mode switch and treat it as Verilator configuration commands.

What does verilog mode switch mean?

Right now I am invoking verilator with verilator --lint-only linechecker.v

Was it helpful?

Solution

You can include the configuration file in your Verilator command. Per the Verilator manual http://www.veripool.org/projects/verilator/wiki/Manual-verilator, just create the file with the configuration options, and name it something such as config.vlt (their recommended extension, but it doesn't matter). Then just add it to your Verilator call, such as verilator --lint-only linechecker.v config.vlt.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top