From: whitequark Date: Fri, 12 Jun 2020 00:35:18 +0000 (+0000) Subject: cxxrtl: annotate port direction as comments. X-Git-Tag: working-ls180~478^2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d5ecd4a570a34f5315824a5bfbd740f7fb1866fa;p=yosys.git cxxrtl: annotate port direction as comments. --- diff --git a/backends/cxxrtl/cxxrtl_backend.cc b/backends/cxxrtl/cxxrtl_backend.cc index c6b8bbc47..a4ef38128 100644 --- a/backends/cxxrtl/cxxrtl_backend.cc +++ b/backends/cxxrtl/cxxrtl_backend.cc @@ -1448,7 +1448,14 @@ struct CxxrtlWorker { } dump_attrs(wire); - f << indent << (unbuffered_wires[wire] ? "value" : "wire") << "<" << width << "> " << mangle(wire); + f << indent; + if (wire->port_input && wire->port_output) + f << "/*inout*/ "; + else if (wire->port_input) + f << "/*input*/ "; + else if (wire->port_output) + f << "/*output*/ "; + f << (unbuffered_wires[wire] ? "value" : "wire") << "<" << width << "> " << mangle(wire); if (wire->has_attribute(ID::init)) { f << " "; dump_const_init(wire->attributes.at(ID::init));