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 ++++ host/lib/usrp/x300/x300_regs.hpp | 2 ++ 2 files changed, 6 insertions(+) (limited to 'host/lib/usrp') 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; diff --git a/host/lib/usrp/x300/x300_regs.hpp b/host/lib/usrp/x300/x300_regs.hpp index c5ed1460b..80d275949 100644 --- a/host/lib/usrp/x300/x300_regs.hpp +++ b/host/lib/usrp/x300/x300_regs.hpp @@ -104,6 +104,7 @@ static const uint32_t X310_2942R_120MHz_PCIE_SSID_ADC_18 = 0x785C; static const uint32_t X310_2943R_40MHz_PCIE_SSID_ADC_18 = 0x7855; static const uint32_t X310_2943R_120MHz_PCIE_SSID_ADC_18 = 0x785D; static const uint32_t X310_2944R_40MHz_PCIE_SSID_ADC_18 = 0x7856; +static const uint32_t X310_2945R_PCIE_SSID_ADC_18 = 0x78EF; static const uint32_t X310_2950R_40MHz_PCIE_SSID_ADC_18 = 0x7857; static const uint32_t X310_2950R_120MHz_PCIE_SSID_ADC_18 = 0x785E; static const uint32_t X310_2952R_40MHz_PCIE_SSID_ADC_18 = 0x7858; @@ -111,6 +112,7 @@ static const uint32_t X310_2952R_120MHz_PCIE_SSID_ADC_18 = 0x785F; static const uint32_t X310_2953R_40MHz_PCIE_SSID_ADC_18 = 0x7859; static const uint32_t X310_2953R_120MHz_PCIE_SSID_ADC_18 = 0x7860; static const uint32_t X310_2954R_40MHz_PCIE_SSID_ADC_18 = 0x785A; +static const uint32_t X310_2955R_PCIE_SSID_ADC_18 = 0x78F0; static const uint32_t FPGA_X3xx_SIG_VALUE = 0x58333030; -- cgit v1.2.3 From 4b6d3db7eb5bbf729f5e4f70d6c495717874285b Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Mon, 26 Sep 2016 13:18:04 -0700 Subject: gps: Removed redundant error message in case no GPS present Signed-off-by: Martin Braun Reviewed-By: Moritz Fischer --- host/lib/usrp/gps_ctrl.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'host/lib/usrp') diff --git a/host/lib/usrp/gps_ctrl.cpp b/host/lib/usrp/gps_ctrl.cpp index bfc243d79..2c78b1834 100644 --- a/host/lib/usrp/gps_ctrl.cpp +++ b/host/lib/usrp/gps_ctrl.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010-2011,2014-2015 Ettus Research LLC +// Copyright 2010-2011,2014-2016 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -135,7 +135,6 @@ private: void update_cache() { if(not gps_detected() or (_gps_type != GPS_TYPE_INTERNAL_GPSDO)) { - UHD_MSG(error) << "get_stat(): unsupported GPS or no GPS detected"; return; } -- cgit v1.2.3 From 9798ec540a77c74036766a132e23230ccd0148cc Mon Sep 17 00:00:00 2001 From: Marcus Müller Date: Thu, 14 Jan 2016 12:31:29 +0100 Subject: Correct maximum link rates for 1GE and 10GE --- host/lib/usrp/x300/x300_impl.hpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'host/lib/usrp') diff --git a/host/lib/usrp/x300/x300_impl.hpp b/host/lib/usrp/x300/x300_impl.hpp index d491e2bc0..f7dde142e 100644 --- a/host/lib/usrp/x300/x300_impl.hpp +++ b/host/lib/usrp/x300/x300_impl.hpp @@ -1,5 +1,5 @@ // -// Copyright 2013-2015 Ettus Research LLC +// Copyright 2013-2016 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -61,8 +61,8 @@ static const size_t X300_PCIE_MSG_NUM_FRAMES = 64; static const size_t X300_PCIE_MAX_CHANNELS = 6; static const size_t X300_PCIE_MAX_MUXED_XPORTS = 32; -static const size_t X300_10GE_DATA_FRAME_MAX_SIZE = 8000; //bytes -static const size_t X300_1GE_DATA_FRAME_MAX_SIZE = 1472; //bytes +static const size_t X300_10GE_DATA_FRAME_MAX_SIZE = 8000; // CHDR packet size in bytes +static const size_t X300_1GE_DATA_FRAME_MAX_SIZE = 1472; // CHDR packet size in bytes static const size_t X300_ETH_MSG_FRAME_SIZE = uhd::transport::udp_simple::mtu; //bytes static const double X300_THREAD_BUFFER_TIMEOUT = 0.1; // Time in seconds @@ -72,8 +72,14 @@ static const size_t X300_ETH_DATA_NUM_FRAMES = 32; static const double X300_DEFAULT_SYSREF_RATE = 10e6; static const size_t X300_MAX_RATE_PCIE = 800000000; // bytes/s -static const size_t X300_MAX_RATE_10GIGE = 800000000; // bytes/s -static const size_t X300_MAX_RATE_1GIGE = 100000000; // bytes/s +static const size_t X300_MAX_RATE_10GIGE = (size_t)( // bytes/s + 10e9 / 8 * // wire speed multiplied by percentage of packets that is sample data + ( float(X300_10GE_DATA_FRAME_MAX_SIZE - uhd::usrp::DEVICE3_TX_MAX_HDR_LEN) / + float(X300_10GE_DATA_FRAME_MAX_SIZE + 8 /* UDP header */ + 20 /* Ethernet header length */ ))); +static const size_t X300_MAX_RATE_1GIGE = (size_t)( // bytes/s + 10e9 / 8 * // wire speed multiplied by percentage of packets that is sample data + ( float(X300_1GE_DATA_FRAME_MAX_SIZE - uhd::usrp::DEVICE3_TX_MAX_HDR_LEN) / + float(X300_1GE_DATA_FRAME_MAX_SIZE + 8 /* UDP header */ + 20 /* Ethernet header length */ ))); #define X300_RADIO_DEST_PREFIX_TX 0 -- 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') 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') 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 From 799446ba9b7517a9703ba05021eb8825ebe1ee61 Mon Sep 17 00:00:00 2001 From: Paul David Date: Mon, 26 Sep 2016 16:49:18 -0700 Subject: B2xx: fixed a typo when checking arguments on a streamer --- host/lib/usrp/b200/b200_io_impl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'host/lib/usrp') diff --git a/host/lib/usrp/b200/b200_io_impl.cpp b/host/lib/usrp/b200/b200_io_impl.cpp index 283091140..d1468332e 100644 --- a/host/lib/usrp/b200/b200_io_impl.cpp +++ b/host/lib/usrp/b200/b200_io_impl.cpp @@ -501,7 +501,7 @@ tx_streamer::sptr b200_impl::get_tx_stream(const uhd::stream_args_t &args_) if (_tree->access("/mboards/0/auto_tick_rate").get()) { set_auto_tick_rate(0, "", args.channels.size()); } - check_streamer_args(args, this->get_tick_rate(), "RX"); + check_streamer_args(args, this->get_tick_rate(), "TX"); boost::shared_ptr my_streamer; for (size_t stream_i = 0; stream_i < args.channels.size(); stream_i++) -- cgit v1.2.3