diff --git a/host/lib/rfnoc/ddc_block_control.cpp b/host/lib/rfnoc/ddc_block_control.cpp index d6d2f5f662..1468e652f4 100644 --- a/host/lib/rfnoc/ddc_block_control.cpp +++ b/host/lib/rfnoc/ddc_block_control.cpp @@ -653,14 +653,10 @@ class ddc_block_control_impl : public ddc_block_control double _set_freq( const double requested_freq, const double dds_rate, const size_t chan) { - static int freq_word_width = 24; double actual_freq; int32_t freq_word; std::tie(actual_freq, freq_word) = - get_freq_and_freq_word(requested_freq, dds_rate, freq_word_width); - - // Only the upper 24 bits of the SR_FREQ_ADDR register are used, so shift the word - freq_word <<= (32 - freq_word_width); + get_freq_and_freq_word(requested_freq, dds_rate); _ddc_reg_iface.poke32( SR_FREQ_ADDR, uint32_t(freq_word), chan, get_command_time(chan)); diff --git a/host/lib/rfnoc/duc_block_control.cpp b/host/lib/rfnoc/duc_block_control.cpp index 36f688e347..99a90f3bda 100644 --- a/host/lib/rfnoc/duc_block_control.cpp +++ b/host/lib/rfnoc/duc_block_control.cpp @@ -645,14 +645,10 @@ class duc_block_control_impl : public duc_block_control double _set_freq( const double requested_freq, const double dds_rate, const size_t chan) { - static int freq_word_width = 24; double actual_freq; int32_t freq_word; std::tie(actual_freq, freq_word) = - get_freq_and_freq_word(requested_freq, dds_rate, freq_word_width); - - // Only the upper 24 bits of the SR_FREQ_ADDR register are used, so shift the word - freq_word <<= (32 - freq_word_width); + get_freq_and_freq_word(requested_freq, dds_rate); _duc_reg_iface.poke32( SR_FREQ_ADDR, uint32_t(freq_word), chan, get_command_time(chan));