aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/rfnoc/legacy_compat.cpp
diff options
context:
space:
mode:
authorMichael West <michael.west@ettus.com>2017-03-29 13:24:32 -0700
committerMartin Braun <martin.braun@ettus.com>2017-06-26 13:23:07 -0700
commit2f7f873b7f0299ec1f8ae7c752246cb2f1608c0a (patch)
treeadaaa9f96542dd201057ab3ef1e9f4b4d5957872 /host/lib/rfnoc/legacy_compat.cpp
parent84f3f9e0db94adfca5ee2d7e31bace9af34d6303 (diff)
downloaduhd-2f7f873b7f0299ec1f8ae7c752246cb2f1608c0a.tar.gz
uhd-2f7f873b7f0299ec1f8ae7c752246cb2f1608c0a.tar.bz2
uhd-2f7f873b7f0299ec1f8ae7c752246cb2f1608c0a.zip
X300: Dual channel TX performance improvements
Diffstat (limited to 'host/lib/rfnoc/legacy_compat.cpp')
-rw-r--r--host/lib/rfnoc/legacy_compat.cpp32
1 files changed, 28 insertions, 4 deletions
diff --git a/host/lib/rfnoc/legacy_compat.cpp b/host/lib/rfnoc/legacy_compat.cpp
index 7acaa898c..bf653a89a 100644
--- a/host/lib/rfnoc/legacy_compat.cpp
+++ b/host/lib/rfnoc/legacy_compat.cpp
@@ -45,6 +45,7 @@ using uhd::stream_cmd_t;
***********************************************************************/
static const std::string RADIO_BLOCK_NAME = "Radio";
static const std::string DFIFO_BLOCK_NAME = "DmaFIFO";
+static const std::string SFIFO_BLOCK_NAME = "FIFO";
static const std::string DDC_BLOCK_NAME = "DDC";
static const std::string DUC_BLOCK_NAME = "DUC";
static const size_t MAX_BYTES_PER_HEADER =
@@ -131,6 +132,7 @@ public:
_has_ducs(not args.has_key("skip_duc") and not device->find_blocks(DUC_BLOCK_NAME).empty()),
_has_ddcs(not args.has_key("skip_ddc") and not device->find_blocks(DDC_BLOCK_NAME).empty()),
_has_dmafifo(not args.has_key("skip_dram") and not device->find_blocks(DFIFO_BLOCK_NAME).empty()),
+ _has_sramfifo(not args.has_key("skip_sram") and not device->find_blocks(SFIFO_BLOCK_NAME).empty()),
_num_mboards(_tree->list("/mboards").size()),
_num_radios_per_board(device->find_blocks<radio_ctrl>("0/Radio").size()), // These might throw, maybe we catch that and provide a nicer error message.
_num_tx_chans_per_radio(
@@ -165,8 +167,12 @@ public:
}
if (args.has_key("skip_dram")) {
UHD_LEGACY_LOG() << "[legacy_compat] Skipping DRAM by user request." << std::endl;
- } else if (not _has_dmafifo) {
- UHD_MSG(warning) << "[legacy_compat] No DMA FIFO detected. You will only be able to transmit at slow rates." << std::endl;
+ }
+ if (args.has_key("skip_sram")) {
+ UHD_LEGACY_LOG() << "[legacy_compat] Skipping SRAM by user request." << std::endl;
+ }
+ if (not _has_dmafifo and not _has_sramfifo) {
+ UHD_MSG(warning) << "[legacy_compat] No FIFO detected. Higher transmit rates may encounter errors." << std::endl;
}
for (size_t mboard = 0; mboard < _num_mboards; mboard++) {
@@ -522,7 +528,9 @@ private: // methods
size_t &port_index
) {
if (dir == uhd::TX_DIRECTION) {
- if (_has_dmafifo) {
+ if (_has_sramfifo) {
+ return block_id_t(mboard_idx, SFIFO_BLOCK_NAME, radio_index).to_string();
+ } else if (_has_dmafifo) {
port_index = radio_index;
return block_id_t(mboard_idx, DFIFO_BLOCK_NAME, 0).to_string();
} else {
@@ -736,7 +744,15 @@ private: // methods
block_id_t(mboard, RADIO_BLOCK_NAME, radio), chan,
tx_bpp
);
- if (_has_dmafifo) {
+ // Prioritize SRAM over DRAM for performance
+ if (_has_sramfifo) {
+ // We have SRAM FIFO *and* DUCs
+ _graph->connect(
+ block_id_t(mboard, SFIFO_BLOCK_NAME, radio), chan,
+ block_id_t(mboard, DUC_BLOCK_NAME, radio), chan,
+ tx_bpp
+ );
+ } else if (_has_dmafifo) {
// We have DMA FIFO *and* DUCs
_graph->connect(
block_id_t(mboard, DFIFO_BLOCK_NAME, 0), radio,
@@ -744,6 +760,13 @@ private: // methods
tx_bpp
);
}
+ } else if (_has_sramfifo) {
+ // We have SRAM FIFO, *no* DUCs
+ _graph->connect(
+ block_id_t(mboard, SFIFO_BLOCK_NAME, radio), radio,
+ block_id_t(mboard, RADIO_BLOCK_NAME, radio), chan,
+ tx_bpp
+ );
} else if (_has_dmafifo) {
// We have DMA FIFO, *no* DUCs
_graph->connect(
@@ -843,6 +866,7 @@ private: // attributes
const bool _has_ducs;
const bool _has_ddcs;
const bool _has_dmafifo;
+ const bool _has_sramfifo;
const size_t _num_mboards;
const size_t _num_radios_per_board;
const size_t _num_tx_chans_per_radio;