You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to use the inside operator with a range, had multiple functions fail on warnings and realized it was all that had ranges starting with zero. Below is a minimal test case. This was done with the Fedora 31 default verilator (distro released this week).
*$ verilator --version*
Verilator 4.016 2019-06-16 rev UNKNOWN_REV
*$ verilator --lint-only -sv test_pkg.sv*
%Warning-UNSIGNED: test_pkg.sv:8: Comparison is constant due to unsigned arithmetic
... Use "/* verilator lint_off UNSIGNED */" and lint_on around source to disable this message.
%Error: Exiting due to 1 warning(s)
%Error: Command Failed /usr/bin/verilator_bin --lint-only -sv test_pkg.sv
The text was updated successfully, but these errors were encountered:
Original Redmine Comment
Author Name: Mitch Hayenga
Original Date: 2019-11-02T18:49:10Z
Note: It also seems to have a range issue issue if the range extends to the end of the range (8'hff). Works if I split it and make it { [8'h40 : 8'hfe], 8'hff }
7 function automatic logic testRangeAlsoFails(input [7:0] byte_in);
8 return byte_in inside { [8'h40 : 8'hff] };
9 endfunction
%Warning-CMPCONST: test_pkg.sv:8: Comparison is constant due to limited range
... Use "/* verilator lint_off CMPCONST */" and lint_on around source to disable this message.
Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2019-11-02T20:56:50Z
Thanks for the good report. Verilator internally converts the inside to <= or >=, which normally give those warnings, but obviously pointless to the user.
Author Name: Mitch Hayenga
Original Redmine Issue: 1581 from https://www.veripool.org
Original Assignee: Wilson Snyder (@wsnyder)
Trying to use the inside operator with a range, had multiple functions fail on warnings and realized it was all that had ranges starting with zero. Below is a minimal test case. This was done with the Fedora 31 default verilator (distro released this week).
The text was updated successfully, but these errors were encountered: