From 3c7fef68c05cb7893d5efd1e7b4e53c85d18ccb5 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Wed, 31 Jan 2018 07:25:10 -0500 Subject: [PATCH] Internals: Sort EmitXml visitors. No functional change. --- src/V3EmitXml.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/V3EmitXml.cpp b/src/V3EmitXml.cpp index 922d522e5..3ebd3799f 100644 --- a/src/V3EmitXml.cpp +++ b/src/V3EmitXml.cpp @@ -97,6 +97,15 @@ class EmitXmlFileVisitor : public AstNVisitor { } // VISITORS + virtual void visit(AstAssignW* nodep) { + outputTag(nodep, "contassign"); // IEEE: vpiContAssign + outputChildrenEnd(nodep, "contassign"); + } + virtual void visit(AstCell* nodep) { + outputTag(nodep, "instance"); // IEEE: vpiInstance + puts(" defName="); putsQuoted(nodep->modName()); // IEEE vpiDefName + outputChildrenEnd(nodep, "instance"); + } virtual void visit(AstNetlist* nodep) { puts("\n"); nodep->iterateChildren(*this); @@ -108,11 +117,6 @@ class EmitXmlFileVisitor : public AstNVisitor { puts(" topModule=\"1\""); // IEEE vpiTopModule outputChildrenEnd(nodep, ""); } - virtual void visit(AstCell* nodep) { - outputTag(nodep, "instance"); // IEEE: vpiInstance - puts(" defName="); putsQuoted(nodep->modName()); // IEEE vpiDefName - outputChildrenEnd(nodep, "instance"); - } virtual void visit(AstPin* nodep) { // What we call a pin in verilator is a port in the IEEE spec. outputTag(nodep, "port"); // IEEE: vpiPort @@ -125,10 +129,6 @@ class EmitXmlFileVisitor : public AstNVisitor { // Children includes vpiHighConn and vpiLowConn; we don't support port bits (yet?) outputChildrenEnd(nodep, "port"); } - virtual void visit(AstAssignW* nodep) { - outputTag(nodep, "contassign"); // IEEE: vpiContAssign - outputChildrenEnd(nodep, "contassign"); - } // Data types virtual void visit(AstBasicDType* nodep) { @@ -165,7 +165,7 @@ void V3EmitXml::emitxml() { of.puts("\n"); of.puts("\n"); { - stringstream sstr; + std::stringstream sstr; FileLine::fileNameNumMapDumpXml(sstr); of.puts(sstr.str()); }