A lint report is a structured bug list. The skill is not clicking "waive all" β it is triage by severity, cluster by rule, and fix the RTL pattern that caused a dozen related violations.
Change the RTL so the violation class disappears everywhere β not just silence one line with a pragma while the same pattern repeats in 40 modules.
Every violation has the same skeleton. Learn to read it once and you can triage any tool β SpyGlass, VC SpyGlass, Verilator -Wall, or your CI dashboard.
| Field | Meaning | Action |
|---|---|---|
| Severity | ERROR / WARNING / INFO | ERROR blocks merge; WARNING needs fix or waiver |
| Rule ID | e.g. INFERRED_LATCH | Look up in rule deck; cluster fixes |
| File:line | Exact location | Jump there β but check pattern elsewhere |
| Message | Human-readable why | Maps to fix pattern from 9.1β9.3 |
// This file generates 4 lint violations β find and fix each
module violation_source (
input wire clk, clk_uart,
input wire rst_n,
input wire en,
input wire [7:0] data,
input wire tx_done,
output reg [7:0] out,
output reg irq
);
// V1: INFERRED_LATCH β line 15
always @(*) begin
if (en) out = data;
end
// V2: GATED_CLOCK β line 20
wire gclk = clk & en;
reg [3:0] cnt;
always @(posedge gclk) cnt <= cnt + 1;
// V3: CDC_NO_SYNC β line 26
always @(posedge clk)
irq <= tx_done; // tx_done from clk_uart domain
// V4: MULTIPLE_DRIVER β line 30 (if assign added below)
endmodule
// assign out = 8'hFF; // uncomment β MULTIPLE_DRIVER
// Root-cause fixes for all four violation classes
module violation_fixed (
input wire clk, clk_uart,
input wire rst_n,
input wire en,
input wire [7:0] data,
input wire tx_done,
output reg [7:0] out,
output reg irq
);
// Fix V1: default assignment
always @(*) begin
out = 8'h00;
if (en) out = data;
end
// Fix V2: enable flop, not gated clock
reg [3:0] cnt;
always @(posedge clk) begin
if (!rst_n) cnt <= 0;
else if (en) cnt <= cnt + 1;
end
// Fix V3: 2-flop synchronizer for CDC
reg tx_done_meta, tx_done_sync;
always @(posedge clk or negedge rst_n) begin
if (!rst_n) {tx_done_meta, tx_done_sync} <= 2'b00;
else {tx_done_meta, tx_done_sync} <= {tx_done, tx_done_meta};
end
always @(posedge clk)
irq <= tx_done_sync;
endmodule
| Severity | Typical policy | Waiver acceptable when⦠|
|---|---|---|
| ERROR | Zero at merge | Almost never β fix RTL |
| WARNING | Fix or approved waiver | Third-party encrypted IP, documented false positive |
| INFO | Team discretion | Style rules with agreed exceptions |
Waiving without a root-cause note creates audit debt. Six months later nobody knows if the waiver hid a real CDC bug or a style nit. Every waiver needs: rule ID, justification, owner, expiry date.
A report with 200 INFERRED_LATCH warnings often means one coding habit, not 200 unique bugs. Fix the macro pattern:
Pro workflow: Export lint to CSV, pivot by rule ID and module. Present "top 5 rule clusters" in review instead of scrolling 10,000 lines.
Some violations are tool limitations, not real bugs. Before waiving, confirm:
# Waiver record β required fields
Rule: CDC_NO_SYNC
Module: third_party_phy_wrap
Line: 0 (encrypted)
Severity: WARNING
Owner: jsmith
Date: 2026-03-15
Expiry: 2027-03-15 (annual review)
Justification: Encrypted PHY IP; vendor signoff doc #PHY-CDC-042
confirms internal 2FF sync. Our lint cannot see inside.
Action: None β IP-level waiver in waiver.tcl
Re-verify: Re-run after PHY IP version bump
Production flows wire lint into CI with a pass/fail threshold. Your job as a designer is to keep the local run green before pushing.
#!/bin/bash # Typical block-level lint CI step sg_shell -tcl lint_block.tcl | tee lint.rpt ERROR_COUNT=$(grep -c "Severity: Error" lint.rpt) WARN_COUNT=$(grep -c "Severity: Warning" lint.rpt) echo "Errors: $ERROR_COUNT Warnings: $WARN_COUNT" if [ "$ERROR_COUNT" -gt 0 ]; then echo "LINT FAILED β fix ERRORs before merge" exit 1 fi # Warnings over threshold also fail in strict teams if [ "$WARN_COUNT" -gt 50 ]; then echo "WARNING budget exceeded β triage before merge" exit 1 fi echo "LINT PASSED"
| CI stage | Runtime | Rules enabled |
|---|---|---|
| Pre-commit (local) | < 2 min | Latch, multi-drive, basic clock |
| PR check | 5β15 min | Full block deck |
| Nightly SoC | 1β4 hrs | CDC, RDC, full chip |
Clock/reset and CDC rules dominate signoff reports on SoCs. Lessons 9.5β9.6 shift from "fix the warning" to "design domains correctly." For the full CDC methodology, see the CDC deep-dive course.