aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/e100
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-07-04 08:33:47 -0700
committerJosh Blum <josh@joshknows.com>2011-07-04 08:33:47 -0700
commitdf91040196c536c1cf0a57379b946c89ea73ae6b (patch)
tree54fb6d34704c10bf6b00852094a3b437c08fbb53 /host/lib/usrp/e100
parent729b284f628f3326d774262570b68540d7de9baa (diff)
downloaduhd-df91040196c536c1cf0a57379b946c89ea73ae6b.tar.gz
uhd-df91040196c536c1cf0a57379b946c89ea73ae6b.tar.bz2
uhd-df91040196c536c1cf0a57379b946c89ea73ae6b.zip
usrp: added clipping to link max rate when setting sample rate
Diffstat (limited to 'host/lib/usrp/e100')
-rw-r--r--host/lib/usrp/e100/e100_impl.cpp2
-rw-r--r--host/lib/usrp/e100/e100_impl.hpp1
2 files changed, 3 insertions, 0 deletions
diff --git a/host/lib/usrp/e100/e100_impl.cpp b/host/lib/usrp/e100/e100_impl.cpp
index 8086eb985..a86a75816 100644
--- a/host/lib/usrp/e100/e100_impl.cpp
+++ b/host/lib/usrp/e100/e100_impl.cpp
@@ -232,6 +232,7 @@ e100_impl::e100_impl(const uhd::device_addr_t &device_addr){
_fpga_ctrl, E100_REG_SR_ADDR(UE_SR_RX_DSP1), E100_REG_SR_ADDR(UE_SR_RX_CTRL1), E100_RX_SID_BASE + 1
));
for (size_t dspno = 0; dspno < _rx_dsps.size(); dspno++){
+ _rx_dsps[dspno]->set_link_rate(E100_LINK_RATE_BPS);
_tree->access<double>(mb_path / "tick_rate")
.subscribe(boost::bind(&rx_dsp_core_200::set_tick_rate, _rx_dsps[dspno], _1));
property_tree::path_type rx_dsp_path = mb_path / str(boost::format("rx_dsps/%u") % dspno);
@@ -252,6 +253,7 @@ e100_impl::e100_impl(const uhd::device_addr_t &device_addr){
_tx_dsp = tx_dsp_core_200::make(
_fpga_ctrl, E100_REG_SR_ADDR(UE_SR_TX_DSP), E100_REG_SR_ADDR(UE_SR_TX_CTRL), E100_TX_ASYNC_SID
);
+ _tx_dsp->set_link_rate(E100_LINK_RATE_BPS);
_tree->access<double>(mb_path / "tick_rate")
.subscribe(boost::bind(&tx_dsp_core_200::set_tick_rate, _tx_dsp, _1));
_tree->create<double>(mb_path / "tx_dsps/0/rate/value")
diff --git a/host/lib/usrp/e100/e100_impl.hpp b/host/lib/usrp/e100/e100_impl.hpp
index a7051d497..e24360223 100644
--- a/host/lib/usrp/e100/e100_impl.hpp
+++ b/host/lib/usrp/e100/e100_impl.hpp
@@ -42,6 +42,7 @@
uhd::transport::zero_copy_if::sptr e100_make_mmap_zero_copy(e100_ctrl::sptr iface);
+static const double E100_LINK_RATE_BPS = 256e6/8;
static const std::string E100_I2C_DEV_NODE = "/dev/i2c-3";
static const std::string E100_FPGA_FILE_NAME = "usrp_e100_fpga_v2.bin";
static const boost::uint16_t E100_FPGA_COMPAT_NUM = 0x05;