aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2015-04-06 08:53:27 -0700
committerMartin Braun <martin.braun@ettus.com>2015-04-14 13:55:38 -0500
commit7ad93dc81f2e89fed4e83ec1cb4c35431465cb87 (patch)
tree75492c715f1a30d42420a86d068780803f09161f /host
parent6f5f0a653d0cb6eaab1707b958d9264d6a1eb44b (diff)
downloaduhd-7ad93dc81f2e89fed4e83ec1cb4c35431465cb87.tar.gz
uhd-7ad93dc81f2e89fed4e83ec1cb4c35431465cb87.tar.bz2
uhd-7ad93dc81f2e89fed4e83ec1cb4c35431465cb87.zip
b200: Added warning for high bandwidth usage
Diffstat (limited to 'host')
-rw-r--r--host/lib/usrp/b200/b200_io_impl.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/host/lib/usrp/b200/b200_io_impl.cpp b/host/lib/usrp/b200/b200_io_impl.cpp
index 262c95f0d..cf5ba7a11 100644
--- a/host/lib/usrp/b200/b200_io_impl.cpp
+++ b/host/lib/usrp/b200/b200_io_impl.cpp
@@ -89,6 +89,14 @@ void b200_impl::update_tick_rate(const double rate)
}
}
+#define CHECK_BANDWIDTH(dir) \
+ if (rate > _codec_ctrl->get_bw_filter_range(dir).stop()) { \
+ UHD_MSG(warning) \
+ << "Selected " << dir << " bandwidth (" << (rate/1e6) << " MHz) exceeds\n" \
+ << "analog frontend filter bandwidth (" << (_codec_ctrl->get_bw_filter_range(dir).stop()/1e6) << " MHz)." \
+ << std::endl; \
+ }
+
void b200_impl::update_rx_samp_rate(const size_t dspno, const double rate)
{
boost::shared_ptr<sph::recv_packet_streamer> my_streamer =
@@ -97,6 +105,7 @@ void b200_impl::update_rx_samp_rate(const size_t dspno, const double rate)
my_streamer->set_samp_rate(rate);
const double adj = _radio_perifs[dspno].ddc->get_scaling_adjustment();
my_streamer->set_scale_factor(adj);
+ CHECK_BANDWIDTH("Rx");
}
void b200_impl::update_tx_samp_rate(const size_t dspno, const double rate)
@@ -107,6 +116,7 @@ void b200_impl::update_tx_samp_rate(const size_t dspno, const double rate)
my_streamer->set_samp_rate(rate);
const double adj = _radio_perifs[dspno].duc->get_scaling_adjustment();
my_streamer->set_scale_factor(adj);
+ CHECK_BANDWIDTH("Tx");
}
/***********************************************************************