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

XML output insufficiently qualified #1372

Closed
veripoolbot opened this issue Dec 5, 2018 · 21 comments
Closed

XML output insufficiently qualified #1372

veripoolbot opened this issue Dec 5, 2018 · 21 comments
Assignees
Labels
area: parser Issue involves SystemVerilog parsing resolution: fixed Closed; fixed

Comments

@veripoolbot
Copy link
Contributor


Author Name: Jonathan Kimmitt (@jrrk2)
Original Redmine Issue: 1372 from https://www.veripool.org

Original Assignee: Wilson Snyder (@wsnyder)


The xml output generated by the verilator --xmlonly command is insufficiently qualified when it comes to toplevel ports.

The attached patch addresses the issue but you need to check if it will break any of your regression tests.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2018-12-06T01:07:26Z


I'm fine with this concept but can you instead please update the patch to add a method to VDirection and AstVarType class similar to the existing ones there that is called by V3EmitXml? (Or perhaps verilogKwd() is sufficient.) That gets rid of the internal-peeking switch statement.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Jonathan Kimmitt (@jrrk2)
Original Date: 2018-12-06T09:45:00Z


This is a second attempt, which tries harder to dump the more interesting information, and also identifies interfaces.
The vartype=unused option is not used as far as I know, but I'm no Verilator expert.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Jonathan Kimmitt (@jrrk2)
Original Date: 2018-12-06T11:50:19Z


That version failed in a rather obvious way, please find attached third, and hopefully final attempt.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2018-12-06T12:14:58Z


Great, fixed in git towards 4.010.

Note used empty() instead of length() as Google static lint tool will complain as empty is faster for some containers.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Jonathan Kimmitt (@jrrk2)
Original Date: 2018-12-06T12:24:27Z


http://git.veripool.org/git/verilator seems to be down, so I can't see your final version.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2018-12-06T12:28:38Z


Huh, I'll see what's up with git.

Meantime attached.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Jonathan Kimmitt (@jrrk2)
Original Date: 2018-12-10T12:07:32Z


Dear Wilson,

I realized too late that the patch previously submitted does not cover dumping port directions for modports. The attached fix seems to be rather simple unless you know of undesirable side-effects. Sorry for the confusion over the previous message, I did not realise your repository is not browsable.

Regards,
Jonathan

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2018-12-10T12:26:03Z


Patch 5 pushed, no worries!

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Jonathan Kimmitt (@jrrk2)
Original Date: 2018-12-10T17:36:13Z


interface modportnames are not mentioned in the typetable (which leaves direction of module interface ports ambiguous).
Also need a syntax to indicate when the whole of an interface is referred to, and not just its modport.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2018-12-11T00:12:10Z


Patch 6 pushed.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Jonathan Kimmitt (@jrrk2)
Original Date: 2018-12-11T08:43:24Z


Thanks. I'm hoping that's enough to get up and running. I am considering this patch provisionally closed.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Jonathan Kimmitt (@jrrk2)
Original Date: 2018-12-12T17:11:57Z


That resolution didn't last long. It turns out AstVarXRef's are not qualified with the path
of the interface that they belong to (stored in the m_dotted field). I definitely predict the
rate of submission of patches will decline from now on.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2018-12-13T03:19:39Z


Applied. No worries, easy as long as you give patches!

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Jonathan Kimmitt (@jrrk2)
Original Date: 2018-12-22T14:32:16Z


It turns out the XML output does not include the display type for $display() and $write() statements and similar. As you know display has a newline at the end and write does not. This patch introduces a displaytype attribute in the XML which clarifies things and allows the original meaning to be (mostly) reconstructed. It looks like something weird is happening with the format specifiers as well, if I can figure that out a further patch might be required.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Jonathan Kimmitt (@jrrk2)
Original Date: 2018-12-22T14:34:19Z


... and have a happy Christmas and prosperous new year if you have already hung up your mouse for the year.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2019-01-02T12:16:59Z


Thanks again, pushed.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Jonathan Kimmitt (@jrrk2)
Original Date: 2019-01-13T07:06:35Z


Happy New Year, happy new patch. I notice extend and extends do not specify the width, and since using these functions could be used as part of an expression such as + or *, that introduces ambiguity, and should be explicit.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2019-01-14T01:59:44Z


Thanks again, pushed.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Jonathan Kimmitt (@jrrk2)
Original Date: 2019-01-14T09:53:46Z


The status says pushed but a fresh checkout of http://git.veripool.org/git/verilator
fails to include the latest patch. Am I doing something stupid ?

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2019-01-14T11:26:08Z


Sorry, pushed.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2019-01-28T12:32:14Z


In 4.010.

If you have more, please open a new bug, thanks for improving this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: parser Issue involves SystemVerilog parsing resolution: fixed Closed; fixed
Projects
None yet
Development

No branches or pull requests

2 participants