Cleanup networks
Header: mockturtle/algorithms/cleanup.hpp
-
template<class NtkSrc, class NtkDest = NtkSrc>
NtkDest mockturtle::cleanup_dangling(NtkSrc const &ntk, bool remove_dangling_PIs = false, bool remove_redundant_POs = false) Cleans up dangling nodes.
This method reconstructs a network and omits all dangling nodes. If the flag
remove_dangling_PIsis true, dangling PIs are also omitted. If the flagremove_redundant_POsis true, redundant POs, i.e. POs connected to a PI or constant, are also omitted. The network types of the source and destination network are the same.Required network functions:
get_nodenode_to_indexget_constantcreate_picreate_pocreate_notis_complementedforeach_nodeforeach_piforeach_poclone_nodeis_piis_constant
Note
This method returns the cleaned up network as a return value. It does not modify the input network.
Warning
doxygenfunction: Unable to resolve function “mockturtle::cleanup_dangling” with arguments (NtkSource const&, NtkDest&, LeavesIterator, LeavesIterator) in doxygen xml output for project “mockturtle” from directory: doxyxml/xml. Potential matches:
- template<class NtkSrc, class NtkDest = NtkSrc> NtkDest cleanup_dangling(NtkSrc const &ntk, bool remove_dangling_PIs = false, bool remove_redundant_POs = false)
- template<typename NtkSrc, typename NtkDest, typename LeavesIterator> std::vector<signal<NtkDest>> cleanup_dangling(NtkSrc const &ntk, NtkDest &dest, LeavesIterator begin, LeavesIterator end)
-
template<class Ntk>
Ntk mockturtle::cleanup_luts(Ntk const &ntk) Cleans up LUT nodes.
This method reconstructs a LUT network and optimizes LUTs when they do not depend on all their fanin, or when some of the fanin are constant inputs.
Constant gate inputs will be propagated.
Required network functions:
get_nodeget_constantforeach_piforeach_poforeach_nodeforeach_fanincreate_picreate_pocreate_nodecreate_notis_constantis_piis_complementednode_function
Note
This method returns the cleaned up network as a return value. It does not modify the input network.