aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/include/uhdlib/rfnoc/graph.hpp
Commit message (Collapse)AuthorAgeFilesLines
* rfnoc: graph: Optimize property propagation algorithmMartin Braun2019-11-261-1/+3
| | | | | | | | | | | | | | | | | | | | | This introduces the concept of a resolution context, because the property propagation algorithm needs to behave differently when called during an initialization step (e.g. when the graph is committed), or when the user changes a property on one of the nodes after it was committed. The algorithm is modified as follows: - When called during an initialization step, then all nodes get resolved at least once. If nodes added new properties, then all nodes get touched again until the max number of iterations is reached. - When called because a node modified one of its properties, then that node is always resolved first. From there, all other nodes are resolved in topological order. However, the algorithm immediately terminates as soon as there are no more dirty nodes. - When called because a node modified one of its properties, but the graph is currently not in a committed state, then that node will do a local property resolution.
* rfnoc: graph: Lock release/commit stateMartin Braun2019-11-261-5/+8
| | | | | | | | | | | | | | | | | Property propagation and action handling depend on the release state, but they are lengthy operations. It is therefore imperative to not change the release/commit state during those methods. This commit changes the following: - Change the release state counter from an atomic to a non-atomic variable - Instead, use a mutex to lock the release state counter, and use the same mutex for locking access to the property propagation and action handling The rfnoc_graph now tries to release the graph before shutting down blocks to make sure they don't get destroyed while those algorithms are still running.
* rfnoc: Enable users to query connections in the graphAlex Williams2019-11-261-0/+4
| | | | Implement uhd::rfnoc::rfnoc_graph::enumerate_*_connections()
* rfnoc: Add check_topology() API to nodesMartin Braun2019-11-261-0/+7
| | | | | This API lets blocks decide if their current topology is OK for them, and make decisions based on their topology.
* rfnoc: graph: Add commit/release APIMartin Braun2019-11-261-2/+13
|
* rfnoc: Move graph_edge data structure to its own header, add to_string()Martin Braun2019-11-261-59/+3
| | | | | | | | This structure represents information about a graph edge. Required by detail::graph and rfnoc_graph. graph_edge_t::to_string() will now provide a textual representation of the edge.
* rfnoc: Add action APIMartin Braun2019-11-261-1/+48
| | | | | | | | - Added action_info class - Allow to send actions from node to node - Allow to post actions into nodes - Allow to set default forwarding policies - Added unit tests
* rfnoc: Add property propagation, Boost.Graph storageMartin Braun2019-11-261-0/+271
- Adds a detail::graph_t class, which handles the propagation - Adds methods to node_t to aid with propagation - Adds unit tests - Adds dynamic property forwarding: Nodes are now able to forward properties they don't know about by providing a forwarding policy. A good example is the FIFO block which simply forwards most properties verbatim. - node: Temporarily disabling consistency check at init