111 std::function<
bool(
const Gate*)> match,
113 std::function<
bool(
const Endpoint*)> exit_endpoint_filter,
114 std::function<
bool(
const Endpoint*)> entry_endpoint_filter)
115 : m_netlist(netlist), m_direction(
direction), m_match(
std::move(match)), m_stop(stop), m_exit_endpoint_filter(
std::move(exit_endpoint_filter)),
116 m_entry_endpoint_filter(
std::move(entry_endpoint_filter))
122 std::function<bool(
const Gate*)> m_match;
124 std::function<bool(
const Endpoint*)> m_exit_endpoint_filter;
125 std::function<bool(
const Endpoint*)> m_entry_endpoint_filter;
126 std::unordered_map<const Net*, std::set<Gate*>> m_store;
162 const std::function<
bool(
const Gate*)>& match,
165 const std::function<
bool(
const Endpoint*,
u32 current_depth)>& exit_endpoint_filter =
nullptr,
166 const std::function<
bool(
const Endpoint*,
u32 current_depth)>& entry_endpoint_filter =
nullptr)
const;
186 const std::function<
bool(
const Gate*)>& match,
189 const std::function<
bool(
const Endpoint*,
u32 current_depth)>& exit_endpoint_filter =
nullptr,
190 const std::function<
bool(
const Endpoint*,
u32 current_depth)>& entry_endpoint_filter =
nullptr)
const;
210 const std::function<
bool(
const Gate*)>& target_gate_filter,
211 bool continue_on_match =
false,
212 const std::function<
bool(
const Endpoint*,
u32 current_depth)>& exit_endpoint_filter =
nullptr,
213 const std::function<
bool(
const Endpoint*,
u32 current_depth)>& entry_endpoint_filter =
nullptr)
const;
231 const std::function<
bool(
const Gate*)>& target_gate_filter,
232 bool continue_on_match =
false,
233 const std::function<
bool(
const Endpoint*,
u32 current_depth)>& exit_endpoint_filter =
nullptr,
234 const std::function<
bool(
const Endpoint*,
u32 current_depth)>& entry_endpoint_filter =
nullptr)
const;
252 const std::function<
bool(
const Gate*)>& target_gate_filter,
253 bool continue_on_mismatch =
false,
254 const std::function<
bool(
const Endpoint*,
u32 current_depth)>& exit_endpoint_filter =
nullptr,
255 const std::function<
bool(
const Endpoint*,
u32 current_depth)>& entry_endpoint_filter =
nullptr)
const;
273 const std::function<
bool(
const Gate*)>& target_gate_filter,
274 bool continue_on_mismatch =
false,
275 const std::function<
bool(
const Endpoint*,
u32 current_depth)>& exit_endpoint_filter =
nullptr,
276 const std::function<
bool(
const Endpoint*,
u32 current_depth)>& entry_endpoint_filter =
nullptr)
const;
292 Result<std::set<Gate*>> get_next_matching_gates_until_depth(
const Net*
net,
bool successors,
u32 max_depth,
const std::function<
bool(
const Gate*)>& target_gate_filter =
nullptr)
const;
308 Result<std::set<Gate*>> get_next_matching_gates_until_depth(
const Gate* gate,
bool successors,
u32 max_depth,
const std::function<
bool(
const Gate*)>& target_gate_filter =
nullptr)
const;
373 Result<std::set<Gate*>> get_combinational_cone(
const Gate* gate,
bool successors,
const std::set<PinType>& forbidden_pins = {})
const;
388 const Gate* end_gate,
390 const std::function<
bool(
const Endpoint*,
u32 current_depth)>& exit_endpoint_filter =
nullptr,
391 const std::function<
bool(
const Endpoint*,
u32 current_depth)>& entry_endpoint_filter =
nullptr)
const;
406 const Gate* end_gate,
408 const std::function<
bool(
const Endpoint*,
u32 current_depth)>& exit_endpoint_filter =
nullptr,
409 const std::function<
bool(
const Endpoint*,
u32 current_depth)>& entry_endpoint_filter =
nullptr)
const;
428 const std::function<
bool(
const Endpoint*,
u32 current_depth)>& exit_endpoint_filter =
nullptr,
429 const std::function<
bool(
const Endpoint*,
u32 current_depth)>& entry_endpoint_filter =
nullptr)
const;
447 const std::function<
bool(
const Endpoint*,
u32 current_depth)>& exit_endpoint_filter =
nullptr,
448 const std::function<
bool(
const Endpoint*,
u32 current_depth)>& entry_endpoint_filter =
nullptr)
const;
460 const std::vector<const GatePin*>& input_pins = {},
461 const std::vector<const GatePin*>& output_pins = {},
462 const std::function<bool(
const Gate*)>& filter =
nullptr)
const;
475 const std::vector<GateType*>& chain_types,
476 const std::map<
GateType*, std::vector<const GatePin*>>& input_pins = {},
477 const std::map<GateType*, std::vector<const GatePin*>>& output_pins = {},
478 const std::function<bool(
const Gate*)>& filter =
nullptr)
const;
509 std::function<
bool(
const Gate*)> match,
511 std::function<
bool(
const Endpoint*)> exit_endpoint_filter =
nullptr,
512 std::function<
bool(
const Endpoint*)> entry_endpoint_filter =
nullptr)
const;
556 const std::function<
bool(
const Gate*)>& match,
558 const std::function<
bool(
const Endpoint*)>& exit_endpoint_filter,
559 const std::function<
bool(
const Endpoint*)>& entry_endpoint_filter,
560 std::unordered_map<
const Net*, std::set<Gate*>>& store)
const;
568 const std::function<
bool(
const Gate*)>& is_target,
570 const std::function<
bool(
const Endpoint*,
u32 current_depth)>& exit_endpoint_filter,
571 const std::function<
bool(
const Endpoint*,
u32 current_depth)>& entry_endpoint_filter)
const;
TraversalCache(TraversalCache &&)=default
TraversalCache & operator=(TraversalCache &&)=default
TraversalCache(const TraversalCache &)=delete
TraversalCache & operator=(const TraversalCache &)=delete
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=false)
std::vector< Net * > get_common_inputs(const std::vector< Gate * > &gates, u32 threshold=0)