diff options
author | Martin Braun <martin.braun@ettus.com> | 2017-04-06 23:34:16 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2017-04-06 23:34:22 -0700 |
commit | 282d57591b2e9befaff667dc9ab2febabcd61e93 (patch) | |
tree | f733f1d4fe209e552b845c1122280ef9445ae59f /host/lib/usrp/common | |
parent | e1c754f2069ce5ee4914ea312e62fc3f708ff824 (diff) | |
download | uhd-282d57591b2e9befaff667dc9ab2febabcd61e93.tar.gz uhd-282d57591b2e9befaff667dc9ab2febabcd61e93.tar.bz2 uhd-282d57591b2e9befaff667dc9ab2febabcd61e93.zip |
logging: Demoted more DEBUG to TRACE
Diffstat (limited to 'host/lib/usrp/common')
-rw-r--r-- | host/lib/usrp/common/ad9361_driver/ad9361_device.cpp | 20 | ||||
-rw-r--r-- | host/lib/usrp/common/adf435x.hpp | 17 | ||||
-rw-r--r-- | host/lib/usrp/common/max287x.hpp | 15 |
3 files changed, 27 insertions, 25 deletions
diff --git a/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp b/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp index e11079ae3..da0ab0b9a 100644 --- a/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp +++ b/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp @@ -1169,7 +1169,7 @@ void ad9361_device_t::_setup_synth(direction_t direction, double vcorate) * fed to the public set_clock_rate function. */ double ad9361_device_t::_tune_bbvco(const double rate) { - UHD_LOGGER_DEBUG("AD936X")<< boost::format("[ad9361_device_t::_tune_bbvco] rate=%.10f\n") % rate; + UHD_LOGGER_TRACE("AD936X")<< boost::format("[ad9361_device_t::_tune_bbvco] rate=%.10f\n") % rate; /* Let's not re-tune to the same frequency over and over... */ if (freq_is_nearly_equal(rate, _req_coreclk)) { @@ -1197,13 +1197,13 @@ double ad9361_device_t::_tune_bbvco(const double rate) if (i == 7) throw uhd::runtime_error("[ad9361_device_t] _tune_bbvco: wrong vcorate"); - UHD_LOGGER_DEBUG("AD936X")<< boost::format("[ad9361_device_t::_tune_bbvco] vcodiv=%d vcorate=%.10f\n") % vcodiv % vcorate; + UHD_LOGGER_TRACE("AD936X")<< boost::format("[ad9361_device_t::_tune_bbvco] vcodiv=%d vcorate=%.10f\n") % vcodiv % vcorate; /* Fo = Fref * (Nint + Nfrac / mod) */ int nint = static_cast<int>(vcorate / fref); - UHD_LOGGER_DEBUG("AD936X")<< boost::format("[ad9361_device_t::_tune_bbvco] (nint)=%.10f\n") % (vcorate / fref); + UHD_LOGGER_TRACE("AD936X")<< boost::format("[ad9361_device_t::_tune_bbvco] (nint)=%.10f\n") % (vcorate / fref); int nfrac = static_cast<int>(boost::math::round(((vcorate / fref) - (double) nint) * (double) modulus)); - UHD_LOGGER_DEBUG("AD936X")<< boost::format("[ad9361_device_t::_tune_bbvco] (nfrac)=%.10f\n") % (((vcorate / fref) - (double) nint) * (double) modulus); - UHD_LOGGER_DEBUG("AD936X")<< boost::format("[ad9361_device_t::_tune_bbvco] nint=%d nfrac=%d\n") % nint % nfrac; + UHD_LOGGER_TRACE("AD936X")<< boost::format("[ad9361_device_t::_tune_bbvco] (nfrac)=%.10f\n") % (((vcorate / fref) - (double) nint) * (double) modulus); + UHD_LOGGER_TRACE("AD936X")<< boost::format("[ad9361_device_t::_tune_bbvco] nint=%d nfrac=%d\n") % nint % nfrac; double actual_vcorate = fref * ((double) nint + ((double) nfrac / (double) modulus)); @@ -1381,7 +1381,7 @@ double ad9361_device_t::_setup_rates(const double rate) /* If we make it into this function, then we are tuning to a new rate. * Store the new rate. */ _req_clock_rate = rate; - UHD_LOGGER_DEBUG("AD936X")<< boost::format("[ad9361_device_t::_setup_rates] rate=%.6d\n") % rate; + UHD_LOGGER_TRACE("AD936X")<< boost::format("[ad9361_device_t::_setup_rates] rate=%.6d\n") % rate; /* Set the decimation and interpolation values in the RX and TX chains. * This also switches filters in / out. Note that all transmitters and @@ -1467,7 +1467,7 @@ double ad9361_device_t::_setup_rates(const double rate) throw uhd::runtime_error("[ad9361_device_t] [_setup_rates] INVALID_CODE_PATH"); } - UHD_LOGGER_DEBUG("AD936X")<< boost::format("[ad9361_device_t::_setup_rates] divfactor=%d\n") % divfactor; + UHD_LOGGER_TRACE("AD936X")<< boost::format("[ad9361_device_t::_setup_rates] divfactor=%d\n") % divfactor; /* Tune the BBPLL to get the ADC and DAC clocks. */ const double adcclk = _tune_bbvco(rate * divfactor); @@ -1489,7 +1489,7 @@ double ad9361_device_t::_setup_rates(const double rate) _io_iface->poke8(0x004, _regs.inputsel); _io_iface->poke8(0x00A, _regs.bbpll); - UHD_LOGGER_DEBUG("AD936X")<< boost::format("[ad9361_device_t::_setup_rates] adcclk=%f\n") % adcclk; + UHD_LOGGER_TRACE("AD936X")<< boost::format("[ad9361_device_t::_setup_rates] adcclk=%f\n") % adcclk; _baseband_bw = (adcclk / divfactor); /* @@ -1798,7 +1798,7 @@ double ad9361_device_t::set_clock_rate(const double req_rate) throw uhd::runtime_error("[ad9361_device_t] Requested master clock rate outside range"); } - UHD_LOGGER_DEBUG("AD936X")<< boost::format("[ad9361_device_t::set_clock_rate] req_rate=%.10f\n") % req_rate; + UHD_LOGGER_TRACE("AD936X")<< boost::format("[ad9361_device_t::set_clock_rate] req_rate=%.10f\n") % req_rate; /* UHD has a habit of requesting the same rate like four times when it * starts up. This prevents that, and any bugs in user code that request @@ -1840,7 +1840,7 @@ double ad9361_device_t::set_clock_rate(const double req_rate) * all the hard work gets done. */ double rate = _setup_rates(req_rate); - UHD_LOGGER_DEBUG("AD936X")<< boost::format("[ad9361_device_t::set_clock_rate] rate=%.10f\n") % rate; + UHD_LOGGER_TRACE("AD936X")<< boost::format("[ad9361_device_t::set_clock_rate] rate=%.10f\n") % rate; /* Transition to the ALERT state and calibrate everything. */ _io_iface->poke8(0x015, 0x04); //dual synth mode, synth en ctrl en diff --git a/host/lib/usrp/common/adf435x.hpp b/host/lib/usrp/common/adf435x.hpp index daa539982..18d5b70ba 100644 --- a/host/lib/usrp/common/adf435x.hpp +++ b/host/lib/usrp/common/adf435x.hpp @@ -268,14 +268,15 @@ public: adf435x_regs_t::LDF_FRAC_N; std::string tuning_str = (int_n_mode) ? "Integer-N" : "Fractional"; - UHD_LOGGER_DEBUG("ADF435X") - << boost::format("ADF 435X Frequencies (MHz): REQUESTED=%0.9f, ACTUAL=%0.9f" - ) % (target_freq/1e6) % (actual_freq/1e6) - << boost::format("ADF 435X Intermediates (MHz): Feedback=%0.2f, VCO=%0.2f, PFD=%0.2f, BAND=%0.2f, REF=%0.2f" - ) % (feedback_freq/1e6) % (vco_freq/1e6) % (pfd_freq/1e6) % (pfd_freq/BS/1e6) % (_reference_freq/1e6) - << boost::format("ADF 435X Tuning: %s") % tuning_str.c_str() - << boost::format("ADF 435X Settings: R=%d, BS=%d, N=%d, FRAC=%d, MOD=%d, T=%d, D=%d, RFdiv=%d" - ) % R % BS % N % FRAC % MOD % T % D % RFdiv ; + UHD_LOGGER_TRACE("ADF435X") + << boost::format("ADF 435X Frequencies (MHz): REQUESTED=%0.9f, ACTUAL=%0.9f") + % (target_freq/1e6) % (actual_freq/1e6) + << boost::format("ADF 435X Intermediates (MHz): Feedback=%0.2f, VCO=%0.2f, PFD=%0.2f, BAND=%0.2f, REF=%0.2f") + % (feedback_freq/1e6) % (vco_freq/1e6) % (pfd_freq/1e6) % (pfd_freq/BS/1e6) % (_reference_freq/1e6) + << boost::format("ADF 435X Tuning: %s") % tuning_str.c_str() + << boost::format("ADF 435X Settings: R=%d, BS=%d, N=%d, FRAC=%d, MOD=%d, T=%d, D=%d, RFdiv=%d") + % R % BS % N % FRAC % MOD % T % D % RFdiv + ; UHD_ASSERT_THROW((_regs.frac_12_bit & ((uint16_t)~0xFFF)) == 0); UHD_ASSERT_THROW((_regs.mod_12_bit & ((uint16_t)~0xFFF)) == 0); diff --git a/host/lib/usrp/common/max287x.hpp b/host/lib/usrp/common/max287x.hpp index a0400f651..c3c4bf18c 100644 --- a/host/lib/usrp/common/max287x.hpp +++ b/host/lib/usrp/common/max287x.hpp @@ -638,13 +638,14 @@ double max287x<max287x_regs_t>::set_frequency( //actual frequency calculation double actual_freq = double((N + (double(FRAC)/double(MOD)))*ref_freq*(1+int(D))/(R*(1+int(T)))) * fb_divisor / RFdiv; - UHD_LOGGER_DEBUG("MAX287X") - << boost::format("MAX287x: Intermediates: ref=%0.2f, outdiv=%f, fbdiv=%f" - ) % ref_freq % double(RFdiv*2) % double(N + double(FRAC)/double(MOD)) - << boost::format("MAX287x: tune: R=%d, BS=%d, N=%d, FRAC=%d, MOD=%d, T=%d, D=%d, RFdiv=%d, type=%s" - ) % R % BS % N % FRAC % MOD % T % D % RFdiv % ((is_int_n) ? "Integer-N" : "Fractional") - << boost::format("MAX287x: Frequencies (MHz): REQ=%0.2f, ACT=%0.2f, VCO=%0.2f, PFD=%0.2f, BAND=%0.2f" - ) % (target_freq/1e6) % (actual_freq/1e6) % (vco_freq/1e6) % (pfd_freq/1e6) % (pfd_freq/BS/1e6) ; + UHD_LOGGER_TRACE("MAX287X") + << boost::format("MAX287x: Intermediates: ref=%0.2f, outdiv=%f, fbdiv=%f") + % ref_freq % double(RFdiv*2) % double(N + double(FRAC)/double(MOD)) + << boost::format("MAX287x: tune: R=%d, BS=%d, N=%d, FRAC=%d, MOD=%d, T=%d, D=%d, RFdiv=%d, type=%s") + % R % BS % N % FRAC % MOD % T % D % RFdiv % ((is_int_n) ? "Integer-N" : "Fractional") + << boost::format("MAX287x: Frequencies (MHz): REQ=%0.2f, ACT=%0.2f, VCO=%0.2f, PFD=%0.2f, BAND=%0.2f") + % (target_freq/1e6) % (actual_freq/1e6) % (vco_freq/1e6) % (pfd_freq/1e6) % (pfd_freq/BS/1e6) + ; //load the register values _regs.rf_output_enable = max287x_regs_t::RF_OUTPUT_ENABLE_ENABLED; |