XAG algebraic rewriting
Header: mockturtle/algorithms/xag_algebraic_rewriting.hpp
Parameters
-
struct xag_algebraic_depth_rewriting_params
Parameters for xag_algebraic_depth_rewriting.
The data structure
xag_algebraic_depth_rewriting_params
holds configurable parameters with default arguments forxag_algebraic_depth_rewriting
.Public Types
-
enum strategy_t
Rewriting strategy.
Values:
-
enumerator dfs
DFS rewriting strategy.
Applies depth rewriting once to all output cones whose drivers have maximum levels
-
enumerator aggressive
Aggressive rewriting strategy.
Applies depth reduction multiple times until the number of nodes, which cannot be rewritten, matches the number of nodes, in the current network; or the new network size is larger than the initial size w.r.t. to an
overhead
.
-
enumerator selective
Selective rewriting strategy.
Like
aggressive
, but only applies rewriting to nodes on critical paths and withoutoverhead
.
-
enumerator dfs
Public Members
-
float overhead = {2.0f}
Overhead factor in aggressive rewriting strategy.
When comparing to the initial size in aggressive depth rewriting, also the number of dangling nodes are taken into account.
-
bool allow_area_increase = {true}
Allow area increase while optimizing depth.
-
bool allow_rare_rules = {false}
Try rules that are rarely applied.
-
enum strategy_t
Algorithm
-
template<class Ntk>
void mockturtle::xag_algebraic_depth_rewriting(Ntk &ntk, xag_algebraic_depth_rewriting_params const &ps = {}) XAG algebraic depth rewriting.
This algorithm tries to rewrite a network with AND/XOR gates for depth optimization using the associativity and distributivity rule in AND-XOR logic. It can be applied to networks other than XAGs, but only considers pairs of nodes which both implement the AND function and the XOR function.
Required network functions:
get_node
level
update_levels
create_and
create_xor
substitute_node
foreach_node
foreach_po
foreach_fanin
is_and
is_xor
clear_values
set_value
value
fanout_size