Skip to content

Verilog: {} and {{}} do not need parentheses #671

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

Merged
merged 1 commit into from
Sep 6, 2024
Merged

Conversation

kroening
Copy link
Member

@kroening kroening commented Sep 5, 2024

This changes the precedence of concatenation and replication when generating Verilog from expressions such that no additional parentheses are generated.

@kroening kroening marked this pull request as ready for review September 5, 2024 21:31
@@ -19,29 +19,29 @@ class sva_ranged_predicate_exprt;

// Precedences (higher means binds more strongly).
// Follows Table 11-2 in IEEE 1800-2017.
//
// We deviate from the table for the precedence of concatenation
// and replication, which act like parenteses.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// and replication, which act like parenteses.
// and replication, which act like parentheses.

This changes the precedence of concatenation and replication when generating
Verilog from expressions such that no additional parentheses are generated.
@tautschnig tautschnig merged commit cdab375 into main Sep 6, 2024
8 checks passed
@tautschnig tautschnig deleted the paren-concat branch September 6, 2024 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants