Major Tools
Other Tools
General Info

Issue #1372

XML output insufficiently qualified

Added by Jonathan Kimmitt 14 days ago. Updated 6 days ago.

% Done:



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


#1 Updated by Wilson Snyder 13 days 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 13 days 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 13 days ago

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

#4 Updated by Wilson Snyder 13 days 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 13 days ago seems to be down, so I can't see your final version.

#6 Updated by Wilson Snyder 13 days ago

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

Meantime attached.

#7 Updated by Jonathan Kimmitt 9 days 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 9 days ago

Patch 5 pushed, no worries!

#9 Updated by Jonathan Kimmitt 9 days 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 8 days ago

Patch 6 pushed.

#11 Updated by Jonathan Kimmitt 8 days 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 7 days 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 6 days ago

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

Also available in: Atom