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

Comments

@veripoolbot
Copy link

@veripoolbot veripoolbot commented Dec 5, 2018


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

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Dec 6, 2018


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

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Dec 6, 2018


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

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Dec 6, 2018


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

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Dec 6, 2018


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

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Dec 6, 2018


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

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Dec 6, 2018


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

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Dec 10, 2018


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

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Dec 10, 2018


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


Patch 5 pushed, no worries!

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Dec 10, 2018


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

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Dec 11, 2018


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


Patch 6 pushed.

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Dec 11, 2018


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

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Dec 12, 2018


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

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Dec 13, 2018


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

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Dec 22, 2018


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

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Dec 22, 2018


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

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Jan 2, 2019


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


Thanks again, pushed.

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Jan 13, 2019


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

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Jan 14, 2019


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


Thanks again, pushed.

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Jan 14, 2019


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

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Jan 14, 2019


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


Sorry, pushed.

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Jan 28, 2019


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
Projects
None yet
2 participants
You can’t perform that action at this time.