Skip to content
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

Possible error with SigParser and struct typedefs inside packages. #93

Closed
veripoolbot opened this issue May 26, 2009 · 3 comments
Closed
Assignees

Comments

@veripoolbot
Copy link
Collaborator


Author Name: David A
Original Redmine Issue: 93 from https://www.veripool.org
Original Date: 2009-05-26
Original Assignee: Wilson Snyder (@wsnyder)


Hi Wilson,

I'm having a rough time with the SigParser's "var" callback. I'm trying to use this callback to find typedef declarations of packed structs eg:

  typedef struct packed {
     bit yes;
     bit no;
  } type_decision; 

In order to find all this user-defined datatype declarations I'm using the "var" callback, and looking for a "typedef" keyword with "struct" datatype.
The problem I'm having is that sometimes a callback is made for the internal fields of a struct, and those fields are marked as "typedefs" of "struct" datatype.

I'm attaching a test case to clarify the issue.
On Verilog-Perl version I'm running (3.210) the printed outputs of the testcase are:

Parsing test_pkg.sv
Struct found: name=type_struct1, objof=package, data_type=struct;
Struct found: name=field_bit, objof=package, data_type=struct;
Struct found: name=field_struct1, objof=package, data_type=struct;
Struct found: name=type_struct2, objof=package, data_type=struct;
End parsing test_pkg.sv

Note that "field_struct1" and "field_bit" are fields of another structure datatypes.

To run the testcase:

myparser.pl -file=test_pkg.sv

Thanks in advance,
David

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2009-05-28T00:28:10Z


I'm traveling at the moment, but will try to fix this next week.

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2009-06-05T21:32:13Z


Note #� was similar.

This should be fixed in the git version, please give it a try.

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2009-06-17T12:02:12Z


In 3.211.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants