verilator %Warning-WIDTH false positive #1613
Comments
Original Redmine Comment The rightmost index of dec_len is 31:0, meaning it needs 6 bits to index into. Your cur_bit_len as you indicate is only 4 bits. Perhaps I'm confused, but seems the warning is correct. |
Original Redmine Comment does
|
Original Redmine Comment I think what I said above is consistent with IEEE 1800-2017 7.4.5 which says (among other things), "A subarray is an array that is an element of another array. As in the C language, subarrays are referenced by omitting indices for one or more array dimensions, always omitting the ones that vary most rapidly..." I find that a bit obtuse but in the preceding paragraph it describes "rapidity" of various dimensions which, I think, went something like
|
Original Redmine Comment You're right, an easy cross check:
What looks to be going on is for packed structs Verilator runs these checks twice, once on the code as written then once after the unpacking, the warning is on the second one which makes no sense for the user. Will look into fixing. |
Author Name: Tim Allen
Original Redmine Issue: 1613 from https://www.veripool.org
excerpt of file.sv...
The text was updated successfully, but these errors were encountered: