aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
authorVidush <vidush.vishwanath@ettus.com>2018-06-20 13:33:21 -0700
committerMartin Braun <martin.braun@ettus.com>2018-06-21 17:28:07 -0700
commit9c56eb9261b315ab4a29e8ab0a94142c85f21413 (patch)
tree1731ffa6bde8c81cd8cdc78129c7a7a061430386 /host/lib
parentfbe00af768c1589caaa6c64d6b969edba0632751 (diff)
downloaduhd-9c56eb9261b315ab4a29e8ab0a94142c85f21413.tar.gz
uhd-9c56eb9261b315ab4a29e8ab0a94142c85f21413.tar.bz2
uhd-9c56eb9261b315ab4a29e8ab0a94142c85f21413.zip
B200: Enforce min_tick_rate
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/usrp/b200/b200_impl.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp
index dac54bb05..a91bccf94 100644
--- a/host/lib/usrp/b200/b200_impl.cpp
+++ b/host/lib/usrp/b200/b200_impl.cpp
@@ -936,6 +936,17 @@ void b200_impl::enforce_tick_rate_limits(size_t chan_count, double tick_rate, co
% (direction.empty() ? "data" : direction)
));
}
+ const double min_tick_rate = ad9361_device_t::AD9361_MIN_CLOCK_RATE / ((chan_count <= 1) ? 1 : 2);
+ if (min_tick_rate - tick_rate >= 1.0)
+ {
+ throw uhd::value_error(boost::str(
+ boost::format("current master clock rate (%.6f MHz) is less than minimum possible master clock rate (%.6f MHz) when using %d %s channels")
+ % (tick_rate/1e6)
+ % (min_tick_rate/1e6)
+ % chan_count
+ % (direction.empty() ? "data" : direction)
+ ));
+ }
}
}