What is Lint tool?

A tool that checks HDL or other code against rules without simulation, flagging problem-prone constructs such as width mismatches and unintended latches.

Field: HDL & Verification

Japanese name: Lint

What it checks

A lint tool is a static checker that examines a description by reading it, without running it. It points out constructs that are legal in the language but prone to errors. Examples are assignments between signals of different widths, latches inferred in combinational logic and incomplete sensitivity lists. Mixing blocking and nonblocking assignments, driving one signal from several places and combinational loops are also covered. The name comes from a tool of the same name that checks C programs.

An example and when to use it

Consider a description that assigns the sum of 8-bit a and b to 8-bit s. If a is 200 and b is 100 the sum is 300, but the carry is discarded and s becomes 44. Verilog does not treat this assignment as an error, so simulation does not reveal it until large values are applied. Depending on the tool and the rules enabled, a lint tool can flag the risk of losing the carry without any values being applied. It runs without a testbench, so it can be used as soon as the description is written.

Limits and operation

A lint tool looks at how the code is written and cannot tell whether the function meets the specification. Function is checked by simulation or by formal verification, which proves properties mathematically. Warnings sometimes appear at places that are fine. Too many warnings bury the important ones, so the rules in use are chosen to suit the design policy. Places that are as intended are excluded from the warnings after the reason is recorded. Checks such as those on signals crossing clock domains are often done with a separate rule set or a dedicated tool.

Try it: questions about Lint tool

What is the role of a lint tool in HDL verification?

  1. AA device that removes lint from chips
  2. BA tool for displaying simulation waveforms attractively
  3. CExamining code without simulation to find problems such as width mismatches, unintended latches and unsynthesizable constructs
Show answer and explanation

Answer: C. Examining code without simulation to find problems such as width mismatches, unintended latches and unsynthesizable constructs

A lint tool statically checks HDL code against rules and flags constructs that are legal but prone to problems, such as assignments between different widths, incomplete sensitivity lists, inferred latches, mixed blocking and nonblocking assignments and clocking mistakes. It runs without any tests, so using it from early in design reduces later verification effort.

FAQ

How does it differ from the errors reported by a simulator or synthesis tool?

In the range of what is checked. Descriptions that break the rules of the language are reported as errors by those tools. A lint tool goes further and points out constructs that break no rule but tend to lead to errors or mismatches.

If lint reports no warnings, is the circuit correct?

That cannot be concluded. A lint tool finds problems in how the code is written and does not check whether the behavior meets the specification. Functional errors are found by verification such as simulation.

Questions that mention Lint tool (1)

Lint tool appears in 2 practice questions across 1 topic, including HDL & Verification.

  1. In Verilog, two 8-bit signals a and b are added and assigned to an 8-bit signal s (assign s = a + b;). What should be watched for?

Books on HDL & Verification Ad

As an Amazon Associate I earn from qualifying purchases.

This page was drafted with AI and fact-checked by a separate AI review before publication. Our Editorial policy explains how we write and check content. If you spot an error, please tell us on our Contact page.

Back to the glossary