summaryrefslogtreecommitdiff
path: root/passes/opt
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2013-11-08 05:20:15 +0100
committerClifford Wolf <clifford@clifford.at>2013-11-08 05:20:15 +0100
commitb04051a0e2f859c0d9f11109e8e05e9740438f9b (patch)
treeb37765bbea60c12c3813d4389d50ca0b67a7f5eb /passes/opt
parent4abc8e695ad0b3b11ae687d776856dd98b56101d (diff)
Fixed keep attribute on wires in opt_clean
Diffstat (limited to 'passes/opt')
-rw-r--r--passes/opt/opt_clean.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/passes/opt/opt_clean.cc b/passes/opt/opt_clean.cc
index 8e3691b3..2921c92d 100644
--- a/passes/opt/opt_clean.cc
+++ b/passes/opt/opt_clean.cc
@@ -54,7 +54,7 @@ static void rmunused_module_cells(RTLIL::Module *module, bool verbose)
for (auto &it : module->wires) {
RTLIL::Wire *wire = it.second;
- if (wire->port_output) {
+ if (wire->port_output || wire->get_bool_attribute("\\keep")) {
std::set<RTLIL::Cell*> cell_list;
RTLIL::SigSpec sig = RTLIL::SigSpec(wire);
assign_map.apply(sig);