diff --git a/Changes b/Changes index cbad0979b..4dcccebc8 100644 --- a/Changes +++ b/Changes @@ -7,7 +7,7 @@ The contributors that suggested a given feature are shown in []. Thanks! *** Removed --trace-lxt2, use --trace-fst instead. -**** For --xml, add additional var information, bug1372. [Jonathan Kimmitt] +**** For --xml, add additional information, bug1372. [Jonathan Kimmitt] * Verilator 4.008 2018-12-01 diff --git a/src/V3EmitXml.cpp b/src/V3EmitXml.cpp index 356936e6c..198b91059 100644 --- a/src/V3EmitXml.cpp +++ b/src/V3EmitXml.cpp @@ -161,6 +161,13 @@ class EmitXmlFileVisitor : public AstNVisitor { } puts("/>\n"); } + virtual void visit(AstIfaceRefDType* nodep) { + string mpn; + outputTag(nodep, ""); + if (nodep->isModport()) mpn = nodep->modportName(); + puts(" modportname="); putsQuoted(mpn); + outputChildrenEnd(nodep, ""); + } // Default virtual void visit(AstNode* nodep) { diff --git a/test_regress/t/t_xml_tag.out b/test_regress/t/t_xml_tag.out index 43ace0dbb..1e24077e8 100644 --- a/test_regress/t/t_xml_tag.out +++ b/test_regress/t/t_xml_tag.out @@ -13,36 +13,48 @@ - + + + - - - - - - + + + + + + + + + + + + + + - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + + - + diff --git a/test_regress/t/t_xml_tag.v b/test_regress/t/t_xml_tag.v index 196e18cd1..a3b56364b 100644 --- a/test_regress/t/t_xml_tag.v +++ b/test_regress/t/t_xml_tag.v @@ -3,6 +3,11 @@ // This file ONLY is placed into the Public Domain, for any use, // without warranty, 2017 by Chris Randall. +interface ifc; + integer value; + modport out_modport (output value); +endinterface + module m ( input clk_ip, // verilator tag clk_ip @@ -20,6 +25,8 @@ module m // This is a comment + ifc itop(); + my_struct this_struct [2]; // verilator tag this_struct endmodule