Closed likeamahoney closed 8 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 93.64%. Comparing base (
4c4155f
) to head (09eb208
).
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.
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 syntacore
example above slang
errors on the static
local function (which called in both always_ff
blocks) variable tmp assignment.
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.
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 slang
in this regard, but just hide that error under the --compat vcs
option, since LRM still mentions local function variables inside calls at always_ff
procedural blocks.
I submit an issue for syntacore
RISC V
kernel project - https://github.com/syntacore/scr1/issues/63
I ended up fixing this differently:
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.