diff options
Diffstat (limited to 'passes')
-rw-r--r-- | passes/opt/opt_clean.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/passes/opt/opt_clean.cc b/passes/opt/opt_clean.cc index 3d75b6404..8e3691b34 100644 --- a/passes/opt/opt_clean.cc +++ b/passes/opt/opt_clean.cc @@ -190,6 +190,11 @@ static void rmunused_module_signals(RTLIL::Module *module, bool purge_mode, bool if (!wire->port_input) used_signals_nodrivers.add(sig); } + if (wire->get_bool_attribute("\\keep")) { + RTLIL::SigSpec sig = RTLIL::SigSpec(wire); + assign_map.apply(sig); + used_signals.add(sig); + } } std::vector<RTLIL::Wire*> del_wires; |