passes to identify input and output ports of cells. The verilog backend
also does not output placeholder modules on default.
-- The "keep" attribute on cells is used to mark cells that should never be
- removed by the optimizer. This is used for example for cells that have
- hidden connections that are not part of the netlist, such as IO pads.
+- The "keep" attribute on cells and wires is used to mark objects that should
+ never be removed by the optimizer. This is used for example for cells that
+ have hidden connections that are not part of the netlist, such as IO pads.
- In addition to the (* ... *) attribute syntax, yosys supports
the non-standard {* ... *} attribute syntax to set default attributes
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;