Skip to content

Commit

Permalink
cxxrtl: don't mark buffered internal wires as UNUSED for debug.
Browse files Browse the repository at this point in the history
Public wires may alias buffered internal wires, so keep BUFFERED
wires in debug information even if they are private. Debug items are
only created for public wires, so this does not otherwise affect how
debug information is emitted.

Fixes YosysHQ#2540.
Fixes YosysHQ#2841.
  • Loading branch information
whitequark committed Jul 16, 2021
1 parent c17e385 commit 44a3d92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backends/cxxrtl/cxxrtl_backend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2795,7 +2795,7 @@ struct CxxrtlWorker {
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()) continue;
if (!wire->name.isPublic() && !wire_type.is_buffered()) continue;

if (!debug_info) continue;
if (wire->port_input || wire_type.is_buffered())
Expand Down

0 comments on commit 44a3d92

Please sign in to comment.