From ce6be04bc75f5dda2943fd438c055c57b70a11a6 Mon Sep 17 00:00:00 2001 From: vkakade Date: Mon, 19 Sep 2016 14:02:01 -0500 Subject: Added NI product IDs for USRP-2945 and USRP-2955 These are USRP RIO (X310) devices with TwinRX daughter-boards. --- host/lib/usrp/x300/x300_impl.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'host/lib/usrp/x300/x300_impl.cpp') diff --git a/host/lib/usrp/x300/x300_impl.cpp b/host/lib/usrp/x300/x300_impl.cpp index 7f7fcad09..0cdc7a3b3 100644 --- a/host/lib/usrp/x300/x300_impl.cpp +++ b/host/lib/usrp/x300/x300_impl.cpp @@ -1664,6 +1664,7 @@ x300_impl::x300_mboard_t x300_impl::get_mb_type_from_pcie(const std::string& res case X310_2943R_40MHz_PCIE_SSID_ADC_18: case X310_2943R_120MHz_PCIE_SSID_ADC_18: case X310_2944R_40MHz_PCIE_SSID_ADC_18: + case X310_2945R_PCIE_SSID_ADC_18: case X310_2950R_40MHz_PCIE_SSID_ADC_18: case X310_2950R_120MHz_PCIE_SSID_ADC_18: case X310_2952R_40MHz_PCIE_SSID_ADC_18: @@ -1671,6 +1672,7 @@ x300_impl::x300_mboard_t x300_impl::get_mb_type_from_pcie(const std::string& res case X310_2953R_40MHz_PCIE_SSID_ADC_18: case X310_2953R_120MHz_PCIE_SSID_ADC_18: case X310_2954R_40MHz_PCIE_SSID_ADC_18: + case X310_2955R_PCIE_SSID_ADC_18: mb_type = USRP_X310_MB; break; default: mb_type = UNKNOWN; break; @@ -1721,6 +1723,7 @@ x300_impl::x300_mboard_t x300_impl::get_mb_type_from_eeprom(const uhd::usrp::mbo case X310_2943R_40MHz_PCIE_SSID_ADC_18: case X310_2943R_120MHz_PCIE_SSID_ADC_18: case X310_2944R_40MHz_PCIE_SSID_ADC_18: + case X310_2945R_PCIE_SSID_ADC_18: case X310_2950R_40MHz_PCIE_SSID_ADC_18: case X310_2950R_120MHz_PCIE_SSID_ADC_18: case X310_2952R_40MHz_PCIE_SSID_ADC_18: @@ -1728,6 +1731,7 @@ x300_impl::x300_mboard_t x300_impl::get_mb_type_from_eeprom(const uhd::usrp::mbo case X310_2953R_40MHz_PCIE_SSID_ADC_18: case X310_2953R_120MHz_PCIE_SSID_ADC_18: case X310_2954R_40MHz_PCIE_SSID_ADC_18: + case X310_2955R_PCIE_SSID_ADC_18: mb_type = USRP_X310_MB; break; default: UHD_MSG(warning) << "X300 unknown product code in EEPROM: " << product_num << std::endl; -- cgit v1.2.3 From a6cf307d4494633e71f94b59c92c21e8ef3112f0 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Mon, 26 Sep 2016 12:38:25 -0700 Subject: x300: Added ignore-cal-file as an option Reviewed-By: Moritz Fischer Signed-off-by: Martin Braun --- host/lib/usrp/x300/x300_impl.cpp | 7 ++++++- host/lib/usrp/x300/x300_radio_ctrl_impl.cpp | 7 ++++++- host/lib/usrp/x300/x300_radio_ctrl_impl.hpp | 6 +++++- 3 files changed, 17 insertions(+), 3 deletions(-) (limited to 'host/lib/usrp/x300/x300_impl.cpp') diff --git a/host/lib/usrp/x300/x300_impl.cpp b/host/lib/usrp/x300/x300_impl.cpp index 0cdc7a3b3..543ac9702 100644 --- a/host/lib/usrp/x300/x300_impl.cpp +++ b/host/lib/usrp/x300/x300_impl.cpp @@ -960,7 +960,12 @@ void x300_impl::setup_mb(const size_t mb_i, const uhd::device_addr_t &dev_addr) BOOST_FOREACH(const rfnoc::block_id_t &id, radio_ids) { rfnoc::x300_radio_ctrl_impl::sptr radio(get_block_ctrl(id)); mb.radios.push_back(radio); - radio->setup_radio(mb.zpu_i2c, mb.clock, dev_addr.has_key("self_cal_adc_delay")); + radio->setup_radio( + mb.zpu_i2c, + mb.clock, + dev_addr.has_key("ignore-cal-file"), + dev_addr.has_key("self_cal_adc_delay") + ); } //////////////////////////////////////////////////////////////////// diff --git a/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp b/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp index e1b724db6..88dc73896 100644 --- a/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp +++ b/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp @@ -297,9 +297,14 @@ double x300_radio_ctrl_impl::get_output_samp_rate(size_t chan) /**************************************************************************** * Radio control and setup ***************************************************************************/ -void x300_radio_ctrl_impl::setup_radio(uhd::i2c_iface::sptr zpu_i2c, x300_clock_ctrl::sptr clock, bool verbose) +void x300_radio_ctrl_impl::setup_radio( + uhd::i2c_iface::sptr zpu_i2c, + x300_clock_ctrl::sptr clock, + bool ignore_cal_file, + bool verbose) { _self_cal_adc_capture_delay(verbose); + _ignore_cal_file = ignore_cal_file; //////////////////////////////////////////////////////////////////// // create RF frontend interfacing diff --git a/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp b/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp index 770519eba..4f7f43b7d 100644 --- a/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp +++ b/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp @@ -73,7 +73,11 @@ public: /*! Set up the radio. No API calls may be made before this one. */ void setup_radio( - uhd::i2c_iface::sptr zpu_i2c, x300_clock_ctrl::sptr clock, bool verbose); + uhd::i2c_iface::sptr zpu_i2c, + x300_clock_ctrl::sptr clock, + bool ignore_cal_file, + bool verbose + ); void reset_codec(); -- cgit v1.2.3 From 2876c159ec268e70ade5139ac73b146fd00b83ca Mon Sep 17 00:00:00 2001 From: Ashish Chaudhari Date: Mon, 26 Sep 2016 15:17:23 -0700 Subject: bugfix: db eeprom id not being written for X3x0 - The value of db_eeprom_t being written was stale due to a caching bug - Updated subscriber for db_eeprom_t to write the EEPROM state *and* cache it locally Signed-off-by: Moritz Fischer --- host/lib/usrp/x300/x300_impl.cpp | 5 ----- host/lib/usrp/x300/x300_impl.hpp | 1 - host/lib/usrp/x300/x300_radio_ctrl_impl.cpp | 10 ++++++++-- host/lib/usrp/x300/x300_radio_ctrl_impl.hpp | 2 ++ 4 files changed, 10 insertions(+), 8 deletions(-) (limited to 'host/lib/usrp/x300/x300_impl.cpp') diff --git a/host/lib/usrp/x300/x300_impl.cpp b/host/lib/usrp/x300/x300_impl.cpp index 543ac9702..e4f6d6fb8 100644 --- a/host/lib/usrp/x300/x300_impl.cpp +++ b/host/lib/usrp/x300/x300_impl.cpp @@ -1445,11 +1445,6 @@ bool x300_impl::is_pps_present(mboard_members_t& mb) * eeprom **********************************************************************/ -void x300_impl::set_db_eeprom(i2c_iface::sptr i2c, const size_t addr, const uhd::usrp::dboard_eeprom_t &db_eeprom) -{ - db_eeprom.store(*i2c, addr); -} - void x300_impl::set_mb_eeprom(i2c_iface::sptr i2c, const mboard_eeprom_t &mb_eeprom) { i2c_iface::sptr eeprom16 = i2c->eeprom16(); diff --git a/host/lib/usrp/x300/x300_impl.hpp b/host/lib/usrp/x300/x300_impl.hpp index f7dde142e..ee42dcf3e 100644 --- a/host/lib/usrp/x300/x300_impl.hpp +++ b/host/lib/usrp/x300/x300_impl.hpp @@ -266,7 +266,6 @@ private: bool wait_for_clk_locked(mboard_members_t& mb, boost::uint32_t which, double timeout); bool is_pps_present(mboard_members_t& mb); - void set_db_eeprom(uhd::i2c_iface::sptr i2c, const size_t, const uhd::usrp::dboard_eeprom_t &); void set_mb_eeprom(uhd::i2c_iface::sptr i2c, const uhd::usrp::mboard_eeprom_t &); void check_fw_compat(const uhd::fs_path &mb_path, uhd::wb_iface::sptr iface); diff --git a/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp b/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp index 88dc73896..e11548703 100644 --- a/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp +++ b/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp @@ -327,8 +327,8 @@ void x300_radio_ctrl_impl::setup_radio( //Add to tree _tree->create(db_path / EEPROM_PATHS[i]) .set(_db_eeproms[addr]) - .add_coerced_subscriber(boost::bind(&dboard_eeprom_t::store, - _db_eeproms[addr], boost::ref(*zpu_i2c), (BASE_ADDR | addr))); + .add_coerced_subscriber(boost::bind(&x300_radio_ctrl_impl::_set_db_eeprom, + this, zpu_i2c, (BASE_ADDR | addr), _1)); } //create a new dboard interface @@ -860,6 +860,12 @@ void x300_radio_ctrl_impl::_check_adc(const boost::uint32_t val) } } +void x300_radio_ctrl_impl::_set_db_eeprom(i2c_iface::sptr i2c, const size_t addr, const uhd::usrp::dboard_eeprom_t &db_eeprom) +{ + db_eeprom.store(*i2c, addr); + _db_eeproms[addr] = db_eeprom; +} + /**************************************************************************** * Helpers ***************************************************************************/ diff --git a/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp b/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp index 4f7f43b7d..46540a0c7 100644 --- a/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp +++ b/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp @@ -156,6 +156,8 @@ private: void _check_adc(const boost::uint32_t val); + void _set_db_eeprom(uhd::i2c_iface::sptr i2c, const size_t, const uhd::usrp::dboard_eeprom_t &); + void set_rx_fe_corrections(const uhd::fs_path &db_path, const uhd::fs_path &rx_fe_corr_path, const double lo_freq); void set_tx_fe_corrections(const uhd::fs_path &db_path, const uhd::fs_path &tx_fe_corr_path, const double lo_freq); -- cgit v1.2.3