diff options
author | michael-west <michael.west@ettus.com> | 2015-04-15 17:38:44 -0700 |
---|---|---|
committer | michael-west <michael.west@ettus.com> | 2015-04-15 17:38:44 -0700 |
commit | df6bf0e77d42f2281fbe07296766924c3c066962 (patch) | |
tree | 98565fd79ba002531abe8b389ae7bc914cce5dfb /host/lib | |
parent | be54951d4c14b11e21518f2e7d87fd527102c948 (diff) | |
download | uhd-df6bf0e77d42f2281fbe07296766924c3c066962.tar.gz uhd-df6bf0e77d42f2281fbe07296766924c3c066962.tar.bz2 uhd-df6bf0e77d42f2281fbe07296766924c3c066962.zip |
B200: Stricter checking of product and revision for frontend mapping.
Diffstat (limited to 'host/lib')
-rw-r--r-- | host/lib/usrp/b200/b200_impl.cpp | 15 | ||||
-rw-r--r-- | host/lib/usrp/b200/b200_impl.hpp | 11 |
2 files changed, 15 insertions, 11 deletions
diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp index cea7e5969..f55ae2a71 100644 --- a/host/lib/usrp/b200/b200_impl.cpp +++ b/host/lib/usrp/b200/b200_impl.cpp @@ -238,6 +238,7 @@ b200_impl::b200_impl(const device_addr_t &device_addr) : //////////////////////////////////////////////////////////////////// std::string default_file_name; std::string product_name = "B200?"; + enum {UNKNOWN,B200,B210} product = UNKNOWN; if (not mb_eeprom["product"].empty()) { switch (boost::lexical_cast<boost::uint16_t>(mb_eeprom["product"])) @@ -246,11 +247,13 @@ b200_impl::b200_impl(const device_addr_t &device_addr) : case 0x7737: product_name = "B200"; default_file_name = B200_FPGA_FILE_NAME; + product = B200; break; case 0x7738: case 0x0002: product_name = "B210"; default_file_name = B210_FPGA_FILE_NAME; + product = B210; break; default: UHD_MSG(error) << "B200 unknown product code: " << mb_eeprom["product"] << std::endl; } @@ -263,14 +266,12 @@ b200_impl::b200_impl(const device_addr_t &device_addr) : //set up frontend mapping _fe1 = 1; _fe2 = 0; - if (not mb_eeprom["revision"].empty()) + if (product == B200 and + not mb_eeprom["revision"].empty() and + boost::lexical_cast<size_t>(mb_eeprom["revision"]) >= 5) { - size_t rev = boost::lexical_cast<size_t>(mb_eeprom["revision"]); - if (rev == 5) - { - _fe1 = 0; - _fe2 = 1; - } + _fe1 = 0; + _fe2 = 1; } //extract the FPGA path for the B200 diff --git a/host/lib/usrp/b200/b200_impl.hpp b/host/lib/usrp/b200/b200_impl.hpp index e871e6b9a..fd94d36ab 100644 --- a/host/lib/usrp/b200/b200_impl.hpp +++ b/host/lib/usrp/b200/b200_impl.hpp @@ -119,10 +119,6 @@ private: boost::mutex _transport_setup_mutex; - // mapping of frontend to radio perif index - size_t _fe1; - size_t _fe2; - //async ctrl + msgs uhd::msg_task::sptr _async_task; typedef uhd::transport::bounded_buffer<uhd::async_metadata_t> async_md_type; @@ -165,6 +161,13 @@ private: }; std::vector<radio_perifs_t> _radio_perifs; + //mapping of AD936x frontends (FE1 and FE2) to radio perif index (0 and 1) + //FE1 corresponds to the ports labeled "RF B" on the B200/B210 + //FE2 corresponds to the ports labeled "RF A" on the B200/B210 + //the mapping is product and revision specific + size_t _fe1; + size_t _fe2; + /*! \brief Setup the DSP chain for one radio front-end. * */ |