Akers synthesis

Header: mockturtle/algorithms/akers_synthesis.hpp

The algorithm implements the method for 3-input majority-based logic synthesis proposed in “Synthesis of combinational logic using three-input majority gates” by Sheldon B. Akers, Jr. (1962).

This method is implemented in the function akers_synthesis, which takes as input a function represented as truth table with possible don’t cares.

The easiest way to run Akers’ synthesis is by doing:

auto mig = akers_synthesis<mig_network>( func, care );

Here, the function returns an MIG, with as many inputs as the number of variables of func and one primary output.

The synthesis method can also be run using already existing signals from an MIG as inputs. As an example, consider an MIG with 4 primary inputs a, b, c, and d, as well as two gates:

std::vector<mig_network::signal> gates;
gates.push_back( mig.create_and( a, b ) );
gates.push_back( mig.create_and( c, d ) );

auto t = akers_synthesis( mig, func, care, gates.begin(), gates.end() );

The algorithm performs the synthesis of the function considering as inputs the two AND gates.

template<typename Ntk, typename LeavesIterator>
signal<Ntk> mockturtle::akers_synthesis(Ntk &ntk, kitty::dynamic_truth_table const &func, kitty::dynamic_truth_table const &care, LeavesIterator begin, LeavesIterator end)

Performs Akers majority-3 synthesis inside network.

Note that the number of variables in func and care must be the same. Also the distance between begin and end must equal the number of variables in func.

Required network functions:

  • create_maj

Parameters:
  • ntk – Network

  • func – Function as truth table

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

  • begin – Begin iterator to child signals

  • end – End iterator to child signals

Returns:

Signal that realizes function in terms of child signals

template<typename Ntk>
Ntk mockturtle::akers_synthesis(kitty::dynamic_truth_table const &func, kitty::dynamic_truth_table const &care)

Performs Akers majority-3 synthesis to create network.

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

Required network functions:

  • create_pi

  • create_po

  • create_maj

Parameters:
  • func – Function as truth table

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

Returns:

A network that realizes the function