diff options
author | whitequark <whitequark@whitequark.org> | 2021-07-16 10:05:24 +0000 |
---|---|---|
committer | whitequark <whitequark@whitequark.org> | 2021-07-16 10:14:40 +0000 |
commit | 09218896d606726c7e3cd9caa635445694338fba (patch) | |
tree | 8aa31b5b70e104b630f0e4fc1f93a9965529e43b /backends/cxxrtl | |
parent | 10c3214e566d8c763a68b7b18317171b707caca4 (diff) | |
download | yosys-09218896d606726c7e3cd9caa635445694338fba.tar.gz yosys-09218896d606726c7e3cd9caa635445694338fba.tar.bz2 yosys-09218896d606726c7e3cd9caa635445694338fba.zip |
cxxrtl: emit debug items for unused public wires.
This greatly improves debug information coverage.
Fixes #2500.
Diffstat (limited to 'backends/cxxrtl')
-rw-r--r-- | backends/cxxrtl/cxxrtl_backend.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/backends/cxxrtl/cxxrtl_backend.cc b/backends/cxxrtl/cxxrtl_backend.cc index eea8103a7..bc9f516ee 100644 --- a/backends/cxxrtl/cxxrtl_backend.cc +++ b/backends/cxxrtl/cxxrtl_backend.cc @@ -2794,12 +2794,12 @@ struct CxxrtlWorker { for (auto wire : module->wires()) { const auto &wire_type = wire_types[wire]; auto &debug_wire_type = debug_wire_types[wire]; - if (wire_type.type == WireType::UNUSED) continue; - if (!wire->name.isPublic() && !wire_type.is_buffered()) continue; if (!debug_info) continue; if (wire->port_input || wire_type.is_buffered()) debug_wire_type = wire_type; // wire contains state + else if (!wire->name.isPublic()) + continue; // internal and stateless if (!debug_member) continue; if (wire_type.is_member()) @@ -2863,7 +2863,7 @@ struct CxxrtlWorker { auto &debug_wire_type = debug_wire_types[wire]; if (wire->name.isPublic()) continue; - if (live_wires[wire].empty() || debug_live_wires[wire].empty()) { + if (debug_live_wires[wire].empty()) { continue; // wire never used } else if (flow.is_inlinable(wire, debug_live_wires[wire])) { log_assert(flow.wire_comb_defs[wire].size() == 1); |