3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-07 09:55:20 +00:00

cxxrtl: restrict the debug info of a blackbox to its ports.

This commit is contained in:
Jean-François Nguyen 2020-06-16 15:28:35 +02:00
parent 334ec5fa0a
commit 8d98c3861d

View file

@ -1621,6 +1621,8 @@ struct CxxrtlWorker {
for (auto wire : module->wires()) {
if (wire->name[0] != '\\')
continue;
if (module->get_bool_attribute(ID(cxxrtl_blackbox)) && (wire->port_id == 0))
continue;
count_public_wires++;
if (debug_const_wires.count(wire)) {
// Wire tied to a constant
@ -1647,6 +1649,7 @@ struct CxxrtlWorker {
count_skipped_wires++;
}
}
if (!module->get_bool_attribute(ID(cxxrtl_blackbox))) {
for (auto &memory_it : module->memories) {
if (memory_it.first[0] != '\\')
continue;
@ -1661,6 +1664,7 @@ struct CxxrtlWorker {
f << indent << mangle(cell) << access << "debug_info(items, ";
f << "path + " << escape_cxx_string(get_hdl_name(cell) + ' ') << ");\n";
}
}
dec_indent();
log_debug("Debug information statistics for module `%s':\n", log_id(module));