Bi-decomposition

Header: mockturtle/algorithms/bi_decomposition.hpp

The algorithm implements a method for 2-input gates logic synthesis using the bi-decomposition algorithm proposed in “An algorithm for bi-decomposition of logic functions” by A. Mishchenko, B. Steinbach, and M. Perkowski (DAC, 2001).

This method is implemented in the function bi_decomposition, which takes as input a function represented as truth table with possible care set (represented as truth table).

An example to run bi-decomposition algorithm for the synthesis of a logic network is by doing:

xag_network ntk;
std::vector<xag_network::signal> pis( 4u );
std::generate( pis.begin(), pis.end(), [&]() { return ntk.create_pi(); } );
ntk.create_po( bi_decomposition( ntk, func, care, pis ) );

Here, the function returns a signal of the XAG and performs the synthesis of the function considering as inputs the signals in the vector pis. ‘func’ and ‘care’ are the functionality and the care set, respectively.

template<class Ntk>
signal<Ntk> mockturtle::bi_decomposition(Ntk &ntk, kitty::dynamic_truth_table const &func, kitty::dynamic_truth_table const &care, std::vector<signal<Ntk>> const &children)

Bi decomposition.

This function applies bi-decomposition on a truth table inside the network.

Note that the number of variables in func and care must be the same. The function will create a network composed on two-input gates with as many primary inputs as the number of variables in func and a single output.

Required network functions:

  • create_and

  • create_or

  • create_xor

  • create_not

Parameters:
  • func – Function as truth table

  • care – Care set of the function (as truth table)

Returns:

An internal signal of the network