diff options
author | Ashish Chaudhari <ashish@ettus.com> | 2015-07-18 21:49:25 -0700 |
---|---|---|
committer | Ashish Chaudhari <ashish@ettus.com> | 2015-07-18 21:49:25 -0700 |
commit | 722f6f6b398e7698089138ed41824b48b569c4ca (patch) | |
tree | 64abe250e279234ddf533fb7ad462fc4d3416cee /host/lib/usrp/x300/x300_impl.cpp | |
parent | 88df5f04c0fc095cb080e5fc666c946557f73c3f (diff) | |
download | uhd-722f6f6b398e7698089138ed41824b48b569c4ca.tar.gz uhd-722f6f6b398e7698089138ed41824b48b569c4ca.tar.bz2 uhd-722f6f6b398e7698089138ed41824b48b569c4ca.zip |
x300: Added new Rev7+ X3x0 MB product codes
- Added new PCIe and MB PIDs for new boards
- Added an error if MB PID is invalid
Diffstat (limited to 'host/lib/usrp/x300/x300_impl.cpp')
-rw-r--r-- | host/lib/usrp/x300/x300_impl.cpp | 38 |
1 files changed, 36 insertions, 2 deletions
diff --git a/host/lib/usrp/x300/x300_impl.cpp b/host/lib/usrp/x300/x300_impl.cpp index 8c565a252..34090faa3 100644 --- a/host/lib/usrp/x300/x300_impl.cpp +++ b/host/lib/usrp/x300/x300_impl.cpp @@ -399,7 +399,7 @@ void x300_impl::setup_mb(const size_t mb_i, const uhd::device_addr_t &dev_addr) default: nirio_status_to_exception(status, "Motherboard detection error. Please ensure that you \ have a valid USRP X3x0, NI USRP-294xR or NI USRP-295xR device and that all the device \ - driver have been loaded."); + drivers have loaded successfully."); } //Load the lvbitx onto the device UHD_MSG(status) << boost::format("Using LVBITX bitfile %s...\n") % lvbitx->get_bitfile_path(); @@ -570,7 +570,9 @@ void x300_impl::setup_mb(const size_t mb_i, const uhd::device_addr_t &dev_addr) product_name = "X310"; break; default: - break; + throw uhd::runtime_error("Unrecognized product type. \n" + "Either the software does not support this device or it is too old for the hardware.\n" + "Please update your UHD/NI-USRP version and retry."); } _tree->create<std::string>(mb_path / "name").set(product_name); _tree->create<std::string>(mb_path / "codename").set("Yetti"); @@ -1744,6 +1746,7 @@ x300_impl::x300_mboard_t x300_impl::get_mb_type_from_pcie(const std::string& res //The PCIe ID -> MB mapping may be different from the EEPROM -> MB mapping switch (pid) { case X300_USRP_PCIE_SSID: + case X300_USRP_PCIE_R7_SSID: mb_type = USRP_X300_MB; break; case X310_USRP_PCIE_SSID: case X310_2940R_40MHz_PCIE_SSID: @@ -1760,6 +1763,21 @@ x300_impl::x300_mboard_t x300_impl::get_mb_type_from_pcie(const std::string& res case X310_2953R_40MHz_PCIE_SSID: case X310_2953R_120MHz_PCIE_SSID: case X310_2954R_40MHz_PCIE_SSID: + case X310_USRP_PCIE_R7_SSID: + case X310_2940R_40MHz_PCIE_R7_SSID: + case X310_2940R_120MHz_PCIE_R7_SSID: + case X310_2942R_40MHz_PCIE_R7_SSID: + case X310_2942R_120MHz_PCIE_R7_SSID: + case X310_2943R_40MHz_PCIE_R7_SSID: + case X310_2943R_120MHz_PCIE_R7_SSID: + case X310_2944R_40MHz_PCIE_R7_SSID: + case X310_2950R_40MHz_PCIE_R7_SSID: + case X310_2950R_120MHz_PCIE_R7_SSID: + case X310_2952R_40MHz_PCIE_R7_SSID: + case X310_2952R_120MHz_PCIE_R7_SSID: + case X310_2953R_40MHz_PCIE_R7_SSID: + case X310_2953R_120MHz_PCIE_R7_SSID: + case X310_2954R_40MHz_PCIE_R7_SSID: mb_type = USRP_X310_MB; break; default: mb_type = UNKNOWN; break; @@ -1785,6 +1803,7 @@ x300_impl::x300_mboard_t x300_impl::get_mb_type_from_eeprom(const uhd::usrp::mbo switch (product_num) { //The PCIe ID -> MB mapping may be different from the EEPROM -> MB mapping case X300_USRP_PCIE_SSID: + case X300_USRP_PCIE_R7_SSID: mb_type = USRP_X300_MB; break; case X310_USRP_PCIE_SSID: case X310_2940R_40MHz_PCIE_SSID: @@ -1801,6 +1820,21 @@ x300_impl::x300_mboard_t x300_impl::get_mb_type_from_eeprom(const uhd::usrp::mbo case X310_2953R_40MHz_PCIE_SSID: case X310_2953R_120MHz_PCIE_SSID: case X310_2954R_40MHz_PCIE_SSID: + case X310_USRP_PCIE_R7_SSID: + case X310_2940R_40MHz_PCIE_R7_SSID: + case X310_2940R_120MHz_PCIE_R7_SSID: + case X310_2942R_40MHz_PCIE_R7_SSID: + case X310_2942R_120MHz_PCIE_R7_SSID: + case X310_2943R_40MHz_PCIE_R7_SSID: + case X310_2943R_120MHz_PCIE_R7_SSID: + case X310_2944R_40MHz_PCIE_R7_SSID: + case X310_2950R_40MHz_PCIE_R7_SSID: + case X310_2950R_120MHz_PCIE_R7_SSID: + case X310_2952R_40MHz_PCIE_R7_SSID: + case X310_2952R_120MHz_PCIE_R7_SSID: + case X310_2953R_40MHz_PCIE_R7_SSID: + case X310_2953R_120MHz_PCIE_R7_SSID: + case X310_2954R_40MHz_PCIE_R7_SSID: mb_type = USRP_X310_MB; break; default: UHD_MSG(warning) << "X300 unknown product code in EEPROM: " << product_num << std::endl; |