diff options
author | Josh Blum <josh@joshknows.com> | 2011-10-18 17:03:11 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-10-18 17:03:11 -0700 |
commit | 13899cd8de84119e7cd5e054c4847b7b19dbe3d2 (patch) | |
tree | 0e06146fa24e8a937664a2c49830fb8820031cd4 | |
parent | 25f0bd512f79f9a04a26c24985c37ca83cfae210 (diff) | |
download | uhd-13899cd8de84119e7cd5e054c4847b7b19dbe3d2.tar.gz uhd-13899cd8de84119e7cd5e054c4847b7b19dbe3d2.tar.bz2 uhd-13899cd8de84119e7cd5e054c4847b7b19dbe3d2.zip |
b100/e100: additional constraints for clock rate configuration
-rw-r--r-- | host/lib/usrp/b100/clock_ctrl.cpp | 3 | ||||
-rw-r--r-- | host/lib/usrp/e100/clock_ctrl.cpp | 3 |
2 files changed, 6 insertions, 0 deletions
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; |