Added support for "keep" attribute to abc pass
authorClifford Wolf <clifford@clifford.at>
Sat, 8 Feb 2014 13:25:29 +0000 (14:25 +0100)
committerClifford Wolf <clifford@clifford.at>
Sat, 8 Feb 2014 13:25:29 +0000 (14:25 +0100)
passes/abc/abc.cc

index 8f873867dbeb497b454cc05f58cfe6fe90453f12..5aa13572e21f353602653efe79f99f6e94330399 100644 (file)
@@ -447,7 +447,7 @@ static void abc_module(RTLIL::Design *design, RTLIL::Module *current_module, std
                extract_cell(c);
 
        for (auto &wire_it : module->wires) {
-               if (wire_it.second->port_id > 0)
+               if (wire_it.second->port_id > 0 || wire_it.second->get_bool_attribute("\\keep"))
                        mark_port(RTLIL::SigSpec(wire_it.second));
        }