mirror of
https://github.com/verilator/verilator.git
synced 2025-01-10 00:27:35 +00:00
Internals: Sort EmitXml visitors. No functional change.
This commit is contained in:
parent
b2322ae873
commit
3c7fef68c0
@ -97,6 +97,15 @@ class EmitXmlFileVisitor : public AstNVisitor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// VISITORS
|
// 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) {
|
virtual void visit(AstNetlist* nodep) {
|
||||||
puts("<netlist>\n");
|
puts("<netlist>\n");
|
||||||
nodep->iterateChildren(*this);
|
nodep->iterateChildren(*this);
|
||||||
@ -108,11 +117,6 @@ class EmitXmlFileVisitor : public AstNVisitor {
|
|||||||
puts(" topModule=\"1\""); // IEEE vpiTopModule
|
puts(" topModule=\"1\""); // IEEE vpiTopModule
|
||||||
outputChildrenEnd(nodep, "");
|
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) {
|
virtual void visit(AstPin* nodep) {
|
||||||
// What we call a pin in verilator is a port in the IEEE spec.
|
// What we call a pin in verilator is a port in the IEEE spec.
|
||||||
outputTag(nodep, "port"); // IEEE: vpiPort
|
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?)
|
// Children includes vpiHighConn and vpiLowConn; we don't support port bits (yet?)
|
||||||
outputChildrenEnd(nodep, "port");
|
outputChildrenEnd(nodep, "port");
|
||||||
}
|
}
|
||||||
virtual void visit(AstAssignW* nodep) {
|
|
||||||
outputTag(nodep, "contassign"); // IEEE: vpiContAssign
|
|
||||||
outputChildrenEnd(nodep, "contassign");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Data types
|
// Data types
|
||||||
virtual void visit(AstBasicDType* nodep) {
|
virtual void visit(AstBasicDType* nodep) {
|
||||||
@ -165,7 +165,7 @@ void V3EmitXml::emitxml() {
|
|||||||
of.puts("<!-- DESCR" "IPTION: Verilator output: XML representation of netlist -->\n");
|
of.puts("<!-- DESCR" "IPTION: Verilator output: XML representation of netlist -->\n");
|
||||||
of.puts("<verilator_xml>\n");
|
of.puts("<verilator_xml>\n");
|
||||||
{
|
{
|
||||||
stringstream sstr;
|
std::stringstream sstr;
|
||||||
FileLine::fileNameNumMapDumpXml(sstr);
|
FileLine::fileNameNumMapDumpXml(sstr);
|
||||||
of.puts(sstr.str());
|
of.puts(sstr.str());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user