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
Verilog::Perl 3.305 doesn't populate the data_type field in a var callback #361
Comments
Original Redmine Comment I think I might have misunderstood the original question. Are you looking for the members of the covergroup, or the variable that instantiates the covergroup (with new())? Neither are presently supported. My original reading was the members, but now think you want the latter? If so, that's a resolution problem which the parser doesn't deal with; it's currently up to the application to know what's behind a data type (covergroups being just a data type.) I realized though that there wasn't a way to know what data types were declared as covergroups, so I added a covergroup and endgroup callback. So, you can build a hash with the covergroup callback, and check it on each var. There's also an internal symbol table that 'sort of' knows it's a covergroup, but that's not presently exposed for some ugly reasons. |
Original Redmine Comment BTW covergroup/endgroup now in git towards 3.308. |
Original Redmine Comment Thanks for this quick response. I should have written a reproducer from the start, but was just busy today -- my apologies. Consider the verilog below. These are the args to the var callbacks I see when it gets parsed. Note the coverGroupInst has no data_type value at all. It would be useful if it could be 'covergroup' (similar to 'struct').
|
Original Redmine Comment Ahh, having a empty data_type is just a typo. Fixed in git towards 3.308. The var callback will now return "myCoverGroup" - if you want to know that's a covergroup, an application could use the new callback to remember the declaration names, and look it up on the var callback. |
Original Redmine Comment Perfect, thanks! |
Original Redmine Comment In 3.310 |
Author Name: Jon Nall
Original Redmine Issue: 361 from https://www.veripool.org
Original Date: 2011-06-30
Original Assignee: Wilson Snyder (@wsnyder)
I'm using Verilog::Perl 3.305. When using the var callback, I don't get a value for the $data_type argument when the var being instantiated is a covergroup.
=item $self->var ( $kwd, $name, $objof, $nettype, $data_type, $array, $value )
I was curious if it's possible to get that argument populated with the name of the cover group.
After an email from Wilson he mentioned cover groups are more like structs than normal variables. In this case, I wouldn't mind the $data_type field to be populated with "covergroup" (similar to how struct works).
The text was updated successfully, but these errors were encountered: