diff options
7 files changed, 21 insertions, 46 deletions
diff --git a/host/lib/include/uhdlib/usrp/dboard/zbx/zbx_cpld_ctrl.hpp b/host/lib/include/uhdlib/usrp/dboard/zbx/zbx_cpld_ctrl.hpp index 3f3c144de..1f53d059f 100644 --- a/host/lib/include/uhdlib/usrp/dboard/zbx/zbx_cpld_ctrl.hpp +++ b/host/lib/include/uhdlib/usrp/dboard/zbx/zbx_cpld_ctrl.hpp @@ -456,6 +456,9 @@ private: void write_register_vector( const std::string& reg_addr_name, const std::vector<uint32_t>& values); + // Cached register state + zbx_cpld_regs_t _regs = zbx_cpld_regs_t(); + //! Poker object poke_fn_type _poke32; @@ -471,9 +474,6 @@ private: // infos about the daughtherboard revision std::string _db_rev_info; - // Cached register state - zbx_cpld_regs_t _regs = zbx_cpld_regs_t(); - const std::string _log_id; }; diff --git a/host/lib/include/uhdlib/usrp/dboard/zbx/zbx_dboard.hpp b/host/lib/include/uhdlib/usrp/dboard/zbx/zbx_dboard.hpp index 619c4a05f..0a52d7bdf 100644 --- a/host/lib/include/uhdlib/usrp/dboard/zbx/zbx_dboard.hpp +++ b/host/lib/include/uhdlib/usrp/dboard/zbx/zbx_dboard.hpp @@ -171,21 +171,21 @@ public: } // LO Property Getters - std::vector<std::string> get_tx_lo_names(const size_t /*chan*/) const + std::vector<std::string> get_tx_lo_names(const size_t /*chan*/) const override { return ZBX_LOS; } - std::vector<std::string> get_rx_lo_names(const size_t /*chan*/) const + std::vector<std::string> get_rx_lo_names(const size_t /*chan*/) const override { return ZBX_LOS; } std::vector<std::string> get_tx_lo_sources( - const std::string& /*name*/, const size_t /*chan*/) const + const std::string& /*name*/, const size_t /*chan*/) const override { return std::vector<std::string>{"internal", "external"}; } std::vector<std::string> get_rx_lo_sources( - const std::string& /*name*/, const size_t /*chan*/) const + const std::string& /*name*/, const size_t /*chan*/) const override { return std::vector<std::string>{"internal", "external"}; } diff --git a/host/lib/include/uhdlib/usrp/dboard/zbx/zbx_expert.hpp b/host/lib/include/uhdlib/usrp/dboard/zbx/zbx_expert.hpp index f386a4fdb..f4e2003ea 100644 --- a/host/lib/include/uhdlib/usrp/dboard/zbx/zbx_expert.hpp +++ b/host/lib/include/uhdlib/usrp/dboard/zbx/zbx_expert.hpp @@ -192,13 +192,13 @@ private: class zbx_freq_be_expert : public uhd::experts::worker_node_t { public: - zbx_freq_be_expert(const uhd::experts::node_retriever_t& db, - const uhd::fs_path fe_path, - const uhd::direction_t trx, - const size_t chan) + zbx_freq_be_expert( + const uhd::experts::node_retriever_t& db, const uhd::fs_path fe_path) : uhd::experts::worker_node_t(fe_path / "zbx_freq_be_expert") - , _coerced_lo1_frequency(db, fe_path / "los" / ZBX_LO1 / "freq" / "value" / "coerced") - , _coerced_lo2_frequency(db, fe_path / "los" / ZBX_LO2 / "freq" / "value" / "coerced") + , _coerced_lo1_frequency( + db, fe_path / "los" / ZBX_LO1 / "freq" / "value" / "coerced") + , _coerced_lo2_frequency( + db, fe_path / "los" / ZBX_LO2 / "freq" / "value" / "coerced") , _coerced_if2_frequency(db, fe_path / "if_freq" / "coerced") , _is_highband(db, fe_path / "is_highband") , _mixer1_m(db, fe_path / "mixer1_m") @@ -206,8 +206,6 @@ public: , _mixer2_m(db, fe_path / "mixer2_m") , _mixer2_n(db, fe_path / "mixer2_n") , _coerced_frequency(db, fe_path / "freq" / "coerced") - , _trx(trx) - , _chan(chan) { // Inputs bind_accessor(_coerced_lo1_frequency); @@ -240,10 +238,6 @@ private: // Output to user/API uhd::experts::data_writer_t<double> _coerced_frequency; - - // Channel properties - const uhd::direction_t _trx; - const size_t _chan; }; /*!--------------------------------------------------------- @@ -264,8 +258,6 @@ class zbx_lo_expert : public uhd::experts::worker_node_t public: zbx_lo_expert(const uhd::experts::node_retriever_t& db, const uhd::fs_path fe_path, - const uhd::direction_t trx, - const size_t chan, const std::string lo, std::shared_ptr<zbx_lo_ctrl> zbx_lo_ctrl) : uhd::experts::worker_node_t(fe_path / "zbx_" + lo + "_expert") @@ -274,8 +266,6 @@ public: , _test_mode_enabled(db, fe_path / lo / "test_mode") , _coerced_lo_frequency(db, fe_path / "los" / lo / "freq" / "value" / "coerced") , _lo_ctrl(zbx_lo_ctrl) - , _trx(trx) - , _chan(chan) { bind_accessor(_desired_lo_frequency); bind_accessor(_test_mode_enabled); @@ -296,8 +286,6 @@ private: uhd::experts::data_writer_t<double> _coerced_lo_frequency; std::shared_ptr<zbx_lo_ctrl> _lo_ctrl; - const uhd::direction_t _trx; - const size_t _chan; }; @@ -410,7 +398,6 @@ class zbx_rx_gain_expert : public uhd::experts::worker_node_t public: zbx_rx_gain_expert(const uhd::experts::node_retriever_t& db, const uhd::fs_path fe_path, - const size_t chan, uhd::usrp::pwr_cal_mgr::sptr power_mgr, uhd::usrp::cal::zbx_rx_dsa_cal::sptr dsa_cal) : uhd::experts::worker_node_t(fe_path / "zbx_gain_expert") @@ -424,7 +411,6 @@ public: , _dsa3b(db, fe_path / "gains" / ZBX_GAIN_STAGE_DSA3B / "value" / "desired") , _power_mgr(power_mgr) , _dsa_cal(dsa_cal) - , _chan(chan) { bind_accessor(_gain_in); bind_accessor(_profile); @@ -455,7 +441,6 @@ private: uhd::usrp::pwr_cal_mgr::sptr _power_mgr; uhd::usrp::cal::zbx_rx_dsa_cal::sptr _dsa_cal; - const size_t _chan; }; /*!--------------------------------------------------------- @@ -660,11 +645,9 @@ public: const uhd::fs_path fe_path, const uhd::direction_t trx, const size_t chan, - const int db_idx, uhd::usrp::zbx_rpc_iface::sptr rpcc) : uhd::experts::worker_node_t(fe_path / "zbx_band_inversion_expert") , _is_band_inverted(db, fe_path / "band_inverted") - , _db_idx(db_idx) , _rpcc(rpcc) , _trx(trx) , _chan(chan) @@ -678,7 +661,6 @@ private: // Inputs from Frequency FE expert uhd::experts::data_reader_t<bool> _is_band_inverted; - const size_t _db_idx; uhd::usrp::zbx_rpc_iface::sptr _rpcc; const uhd::direction_t _trx; const size_t _chan; diff --git a/host/lib/include/uhdlib/usrp/dboard/zbx/zbx_lo_ctrl.hpp b/host/lib/include/uhdlib/usrp/dboard/zbx/zbx_lo_ctrl.hpp index add7013ef..270cb2588 100644 --- a/host/lib/include/uhdlib/usrp/dboard/zbx/zbx_lo_ctrl.hpp +++ b/host/lib/include/uhdlib/usrp/dboard/zbx/zbx_lo_ctrl.hpp @@ -62,9 +62,7 @@ private: // Returns the appropriate output port for given LO lmx2572_iface::output_t _get_output_port(bool test_port); - // Specific LO that this class was constructed for - const zbx_lo_t _lo; - + // String prefix for log messages const std::string _log_id; // LMX driver set up with this object specific LO diff --git a/host/lib/usrp/dboard/zbx/zbx_dboard_init.cpp b/host/lib/usrp/dboard/zbx/zbx_dboard_init.cpp index ef86f10b6..f0558f8a4 100644 --- a/host/lib/usrp/dboard/zbx/zbx_dboard_init.cpp +++ b/host/lib/usrp/dboard/zbx/zbx_dboard_init.cpp @@ -190,7 +190,7 @@ void zbx_dboard_impl::_init_prop_tree() _cpld); subtree->create<eeprom_map_t>("eeprom") - .add_coerced_subscriber([this](const eeprom_map_t&) { + .add_coerced_subscriber([](const eeprom_map_t&) { throw uhd::runtime_error("Attempting to update daughterboard eeprom!"); }) .set_publisher([this]() { return get_db_eeprom(); }); @@ -261,8 +261,7 @@ uhd::usrp::pwr_cal_mgr::sptr zbx_dboard_impl::_init_power_cal( return trx == TX_DIRECTION ? get_tx_frequency(chan_idx) : get_rx_frequency(chan_idx); }, - [this, - trx_str = (trx == TX_DIRECTION ? "tx" : "rx"), + [trx_str = (trx == TX_DIRECTION ? "tx" : "rx"), fe_path, subtree, chan_str = std::to_string(chan_idx)]() -> std::string { @@ -327,16 +326,15 @@ void zbx_dboard_impl::_init_experts(uhd::property_tree::sptr subtree, expert_factory::add_worker_node<zbx_rx_gain_expert>(expert, expert->node_retriever(), fe_path, - chan_idx, get_pwr_mgr(trx).at(chan_idx), _rx_dsa_cal); } expert_factory::add_worker_node<zbx_freq_be_expert>( - expert, expert->node_retriever(), fe_path, trx, chan_idx); + expert, expert->node_retriever(), fe_path); expert_factory::add_worker_node<zbx_band_inversion_expert>( - expert, expert->node_retriever(), fe_path, trx, chan_idx, _db_idx, _rpcc); + expert, expert->node_retriever(), fe_path, trx, chan_idx, _rpcc); // Initialize our LO Control Experts @@ -365,8 +363,6 @@ void zbx_dboard_impl::_init_experts(uhd::property_tree::sptr subtree, expert_factory::add_worker_node<zbx_lo_expert>(expert, expert->node_retriever(), fe_path, - trx, - chan_idx, lo_select, lo_ctrl); _lo_ctrl_map.insert({lo, lo_ctrl}); diff --git a/host/lib/usrp/dboard/zbx/zbx_lo_ctrl.cpp b/host/lib/usrp/dboard/zbx/zbx_lo_ctrl.cpp index 1af665207..4fe2a243d 100644 --- a/host/lib/usrp/dboard/zbx/zbx_lo_ctrl.cpp +++ b/host/lib/usrp/dboard/zbx/zbx_lo_ctrl.cpp @@ -18,8 +18,7 @@ zbx_lo_ctrl::zbx_lo_ctrl(zbx_lo_t lo, const double default_frequency, const double db_prc_rate, const bool testing_mode_enabled) - : _lo(lo) - , _log_id(ZBX_LO_LOG_ID.at(lo)) + : _log_id(ZBX_LO_LOG_ID.at(lo)) , _freq(default_frequency) , _db_prc_rate(db_prc_rate) , _testing_mode_enabled(testing_mode_enabled) diff --git a/host/tests/rfnoc_block_tests/x4xx_zbx_mpm_mock.hpp b/host/tests/rfnoc_block_tests/x4xx_zbx_mpm_mock.hpp index ad47089a5..956e713db 100644 --- a/host/tests/rfnoc_block_tests/x4xx_zbx_mpm_mock.hpp +++ b/host/tests/rfnoc_block_tests/x4xx_zbx_mpm_mock.hpp @@ -137,7 +137,7 @@ public: double rfdc_set_nco_freq(const std::string& trx, const size_t /*db_id*/, const size_t chan, - const double freq) + const double freq) override { BOOST_REQUIRE(trx == "rx" || trx == "tx"); BOOST_REQUIRE(chan < uhd::usrp::zbx::ZBX_NUM_CHANS); @@ -146,7 +146,7 @@ public: } double rfdc_get_nco_freq( - const std::string& trx, const size_t /*db_id*/, const size_t chan) + const std::string& trx, const size_t /*db_id*/, const size_t chan) override { BOOST_REQUIRE(trx == "rx" || trx == "tx"); BOOST_REQUIRE(chan < uhd::usrp::zbx::ZBX_NUM_CHANS); |