Technology Network
A mockturtle
logic network type that extends mockturtle::klut_network
. It reimplements all node creation functions
to disable structural hashing. Furthermore, create_buf is overwritten such that it creates real buffer nodes that count
towards the size of the network and compute the identity function. In the same way, a buffer with more than one fanout
node is considered a fanout node (or splitter in some contexts) that copies an incoming signal to two or more data paths.
Header: fiction/networks/technology_network.hpp
-
class technology_network : public mockturtle::klut_network
A
mockturtle
logic network type that extendsklut_network
. It reimplements all node creation functions to disable structural hashing. Furthermore,create_buf
is overwritten such that it creates real buffer nodes that count towards the size of the network and compute the identity function. In the same way, a buffer with more than one fanout node is considered a fanout node (or splitter in some contexts) that copies an incoming signal to two or more data paths.This network is used internally for most implemented FCN physical design algorithms and extends
klut_network
by some further convenience functions but is still fully compatible with the mockturtle network API. The function convert_network can be used to convert any other mockturtle network to this type.Most functions in this class are borrowed and reimplemented directly from
klut_network
and are, therefore, only sporadically documented where their behavior might differ. For information considermockturtle/networks/klut.hpp
.Public Functions
-
inline bool is_po(const node &n) const
Checks whether a node is primary output by considering the signal pointing to it. This is possible because this network does not use complemented signals.
- Parameters:
n – Node to consider.
- Returns:
true
iffn
’s signal is primary output.
-
inline signal create_buf(const signal &a)
Creates a buffer node in the network that computes the identity function and counts towards the network size and depth. A buffer node with more than one output is called a fanout.
- Parameters:
a – Incoming signal to the newly created buffer node.
- Returns:
Outgoing signal of the newly created buffer node.
-
inline signal _create_node(const std::vector<signal> &children, uint32_t literal)
Disable structural hashing.
-
inline signal create_node(const std::vector<signal> &children, const kitty::dynamic_truth_table &function)
Disable structural hashing.
-
inline bool is_buf(const node &n) const noexcept
Returns whether the given node
n
is a buffer node, i.e., whethern
computes the identity function and is not a PI. This also returnstrue
on fanout nodes.- Parameters:
n – Node to consider.
- Returns:
true
iffn
is a buffer node.
-
inline bool is_fanout(const node &n) const noexcept
Returns whether the given node
n
is a fanout node, i.e., whethern
is a buffer node and has more than one output signal.- Parameters:
n – Node to consider.
- Returns:
true
iffn
is a fanout node.
-
inline bool is_inv(const node &n) const noexcept
Returns whether the given node
n
is an inverter node.- Parameters:
n – Node to consider.
- Returns:
true
iffn
is an inverter node.
-
inline void substitute_po_signals() noexcept
Adds additional buffer nodes for each primary output that does not already point to a buffer.
-
inline bool is_po(const node &n) const
- class mnt.pyfiction.technology_network
A mockturtle logic network type that extends klut_network. It reimplements all node creation functions to disable structural hashing. Furthermore, create_buf is overwritten such that it creates real buffer nodes that count towards the size of the network and compute the identity function. In the same way, a buffer with more than one fanout node is considered a fanout node (or splitter in some contexts) that copies an incoming signal to two or more data paths.
This network is used internally for most implemented FCN physical design algorithms and extends klut_network by some further convenience functions but is still fully compatible with the mockturtle network API. The function convert_network can be used to convert any other mockturtle network to this type.
Most functions in this class are borrowed and reimplemented directly from klut_network and are, therefore, only sporadically documented where their behavior might differ. For information consider mockturtle/networks/klut.hpp.
- fanins(self: mnt.pyfiction.pyfiction.technology_network, n: SupportsInt) list[int]
- gates(self: mnt.pyfiction.pyfiction.technology_network) list[int]
- get_name(self: mnt.pyfiction.pyfiction.technology_network, n: SupportsInt) str
- get_output_name(self: mnt.pyfiction.pyfiction.technology_network, index: SupportsInt) str
- has_name(self: mnt.pyfiction.pyfiction.technology_network, n: SupportsInt) bool
- has_output_name(self: mnt.pyfiction.pyfiction.technology_network, index: SupportsInt) bool
- is_and(self: mnt.pyfiction.pyfiction.technology_network, n: SupportsInt) bool
- is_buf(self: mnt.pyfiction.pyfiction.technology_network, n: SupportsInt) bool
Returns whether the given node n is a buffer node, i.e., whether n computes the identity function and is not a PI. This also returns true on fanout nodes.
- Parameter
n
: Node to consider.
- Returns:
true iff n is a buffer node.
- Parameter
- is_constant(self: mnt.pyfiction.pyfiction.technology_network, n: SupportsInt) bool
- is_fanout(self: mnt.pyfiction.pyfiction.technology_network, n: SupportsInt) bool
Returns whether the given node n is a fanout node, i.e., whether n is a buffer node and has more than one output signal.
- Parameter
n
: Node to consider.
- Returns:
true iff n is a fanout node.
- Parameter
- is_inv(self: mnt.pyfiction.pyfiction.technology_network, n: SupportsInt) bool
Returns whether the given node n is an inverter node.
- Parameter
n
: Node to consider.
- Returns:
true iff n is an inverter node.
- Parameter
- is_maj(self: mnt.pyfiction.pyfiction.technology_network, n: SupportsInt) bool
- is_nand(self: mnt.pyfiction.pyfiction.technology_network, n: SupportsInt) bool
- is_nor(self: mnt.pyfiction.pyfiction.technology_network, n: SupportsInt) bool
- is_or(self: mnt.pyfiction.pyfiction.technology_network, n: SupportsInt) bool
- is_pi(self: mnt.pyfiction.pyfiction.technology_network, n: SupportsInt) bool
- is_po(self: mnt.pyfiction.pyfiction.technology_network, n: SupportsInt) bool
- is_xnor(self: mnt.pyfiction.pyfiction.technology_network, n: SupportsInt) bool
- is_xor(self: mnt.pyfiction.pyfiction.technology_network, n: SupportsInt) bool
- nodes(self: mnt.pyfiction.pyfiction.technology_network) list[int]
- num_gates(self: mnt.pyfiction.pyfiction.technology_network) int
- num_pis(self: mnt.pyfiction.pyfiction.technology_network) int
- num_pos(self: mnt.pyfiction.pyfiction.technology_network) int
- pis(self: mnt.pyfiction.pyfiction.technology_network) list[int]
- po_at(self: mnt.pyfiction.pyfiction.technology_network, index: SupportsInt) int
- po_index(self: mnt.pyfiction.pyfiction.technology_network, n: SupportsInt) int
- pos(self: mnt.pyfiction.pyfiction.technology_network) list[int]
- size(self: mnt.pyfiction.pyfiction.technology_network) int