projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2db4137
)
cxxrtl: treat internal wires used only for debug as constants.
author
whitequark
<whitequark@whitequark.org>
Sat, 17 Jul 2021 14:23:57 +0000
(14:23 +0000)
committer
whitequark
<whitequark@whitequark.org>
Sat, 17 Jul 2021 14:23:57 +0000
(14:23 +0000)
Fixes #2739 (again).
backends/cxxrtl/cxxrtl_backend.cc
patch
|
blob
|
history
diff --git
a/backends/cxxrtl/cxxrtl_backend.cc
b/backends/cxxrtl/cxxrtl_backend.cc
index 7ff344e66edceb67be0efd8197075fc148623281..56305258a4a62f054d8d61064d7f0179e154320a 100644
(file)
--- a/
backends/cxxrtl/cxxrtl_backend.cc
+++ b/
backends/cxxrtl/cxxrtl_backend.cc
@@
-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