The Verilator model in the previous chapter was generated at the expense of turning off most of the warnings and restricting the language to IEEE 1364-2001 Verilog.
For much existing RTL, this is a satisfactory endpoint. However fixing the various warnings can allow Verilator to generate better quality code. This chapter takes each of those warnings in turn and shows how to handle them.
There is a general approach, which applies to most warnings in
Verilator An individual warning can be disabled by surrounding the
troublesome code by a verilator lint_off
and verilator lint_on
comments specific to
the warning. For example to disable a CASEX
warning use the following:
// verilator lint_off CASEX <troublesome code> // verilator lint_on CASEX