diff options
author | Martin Braun <martin.braun@ettus.com> | 2017-06-29 17:24:20 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2017-06-30 13:30:47 -0700 |
commit | f3d4d317f7d8e83c1435de4208fa66754522c1e2 (patch) | |
tree | 4d0869acd7ae180ad6f805b125e9a10c3c745916 /host | |
parent | 6ed6a01784a5846a462fdef92b1bcd6c1f1c90d9 (diff) | |
download | uhd-f3d4d317f7d8e83c1435de4208fa66754522c1e2.tar.gz uhd-f3d4d317f7d8e83c1435de4208fa66754522c1e2.tar.bz2 uhd-f3d4d317f7d8e83c1435de4208fa66754522c1e2.zip |
rfnoc: Fixed SRAM FIFO indexing
Loopback FIFOs ("SRAM FIFOs") only have a single channel, unlike the
DRAM FIFOs (and that's also the reason why we have full bandwdith
between all channels using those). We thus need to ensure that every TX
stream gets its own SRAM FIFO.
Diffstat (limited to 'host')
-rw-r--r-- | host/lib/rfnoc/legacy_compat.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/host/lib/rfnoc/legacy_compat.cpp b/host/lib/rfnoc/legacy_compat.cpp index 70fe067f8..7b80bf175 100644 --- a/host/lib/rfnoc/legacy_compat.cpp +++ b/host/lib/rfnoc/legacy_compat.cpp @@ -520,7 +520,10 @@ private: // methods ) { if (dir == uhd::TX_DIRECTION) { if (_has_sramfifo) { - return block_id_t(mboard_idx, SFIFO_BLOCK_NAME, radio_index).to_string(); + const size_t sfifo_idx = + radio_index * _num_tx_chans_per_radio + port_index; + port_index = 0; + return block_id_t(mboard_idx, SFIFO_BLOCK_NAME, sfifo_idx).to_string(); } else if (_has_dmafifo) { port_index = radio_index; return block_id_t(mboard_idx, DFIFO_BLOCK_NAME, 0).to_string(); @@ -738,8 +741,11 @@ private: // methods // Prioritize SRAM over DRAM for performance if (_has_sramfifo) { // We have SRAM FIFO *and* DUCs + // SRAM FIFOs have only 1 channel per block + const size_t sfifo_idx = + _num_tx_chans_per_radio * radio + chan; _graph->connect( - block_id_t(mboard, SFIFO_BLOCK_NAME, radio), chan, + block_id_t(mboard, SFIFO_BLOCK_NAME, sfifo_idx), chan, block_id_t(mboard, DUC_BLOCK_NAME, radio), chan, tx_bpp ); @@ -753,8 +759,11 @@ private: // methods } } else if (_has_sramfifo) { // We have SRAM FIFO, *no* DUCs + // SRAM FIFOs have only 1 channel per block + const size_t sfifo_idx = + _num_tx_chans_per_radio * radio + chan; _graph->connect( - block_id_t(mboard, SFIFO_BLOCK_NAME, radio), radio, + block_id_t(mboard, SFIFO_BLOCK_NAME, sfifo_idx), 0, block_id_t(mboard, RADIO_BLOCK_NAME, radio), chan, tx_bpp ); |