Project

General

Profile

[logo] 
 
Home
News
Activity
About/Contact
Major Tools
  Dinotrace
  Verilator
  Verilog-mode
  Verilog-Perl
Other Tools
  BugVise
  CovVise
  Force-Gate-Sim
  Gspice
  IPC::Locker
  Rsvn
  SVN::S4
  Voneline
  WFH
General Info
  Papers

Issue #1372

XML output insufficiently qualified

Added by Jonathan Kimmitt 11 months ago. Updated 9 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Parser
% Done:

0%


Description

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.

xml.patch View - patch to identify ports and port types (2.16 KB) Jonathan Kimmitt, 12/05/2018 04:18 PM

xml.patch-attempt2 (1.35 KB) Jonathan Kimmitt, 12/06/2018 09:41 AM

xml.patch-attempt3 (1.2 KB) Jonathan Kimmitt, 12/06/2018 11:48 AM

xml.patch-attempt4 (881 Bytes) Wilson Snyder, 12/06/2018 12:28 PM

xml.patch5 (570 Bytes) Jonathan Kimmitt, 12/10/2018 12:02 PM

xml.patch6 (573 Bytes) Jonathan Kimmitt, 12/10/2018 05:34 PM

xml.patch7 (510 Bytes) Jonathan Kimmitt, 12/12/2018 05:08 PM

xml.patch8 (519 Bytes) Jonathan Kimmitt, 12/22/2018 02:28 PM

xml.patch9 (867 Bytes) Jonathan Kimmitt, 01/13/2019 07:02 AM

History

#1 Updated by Wilson Snyder 11 months ago

  • Status changed from New to AskedReporter

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.

#2 Updated by Jonathan Kimmitt 11 months ago

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.

#3 Updated by Jonathan Kimmitt 11 months ago

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

#4 Updated by Wilson Snyder 11 months ago

  • Status changed from AskedReporter to Resolved

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.

#5 Updated by Jonathan Kimmitt 11 months ago

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

#6 Updated by Wilson Snyder 11 months ago

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

Meantime attached.

#7 Updated by Jonathan Kimmitt 11 months ago

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

#8 Updated by Wilson Snyder 11 months ago

Patch 5 pushed, no worries!

#9 Updated by Jonathan Kimmitt 11 months ago

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.

#10 Updated by Wilson Snyder 11 months ago

Patch 6 pushed.

#11 Updated by Jonathan Kimmitt 11 months ago

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

#12 Updated by Jonathan Kimmitt 11 months ago

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.

#13 Updated by Wilson Snyder 10 months ago

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

#14 Updated by Jonathan Kimmitt 10 months ago

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.

#15 Updated by Jonathan Kimmitt 10 months ago

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

#16 Updated by Wilson Snyder 10 months ago

Thanks again, pushed.

#17 Updated by Jonathan Kimmitt 9 months ago

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.

#18 Updated by Wilson Snyder 9 months ago

Thanks again, pushed.

#19 Updated by Jonathan Kimmitt 9 months ago

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 ?

#20 Updated by Wilson Snyder 9 months ago

Sorry, pushed.

#21 Updated by Wilson Snyder 9 months ago

  • Status changed from Resolved to Closed

In 4.010.

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

Also available in: Atom