write_cxxrtl: ignore disconnected module ports.

E.g. port `q` in `submod x(.p(p), .q());`.

Fixes #1920.
This commit is contained in:
whitequark 2020-04-14 12:34:35 +00:00
parent f44b287f8e
commit 0d0bf9c4a2
1 changed files with 2 additions and 0 deletions

View File

@ -970,6 +970,8 @@ struct CxxrtlWorker {
continue;
}
if (cell->output(conn.first)) {
if (conn.second.empty())
continue; // ignore disconnected ports
f << indent;
dump_sigspec_lhs(conn.second);
f << " = " << mangle(cell) << "." << mangle_wire_name(conn.first) << ".curr;\n";