From ab87597e9e76854237b5d78f7d35959b14e9737b Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Wed, 17 Jul 2019 15:25:51 -0700 Subject: rfnoc: Implement overrun handling using action API In order to enable overrun handling through the action API, a few new features are implemented: - The RX streamer can now accept stream command actions. The streamer will interpret stream command actions as a request to send stream commands upstream to all producers. - A new action type is defined ('restart request') which is understood by the radio and streamer, and is a handshake between producers and consumers. In this case, it will ask the radio to send a stream command itself. When an RX streamer receives an overrun, it will now run the following algorithm: 1. Stop all upstream producers (this was already in the code before this commit). 2. If no restart is required, Wait for the radios to have space in the downstream blocks. The radio, if it was in continuous streaming mode before the overrun, includes a flag in its initial action whether or not to restart the streaming. Also, it will wait for the stop stream command from the streamer. When it receives that, it will initiate a restart request handshake. 3. The streamer submits a restart request action upstream. This action will be received by the radio. The radio will then check the current time, and send a stream command action back downstream. 4. The RX streamer receives the stream command action, and uses it to send another stream command to all upstream producers. This way, all upstream producers receive a start command for the same time. --- host/lib/rfnoc/graph.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'host/lib/rfnoc/graph.cpp') diff --git a/host/lib/rfnoc/graph.cpp b/host/lib/rfnoc/graph.cpp index ff5fde1e9..1a25f84f9 100644 --- a/host/lib/rfnoc/graph.cpp +++ b/host/lib/rfnoc/graph.cpp @@ -417,8 +417,9 @@ void graph_t::enqueue_action( // The following call can cause other nodes to add more actions to // the end of _action_queue! UHD_LOG_TRACE(LOG_ID, - "Now delivering action " << next_action_sptr->key << "#" - << next_action_sptr->id); + "Now delivering action " + << next_action_sptr->key << "#" << next_action_sptr->id << " to " + << recipient_node->get_unique_id() << "@" << recipient_port.to_string()); node_accessor_t{}.send_action(recipient_node, recipient_port, next_action_sptr); } UHD_LOG_TRACE(LOG_ID, "Delivered all actions, terminating action handling."); -- cgit v1.2.3