Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions include/mockturtle/algorithms/node_resynthesis/cached.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ class cached_resynthesis
else
{
bool found_one = false;
auto on_signal = [&]( signal<Ntk> const& f ) {
auto on_signal = [&]( signal<Ntk> const& f ) -> bool {
if ( !found_one )
{
++_cache_misses;
Expand All @@ -192,6 +192,7 @@ class cached_resynthesis
std::copy( _existing_signals.begin(), _existing_signals.end(), signals.begin() + _initial_size );
fn( cleanup_dangling( _cache.get_view( key ), ntk, signals.begin(), signals.end() ).front() );
}
return false;
};

_resyn_fn( _cache.network(), function, _cache.pis().begin(), _cache.pis().begin() + function.num_vars(), on_signal );
Expand Down Expand Up @@ -307,4 +308,4 @@ class cached_resynthesis
uint32_t _cache_hits{};
uint32_t _cache_misses{};
};
} /* namespace mockturtle */
} /* namespace mockturtle */
10 changes: 8 additions & 2 deletions include/mockturtle/algorithms/node_resynthesis/exact.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,8 @@ struct exact_xmg_resynthesis_params
{
uint32_t num_candidates{10u};
bool use_only_self_dual_gates{false};
bool use_xor3{true};
int conflict_limit{0};
};

/*! \brief Resynthesis function based on exact synthesis for XMGs.
Expand Down Expand Up @@ -448,6 +450,7 @@ class exact_xmg_resynthesis
percy::spec spec;
spec.verbosity = 0;
spec.fanin = 3;
spec.conflict_limit = ps.conflict_limit;

/* specify local normalized gate primitives */
kitty::dynamic_truth_table const0{3};
Expand All @@ -471,7 +474,10 @@ class exact_xmg_resynthesis
spec.add_primitive( a ^ b ); // 66
spec.add_primitive( a ^ c ); // 3c
spec.add_primitive( b ^ c ); // 5a
spec.add_primitive( a ^ b ^ c ); // 96
if ( ps.use_xor3 )
{
spec.add_primitive( a ^ b ^ c ); // 96
}

/* add non-self dual gate functions */
if ( !ps.use_only_self_dual_gates )
Expand Down Expand Up @@ -601,4 +607,4 @@ class exact_xmg_resynthesis
exact_xmg_resynthesis_params const& ps;
}; /* exact_xmg_resynthesis */

} /* namespace mockturtle */
} /* namespace mockturtle */