Skip to content
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

[SeqToSV] Do not use always_ff for compreg with initializer #7838

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

fzi-hielscher
Copy link
Contributor

@fzi-hielscher fzi-hielscher commented Nov 19, 2024

By default SeqToSV uses always_ff processes to lower seq.compreg ops. This prohibits any other assignments to the register/variable in another process. Apparently, some simulators consider an initializer at the declaration to be a process. Other simulators don't, and it is also not how I would interpret the SV spec, but what do I know?

I think dodging a simulator error is more important than having the always_ff. So, this PR changes the lowering to use always instead of always_ff in the presence of an initializer, even if the lower-to-always-ff flag is set.

See also #1310, #2110.

@fzi-hielscher fzi-hielscher added Verilog/SystemVerilog Involving a Verilog dialect Seq Involving the `seq` dialect labels Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Seq Involving the `seq` dialect Verilog/SystemVerilog Involving a Verilog dialect
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant