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

[ibex_tracer] Use static variables in always/final blocks #2243

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

Razer6
Copy link
Member

@Razer6 Razer6 commented Jan 9, 2025

Without, this causes warnings in xcelium:

Local static variable with initializer requires 'static' keyword.

Signed-off-by: Robert Schilling <rschilling@rivosinc.com>
@Razer6 Razer6 requested a review from rswarbrick January 9, 2025 19:45
Copy link
Contributor

@rswarbrick rswarbrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for looking at this. I understand why it might be needed for the final block, but is it also needed for the always block? I'm a little surprised if this isn't considered an automatic variable?

@Razer6
Copy link
Member Author

Razer6 commented Jan 10, 2025

Thanks for looking at this. I understand why it might be needed for the final block, but is it also needed for the always block? I'm a little surprised if this isn't considered an automatic variable?

Xcelium warns exactly for these 3 locations.

@rswarbrick
Copy link
Contributor

Huh, you're completely right! This is in the 1800 spec, section 6.21. And, thinking about it, it's kind of reasonable (and Xcelium is a bit silly to warn about this, I think).

Anyway, this looks good to me.

@rswarbrick rswarbrick added this pull request to the merge queue Jan 10, 2025
Merged via the queue into lowRISC:master with commit 5da1679 Jan 10, 2025
11 checks passed
@Razer6 Razer6 deleted the static-vars branch January 10, 2025 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants