From b772c98717554dca5f58a149917257da5c6a4d8c Mon Sep 17 00:00:00 2001 From: michael-west Date: Thu, 21 Mar 2019 18:27:54 -0700 Subject: TwinRX: Fix duplicate write to N value in DDC The N value was getting written twice and the second value being written was 1, which works for all use cases except when using TwinRX. This change fixes several issues with TwinRX including streaming failing to stop cleanly and incorrect decimation. --- host/lib/rfnoc/ddc_block_ctrl_impl.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/host/lib/rfnoc/ddc_block_ctrl_impl.cpp b/host/lib/rfnoc/ddc_block_ctrl_impl.cpp index d89719c65..dbba7f68c 100644 --- a/host/lib/rfnoc/ddc_block_ctrl_impl.cpp +++ b/host/lib/rfnoc/ddc_block_ctrl_impl.cpp @@ -247,7 +247,6 @@ private: // Rate change = M/N sr_write("N", m * std::pow(2.0, double(hb_enable)) * (decim & 0xff), chan); - sr_write("M", m, chan); const auto noc_id = _tree->access(_root_path / "noc_id").get(); // FIXME this should be a rb reg in the FPGA, not based on a hard-coded // Noc-ID @@ -255,7 +254,7 @@ private: UHD_LOG_DEBUG("DDC", "EISCAT DDC! Assuming real inputs."); sr_write("M", 2, chan); } else { - sr_write("M", 1, chan); + sr_write("M", m, chan); } if (decim > 1 and hb_enable == 0) { -- cgit v1.2.3