forked from lowRISC/ibex
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix and waive Verilator lint errors in tb_cs_registers
Add a waiver for top-level parameters passed in through the command line, and fix the use within the file.
- Loading branch information
Showing
3 changed files
with
40 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Copyright lowRISC contributors. | ||
// Licensed under the Apache License, Version 2.0, see LICENSE for details. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
// Lint waivers for processing simple_system RTL with Verilator | ||
// | ||
// This should be used for rules applying to things like testbench | ||
// top-levels. For rules that apply to the actual design (files in the | ||
// 'rtl' directory), see verilator_waiver_rtl.vlt in the same | ||
// directory. | ||
// | ||
// See https://www.veripool.org/projects/verilator/wiki/Manual-verilator#CONFIGURATION-FILES | ||
// for documentation. | ||
// | ||
// Important: This file must included *before* any other Verilog file is read. | ||
// Otherwise, only global waivers are applied, but not file-specific waivers. | ||
|
||
`verilator_config | ||
|
||
// We use boolean top-level parameters. | ||
// When building with fusesoc, these get set with defines like | ||
// -GRV32M=1 (rather than -GRV32M=1'b1), leading to warnings like: | ||
// | ||
// Operator VAR '<varname>' expects 1 bits on the Initial value, but | ||
// Initial value's CONST '32'h1' generates 32 bits. | ||
// | ||
// This signoff rule ignores errors like this. Note that it only | ||
// matches when you set a 1-bit value to a literal 1, so it won't hide | ||
// silly mistakes like setting it to 2. | ||
// | ||
lint_off -rule WIDTH -file "*/tb/tb_cs_registers.sv" | ||
-match "*expects 1 bits*Initial value's CONST '32'h1'*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters