aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--host/lib/rfnoc/radio_ctrl_impl.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/host/lib/rfnoc/radio_ctrl_impl.cpp b/host/lib/rfnoc/radio_ctrl_impl.cpp
index a151b2690..643a6e745 100644
--- a/host/lib/rfnoc/radio_ctrl_impl.cpp
+++ b/host/lib/rfnoc/radio_ctrl_impl.cpp
@@ -360,7 +360,17 @@ void radio_ctrl_impl::issue_stream_cmd(
"channel. Skipping.";
return;
}
- UHD_ASSERT_THROW(stream_cmd.num_samps <= 0x0fffffff);
+ constexpr size_t max_num_samps = 0x0fffffff;
+ if (stream_cmd.num_samps > max_num_samps) {
+ UHD_LOG_ERROR("RFNOC RADIO",
+ "Requesting too many samples in a single burst! "
+ "Requested " + std::to_string(stream_cmd.num_samps) + ", maximum "
+ "is " + std::to_string(max_num_samps) + ".");
+ UHD_LOG_INFO("RFNOC RADIO",
+ "Note that a decimation block will increase the number of samples "
+ "per burst. Your application may have requested fewer samples.");
+ throw uhd::value_error("Requested too many samples in a single burst.");
+ }
_continuous_streaming[chan] =
(stream_cmd.stream_mode == stream_cmd_t::STREAM_MODE_START_CONTINUOUS);