aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwhitequark <whitequark@whitequark.org>2021-07-16 11:01:10 +0000
committerGitHub <noreply@github.com>2021-07-16 11:01:10 +0000
commitefc43270fa2435fac706e380b75a45a288844343 (patch)
tree5050d35e1a21d936855fc33932f83cd68879cc76
parent37f5ed94396bd0d7161e83105e508590798f1d54 (diff)
parent09218896d606726c7e3cd9caa635445694338fba (diff)
downloadyosys-efc43270fa2435fac706e380b75a45a288844343.tar.gz
yosys-efc43270fa2435fac706e380b75a45a288844343.tar.bz2
yosys-efc43270fa2435fac706e380b75a45a288844343.zip
Merge pull request #2873 from whitequark/cxxrtl-fix-2500
cxxrtl: emit debug items for unused public wires
-rw-r--r--backends/cxxrtl/cxxrtl_backend.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/backends/cxxrtl/cxxrtl_backend.cc b/backends/cxxrtl/cxxrtl_backend.cc
index bf93c932a..dfdb9df74 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);