Miter generation

Header: mockturtle/algorithms/miter.hpp

template<class NtkDest, class NtkSource1, class NtkSource2>
std::optional<NtkDest> mockturtle::miter(NtkSource1 const &ntk1, NtkSource2 const &ntk2)

Creates a combinational miter from two networks.

This method combines two networks that have the same number of primary inputs and the same number of primary outputs into a miter. The miter has the same number of inputs and one primary output. This output is the OR of XORs of all primary output pairs. In other words, the miter outputs 1 for all input assignments in which the two input networks differ.

All networks may have different types. The method returns an optional, which is nullopt, whenever the two input networks don’t match in their number of primary inputs and primary outputs.