aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAshish Chaudhari <ashish@ettus.com>2016-03-09 17:57:54 -0800
committerAshish Chaudhari <ashish@ettus.com>2016-03-21 17:46:23 -0700
commit721f2dd9c1b29b219c9e036f856e7f64f495728c (patch)
tree503040b695c547f5b666079b37fd305795a5d400
parent7fad896c07fbdda4cf112e9e4999a5ab8f5484a5 (diff)
downloaduhd-721f2dd9c1b29b219c9e036f856e7f64f495728c.tar.gz
uhd-721f2dd9c1b29b219c9e036f856e7f64f495728c.tar.bz2
uhd-721f2dd9c1b29b219c9e036f856e7f64f495728c.zip
dboard_iface: Added method to configure front connection and settings
-rw-r--r--host/include/uhd/usrp/dboard_iface.hpp9
-rw-r--r--host/lib/usrp/b100/dboard_iface.cpp6
-rw-r--r--host/lib/usrp/e100/dboard_iface.cpp6
-rw-r--r--host/lib/usrp/usrp1/dboard_iface.cpp6
-rw-r--r--host/lib/usrp/usrp2/dboard_iface.cpp6
-rw-r--r--host/lib/usrp/x300/x300_dboard_iface.cpp10
-rw-r--r--host/lib/usrp/x300/x300_impl.cpp1
-rw-r--r--host/lib/usrp/x300/x300_impl.hpp1
8 files changed, 45 insertions, 0 deletions
diff --git a/host/include/uhd/usrp/dboard_iface.hpp b/host/include/uhd/usrp/dboard_iface.hpp
index 4a80908e0..c561b2fff 100644
--- a/host/include/uhd/usrp/dboard_iface.hpp
+++ b/host/include/uhd/usrp/dboard_iface.hpp
@@ -22,6 +22,7 @@
#include <uhd/utils/pimpl.hpp>
#include <uhd/types/serial.hpp>
#include <uhd/types/time_spec.hpp>
+#include <uhd/usrp/fe_connection.hpp>
#include <uhd/usrp/gpio_defs.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/cstdint.hpp>
@@ -272,6 +273,14 @@ public:
virtual double get_codec_rate(unit_t unit) = 0;
/*!
+ * Configure the front-end connection parameters.
+ *
+ * \param unit which unit rx or tx
+ * \param fe_conn connection parameters class
+ */
+ virtual void set_fe_connection(unit_t unit, const uhd::usrp::fe_connection_t& fe_conn) = 0;
+
+ /*!
* Get the command time.
* \return the command time
*/
diff --git a/host/lib/usrp/b100/dboard_iface.cpp b/host/lib/usrp/b100/dboard_iface.cpp
index f8c5c0f26..73c97c104 100644
--- a/host/lib/usrp/b100/dboard_iface.cpp
+++ b/host/lib/usrp/b100/dboard_iface.cpp
@@ -101,6 +101,7 @@ public:
double get_clock_rate(unit_t);
void set_clock_enabled(unit_t, bool);
double get_codec_rate(unit_t);
+ void set_fe_connection(unit_t unit, const fe_connection_t& fe_conn);
private:
timed_wb_iface::sptr _wb_iface;
@@ -286,3 +287,8 @@ uhd::time_spec_t b100_dboard_iface::get_command_time(void)
{
return _wb_iface->get_time();
}
+
+void b100_dboard_iface::set_fe_connection(unit_t, const fe_connection_t&)
+{
+ throw uhd::not_implemented_error("fe connection configuration support not implemented");
+}
diff --git a/host/lib/usrp/e100/dboard_iface.cpp b/host/lib/usrp/e100/dboard_iface.cpp
index f1d41a034..faa0ff7d4 100644
--- a/host/lib/usrp/e100/dboard_iface.cpp
+++ b/host/lib/usrp/e100/dboard_iface.cpp
@@ -101,6 +101,7 @@ public:
double get_clock_rate(unit_t);
void set_clock_enabled(unit_t, bool);
double get_codec_rate(unit_t);
+ void set_fe_connection(unit_t unit, const fe_connection_t& fe_conn);
private:
timed_wb_iface::sptr _wb_iface;
@@ -286,3 +287,8 @@ void e100_dboard_iface::set_command_time(const uhd::time_spec_t& t)
{
_wb_iface->set_time(t);
}
+
+void e100_dboard_iface::set_fe_connection(unit_t, const fe_connection_t&)
+{
+ throw uhd::not_implemented_error("fe connection configuration support not implemented");
+}
diff --git a/host/lib/usrp/usrp1/dboard_iface.cpp b/host/lib/usrp/usrp1/dboard_iface.cpp
index cf6d97eb1..b8d651694 100644
--- a/host/lib/usrp/usrp1/dboard_iface.cpp
+++ b/host/lib/usrp/usrp1/dboard_iface.cpp
@@ -143,6 +143,7 @@ public:
double get_clock_rate(unit_t);
void set_clock_enabled(unit_t, bool);
double get_codec_rate(unit_t);
+ void set_fe_connection(unit_t unit, const fe_connection_t& fe_conn);
private:
usrp1_iface::sptr _iface;
@@ -499,3 +500,8 @@ uhd::time_spec_t usrp1_dboard_iface::get_command_time()
throw uhd::not_implemented_error("timed command support not implemented");
}
+void usrp1_dboard_iface::set_fe_connection(unit_t, const fe_connection_t&)
+{
+ throw uhd::not_implemented_error("fe connection configuration support not implemented");
+}
+
diff --git a/host/lib/usrp/usrp2/dboard_iface.cpp b/host/lib/usrp/usrp2/dboard_iface.cpp
index 0a45b4e48..b4066898e 100644
--- a/host/lib/usrp/usrp2/dboard_iface.cpp
+++ b/host/lib/usrp/usrp2/dboard_iface.cpp
@@ -75,6 +75,7 @@ public:
std::vector<double> get_clock_rates(unit_t);
void set_clock_enabled(unit_t, bool);
double get_codec_rate(unit_t);
+ void set_fe_connection(unit_t unit, const fe_connection_t& fe_conn);
void write_spi(
unit_t unit,
@@ -351,3 +352,8 @@ void usrp2_dboard_iface::set_command_time(const uhd::time_spec_t& t)
{
_wb_iface->set_time(t);
}
+
+void usrp2_dboard_iface::set_fe_connection(unit_t, const fe_connection_t&)
+{
+ throw uhd::not_implemented_error("fe connection configuration support not implemented");
+}
diff --git a/host/lib/usrp/x300/x300_dboard_iface.cpp b/host/lib/usrp/x300/x300_dboard_iface.cpp
index ef55368c8..884848624 100644
--- a/host/lib/usrp/x300/x300_dboard_iface.cpp
+++ b/host/lib/usrp/x300/x300_dboard_iface.cpp
@@ -80,6 +80,7 @@ public:
boost::uint32_t data,
size_t num_bits
);
+ void set_fe_connection(unit_t unit, const fe_connection_t& fe_conn);
const x300_dboard_iface_config_t _config;
uhd::dict<unit_t, ad5623_regs_t> _dac_regs;
@@ -369,3 +370,12 @@ void x300_dboard_iface::set_command_time(const uhd::time_spec_t& t)
{
_config.cmd_time_ctrl->set_time(t);
}
+
+void x300_dboard_iface::set_fe_connection(unit_t unit, const fe_connection_t& fe_conn)
+{
+ if (unit == UNIT_RX) {
+ _config.rx_dsp->set_mux(fe_conn);
+ } else {
+ throw uhd::not_implemented_error("frontend connection not configurable for TX");
+ }
+}
diff --git a/host/lib/usrp/x300/x300_impl.cpp b/host/lib/usrp/x300/x300_impl.cpp
index 80953ac20..4f49f7e73 100644
--- a/host/lib/usrp/x300/x300_impl.cpp
+++ b/host/lib/usrp/x300/x300_impl.cpp
@@ -1072,6 +1072,7 @@ void x300_impl::setup_radio(const size_t mb_i, const std::string &slot_name, con
db_config.tx_spi_slaveno = DB_TX_SEN;
db_config.i2c = mb.zpu_i2c;
db_config.clock = mb.clock;
+ db_config.rx_dsp = mb.radio_perifs[radio_index].ddc;
db_config.which_rx_clk = (slot_name == "A")? X300_CLOCK_WHICH_DB0_RX : X300_CLOCK_WHICH_DB1_RX;
db_config.which_tx_clk = (slot_name == "A")? X300_CLOCK_WHICH_DB0_TX : X300_CLOCK_WHICH_DB1_TX;
db_config.dboard_slot = (slot_name == "A")? 0 : 1;
diff --git a/host/lib/usrp/x300/x300_impl.hpp b/host/lib/usrp/x300/x300_impl.hpp
index 6ebea0161..dd94708b7 100644
--- a/host/lib/usrp/x300/x300_impl.hpp
+++ b/host/lib/usrp/x300/x300_impl.hpp
@@ -134,6 +134,7 @@ struct x300_dboard_iface_config_t
size_t tx_spi_slaveno;
i2c_core_100_wb32::sptr i2c;
x300_clock_ctrl::sptr clock;
+ rx_dsp_core_3000::sptr rx_dsp;
x300_clock_which_t which_rx_clk;
x300_clock_which_t which_tx_clk;
boost::uint8_t dboard_slot;