32 #include <unordered_set>
43 namespace netlist_utils
56 [[deprecated(
"Will be removed in a future version, use SubgraphNetlistDecorator::get_subgraph_function instead.")]]
CORE_API Result<BooleanFunction>
57 get_subgraph_function(
const Net*
net,
const std::vector<const Gate*>& subgraph_gates, std::map<std::pair<u32, const GatePin*>, BooleanFunction>& cache);
68 [[deprecated(
"Will be removed in a future version, use SubgraphNetlistDecorator::get_subgraph_function instead.")]]
CORE_API Result<BooleanFunction>
78 [[deprecated(
"Will be removed in a future version, use Netlist::copy instead.")]]
CORE_API std::unique_ptr<Netlist>
copy_netlist(
const Netlist* nl);
97 [[deprecated(
"Will be removed in a future version, use SubgraphNetlistDecorator::copy_subgraph_netlist instead.")]]
CORE_API std::unique_ptr<Netlist>
114 [[deprecated(
"Will be removed in a future version, use NetlistTraversalDecorator::get_next_matching_gates_until_depth instead.")]]
CORE_API std::vector<Gate*>
115 get_next_gates(
const Gate* gate,
bool get_successors,
int depth = 0,
const std::function<
bool(
const Gate*)>& filter =
nullptr);
131 [[deprecated(
"Will be removed in a future version, use NetlistTraversalDecorator::get_next_matching_gates_until_depth instead.")]]
CORE_API std::vector<Gate*>
132 get_next_gates(
const Net*
net,
bool get_successors,
int depth = 0,
const std::function<
bool(
const Gate*)>& filter =
nullptr);
148 [[deprecated(
"Will be removed in a future version, use NetlistTraversalDecorator::get_next_sequential_gates instead.")]]
CORE_API std::vector<Gate*>
161 [[deprecated(
"Will be removed in a future version, use NetlistTraversalDecorator::get_next_sequential_gates instead.")]]
CORE_API std::vector<Gate*>
177 [[deprecated(
"Will be removed in a future version, use NetlistTraversalDecorator::get_next_sequential_gates instead.")]]
CORE_API std::vector<Gate*>
189 [[deprecated(
"Will be removed in a future version, use NetlistTraversalDecorator::get_next_sequential_gates instead.")]]
CORE_API std::vector<Gate*>
206 CORE_API std::vector<Gate*>
get_path(
const Gate* gate,
bool get_successors, std::set<GateTypeProperty> stop_properties, std::unordered_map<
u32, std::vector<Gate*>>& cache);
218 CORE_API std::vector<Gate*>
get_path(
const Gate* gate,
bool get_successors, std::set<GateTypeProperty> stop_properties);
233 CORE_API std::vector<Gate*>
get_path(
const Net*
net,
bool get_successors, std::set<GateTypeProperty> stop_properties, std::unordered_map<
u32, std::vector<Gate*>>& cache);
244 CORE_API std::vector<Gate*>
get_path(
const Net*
net,
bool get_successors, std::set<GateTypeProperty> stop_properties);
264 [[deprecated(
"Will be removed in a future version, use NetlistPreprocessingPlugin::remove_buffers instead.")]]
CORE_API Result<u32>
remove_buffers(Netlist*
netlist,
265 bool analyze_inputs =
false);
299 [[deprecated(
"Will be removed in a future version, use NetlistModificationDecorator::replace_gate instead.")]]
CORE_API Result<std::monostate>
300 replace_gate(Gate* gate, GateType* target_type, std::map<GatePin*, GatePin*> pin_map);
315 const std::vector<const GatePin*>& input_pins = {},
316 const std::vector<const GatePin*>& output_pins = {},
317 const std::function<bool(
const Gate*)>& filter =
nullptr);
334 const std::vector<GateType*>& chain_types,
335 const std::map<GateType*, std::vector<const GatePin*>>& input_pins,
336 const std::map<GateType*, std::vector<const GatePin*>>& output_pins,
337 const std::function<
bool(
const Gate*)>& filter =
nullptr);
350 [[deprecated(
"Will be removed in a future version, use NetlistTraversalDecorator::get_shortest_path instead.")]]
CORE_API std::vector<Gate*>
351 get_shortest_path(Gate* start_gate, Gate* end_gate,
bool search_both_directions =
false);
std::vector< Net * > get_common_inputs(const std::vector< Gate * > &gates, u32 threshold)
std::unique_ptr< Netlist > get_partial_netlist(const Netlist *nl, const std::vector< const Gate * > &subgraph_gates)
std::vector< Gate * > get_next_gates(const Gate *gate, bool get_successors, int depth, const std::function< bool(const Gate *)> &filter)
Result< std::vector< Gate * > > get_gate_chain(Gate *start_gate, const std::vector< const GatePin * > &input_pins, const std::vector< const GatePin * > &output_pins, const std::function< bool(const Gate *)> &filter)
Result< std::vector< Gate * > > get_complex_gate_chain(Gate *start_gate, const std::vector< GateType * > &chain_types, const std::map< GateType *, std::vector< const GatePin * >> &input_pins, const std::map< GateType *, std::vector< const GatePin * >> &output_pins, const std::function< bool(const Gate *)> &filter)
std::vector< Gate * > get_path(const Gate *gate, bool get_successors, std::set< GateTypeProperty > stop_properties, std::unordered_map< u32, std::vector< Gate * >> &cache)
std::unique_ptr< Netlist > copy_netlist(const Netlist *nl)
Result< std::monostate > replace_gate(Gate *gate, GateType *target_type, std::map< GatePin *, GatePin * > pin_map)
std::vector< Net * > get_nets_at_pins(Gate *gate, std::vector< GatePin * > pins)
Result< u32 > remove_unused_lut_endpoints(Netlist *netlist)
Result< BooleanFunction > get_subgraph_function(const Net *net, const std::vector< const Gate * > &subgraph_gates, std::map< std::pair< u32, const GatePin * >, BooleanFunction > &cache)
std::vector< Gate * > get_next_sequential_gates(const Gate *gate, bool get_successors, std::unordered_map< u32, std::vector< Gate * >> &cache)
std::vector< Gate * > get_shortest_path(Gate *start_gate, Gate *end_gate, bool search_both_directions)
std::pair< std::map< u32, Gate * >, std::vector< std::vector< int > > > get_ff_dependency_matrix(const Netlist *nl)
Result< u32 > remove_buffers(Netlist *netlist, bool analyze_inputs)
std::vector< PinInformation > pins