diff options
| -rw-r--r-- | host/lib/usrp/cores/rx_dsp_core_200.cpp | 4 | ||||
| -rw-r--r-- | host/lib/usrp/cores/tx_dsp_core_200.cpp | 4 | 
2 files changed, 6 insertions, 2 deletions
| diff --git a/host/lib/usrp/cores/rx_dsp_core_200.cpp b/host/lib/usrp/cores/rx_dsp_core_200.cpp index a83a93d24..d562c64db 100644 --- a/host/lib/usrp/cores/rx_dsp_core_200.cpp +++ b/host/lib/usrp/cores/rx_dsp_core_200.cpp @@ -133,9 +133,11 @@ public:      }      double set_host_rate(const double rate){ -        const size_t decim_rate = uhd::clip<size_t>( +        size_t decim_rate = uhd::clip<size_t>(              boost::math::iround(_tick_rate/rate), size_t(std::ceil(_tick_rate/_link_rate)), 512          ); +        if (decim_rate > 128) decim_rate &= ~0x1; //CIC up to 128, have to use 1 HB +        if (decim_rate > 256) decim_rate &= ~0x3; //CIC up to 128, have to use 2 HB          size_t decim = decim_rate;          //determine which half-band filters are activated diff --git a/host/lib/usrp/cores/tx_dsp_core_200.cpp b/host/lib/usrp/cores/tx_dsp_core_200.cpp index 222ba589a..04e9f5da4 100644 --- a/host/lib/usrp/cores/tx_dsp_core_200.cpp +++ b/host/lib/usrp/cores/tx_dsp_core_200.cpp @@ -74,9 +74,11 @@ public:      }      double set_host_rate(const double rate){ -        const size_t interp_rate = uhd::clip<size_t>( +        size_t interp_rate = uhd::clip<size_t>(              boost::math::iround(_tick_rate/rate), size_t(std::ceil(_tick_rate/_link_rate)), 512          ); +        if (interp_rate > 128) interp_rate &= ~0x1; //CIC up to 128, have to use 1 HB +        if (interp_rate > 256) interp_rate &= ~0x3; //CIC up to 128, have to use 2 HB          size_t interp = interp_rate;          //determine which half-band filters are activated | 
