-
Notifications
You must be signed in to change notification settings - Fork 145
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
Why are the common cells not using the assertion macros? #232
Comments
I believe this is mainly due to legacy reasons or personal preference. I am fully in favor of making this consistent, and also to enable easier ways to choose the proper define guards. Adding @phsauter to the loop, since we recently had the same discussion. |
Personally I am in favor of using the common cells assertions throughout the common cells themself. One thing we may want to keep is |
Alright, then I will proceed with a PR to make this happen. Regarding the Also, since many assertions do have a descriptive message, I would add an extra optional argument at the end of each assertion macro to keep displaying that message. For instance, the message shown when a full FIFO is written is more descriptive than just the name Lines 146 to 148 in aa85c7a
An optional argument at the end of the argument list should ensure backwards compatibility with any current users of Please let me know if you any reservations w.r.t. this or any other suggestions/ideas. |
Btw, I would also change the |
I would probably advise against that. Most simulators treat assertions anyway as fatal and this gives you more fine grained control over the assertion and it doesn't fatal out on the call to |
Ok, then let's stick with |
Is there a particular reason why the modules in this repository are not using the assertion macros in
assertions.svh
?Using these macros seems to make sense, as it allows more freedom in defining custom ways to report assertions (via the
`ASSERT_RPT
macro) and also to override macros that typically disable assertions such as`SYNTHESIS
by forcefully defining`INC_ASSERT
.@niwis Would a patch that replaces all
assert
(andassume
) statements in this repository with macros fromassertions.svh
be accepted? Is there anything particular that you would like to have addressed as part of such a change?The text was updated successfully, but these errors were encountered: