host: x4xx: update default wait time for NCO reset

This commit is contained in:
Max Köhler 2026-10-05 21:51:28 +02:00 committed by Martin Braun
parent 7b7f518ad4
commit 632f9927e5
3 changed files with 8 additions and 3 deletions

View File

@ -24,6 +24,9 @@ class rfdc_control
public: public:
using sptr = std::shared_ptr<rfdc_control>; using sptr = std::shared_ptr<rfdc_control>;
//! Default SYSREF wait time for an NCO reset, in SYSREF cycles
static constexpr uint32_t DEFAULT_SYSREF_WAIT_CYCLES = 14;
struct regmap struct regmap
{ {
//! Address of the NCO reset register //! Address of the NCO reset register

View File

@ -27,8 +27,9 @@ void rfdc_control::reset_ncos(
} }
UHD_LOG_TRACE(_log_id, "Resetting " << ncos.size() << " NCOs..."); UHD_LOG_TRACE(_log_id, "Resetting " << ncos.size() << " NCOs...");
// Initialize the NCO reset delay to a default of 11 SYSREF cycles // Initialize the NCO reset delay to the default number of SYSREF cycles
constexpr uint32_t reset_word = (11 & 0xFF) << regmap::SYSREF_WAIT_LSB constexpr uint32_t reset_word = (DEFAULT_SYSREF_WAIT_CYCLES & 0xFF)
<< regmap::SYSREF_WAIT_LSB
| 0x1 << regmap::WRITE_SYSREF_WAIT | 1; | 0x1 << regmap::WRITE_SYSREF_WAIT | 1;
// Initiate NCO reset // Initiate NCO reset

View File

@ -778,7 +778,8 @@ BOOST_FIXTURE_TEST_CASE(zbx_phase_sync_test, x400_radio_fixture)
// Set reset complete bit // Set reset complete bit
regs[nco_sync_addr] = 1 << 1; regs[nco_sync_addr] = 1 << 1;
constexpr uint32_t nco_sync_val = constexpr uint32_t nco_sync_val =
(11 & 0xFF) << uhd::rfnoc::x400::rfdc_control::regmap::SYSREF_WAIT_LSB (uhd::rfnoc::x400::rfdc_control::DEFAULT_SYSREF_WAIT_CYCLES & 0xFF)
<< uhd::rfnoc::x400::rfdc_control::regmap::SYSREF_WAIT_LSB
| 1 << uhd::rfnoc::x400::rfdc_control::regmap::WRITE_SYSREF_WAIT | 1 << uhd::rfnoc::x400::rfdc_control::regmap::WRITE_SYSREF_WAIT
| 1 << uhd::rfnoc::x400::rfdc_control::regmap::NCO_RESET_DONE_MSB | 1 << uhd::rfnoc::x400::rfdc_control::regmap::NCO_RESET_DONE_MSB
| 1 << uhd::rfnoc::x400::rfdc_control::regmap::NCO_RESET_START_MSB; | 1 << uhd::rfnoc::x400::rfdc_control::regmap::NCO_RESET_START_MSB;