aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--host/lib/usrp/b200/b200_impl.cpp15
-rw-r--r--host/lib/usrp/b200/b200_impl.hpp11
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.
*
*/