-
Notifications
You must be signed in to change notification settings - Fork 142
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
[slang] Fix static subroutine local variables multiple assigns and reduce MultipleAlwaysAssigns diag severity #903
Conversation
and reduce MultipleAlwaysAssigns diag severity
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #903 +/- ##
=======================================
Coverage 93.64% 93.64%
=======================================
Files 189 189
Lines 47298 47297 -1
=======================================
+ Hits 44290 44292 +2
+ Misses 3008 3005 -3
... and 2 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Can you explain more why you want to downgrade the error? The LRM is pretty clear that such code is not allowed, and the example links you provided don't tell me much; each link seems to be for two different variables entirely that are only ever driven by one always_ff block that I can see. |
Thanks for the response! In the |
Hmm, I see. All of the tools I tried have interpreted this rule to not include local variable declarations, so I think I would just rather change slang to not cause an error if the variable being written to is a local variable of a task or function. |
Maybe we shouldn’t change |
I submit an issue for |
MultipleAlwaysAssign
error diag check is not handle such type ofstatic
function local variable assign despite the fact that there is an function local variablec
assigns during call atalways_ff
block:But such type of code triggers that diag correctly:
IEEE Std 1800™-2017
says:So that thing tell us to maintain function local variables just like as procedure block outs especially in the case of a
static
function. I don't think so that is need to be fixed in case of automatic function.Secondary i want to suggest to reduce severity of
MultipleAlwaysAssing
to have an opportunity for disabling it manually because it's hard to make it heuristically correct at all cases which leads to false positives. For example:Without synthesis it's hard to understand which paths are opposite.
Here are an example of correctly synthesiable code of
RISCV
kernel from https://github.com/syntacore/scr1Which is triggers that diag - first_always_ff_call and second_always_ff_call.