An attribute- mechanism for suppressing particular warnings
when using lint.
This is quick and dirty, but probably is actually a pretty
effective and reasonable way to deal with suppressing unwanted warnings from
The basic idea is to stick attributes such as (* LINT_IGNORE *) into
the source code, which with our comment syntax can be done using the form
//@VL LINT_IGNORE, or similar. We then look for these attributes to
decide whether to suppress a warning.
For convenience we treat LINT_IGNORE directives in a case-insensitive
way and treat _ interchangeably with -. This is useful because the Verilog
user typically has to use _ since these are attribute names and hence must be
We let the user write things like LINT_IGNORE_VL_WARN_ODDEXPR, or, more
conveniently, LINT_IGNORE_ODDEXPR, by just "mashing" the tail of what
they write by throwing away any leading VL_ or VL_WARN_ part. By
convention a plain LINT_IGNORE with no further information means just
ignore all warnings.
- (vl-mash-warning-strings x) maps vl-mash-warning-string across a list.
- Globally suppress certain kinds of warnings.
- Do basic string mashing to allow the user to refer to warnings in
either upper or lower case, treating - and _ as equivalent, and with or without
- Recognize strings that start with lint-ignore or lint_ignore, case