-
Notifications
You must be signed in to change notification settings - Fork 19
Verilog: generate property description prior to expression synthesis #585
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
Conversation
ab81c6d
to
e37325e
Compare
src/verilog/expr2verilog.cpp
Outdated
const hierarchical_identifier_exprt &src, | ||
unsigned &precedence) | ||
{ | ||
precedence = 22; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/verilog/expr2verilog.cpp
Outdated
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); |
There was a problem hiding this comment.
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$ |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
e37325e
to
08654ea
Compare
This generates the property description from the expression prior to synthesis, which is closer to the Verilog source code.