Advertisement
Guest User

Untitled

a guest
Mar 26th, 2012
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. diff --git a/host/lib/usrp/dboard/db_dbsrx.cpp b/host/lib/usrp/dboard/db_dbsrx.cpp
  2. index 846597f..95c5c5d 100644
  3. --- a/host/lib/usrp/dboard/db_dbsrx.cpp
  4. +++ b/host/lib/usrp/dboard/db_dbsrx.cpp
  5. @@ -1,5 +1,5 @@
  6. //
  7. -// Copyright 2010-2011 Ettus Research LLC
  8. +// Copyright 2010-2012 Ettus Research LLC
  9. //
  10. // This program is free software: you can redistribute it and/or modify
  11. // it under the terms of the GNU General Public License as published by
  12. @@ -58,6 +58,8 @@ static const uhd::dict<std::string, gain_range_t> dbsrx_gain_ranges = map_list_o
  13. ("GC2", gain_range_t(0, 24, 1))
  14. ;
  15.  
  16. +static const double usrp1_gpio_clock_rate_limit = 4e6;
  17. +
  18. /***********************************************************************
  19. * The DBSRX dboard class
  20. **********************************************************************/
  21. @@ -265,6 +267,11 @@ double dbsrx::set_lo_freq(double target_freq){
  22. std::vector<double> clock_rates = this->get_iface()->get_clock_rates(dboard_iface::UNIT_RX);
  23. const double max_clock_rate = uhd::sorted(clock_rates).back();
  24. BOOST_FOREACH(ref_clock, uhd::reversed(uhd::sorted(clock_rates))){
  25. + //USRP1 feeds the DBSRX clock from a FPGA GPIO line.
  26. + //make sure that this clock does not exceed rate limit.
  27. + if (this->get_iface()->get_special_props().soft_clock_divider){
  28. + if (ref_clock > usrp1_gpio_clock_rate_limit) continue;
  29. + }
  30. if (ref_clock > 27.0e6) continue;
  31. if (size_t(max_clock_rate/ref_clock)%2 == 1) continue; //reject asymmetric clocks (odd divisors)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement