aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/rfnoc/rfnoc_rx_streamer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* lib: Fix warnings related to unnecessary lambda capturesMartin Braun2021-03-041-3/+6
|
* RFNoC: Revert change in streamer initializationmichael-west2020-08-071-1/+1
| | | | | | | Reverting inadvertent change in num_chans argument during tx/rx_streamer_impl construction. Signed-off-by: michael-west <michael.west@ettus.com>
* RFNoC: Added support for destruction of streamersmichael-west2020-08-041-3/+12
| | | | | | | | | | | - Added rfnoc_graph method to disconnect a connection. - Added rfnoc_graph method to disconnect a streamer. - Added rfnoc_graph method to disconnect a port on a streamer. - Added disconnect callback to rfnoc_rx_streamer and rfnoc_tx_streamer. - Registered disconnect callback functions to streamers returned by get_rx_streamer and get_tx_streamer methods. Signed-off-by: michael-west <michael.west@ettus.com>
* uhd: Apply clang-format against all .cpp and .hpp files in host/Martin Braun2020-03-031-26/+25
| | | | | Note: template_lvbitx.{cpp,hpp} need to be excluded from the list of files that clang-format gets applied against.
* rfnoc: radio/streamer: Handle late commands and burst ACKsMartin Braun2019-11-261-0/+4
| | | | | | | - Burst ACKs are already handled by the TX streamer, but the radio now also sends an action upstream on reception of a burst ACK - Late commands were only acquitted by an 'L', now an action gets sent downstream and is handled in the rx streamer
* rfnoc: Add MTU property to RX streamerCiro Nishiguchi2019-11-261-0/+40
|
* rfnoc: Implement flushing on overrunCiro Nishiguchi2019-11-261-28/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This modifies the overrun handling such that the RX streamer does not restart the radios until the packets that were buffered prior to the overrun are read by the user. When an RX streamer receives an overrun, it will run the following algorithm: 1. Stop all upstream producers. 2. Set an internal flag in the streamer that indicates that the producers have stopped due to an overrun. 3. Continue servicing calls to recv until it runs out of packets in the host buffer (packets that can be read from the transport using a 0 timeout). 4. Once the packets are exhausted, return an overrun error from recv. The radio, if it was in continuous streaming mode before the overrun, includes a flag in its initial action whether or not to restart streaming. 5. If the radio requested a restart, 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. 6. 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.
* rfnoc: Implement overrun handling using action APIMartin Braun2019-11-261-0/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* rfnoc: add rx and tx transports, and amend rfnoc_graphCiro Nishiguchi2019-11-261-0/+141
transports: Transports build on I/O service and implements flow control and sequence number checking. The rx streamer subclass extends the streamer implementation to connect it to the rfnoc graph. It receives configuration values from property propagation and configures the streamer accordingly. It also implements the issue_stream_cmd rx_streamer API method. Add implementation of rx streamer creation and method to connect it to an rfnoc block. rfnoc_graph: Cache more connection info, clarify contract Summary of changes: - rfnoc_graph stores more information about static connections at the beginning. Some search algorithms are replaced by simpler lookups. - The contract for connect() was clarified. It is required to call connect, even for static connections.