aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp1
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/usrp/usrp1')
-rw-r--r--host/lib/usrp/usrp1/dboard_impl.cpp12
-rw-r--r--host/lib/usrp/usrp1/io_impl.cpp6
-rw-r--r--host/lib/usrp/usrp1/mboard_impl.cpp2
-rw-r--r--host/lib/usrp/usrp1/usrp1_impl.hpp2
4 files changed, 16 insertions, 6 deletions
diff --git a/host/lib/usrp/usrp1/dboard_impl.cpp b/host/lib/usrp/usrp1/dboard_impl.cpp
index 02906fc45..df0bb6261 100644
--- a/host/lib/usrp/usrp1/dboard_impl.cpp
+++ b/host/lib/usrp/usrp1/dboard_impl.cpp
@@ -59,6 +59,7 @@ void usrp1_impl::dboard_init(void)
//read the tx and rx dboard eeproms
_rx_db_eeproms[dboard_slot].load(*_iface, get_rx_ee_addr(dboard_slot));
_tx_db_eeproms[dboard_slot].load(*_iface, get_tx_ee_addr(dboard_slot));
+ _gdb_eeproms[dboard_slot].load(*_iface, get_tx_ee_addr(dboard_slot) ^ 5);
//create a new dboard interface and manager
_dboard_ifaces[dboard_slot] = make_dboard_iface(
@@ -68,7 +69,7 @@ void usrp1_impl::dboard_init(void)
_dboard_managers[dboard_slot] = dboard_manager::make(
_rx_db_eeproms[dboard_slot].id,
- _tx_db_eeproms[dboard_slot].id,
+ ((_gdb_eeproms[dboard_slot].id == dboard_id_t::none())? _tx_db_eeproms[dboard_slot] : _gdb_eeproms[dboard_slot]).id,
_dboard_ifaces[dboard_slot]
);
@@ -171,6 +172,10 @@ void usrp1_impl::tx_dboard_get(const wax::obj &key_, wax::obj &val, dboard_slot_
val = _tx_db_eeproms[dboard_slot];
return;
+ case DBOARD_PROP_GBOARD_EEPROM:
+ val = _gdb_eeproms[dboard_slot];
+ return;
+
case DBOARD_PROP_DBOARD_IFACE:
val = _dboard_ifaces[dboard_slot];
return;
@@ -203,6 +208,11 @@ void usrp1_impl::tx_dboard_set(const wax::obj &key, const wax::obj &val, dboard_
_tx_db_eeproms[dboard_slot].store(*_iface, get_tx_ee_addr(dboard_slot));
return;
+ case DBOARD_PROP_GBOARD_EEPROM:
+ _gdb_eeproms[dboard_slot] = val.as<dboard_eeprom_t>();
+ _gdb_eeproms[dboard_slot].store(*_iface, get_tx_ee_addr(dboard_slot) ^ 5);
+ return;
+
default: UHD_THROW_PROP_SET_ERROR();
}
}
diff --git a/host/lib/usrp/usrp1/io_impl.cpp b/host/lib/usrp/usrp1/io_impl.cpp
index b3268298e..8fb639c4a 100644
--- a/host/lib/usrp/usrp1/io_impl.cpp
+++ b/host/lib/usrp/usrp1/io_impl.cpp
@@ -180,6 +180,9 @@ void usrp1_impl::io_impl::commit_send_buff(
//commit the current buffer
curr.buff->commit(num_bytes_to_commit);
+
+ //store the next buffer for the next call
+ curr_buff = next;
}
/*!
@@ -216,9 +219,6 @@ bool usrp1_impl::io_impl::get_send_buffs(
//make a new managed buffer with the offset buffs
buffs[0] = omsb.get_new(curr_buff, next_buff);
- //store the next buffer for the next call
- curr_buff = next_buff;
-
return true;
}
diff --git a/host/lib/usrp/usrp1/mboard_impl.cpp b/host/lib/usrp/usrp1/mboard_impl.cpp
index 4e2fad6e5..870956568 100644
--- a/host/lib/usrp/usrp1/mboard_impl.cpp
+++ b/host/lib/usrp/usrp1/mboard_impl.cpp
@@ -80,7 +80,7 @@ static boost::uint32_t calc_rx_mux(
//calculate the channel flags
int channel_flags = 0;
size_t num_reals = 0, num_quads = 0;
- BOOST_FOREACH(const subdev_spec_pair_t &pair, subdev_spec){
+ BOOST_FOREACH(const subdev_spec_pair_t &pair, uhd::reversed(subdev_spec)){
wax::obj dboard = mboard[named_prop_t(MBOARD_PROP_RX_DBOARD, pair.db_name)];
wax::obj subdev = dboard[named_prop_t(DBOARD_PROP_SUBDEV, pair.sd_name)];
subdev_conn_t conn = subdev[SUBDEV_PROP_CONNECTION].as<subdev_conn_t>();
diff --git a/host/lib/usrp/usrp1/usrp1_impl.hpp b/host/lib/usrp/usrp1/usrp1_impl.hpp
index 9755c466d..f53894b29 100644
--- a/host/lib/usrp/usrp1/usrp1_impl.hpp
+++ b/host/lib/usrp/usrp1/usrp1_impl.hpp
@@ -175,7 +175,7 @@ private:
uhd::dict<dboard_slot_t, wax_obj_proxy::sptr> _rx_dboard_proxies;
//tx dboard functions and settings
- uhd::dict<dboard_slot_t, uhd::usrp::dboard_eeprom_t> _tx_db_eeproms;
+ uhd::dict<dboard_slot_t, uhd::usrp::dboard_eeprom_t> _tx_db_eeproms, _gdb_eeproms;
void tx_dboard_get(const wax::obj &, wax::obj &, dboard_slot_t);
void tx_dboard_set(const wax::obj &, const wax::obj &, dboard_slot_t);
uhd::dict<dboard_slot_t, wax_obj_proxy::sptr> _tx_dboard_proxies;