Network Conversion

Header: fiction/synthesis/network_conversion.hpp

template<typename NtkDest, typename NtkSrc>
NtkDest fiction::synthesis::convert_network(const NtkSrc &ntk)

Converts a logic network into an equivalent one of another type. Thereby, this function is very similar to mockturtle::cleanup_dangling. However, it supports real buffer nodes used for fanouts and path balancing in fiction.

Note

If NtkDest and NtkSrc are of the same type, this function returns ntk cleaned using mockturtle::cleanup_dangling.

Template Parameters:
  • NtkDest – Type of the returned logic network.

  • NtkSrc – Type of the input logic network.

Parameters:

ntk – The input logic network.

Returns:

A logic network of type NtkDest that is logically equivalent to ntk.

Network Balancing

Header: fiction/synthesis/network_balancing.hpp

struct network_balancing_params

Parameters for the network balancing algorithm.

Public Members

bool unify_outputs = false

Flag to indicate that all output nodes should be in the same rank.

utils::progress_callback on_progress = {}

Reports completed work in each bounded phase.

template<typename NtkDest, typename NtkSrc>
NtkDest fiction::synthesis::network_balancing(const NtkSrc &ntk_src, network_balancing_params ps = {})

Balances a logic network with buffer nodes that compute the identity function. For this purpose, create_buf is utilized. Therefore, NtkDest should support identity nodes. If it does not, no new nodes will in fact be created. In either case, the returned network will be logically equivalent to the input one.

The process is rather naive and is not combined with fanout substitution.

The returned network is newly created from scratch because its type NtkDest may differ from NtkSrc.

Note

The physical design algorithms natively provided in fiction do not require their input networks to be balanced. If that is necessary, they will do it themselves. Providing already balanced networks may lead to substantial overhead.

Template Parameters:
  • NtkDest – Type of the returned logic network.

  • NtkSrc – Type of the input logic network.

Parameters:
  • ntk_src – The input logic network.

  • ps – Parameters.

Returns:

A path-balanced logic network of type NtkDest that is logically equivalent to ntk_src.

class network_balancing_params

Parameters for the network balancing algorithm.

property on_progress

Receives completed work and the phase total.

property unify_outputs

Flag to indicate that all output nodes should be in the same rank.

network_balancing(network: technology_network, params: network_balancing_params = <mnt.pyfiction.synthesis.network_balancing_params object at 0x579c36d51020>) → technology_network

Balances a logic network with buffer nodes that compute the identity function. For this purpose, create_buf is utilized. Therefore, NtkDest should support identity nodes. If it does not, no new nodes will in fact be created. In either case, the returned network will be logically equivalent to the input one.

The process is rather naive and is not combined with fanout substitution.

The returned network is newly created from scratch because its type NtkDest may differ from NtkSrc.

Parameters:
  • ntk_src – The input logic network.

  • ps – Parameters.

Template Args:
  • NtkDest – Type of the returned logic network.

  • NtkSrc – Type of the input logic network.

Returns:

A path-balanced logic network of type NtkDest that is logically equivalent to ntk_src.

Note

The physical design algorithms natively provided in fiction do not require their input networks to be balanced. If that is necessary, they will do it themselves. Providing already balanced networks may lead to substantial overhead.

is_balanced(network: technology_network, params: network_balancing_params = <mnt.pyfiction.synthesis.network_balancing_params object at 0x579c36d516a0>) → bool

Checks if a logic network is properly path-balanced with regard to the provided parameters.

Parameters:
  • ntk – The logic network to check.

  • ps – Parameters.

Template Args:

Ntk – Logic network type.

Returns:

true iff ntk is properly path-balanced with regard to ps.

Fanout Substitution

Header: fiction/synthesis/fanout_substitution.hpp

struct fanout_substitution_params

Parameters for the fanout substitution algorithm.

Public Types

enum class substitution_strategy : uint8_t

Breadth-first vs. depth-first fanout-tree substitution strategies.

Values:

enumerator BREADTH

Breadth-first substitution. Creates balanced fanout trees.

enumerator DEPTH

Depth-first substitution. Creates fanout trees with one deep branch.

enumerator RANDOM

Random substitution. Inserts fanout buffers at random positions in the fanout tree.

Public Members

substitution_strategy strategy = substitution_strategy::BREADTH

Substitution strategy of high-degree fanout networks (depth-first vs. breadth-first).

uint32_t degree = 2ul

Maximum output degree of each fan-out node. Must be at least two.

uint32_t threshold = 1ul

Maximum number of outputs any gate is allowed to have before substitution applies. Must be at least one.

std::optional<uint32_t> seed = std::nullopt

Seed used for random substitution, generated randomly if not specified.

utils::progress_callback on_progress = {}

Reports completed work in each bounded phase.

template<typename NtkDest, typename NtkSrc>
NtkDest fiction::synthesis::fanout_substitution(const NtkSrc &ntk_src, fanout_substitution_params ps = {})

Substitutes high-output degrees in a logic network with fanout nodes that compute the identity function. For this purpose, create_buf is utilized. Therefore, NtkDest should support identity nodes. If it does not, no new nodes will in fact be created. A destination that elides buffer nodes may exceed the requested fanout degrees. The returned network is logically equivalent to the input network.

The algorithm builds breadth-first, depth-first, or random fanout trees. Parameters set the maximum output degrees of ordinary nodes and fanout nodes.

The returned network is newly created from scratch because its type NtkDest may differ from NtkSrc. Repeated nonconstant inputs use distinct routing branches when NtkDest preserves buffer nodes.

Note

The physical design algorithms natively provided in fiction do not require their input networks to be fanout-substituted. If that is necessary, they will do it themselves. Providing already substituted networks does however allow for the control over maximum output degrees.

Template Parameters:
  • NtkDest – Type of the returned logic network.

  • NtkSrc – Type of the input logic network.

Parameters:
  • ntk_src – The input logic network.

  • ps – Parameters.

Throws:

std::invalid_argument – If ps.degree is less than two or ps.threshold is zero.

Returns:

A fanout-substituted logic network of type NtkDest that is logically equivalent to ntk_src.

class fanout_substitution_params

Parameters for the fanout substitution algorithm.

property degree

Maximum output degree of each fan-out node. Must be at least two.

property on_progress

Receives completed work and the phase total.

property seed

Seed used for random substitution, generated randomly if not specified.

property strategy

Substitution strategy of high-degree fanout networks (depth-first vs. breadth-first).

property threshold

Maximum number of outputs any gate is allowed to have before substitution applies. Must be at least one.

class substitution_strategy(*values)

Breadth-first vs. depth-first fanout-tree substitution strategies.

BREADTH = 0
DEPTH = 1
RANDOM = 2
fanout_substitution(network: technology_network, params: fanout_substitution_params = <mnt.pyfiction.synthesis.fanout_substitution_params object at 0x579c36d4e270>) → technology_network

Substitutes high-output degrees in a logic network with fanout nodes that compute the identity function. For this purpose, create_buf is utilized. Therefore, NtkDest should support identity nodes. If it does not, no new nodes will in fact be created. A destination that elides buffer nodes may exceed the requested fanout degrees. The returned network is logically equivalent to the input network.

The algorithm builds breadth-first, depth-first, or random fanout trees. Parameters set the maximum output degrees of ordinary nodes and fanout nodes.

The returned network is newly created from scratch because its type NtkDest may differ from NtkSrc. Repeated nonconstant inputs use distinct routing branches when NtkDest preserves buffer nodes.

Parameters:
  • ntk_src – The input logic network.

  • ps – Parameters.

Template Args:
  • NtkDest – Type of the returned logic network.

  • NtkSrc – Type of the input logic network.

Returns:

A fanout-substituted logic network of type NtkDest that is logically equivalent to ntk_src.

Raises:

std::invalid_argument – If ps.degree is less than two or ps.threshold is zero.

Note

The physical design algorithms natively provided in fiction do not require their input networks to be fanout-substituted. If that is necessary, they will do it themselves. Providing already substituted networks does however allow for the control over maximum output degrees.

is_fanout_substituted(network: technology_network, params: fanout_substitution_params = <mnt.pyfiction.synthesis.fanout_substitution_params object at 0x579c36d4e200>) → bool

Checks if a logic network is properly fanout-substituted with regard to the provided parameters, i.e., if no node exceeds the specified fanout limits.

Parameters:
  • ntk – The logic network to check.

  • ps – Parameters.

Template Args:

Ntk – Logic network type.

Returns:

true iff ntk is properly fanout-substituted with regard to ps.

Technology Mapping

Header: fiction/synthesis/technology_mapping.hpp

class missing_required_gates_exception : public std::logic_error

Exception thrown when a technology mapping library does not contain the required gates for the base network type.

struct technology_mapping_params

Public Members

mockturtle::emap_params mapper_params = {}

mockturtle’s mapper parameters.

bool decay = {false}

Enforce the application of at least one constant input to three-input gates.

bool inv = {false}

1-input NOT gate (inverter).

bool and2 = {false}

2-input AND gate.

bool nand2 = {false}

2-input NAND gate.

bool or2 = {false}

2-input OR gate.

bool nor2 = {false}

2-input NOR gate.

bool xor2 = {false}

2-input XOR gate.

bool xnor2 = {false}

2-input XNOR gate.

bool lt2 = {false}

2-input less-than gate.

bool gt2 = {false}

2-input greater-than gate.

bool le2 = {false}

2-input less-or-equal gate.

bool ge2 = {false}

2-input greater-or-equal gate.

bool and3 = {false}

3-input AND gate.

bool xor_and = {false}

3-input XOR-AND gate.

bool or_and = {false}

3-input OR-AND gate.

bool onehot = {false}

3-input ONEHOT gate.

bool maj3 = {false}

3-input MAJ gate.

bool gamble = {false}

3-input GAMBLE gate.

bool dot = {false}

3-input DOT gate.

bool mux = {false}

3-input MUX gate (ITE).

bool and_xor = {false}

3-input AND-XOR gate.

inline technology_mapping_params fiction::synthesis::and_or_not() noexcept

Auxiliary function to create technology mapping parameters for AND, OR, and NOT gates.

Returns:

Technology mapping parameters.

inline technology_mapping_params fiction::synthesis::and_or_not_maj() noexcept

Auxiliary function to create technology mapping parameters for AND, OR, NOT, and MAJ gates.

Returns:

Technology mapping parameters.

inline technology_mapping_params fiction::synthesis::all_standard_2_input_functions() noexcept

Auxiliary function to create technology mapping parameters for AND, OR, NAND, NOR, XOR, XNOR, and NOT gates.

Returns:

Technology mapping parameters.

inline technology_mapping_params fiction::synthesis::all_standard_3_input_functions() noexcept

Auxiliary function to create technology mapping parameters for AND3, XOR_AND, OR_AND, ONEHOT, MAJ3, GAMBLE, DOT, MUX, and AND_XOR gates.

Returns:

Technology mapping parameters.

inline technology_mapping_params fiction::synthesis::all_supported_standard_functions() noexcept

Auxiliary function to create technology mapping parameters for all supported standard functions.

Returns:

Technology mapping parameters.

struct technology_mapping_stats

Statistics for technology mapping.

Public Functions

inline void report() const

Report statistics.

Public Members

mockturtle::emap_stats mapper_stats = {}

Statistics for mockturtle’s mapper.

template<typename Ntk>
tec_nt fiction::synthesis::technology_mapping(const Ntk &ntk, const technology_mapping_params &params = {}, technology_mapping_stats *pst = nullptr)

Performs technology mapping on the given network. Technology mapping is the process of replacing the gates in a network with gates from a given technology library. This function utilizes mockturtle::emap to perform the technology mapping. This function is a wrapper around that interface to provide a more convenient usage.

Template Parameters:

Ntk – Input logic network type.

Parameters:
  • ntk – Input logic network.

  • params – Technology mapping parameters.

  • pst – Technology mapping statistics.

Throws:

missing_required_gates_exception – if the technology library does not contain required gates for the base network type (e.g., AIG requires INV and AND; XAG requires INV, AND, and XOR; MIG requires INV and MAJ).

Returns:

Mapped network exclusively using gates from the provided library.

class missing_required_gates_exception
class technology_mapping_params
property and2

2-input AND gate.

property and3

3-input AND gate.

property and_xor

3-input AND-XOR gate.

property decay

Enforce the application of at least one constant input to three-input gates.

property dot

3-input DOT gate.

property gamble

3-input GAMBLE gate.

property ge2

2-input greater-or-equal gate.

property gt2

2-input greater-than gate.

property inv

1-input NOT gate (inverter).

property le2

2-input less-or-equal gate.

property lt2

2-input less-than gate.

property maj3

3-input MAJ gate.

property mux

3-input MUX gate (ITE).

property nand2

2-input NAND gate.

property nor2

2-input NOR gate.

property onehot

3-input ONEHOT gate.

property or2

2-input OR gate.

property or_and

3-input OR-AND gate.

property xnor2

2-input XNOR gate.

property xor2

2-input XOR gate.

property xor_and

3-input XOR-AND gate.

and_or_not() → technology_mapping_params

Auxiliary function to create technology mapping parameters for AND, OR, and NOT gates.

Returns:

Technology mapping parameters.

and_or_not_maj() → technology_mapping_params

Auxiliary function to create technology mapping parameters for AND, OR, NOT, and MAJ gates.

Returns:

Technology mapping parameters.

all_standard_2_input_functions() → technology_mapping_params

Auxiliary function to create technology mapping parameters for AND, OR, NAND, NOR, XOR, XNOR, and NOT gates.

Returns:

Technology mapping parameters.

all_standard_3_input_functions() → technology_mapping_params

Auxiliary function to create technology mapping parameters for AND3, XOR_AND, OR_AND, ONEHOT, MAJ3, GAMBLE, DOT, MUX, and AND_XOR gates.

Returns:

Technology mapping parameters.

all_supported_standard_functions() → technology_mapping_params

Auxiliary function to create technology mapping parameters for all supported standard functions.

Returns:

Technology mapping parameters.

class technology_mapping_stats

Statistics for technology mapping.

property mapper_stats

Statistics for mockturtle’s mapper.

report() → None

Report statistics.

technology_mapping(network: technology_network, params: technology_mapping_params = <mnt.pyfiction.synthesis.technology_mapping_params object at 0x579c36d5a500>, stats: technology_mapping_stats | None = None) → technology_network
technology_mapping(network: mnt.pyfiction.networks.aig_network, params: technology_mapping_params = <mnt.pyfiction.synthesis.technology_mapping_params object at 0x579c36d5a7c0>, stats: technology_mapping_stats | None = None) → technology_network
technology_mapping(network: mnt.pyfiction.networks.xag_network, params: technology_mapping_params = <mnt.pyfiction.synthesis.technology_mapping_params object at 0x579c36d5a920>, stats: technology_mapping_stats | None = None) → technology_network
technology_mapping(network: mnt.pyfiction.networks.mig_network, params: technology_mapping_params = <mnt.pyfiction.synthesis.technology_mapping_params object at 0x579c36d5aa80>, stats: technology_mapping_stats | None = None) → technology_network

Performs technology mapping on the given network. Technology mapping is the process of replacing the gates in a network with gates from a given technology library. This function utilizes mockturtle::emap to perform the technology mapping. This function is a wrapper around that interface to provide a more convenient usage.

Parameters:
  • ntk – Input logic network.

  • params – Technology mapping parameters.

  • pst – Technology mapping statistics.

Template Args:

Ntk – Input logic network type.

Returns:

Mapped network exclusively using gates from the provided library.

Raises:

missing_required_gates_exception – if the technology library does not contain required gates for the base network type (e.g., AIG requires INV and AND; XAG requires INV, AND, and XOR; MIG requires INV and MAJ).

Delete Virtual PIs

Header: fiction/synthesis/delete_virtual_pis.hpp

template<typename Ntk>
Ntk fiction::synthesis::delete_virtual_pis(const Ntk &ntk) noexcept

Deletes virtual primary inputs (PIs) from a network and remaps all signals connected to the virtual PIs back to their corresponding real PIs. This ensures compatibility for equivalence checking between networks with and without virtual inputs, as the miter requires networks to have an identical number of primary inputs. If the network does not contain any virtual PIs, it is returned unchanged.

Template Parameters:

Ntk – The type of network.

Parameters:

ntk – The input network.

Returns:

The resulting network after virtual primary inputs are deleted.

Truth Tables

Header: fiction/synthesis/truth_tables.hpp

inline kitty::dynamic_truth_table fiction::synthesis::create_id_tt() noexcept

Creates and returns a truth table that implements the identity function in one variable.

Returns:

Identity function in one variable.

inline kitty::dynamic_truth_table fiction::synthesis::create_not_tt() noexcept

Creates and returns a truth table that implements the negation in one variable.

Returns:

Negation in one variable.

inline kitty::dynamic_truth_table fiction::synthesis::create_and_tt() noexcept

Creates and returns a truth table that implements the conjunction in two variables.

Returns:

Conjunction in two variables.

inline kitty::dynamic_truth_table fiction::synthesis::create_or_tt() noexcept

Creates and returns a truth table that implements the disjunction in two variables.

Returns:

Disjunction in two variables.

inline kitty::dynamic_truth_table fiction::synthesis::create_nand_tt() noexcept

Creates and returns a truth table that implements the negated conjunction in two variables.

Returns:

Negated conjunction in two variables.

inline kitty::dynamic_truth_table fiction::synthesis::create_nor_tt() noexcept

Creates and returns a truth table that implements the negated disjunction in two variables.

Returns:

Negated disjunction in two variables.

inline kitty::dynamic_truth_table fiction::synthesis::create_xor_tt() noexcept

Creates and returns a truth table that implements the exclusive disjunction in two variables.

Returns:

Exclusive disjunction in two variables.

inline kitty::dynamic_truth_table fiction::synthesis::create_xnor_tt() noexcept

Creates and returns a truth table that implements the negated exclusive disjunction in two variables.

Returns:

Negated exclusive disjunction in two variables.

inline kitty::dynamic_truth_table fiction::synthesis::create_lt_tt() noexcept

Creates and returns a truth table that implements the less-than function in two variables.

Returns:

Less-than function in two variables.

inline kitty::dynamic_truth_table fiction::synthesis::create_gt_tt() noexcept

Creates and returns a truth table that implements the greater-than function in two variables.

Returns:

Greater-than function in two variables.

inline kitty::dynamic_truth_table fiction::synthesis::create_le_tt() noexcept

Creates and returns a truth table that implements the less-than-or-equal function in two variables.

Returns:

Less-than-or-equal function in two variables.

inline kitty::dynamic_truth_table fiction::synthesis::create_ge_tt() noexcept

Creates and returns a truth table that implements the greater-than-or-equal function in two variables.

Returns:

Greater-than-or-equal function in two variables.

inline kitty::dynamic_truth_table fiction::synthesis::create_and3_tt() noexcept

Creates and returns a truth table that implements the conjunction in three variables.

Returns:

Conjunction in three variables.

inline kitty::dynamic_truth_table fiction::synthesis::create_xor_and_tt() noexcept

Creates and returns a truth table that implements the XOR-AND function (a and (b xor c)) in three variables.

Returns:

XOR-AND in three variables.

inline kitty::dynamic_truth_table fiction::synthesis::create_or_and_tt() noexcept

Creates and returns a truth table that implements the OR-AND function (a and (b or c)) in three variables.

Returns:

OR-AND in three variables.

inline kitty::dynamic_truth_table fiction::synthesis::create_onehot_tt() noexcept

Creates and returns a truth table that implements the Onehot function (exactly one of a,b,c) in three variables.

Returns:

Onehot in three variables.

inline kitty::dynamic_truth_table fiction::synthesis::create_maj_tt() noexcept

Creates and returns a truth table that implements the majority function in three variables.

Returns:

Majority function in three variables.

inline kitty::dynamic_truth_table fiction::synthesis::create_gamble_tt() noexcept

Creates and returns a truth table that implements the Gamble function (all or none of a,b,c) in three variables.

Returns:

Gamble in three variables.

inline kitty::dynamic_truth_table fiction::synthesis::create_dot_tt() noexcept

Creates and returns a truth table that implements the Dot function (a xor (c or a and b)) in three variables.

Returns:

Dot function in three variables.

inline kitty::dynamic_truth_table fiction::synthesis::create_ite_tt() noexcept

Creates and returns a truth table that implements the ITE (MUX) function (if a then b else c) in three variables.

Returns:

ITE (MUX) in three variables.

inline kitty::dynamic_truth_table fiction::synthesis::create_and_xor_tt() noexcept

Creates and returns a truth table that implements the AND-XOR function (a xor b and c) in three variables.

Returns:

AND-XOR in three variables.

inline kitty::dynamic_truth_table fiction::synthesis::create_xor3_tt() noexcept

Creates and returns a truth table that implements the exclusive disjunction in three variables.

Returns:

Exclusive disjunction in three variables.

inline std::vector<kitty::dynamic_truth_table> fiction::synthesis::create_double_wire_tt() noexcept

Creates and returns a vector of truth tables for a double wire multi-output function.

This function generates a vector of truth tables, each representing one of the outputs of a double wire multi-output function in two variables. The function returns a vector containing two truth tables.

Returns:

Vector of truth tables, each representing an output of the double wire function.

inline std::vector<kitty::dynamic_truth_table> fiction::synthesis::create_crossing_wire_tt() noexcept

Creates and returns a vector of truth tables for a crossing wire multi-output function.

This function generates a vector of truth tables, each representing one of the outputs of a crossing wire multi-output function in two variables. The function returns a vector containing two truth tables.

Returns:

Vector of truth tables, each representing an output of the crossing wire function.

inline std::vector<kitty::dynamic_truth_table> fiction::synthesis::create_fan_out_tt() noexcept

Creates and returns a vector of truth tables for a multi-output function with two variables.

This function generates a vector of truth tables, each representing one of the outputs of a multi-output function in two variables.

Returns:

Vector of truth tables, each representing an output of the identity function.

inline std::vector<kitty::dynamic_truth_table> fiction::synthesis::create_half_adder_tt() noexcept

Creates and returns a vector of truth tables for a half adder multi-output function.

This function generates a vector of truth tables, each representing one of the outputs of a half adder multi-output function in two variables. The function returns a vector containing two truth tables.

Returns:

Vector of truth tables, each representing an output of the half adder function.

create_id_tt() → mnt.pyfiction.synthesis.dynamic_truth_table

Creates and returns a truth table that implements the identity function in one variable.

Returns:

Identity function in one variable.

create_not_tt() → mnt.pyfiction.synthesis.dynamic_truth_table

Creates and returns a truth table that implements the negation in one variable.

Returns:

Negation in one variable.

create_and_tt() → mnt.pyfiction.synthesis.dynamic_truth_table

Creates and returns a truth table that implements the conjunction in two variables.

Returns:

Conjunction in two variables.

create_or_tt() → mnt.pyfiction.synthesis.dynamic_truth_table

Creates and returns a truth table that implements the disjunction in two variables.

Returns:

Disjunction in two variables.

create_nand_tt() → mnt.pyfiction.synthesis.dynamic_truth_table

Creates and returns a truth table that implements the negated conjunction in two variables.

Returns:

Negated conjunction in two variables.

create_nor_tt() → mnt.pyfiction.synthesis.dynamic_truth_table

Creates and returns a truth table that implements the negated disjunction in two variables.

Returns:

Negated disjunction in two variables.

create_xor_tt() → mnt.pyfiction.synthesis.dynamic_truth_table

Creates and returns a truth table that implements the exclusive disjunction in two variables.

Returns:

Exclusive disjunction in two variables.

create_xnor_tt() → mnt.pyfiction.synthesis.dynamic_truth_table

Creates and returns a truth table that implements the negated exclusive disjunction in two variables.

Returns:

Negated exclusive disjunction in two variables.

create_lt_tt() → mnt.pyfiction.synthesis.dynamic_truth_table

Creates and returns a truth table that implements the less-than function in two variables.

Returns:

Less-than function in two variables.

create_gt_tt() → mnt.pyfiction.synthesis.dynamic_truth_table

Creates and returns a truth table that implements the greater-than function in two variables.

Returns:

Greater-than function in two variables.

create_le_tt() → mnt.pyfiction.synthesis.dynamic_truth_table

Creates and returns a truth table that implements the less-than-or- equal function in two variables.

Returns:

Less-than-or-equal function in two variables.

create_ge_tt() → mnt.pyfiction.synthesis.dynamic_truth_table

Creates and returns a truth table that implements the greater-than-or- equal function in two variables.

Returns:

Greater-than-or-equal function in two variables.

create_and3_tt() → mnt.pyfiction.synthesis.dynamic_truth_table

Creates and returns a truth table that implements the conjunction in three variables.

Returns:

Conjunction in three variables.

create_xor_and_tt() → mnt.pyfiction.synthesis.dynamic_truth_table

Creates and returns a truth table that implements the XOR-AND function (a and (b xor c)) in three variables.

Returns:

XOR-AND in three variables.

create_or_and_tt() → mnt.pyfiction.synthesis.dynamic_truth_table

Creates and returns a truth table that implements the OR-AND function (a and (b or c)) in three variables.

Returns:

OR-AND in three variables.

create_onehot_tt() → mnt.pyfiction.synthesis.dynamic_truth_table

Creates and returns a truth table that implements the Onehot function (exactly one of a,b,c) in three variables.

Returns:

Onehot in three variables.

create_maj_tt() → mnt.pyfiction.synthesis.dynamic_truth_table

Creates and returns a truth table that implements the majority function in three variables.

Returns:

Majority function in three variables.

create_gamble_tt() → mnt.pyfiction.synthesis.dynamic_truth_table

Creates and returns a truth table that implements the Gamble function (all or none of a,b,c) in three variables.

Returns:

Gamble in three variables.

create_dot_tt() → mnt.pyfiction.synthesis.dynamic_truth_table

Creates and returns a truth table that implements the Dot function (a xor (c or a and b)) in three variables.

Returns:

Dot function in three variables.

create_ite_tt() → mnt.pyfiction.synthesis.dynamic_truth_table

Creates and returns a truth table that implements the ITE (MUX) function (if a then b else c) in three variables.

Returns:

ITE (MUX) in three variables.

create_and_xor_tt() → mnt.pyfiction.synthesis.dynamic_truth_table

Creates and returns a truth table that implements the AND-XOR function (a xor b and c) in three variables.

Returns:

AND-XOR in three variables.

create_xor3_tt() → mnt.pyfiction.synthesis.dynamic_truth_table

Creates and returns a truth table that implements the exclusive disjunction in three variables.

Returns:

Exclusive disjunction in three variables.

create_double_wire_tt() → list[mnt.pyfiction.synthesis.dynamic_truth_table]

Creates and returns a vector of truth tables for a double wire multi- output function.

This function generates a vector of truth tables, each representing one of the outputs of a double wire multi-output function in two variables. The function returns a vector containing two truth tables.

Returns:

Vector of truth tables, each representing an output of the double wire function.

create_crossing_wire_tt() → list[mnt.pyfiction.synthesis.dynamic_truth_table]

Creates and returns a vector of truth tables for a crossing wire multi-output function.

This function generates a vector of truth tables, each representing one of the outputs of a crossing wire multi-output function in two variables. The function returns a vector containing two truth tables.

Returns:

Vector of truth tables, each representing an output of the crossing wire function.

create_fan_out_tt() → list[mnt.pyfiction.synthesis.dynamic_truth_table]

Creates and returns a vector of truth tables for a multi-output function with two variables.

This function generates a vector of truth tables, each representing one of the outputs of a multi-output function in two variables.

Returns:

Vector of truth tables, each representing an output of the identity function.

create_half_adder_tt() → list[mnt.pyfiction.synthesis.dynamic_truth_table]

Creates and returns a vector of truth tables for a half adder multi- output function.

This function generates a vector of truth tables, each representing one of the outputs of a half adder multi-output function in two variables. The function returns a vector containing two truth tables.

Returns:

Vector of truth tables, each representing an output of the half adder function.