mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-06 01:24:10 +00:00
cxxrtl: treat assignable internal wires used only for debug as locals.
This issue was introduced in commit 4aa65f40
while fixing #2739.
Fixes #2882.
This commit is contained in:
parent
c2afcbe78d
commit
225af830c1
|
@ -2879,17 +2879,19 @@ struct CxxrtlWorker {
|
||||||
default: continue;
|
default: continue;
|
||||||
}
|
}
|
||||||
debug_live_nodes.erase(node);
|
debug_live_nodes.erase(node);
|
||||||
} else if (wire_type.is_local()) {
|
} else if (wire_type.is_member() || wire_type.is_local()) {
|
||||||
debug_wire_type = {WireType::LOCAL}; // wire not inlinable
|
debug_wire_type = wire_type; // 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 {
|
} else {
|
||||||
log_assert(wire_type.is_member());
|
log_assert(wire_type.type == WireType::UNUSED);
|
||||||
debug_wire_type = wire_type; // wire is a member
|
if (flow.wire_comb_defs[wire].size() == 0) {
|
||||||
|
if (wire_init.count(wire)) { // wire never modified
|
||||||
|
debug_wire_type = {WireType::CONST, wire_init.at(wire)};
|
||||||
|
} else {
|
||||||
|
debug_wire_type = {WireType::CONST, RTLIL::SigSpec(RTLIL::S0, wire->width)};
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
debug_wire_type = {WireType::LOCAL}; // wire used only for debug
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue