aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authormichael-west <michael.west@ettus.com>2017-12-05 16:00:44 -0800
committerMartin Braun <martin.braun@ettus.com>2017-12-07 13:32:26 -0800
commit298a13ac3d9f9e785bf031e85060569541ca4b6f (patch)
treedf4115484fe12b2bf2a91c8b24e13d5ff4cf5641 /host
parentede5696d575342031c97527cf758314551f3207b (diff)
downloaduhd-298a13ac3d9f9e785bf031e85060569541ca4b6f.tar.gz
uhd-298a13ac3d9f9e785bf031e85060569541ca4b6f.tar.bz2
uhd-298a13ac3d9f9e785bf031e85060569541ca4b6f.zip
UBX: Add support for UBX-TDD
Diffstat (limited to 'host')
-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 473a3d6b1..110c5ff87 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 9828a7fc2..a144f1c75 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();
}
@@ -1318,4 +1325,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 68e7c1920..48e31d11c 100644
--- a/host/lib/usrp/dboard_manager.cpp
+++ b/host/lib/usrp/dboard_manager.cpp
@@ -215,6 +215,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 3a2c25729..17009c6a9 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
@@ -380,7 +380,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)
);