Skip to content

Conversation

kroening
Copy link
Member

This generates the property description from the expression prior to synthesis, which is closer to the Verilog source code.

@kroening kroening force-pushed the cond_for_comment branch 2 times, most recently from ab81c6d to e37325e Compare June 30, 2024 12:32
@kroening kroening marked this pull request as ready for review July 1, 2024 09:45
const hierarchical_identifier_exprt &src,
unsigned &precedence)
{
precedence = 22;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you please add a comment for this magic number?

Copy link
Member Author

Choose a reason for hiding this comment

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

Comment on lines 1164 to 1169
to_verilog_indexed_part_select_plus_or_minus_expr(src), precedence = 18);
}

else if(src.id() == ID_verilog_non_indexed_part_select)
return convert_non_indexed_part_select(
to_verilog_non_indexed_part_select_expr(src), precedence = 18);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you please add comments for those magic numbers?

@@ -1,7 +1,7 @@
CORE
named_property1.sv
--bound 0
^\[main\.assert\.1\] always main\.x == 10: PROVED up to bound 0$
^\[main\.assert\.1\] always main\.x_is_ten: PROVED up to bound 0$
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would have expected x_is_ten to make it into the property identifier, but maybe that's a misconception on my part?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, no, there is a some terminology issue here: The identifier is for assertions, not Verilog properties. Verilog properties may or may not end up as an assertion, assumption, cover statement, etc.

Verilog properties do not get checked by default.

This generates the property description from the expression prior to
synthsis, which is closer to the Verilog source code.
@kroening kroening merged commit 80e2eee into main Jul 12, 2024
@kroening kroening deleted the cond_for_comment branch July 12, 2024 19:08
Romy15200 pushed a commit to Romy15200/nws that referenced this pull request Aug 19, 2025
Verilog: generate property description prior to expression synthesis
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