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
Verilator does not support assertions in constant functions #973
Comments
Original Redmine Comment Should have linked to the repository. I realized after posting this patch that I'm failing to do proper formatting of the format string. I suspect I can extract some code from V3EmitC to be able to do this at elaboration time as well. |
Original Redmine Comment Updated github repository to expand format strings and updated bundled test. |
Original Redmine Comment Good stuff, thanks! Yes, please add new error codes, maybe something like USER_WARN, USER_ERROR,USER_FATAL, USER_INFO. Add documentation on them to bin/verilator. In t_assert_elab/assert_elab_fail.pl, use please use file_grep to check that the messages print properly. Please rename _fail.pl to _bad.pl - the bad suffix indicates it's expected to fail. Then should be good to get merged. |
Original Redmine Comment Make that USERERROR, USERFATAL, USERINFO, USERWARN. Error codes don't have underscores otherwise. |
Original Redmine Comment Thanks! Updated with requested changes. |
Original Redmine Comment Anything else I can change in this patch to get it merged? Let me know. Code is available at https://github.com/phb/verilator-asserts |
Original Redmine Comment Thanks for the ping, I had missed that there was a new version. Pushed to git towards 3.878. |
Original Redmine Comment In 3.878. |
Author Name: Johan Bjork
Original Redmine Issue: 973 from https://www.veripool.org
Original Date: 2015-10-01
Original Assignee: Johan Bjork
Specifically, Verilator does not support statements like this
which should be valid SV-2009.
My first attempt on a patch to verilator is available here phb/verilator-asserts@1908f3b. I've left a FIXME in there -- specifically asking for feedback whether we should use different V3ErrorCode's for elaboration errors triggered by user assertions. Let me know what you think and I'll change the patch as needed.
The text was updated successfully, but these errors were encountered: