aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/rfnoc
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2019-08-21 15:14:39 -0700
committerMartin Braun <martin.braun@ettus.com>2019-11-26 11:49:42 -0800
commit027cf1fe9b484197bc7f2aeb2f1bb588442d0bdc (patch)
treeb94743f513b3e0d5d53241592f1caaa72e2acb56 /host/lib/rfnoc
parent77a5358dd03669366a162d67f9ea11b2056c78b6 (diff)
downloaduhd-027cf1fe9b484197bc7f2aeb2f1bb588442d0bdc.tar.gz
uhd-027cf1fe9b484197bc7f2aeb2f1bb588442d0bdc.tar.bz2
uhd-027cf1fe9b484197bc7f2aeb2f1bb588442d0bdc.zip
rfnoc: radio/streamer: Handle late commands and burst ACKs
- 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
Diffstat (limited to 'host/lib/rfnoc')
-rw-r--r--host/lib/rfnoc/radio_control_impl.cpp16
-rw-r--r--host/lib/rfnoc/rfnoc_rx_streamer.cpp4
2 files changed, 20 insertions, 0 deletions
diff --git a/host/lib/rfnoc/radio_control_impl.cpp b/host/lib/rfnoc/radio_control_impl.cpp
index e400033b3..2a730e8df 100644
--- a/host/lib/rfnoc/radio_control_impl.cpp
+++ b/host/lib/rfnoc/radio_control_impl.cpp
@@ -872,6 +872,8 @@ bool radio_control_impl::async_message_validator(
return true;
case err_codes::ERR_TX_LATE_DATA:
return true;
+ case err_codes::EVENT_TX_BURST_ACK:
+ return true;
default:
return false;
}
@@ -939,6 +941,14 @@ void radio_control_impl::async_message_handler(
RFNOC_LOG_TRACE("Posting late data event action message.");
break;
}
+ case err_codes::EVENT_TX_BURST_ACK: {
+ auto tx_event_action = tx_event_action_info::make(
+ uhd::async_metadata_t::EVENT_CODE_BURST_ACK);
+ post_action(res_source_info{res_source_info::INPUT_EDGE, chan},
+ tx_event_action);
+ RFNOC_LOG_TRACE("Posting burst ack event action message.");
+ break;
+ }
}
break;
}
@@ -963,6 +973,12 @@ void radio_control_impl::async_message_handler(
}
case err_codes::ERR_RX_LATE_CMD:
UHD_LOG_FASTPATH("L");
+ auto rx_event_action = rx_event_action_info::make();
+ rx_event_action->error_code =
+ uhd::rx_metadata_t::ERROR_CODE_LATE_COMMAND;
+ RFNOC_LOG_TRACE("Posting RX late command message.");
+ post_action(res_source_info{res_source_info::OUTPUT_EDGE, chan},
+ rx_event_action);
break;
}
break;
diff --git a/host/lib/rfnoc/rfnoc_rx_streamer.cpp b/host/lib/rfnoc/rfnoc_rx_streamer.cpp
index 9383e3487..d6778267f 100644
--- a/host/lib/rfnoc/rfnoc_rx_streamer.cpp
+++ b/host/lib/rfnoc/rfnoc_rx_streamer.cpp
@@ -244,6 +244,10 @@ void rfnoc_rx_streamer::_handle_rx_event_action(
// Tell the streamer to flag an overrun to the user after the data that
// was buffered prior to the overrun is read.
set_stopped_due_to_overrun();
+ } else if (rx_event_action->error_code
+ == uhd::rx_metadata_t::ERROR_CODE_LATE_COMMAND) {
+ RFNOC_LOG_DEBUG("Received late command message on port " << src.instance);
+ set_stopped_due_to_late_command();
}
}