Conversation
s_nz was assigned in two separate always @(posedge clk) blocks: the main accumulator block reset it to 0 alongside s_valid/acc, and a second, dedicated block both reset it to 0 and drove its real value (the OR-reduce of the final syndromes) on in_valid && in_last. A variable driven by more than one procedural block is invalid Verilog, caught by any tool that checks for this (e.g. EBMC: "s_nz has multiple drivers"). Remove the redundant reset assignment from the first block; the second block already resets s_nz on rst and is its sole driver. Found via ebmc's parse/elaborate pass over the benchmark suite (https://diffblue.github.io/hw-cbmc/logikbench/).
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
rs_syndrome.s_nzis assigned in two separatealways @(posedge clk)blocks: the main accumulator block resets it to 0 alongside
s_valid/acc, and a second, dedicated block both resets it to 0 anddrives its real value (the OR-reduce of the final syndromes) on
in_valid && in_last. A variable driven by more than one proceduralblock is invalid Verilog, caught by any tool that checks for this --
e.g. ebmc reports
`s_nz' has multiple driversand rejects themodule.
Fix
Remove the redundant reset assignment to
s_nzfrom the first block;the second block already resets it on
rstand is its sole driver.No behavioral change (both blocks reset it to the same value 0; only
the second block ever drives it to anything else).
Note
reedsolomonstill won't fully elaborate with ebmc after this fix --rs_dec.vshares anintegerloop counter (k) across two clockedalwaysblocks, which is a separate, real bug in ebmc itself (notthis RTL), already reported at
diffblue/hw-cbmc#2184.
How found
Found via
ebmc's parse/elaborate pass over the benchmark suite,reported at https://diffblue.github.io/hw-cbmc/logikbench/.