Is there a warning for assigning to narrower bus? #4347
-
So I can avoid this in the future: wire [7:0] ram_do;
wire [7:0] rom_do;
wire mem_do = ram_do | rom_do; |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
There is a warning if you use the verific parser, however the standard verilog parser is very limited and it is recommended to use something like Icarus Verilog for checking syntax. |
Beta Was this translation helpful? Give feedback.
-
We don't warn for this because it's incredibly common to do in normal, correct code, and there's no way to differentiate this case from this one:
With other tools that do produce warnings it just leads to people ignoring all warnings. In fact, I'm currently advocating for turning this message into not a warning by default with the verific frontend too: #4324 |
Beta Was this translation helpful? Give feedback.
There is a warning if you use the verific parser, however the standard verilog parser is very limited and it is recommended to use something like Icarus Verilog for checking syntax.