From 44a3d924ce30adfd3a09ffea40031a8d28445e25 Mon Sep 17 00:00:00 2001 From: whitequark Date: Fri, 16 Jul 2021 07:36:18 +0000 Subject: cxxrtl: don't mark buffered internal wires as UNUSED for debug. 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 #2540. Fixes #2841. --- backends/cxxrtl/cxxrtl_backend.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'backends/cxxrtl/cxxrtl_backend.cc') diff --git a/backends/cxxrtl/cxxrtl_backend.cc b/backends/cxxrtl/cxxrtl_backend.cc index 26c534bec..eea8103a7 100644 --- a/backends/cxxrtl/cxxrtl_backend.cc +++ b/backends/cxxrtl/cxxrtl_backend.cc @@ -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()) -- cgit v1.2.3