From b04051a0e2f859c0d9f11109e8e05e9740438f9b Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Fri, 8 Nov 2013 05:20:15 +0100 Subject: [PATCH] Fixed keep attribute on wires in opt_clean --- passes/opt/opt_clean.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/passes/opt/opt_clean.cc b/passes/opt/opt_clean.cc index 8e3691b34..2921c92d8 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 cell_list; RTLIL::SigSpec sig = RTLIL::SigSpec(wire); assign_map.apply(sig); -- 2.30.2