Skip to content

Commit

Permalink
deprecated some netlist utils functions
Browse files Browse the repository at this point in the history
  • Loading branch information
SJulianS committed May 10, 2024
1 parent dd6b14c commit b3beac6
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions include/hal_core/netlist/netlist_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ namespace hal
get_partial_netlist(const Netlist* nl, const std::vector<const Gate*>& subgraph_gates);

/**
* \deprecated
* Find predecessors or successors of a gate. If depth is set to 1 only direct predecessors/successors will be returned.
* Higher number of depth causes as many steps of recursive calls.
* If depth is set to 0 there is no limitation and the loop continues until no more predecessors/succesors are found.
Expand All @@ -110,9 +111,11 @@ namespace hal
* @param[in] filter - User-defined filter function.
* @return Vector of predecessor/successor gates.
*/
CORE_API std::vector<Gate*> get_next_gates(const Gate* gate, bool get_successors, int depth = 0, const std::function<bool(const Gate*)>& filter = nullptr);
[[deprecated("Will be removed in a future version, use NetlistTraversalDecorator::get_next_matching_gates_until_depth instead.")]] CORE_API std::vector<Gate*>
get_next_gates(const Gate* gate, bool get_successors, int depth = 0, const std::function<bool(const Gate*)>& filter = nullptr);

/**
* \deprecated
* Find predecessors or successors of a net. If depth is set to 1 only direct predecessors/successors will be returned.
* Higher number of depth causes as many steps of recursive calls.
* If depth is set to 0 there is no limitation and the loop continues until no more predecessors/succesors are found.
Expand All @@ -125,9 +128,11 @@ namespace hal
* @param[in] filter - User-defined filter function.
* @return Vector of predecessor/successor gates.
*/
CORE_API std::vector<Gate*> get_next_gates(const Net* net, bool get_successors, int depth = 0, const std::function<bool(const Gate*)>& filter = nullptr);
[[deprecated("Will be removed in a future version, use NetlistTraversalDecorator::get_next_matching_gates_until_depth instead.")]] CORE_API std::vector<Gate*>
get_next_gates(const Net* net, bool get_successors, int depth = 0, const std::function<bool(const Gate*)>& filter = nullptr);

/**
* \deprecated
* Find all sequential predecessors or successors of a gate.
* Traverses combinational logic of all input or output nets until sequential gates are found.
* The result may include the provided gate itself.
Expand All @@ -140,9 +145,11 @@ namespace hal
* @param[inout] cache - The cache.
* @returns All sequential successors or predecessors of the gate.
*/
CORE_API std::vector<Gate*> get_next_sequential_gates(const Gate* gate, bool get_successors, std::unordered_map<u32, std::vector<Gate*>>& cache);
[[deprecated("Will be removed in a future version, use NetlistTraversalDecorator::get_next_sequential_gates instead.")]] CORE_API std::vector<Gate*>
get_next_sequential_gates(const Gate* gate, bool get_successors, std::unordered_map<u32, std::vector<Gate*>>& cache);

/**
* \deprecated
* Find all sequential predecessors or successors of a gate.
* Traverses combinational logic of all input or output nets until sequential gates are found.
* The result may include the provided gate itself.
Expand All @@ -151,9 +158,11 @@ namespace hal
* @param[in] get_successors - If true, sequential successors are returned, otherwise sequential predecessors are returned.
* @returns All sequential successors or predecessors of the gate.
*/
CORE_API std::vector<Gate*> get_next_sequential_gates(const Gate* gate, bool get_successors);
[[deprecated("Will be removed in a future version, use NetlistTraversalDecorator::get_next_sequential_gates instead.")]] CORE_API std::vector<Gate*>
get_next_sequential_gates(const Gate* gate, bool get_successors);

/**
* \deprecated
* Find all sequential predecessors or successors of a net.
* Traverses combinational logic of all input or output nets until sequential gates are found.
* The use of the cache is recommended in case of extensive usage of this function.
Expand All @@ -165,17 +174,20 @@ namespace hal
* @param[inout] cache - The cache.
* @returns All sequential successors or predecessors of the net.
*/
CORE_API std::vector<Gate*> get_next_sequential_gates(const Net* net, bool get_successors, std::unordered_map<u32, std::vector<Gate*>>& cache);
[[deprecated("Will be removed in a future version, use NetlistTraversalDecorator::get_next_sequential_gates instead.")]] CORE_API std::vector<Gate*>
get_next_sequential_gates(const Net* net, bool get_successors, std::unordered_map<u32, std::vector<Gate*>>& cache);

/**
* \deprecated
* Find all sequential predecessors or successors of a net.
* Traverses combinational logic of all input or output nets until sequential gates are found.
*
* @param[in] net - The initial net.
* @param[in] get_successors - If true, sequential successors are returned, otherwise sequential predecessors are returned.
* @returns All sequential successors or predecessors of the net.
*/
CORE_API std::vector<Gate*> get_next_sequential_gates(const Net* net, bool get_successors);
[[deprecated("Will be removed in a future version, use NetlistTraversalDecorator::get_next_sequential_gates instead.")]] CORE_API std::vector<Gate*>
get_next_sequential_gates(const Net* net, bool get_successors);

/**
* Find all gates on the predecessor or successor path of a gate.
Expand Down

0 comments on commit b3beac6

Please sign in to comment.