From 13899cd8de84119e7cd5e054c4847b7b19dbe3d2 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Tue, 18 Oct 2011 17:03:11 -0700 Subject: b100/e100: additional constraints for clock rate configuration --- host/lib/usrp/b100/clock_ctrl.cpp | 3 +++ host/lib/usrp/e100/clock_ctrl.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/host/lib/usrp/b100/clock_ctrl.cpp b/host/lib/usrp/b100/clock_ctrl.cpp index fd398abff..cbe6c40a0 100644 --- a/host/lib/usrp/b100/clock_ctrl.cpp +++ b/host/lib/usrp/b100/clock_ctrl.cpp @@ -153,6 +153,9 @@ static clock_settings_type get_clock_settings(double rate){ if (cs.b_counter == 1 and cs.a_counter != 0) continue; if (cs.b_counter >= (1<<13)) continue; if (cs.a_counter >= (1<<6)) continue; + if (cs.get_vco_rate() > 1800e6 - vco_bound_pad) continue; + if (cs.get_vco_rate() < 1400e6 + vco_bound_pad) continue; + if (cs.get_out_rate() != rate) continue; UHD_MSG(status) << "USRP-B100 clock control: " << i << std::endl << cs.to_pp_string() << std::endl; return cs; diff --git a/host/lib/usrp/e100/clock_ctrl.cpp b/host/lib/usrp/e100/clock_ctrl.cpp index 1dd55049b..9e355ce17 100644 --- a/host/lib/usrp/e100/clock_ctrl.cpp +++ b/host/lib/usrp/e100/clock_ctrl.cpp @@ -151,6 +151,9 @@ static clock_settings_type get_clock_settings(double rate){ if (cs.b_counter == 1 and cs.a_counter != 0) continue; if (cs.b_counter >= (1<<13)) continue; if (cs.a_counter >= (1<<6)) continue; + if (cs.get_vco_rate() > 1800e6 - vco_bound_pad) continue; + if (cs.get_vco_rate() < 1400e6 + vco_bound_pad) continue; + if (cs.get_out_rate() != rate) continue; UHD_MSG(status) << "USRP-E100 clock control: " << i << std::endl << cs.to_pp_string() << std::endl; return cs; -- cgit v1.2.3