-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Listing the hierarchy of a module when a warning in that module fires and the code depends on parameters? #1125
Comments
Some more thoughts:
|
slang already sort of has what you're asking for, controlled by the Separately, I think Wuseless-cast is a little overzealous in that it just checks integral types with the same width; probably it should be a little more exact, and probably shouldn't warn about genvars, etc. |
--diag-hierarchy is exactly what I was looking for. I had copied VIM I don't have any examples off-hand where The cases where knowing the hierarchy would have been helpful are almost always width-mismatch or conversion warnings where parameters are either configured wrong, or the RTL isn't well written. Most of the time I can tell how to fix the RTL from casually reading the code. But sometimes, the RTL code is of... sufficiently low-quality as to make groking its intent a bit time-consuming. So being able to get the param values from the instance helps speed up the learning curve. I don't have the width-mismatch and conversion warnings turned on yet for a couple of larger repos, so I'll keep my eye out for some good examples that I can easily minimize. |
While attempting to enable every slang warning in many repos, one issue I run into is when warnings only fire within a module when parameters of that module are specific values. i.e. there is no warning in all compiles, but only under certain configurations. In large models, it can be difficult to track down exactly which hierarchy the warning is related to, as the warning fires generically against the child module without any context.
In the following example, if module-instance
m2
is commented out, there is no warning, but when the warning fires it is not always obvious that it is only specific to m2 and not both m1 and m2.What do you think about adding new
info
printouts after the warning-message which provide the module hierarchy for the module that contains the warning? I don't have an exhaustive list of all the warnings where this extra information would be useful yet, and always dumping an Info message might be annoying.Note: In the below example, the static-width-cast was added to the RTL to suppress LHS vs RHS width mismatches from a different vendor LINT tool used by a project, which then leads to the Slang warning. I don't have a simple way to make both tools happy at the same time yet. :-)
The text was updated successfully, but these errors were encountered: