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
Create a warning that checks for these width mismatches. Explicitly matching the widths via tools like WIDTH'(expression) can resolve the warning.
Additional Context
Even though this is a well-documented "feature" of (system)verilog, it can hide nasty bugs. In this case, explicit is better than implicit!
The text was updated successfully, but these errors were encountered:
Summary
I'd like the ability to detect when an assignment has differing widths, and a warning that comes with it.
Test cases and examples
In the below example,
address
silently resolves to a value of0
in QuestaSim.In the below example,
sixteen
is silently extended (I'm not sure if it's signed/arithmetic extension, either).Proposal
Create a warning that checks for these width mismatches. Explicitly matching the widths via tools like
WIDTH'(expression)
can resolve the warning.Additional Context
Even though this is a well-documented "feature" of (system)verilog, it can hide nasty bugs. In this case, explicit is better than implicit!
The text was updated successfully, but these errors were encountered: