aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormichael-west <michael.west@ettus.com>2017-12-05 16:00:44 -0800
committermichael-west <michael.west@ettus.com>2017-12-19 18:26:29 -0800
commitd16a5d4f8e41da069b8add4176c8ac0e20a6c2b4 (patch)
tree175dc9ed89a20f529ad450ce61978150ee12b4c8
parent7d35f43077adfa0fd9f8794b397c1b20821f3958 (diff)
downloaduhd-d16a5d4f8e41da069b8add4176c8ac0e20a6c2b4.tar.gz
uhd-d16a5d4f8e41da069b8add4176c8ac0e20a6c2b4.tar.bz2
uhd-d16a5d4f8e41da069b8add4176c8ac0e20a6c2b4.zip
UBX: Add support for UBX-TDD
-rw-r--r--host/include/uhd/usrp/dboard_manager.hpp19
-rw-r--r--host/lib/usrp/b100/b100_impl.cpp4
-rw-r--r--host/lib/usrp/dboard/db_ubx.cpp10
-rw-r--r--host/lib/usrp/dboard_manager.cpp21
-rw-r--r--host/lib/usrp/usrp1/usrp1_impl.cpp4
5 files changed, 53 insertions, 5 deletions
diff --git a/host/include/uhd/usrp/dboard_manager.hpp b/host/include/uhd/usrp/dboard_manager.hpp
index 46716eab9..c98617753 100644
--- a/host/include/uhd/usrp/dboard_manager.hpp
+++ b/host/include/uhd/usrp/dboard_manager.hpp
@@ -120,6 +120,25 @@ public:
/*!
* Make a new dboard manager.
+ * \param rx_dboard_id the id of the rx dboard
+ * \param tx_dboard_id the id of the tx dboard
+ * \param gdboard_id the id of the grand-dboard
+ * \param iface the custom dboard interface
+ * \param subtree the subtree to load with props
+ * \param defer_db_init initialising the daughterboards (DEPRECATED)
+ * \return an sptr to the new dboard manager
+ */
+ static sptr make(
+ dboard_id_t rx_dboard_id,
+ dboard_id_t tx_dboard_id,
+ dboard_id_t gdboard_id,
+ dboard_iface::sptr iface,
+ property_tree::sptr subtree,
+ bool defer_db_init = false
+ );
+
+ /*!
+ * Make a new dboard manager.
* \param rx_eeprom the RX EEPROM data
* \param tx_eeprom the TX EEPROM data
* \param gdb_eeprom the grand-dboard EEPROM data
diff --git a/host/lib/usrp/b100/b100_impl.cpp b/host/lib/usrp/b100/b100_impl.cpp
index b73552ec5..1a38bf3b7 100644
--- a/host/lib/usrp/b100/b100_impl.cpp
+++ b/host/lib/usrp/b100/b100_impl.cpp
@@ -1,5 +1,5 @@
//
-// Copyright 2012-2014,2017 Ettus Research, A National Instruments Company
+// Copyright 2012-2014 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
@@ -471,7 +471,7 @@ b100_impl::b100_impl(const device_addr_t &device_addr){
//create a new dboard interface and manager
_dboard_manager = dboard_manager::make(
- rx_db_eeprom, tx_db_eeprom, gdb_eeprom,
+ rx_db_eeprom.id, tx_db_eeprom.id, gdb_eeprom.id,
make_b100_dboard_iface(_fifo_ctrl, _fpga_i2c_ctrl, _fifo_ctrl/*spi*/, _clock_ctrl, _codec_ctrl),
_tree->subtree(mb_path / "dboards/A")
);
diff --git a/host/lib/usrp/dboard/db_ubx.cpp b/host/lib/usrp/dboard/db_ubx.cpp
index c6c5ad2df..3c5b38d60 100644
--- a/host/lib/usrp/dboard/db_ubx.cpp
+++ b/host/lib/usrp/dboard/db_ubx.cpp
@@ -160,6 +160,8 @@ static const dboard_id_t UBX_V2_160MHZ_TX_ID(0x7D);
static const dboard_id_t UBX_V2_160MHZ_RX_ID(0x7E);
static const dboard_id_t UBX_LP_160MHZ_TX_ID(0x0200);
static const dboard_id_t UBX_LP_160MHZ_RX_ID(0x0201);
+static const dboard_id_t UBX_TDD_160MHZ_TX_ID(0x0202);
+static const dboard_id_t UBX_TDD_160MHZ_RX_ID(0x0203);
static const freq_range_t ubx_freq_range(10e6, 6.0e9);
static const gain_range_t ubx_tx_gain_range(0, 31.5, double(0.5));
static const gain_range_t ubx_rx_gain_range(0, 31.5, double(0.5));
@@ -227,7 +229,7 @@ public:
_iface = get_iface();
dboard_id_t rx_id = get_rx_id();
dboard_id_t tx_id = get_tx_id();
- size_t revision = boost::lexical_cast<size_t>(get_rx_eeprom().revision);
+ const size_t revision = boost::lexical_cast<size_t>(get_rx_eeprom().revision);
_high_isolation = false;
if (rx_id == UBX_PROTO_V3_RX_ID and tx_id == UBX_PROTO_V3_TX_ID) {
_rev = 0;
@@ -262,6 +264,11 @@ public:
bw = 160e6;
_rev = 2;
}
+ else if (rx_id == UBX_TDD_160MHZ_RX_ID and tx_id == UBX_TDD_160MHZ_TX_ID) {
+ bw = 160e6;
+ _rev = 2;
+ _high_isolation = true;
+ }
else {
UHD_THROW_INVALID_CODE_PATH();
}
@@ -1314,4 +1321,5 @@ UHD_STATIC_BLOCK(reg_ubx_dboards)
dboard_manager::register_dboard(UBX_V2_40MHZ_RX_ID, UBX_V2_40MHZ_TX_ID, &make_ubx, "UBX-40 v2");
dboard_manager::register_dboard(UBX_V2_160MHZ_RX_ID, UBX_V2_160MHZ_TX_ID, &make_ubx, "UBX-160 v2");
dboard_manager::register_dboard(UBX_LP_160MHZ_RX_ID, UBX_LP_160MHZ_TX_ID, &make_ubx, "UBX-160-LP");
+ dboard_manager::register_dboard(UBX_TDD_160MHZ_RX_ID, UBX_TDD_160MHZ_TX_ID, &make_ubx, "UBX-TDD");
}
diff --git a/host/lib/usrp/dboard_manager.cpp b/host/lib/usrp/dboard_manager.cpp
index 6132b4259..3fe1302fa 100644
--- a/host/lib/usrp/dboard_manager.cpp
+++ b/host/lib/usrp/dboard_manager.cpp
@@ -216,6 +216,27 @@ private:
* make routine for dboard manager
**********************************************************************/
dboard_manager::sptr dboard_manager::make(
+ dboard_id_t rx_dboard_id,
+ dboard_id_t tx_dboard_id,
+ dboard_id_t gdboard_id,
+ dboard_iface::sptr iface,
+ property_tree::sptr subtree,
+ bool defer_db_init
+){
+ dboard_eeprom_t rx_eeprom;
+ dboard_eeprom_t tx_eeprom;
+ rx_eeprom.id = rx_dboard_id;
+ tx_eeprom.id = (gdboard_id == dboard_id_t::none()) ? tx_dboard_id : gdboard_id;
+ return dboard_manager::sptr(
+ new dboard_manager_impl(
+ rx_eeprom,
+ tx_eeprom,
+ iface, subtree, defer_db_init
+ )
+ );
+}
+
+dboard_manager::sptr dboard_manager::make(
dboard_eeprom_t rx_eeprom,
dboard_eeprom_t tx_eeprom,
dboard_eeprom_t gdb_eeprom,
diff --git a/host/lib/usrp/usrp1/usrp1_impl.cpp b/host/lib/usrp/usrp1/usrp1_impl.cpp
index b55a78f91..09352c5e0 100644
--- a/host/lib/usrp/usrp1/usrp1_impl.cpp
+++ b/host/lib/usrp/usrp1/usrp1_impl.cpp
@@ -1,5 +1,5 @@
//
-// Copyright 2010-2012,2014,2017 Ettus Research, A National Instruments Company
+// Copyright 2010-2012,2014 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
@@ -378,7 +378,7 @@ usrp1_impl::usrp1_impl(const device_addr_t &device_addr){
_master_clock_rate, rx_db_eeprom.id
);
_dbc[db].dboard_manager = dboard_manager::make(
- rx_db_eeprom, tx_db_eeprom, gdb_eeprom,
+ rx_db_eeprom.id, tx_db_eeprom.id, gdb_eeprom.id,
dboard_iface, _tree->subtree(mb_path / "dboards" / db)
);