aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/usrp/b200/b200_impl.cpp24
-rw-r--r--host/lib/usrp/cores/rx_dsp_core_200.cpp3
-rw-r--r--host/lib/usrp/x300/x300_impl.cpp4
-rw-r--r--host/lib/usrp/x300/x300_impl.hpp6
4 files changed, 24 insertions, 13 deletions
diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp
index 261183128..ac2407eba 100644
--- a/host/lib/usrp/b200/b200_impl.cpp
+++ b/host/lib/usrp/b200/b200_impl.cpp
@@ -427,7 +427,7 @@ b200_impl::b200_impl(const device_addr_t &device_addr)
//setup time source props
_tree->create<std::string>(mb_path / "time_source" / "value")
.subscribe(boost::bind(&b200_impl::update_time_source, this, _1));
- static const std::vector<std::string> time_sources = boost::assign::list_of("none")("external")("gpsdo");
+ static const std::vector<std::string> time_sources = boost::assign::list_of("none")("internal")("external")("gpsdo");
_tree->create<std::vector<std::string> >(mb_path / "time_source" / "options").set(time_sources);
//setup reference source props
_tree->create<std::string>(mb_path / "clock_source" / "value")
@@ -464,10 +464,6 @@ b200_impl::b200_impl(const device_addr_t &device_addr)
_tree->access<subdev_spec_t>(mb_path / "rx_subdev_spec").set(rx_spec);
_tree->access<subdev_spec_t>(mb_path / "tx_subdev_spec").set(tx_spec);
- //init to internal clock and time source
- _tree->access<std::string>(mb_path / "clock_source/value").set("internal");
- _tree->access<std::string>(mb_path / "time_source/value").set("none");
-
//GPS installed: use external ref, time, and init time spec
if (_gps and _gps->gps_detected())
{
@@ -477,6 +473,10 @@ b200_impl::b200_impl(const device_addr_t &device_addr)
UHD_MSG(status) << "Initializing time to the internal GPSDO" << std::endl;
const time_t tp = time_t(_gps->get_sensor("gps_time").to_int()+1);
_tree->access<time_spec_t>(mb_path / "time" / "pps").set(time_spec_t(tp));
+ } else {
+ //init to internal clock and time source
+ _tree->access<std::string>(mb_path / "clock_source/value").set("internal");
+ _tree->access<std::string>(mb_path / "time_source/value").set("internal");
}
}
@@ -786,11 +786,17 @@ void b200_impl::update_clock_source(const std::string &source)
void b200_impl::update_time_source(const std::string &source)
{
- if (source == "none"){}
- else if (source == "external"){}
- else if (source == "gpsdo"){}
+ boost::uint32_t value = 0;
+ if (source == "none")
+ value = 3;
+ else if (source == "internal")
+ value = 2;
+ else if (source == "external")
+ value = 1;
+ else if (source == "gpsdo")
+ value = 0;
else throw uhd::key_error("update_time_source: unknown source: " + source);
- _local_ctrl->poke32(TOREG(SR_CORE_PPS_SEL), (source == "external")? 1 : 0);
+ _local_ctrl->poke32(TOREG(SR_CORE_PPS_SEL), value);
}
/***********************************************************************
diff --git a/host/lib/usrp/cores/rx_dsp_core_200.cpp b/host/lib/usrp/cores/rx_dsp_core_200.cpp
index 2fdc220b5..2e5ca8e7a 100644
--- a/host/lib/usrp/cores/rx_dsp_core_200.cpp
+++ b/host/lib/usrp/cores/rx_dsp_core_200.cpp
@@ -176,7 +176,8 @@ public:
//determine which half-band filters are activated
int hb0 = 0, hb1 = 0;
- if (decim % 2 == 0){
+ // hb0 can only be enabled if the rate will be decimated by at least 2 between the CIC and hb1
+ if (decim >= 4 && decim % 2 == 0){
hb0 = 1;
decim /= 2;
}
diff --git a/host/lib/usrp/x300/x300_impl.cpp b/host/lib/usrp/x300/x300_impl.cpp
index 2c291f422..a624ebf6b 100644
--- a/host/lib/usrp/x300/x300_impl.cpp
+++ b/host/lib/usrp/x300/x300_impl.cpp
@@ -1129,12 +1129,12 @@ x300_impl::both_xports_t x300_impl::make_transport(
if (mb.xport_path == "nirio") {
default_buff_args.send_frame_size =
(prefix == X300_RADIO_DEST_PREFIX_TX)
- ? X300_PCIE_DATA_FRAME_SIZE
+ ? X300_PCIE_TX_DATA_FRAME_SIZE
: X300_PCIE_MSG_FRAME_SIZE;
default_buff_args.recv_frame_size =
(prefix == X300_RADIO_DEST_PREFIX_RX)
- ? X300_PCIE_DATA_FRAME_SIZE
+ ? X300_PCIE_RX_DATA_FRAME_SIZE
: X300_PCIE_MSG_FRAME_SIZE;
default_buff_args.num_send_frames =
diff --git a/host/lib/usrp/x300/x300_impl.hpp b/host/lib/usrp/x300/x300_impl.hpp
index 80f3e8faa..27f20fbd9 100644
--- a/host/lib/usrp/x300/x300_impl.hpp
+++ b/host/lib/usrp/x300/x300_impl.hpp
@@ -63,7 +63,11 @@ static const size_t X300_RX_SW_BUFF_SIZE_ETH_MACOS = 0x100000; //1Mib
static const double X300_RX_SW_BUFF_FULL_FACTOR = 0.90; //Buffer should ideally be 90% full.
static const size_t X300_RX_FC_REQUEST_FREQ = 32; //per flow-control window
-static const size_t X300_PCIE_DATA_FRAME_SIZE = 8192; //bytes
+//The FIFO closest to the DMA controller is 1023 elements deep for RX and 1029 elements deep for TX
+//where an element is 8 bytes. For best throughput ensure that the data frame fits in these buffers.
+//Also ensure that the kernel has enough frames to hold buffered TX and RX data
+static const size_t X300_PCIE_RX_DATA_FRAME_SIZE = 8184; //bytes
+static const size_t X300_PCIE_TX_DATA_FRAME_SIZE = 8192; //bytes
static const size_t X300_PCIE_DATA_NUM_FRAMES = 2048;
static const size_t X300_PCIE_MSG_FRAME_SIZE = 256; //bytes
static const size_t X300_PCIE_MSG_NUM_FRAMES = 32;