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
Feature request: elaboration tasks #1429
Comments
Original Redmine Comment Sorry, no way to edit posts :-( The text above is obviously taken from the IEEE1800-2017 LRM. This is the test case:
|
Original Redmine Comment Searching a github copy of verilator for completely different stuff ($diplay() implementations), I hit upon the Verilator parser section, where it is clearly indicated this is already supported... So, it seems that elaboration tasks are partially supported (parsed but not correctly executed). |
Original Redmine Comment As you noted this is (supposedly) supported, can you please edit the e.g. test_regress/t/t_assert_elab_bad.pl test to show the issue, and then ideally debug? |
Original Redmine Comment I'm less familiar with the Verilator codebase, but I';ll try next week. |
Original Redmine Comment OK, I tried looking into it. Take this code for example:
$warning is an elaboration time task, while the $Info is a runtime task. The XML shows them both on the same level under an tag:
It yet remains to be seen why the $warning call is created under an tag (I assume that corresponds to an identical AST node). Going back to the working code for functions, I tried:
and got:
I also noticed that as long as the constant function is used by runtime constructs and not cmpile time constructs, it won't be triggered. e.g., if I change
|
Original Redmine Comment Did some poking on this, will add it to the soon-to-work on list. If you or someone has time to create a patch it would be welcome. |
Original Redmine Comment Fixed in git towards 4.018. |
Original Redmine Comment In 4.018. |
Author Name: Udi Finkelstein
Original Redmine Issue: 1429 from https://www.veripool.org
While looking for a way to trigger an error on invalid parameter combinations of a parammetrized module, I stumbled upon this hidden gem:
So it seems that if you call $error()/$wrning()/$info()/$fatal() directly within a generate section, outside any procedural always/initial block,
it is treated as elaboration system atsks, not runtime system tasks!
I've tried the following example, but it triggered no response from Verilator:
Is it possible to add support for these system tasks in elaboration time?
The text was updated successfully, but these errors were encountered: