3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-08 10:25:19 +00:00

Merge pull request #2879 from whitequark/cxxrtl-fix-2739-again

cxxrtl: treat internal wires used only for debug as constants
This commit is contained in:
whitequark 2021-07-17 17:22:15 +00:00 committed by GitHub
commit 101d72ccb3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2881,6 +2881,12 @@ struct CxxrtlWorker {
debug_live_nodes.erase(node);
} else if (wire_type.is_local()) {
debug_wire_type = {WireType::LOCAL}; // wire not inlinable
} else if (wire_type.type == WireType::UNUSED) {
if (wire_init.count(wire)) {
debug_wire_type = {WireType::CONST, wire_init.at(wire)};
} else {
debug_wire_type = {WireType::CONST, RTLIL::SigSpec(RTLIL::S0, wire->width)};
} // wire never modified
} else {
log_assert(wire_type.is_member());
debug_wire_type = wire_type; // wire is a member