aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorMichael West <michael.west@ettus.com>2018-05-15 10:26:30 -0700
committerMartin Braun <martin.braun@ettus.com>2018-05-15 11:53:11 -0700
commitca13060b92211a58670d4581e37def6941be63bf (patch)
tree3b705d858d0b3fc7211dbb19c863cc6a5d0c79c5 /host
parent02638afb18a3f120b40555fbbbf2098e8d3611e5 (diff)
downloaduhd-ca13060b92211a58670d4581e37def6941be63bf.tar.gz
uhd-ca13060b92211a58670d4581e37def6941be63bf.tar.bz2
uhd-ca13060b92211a58670d4581e37def6941be63bf.zip
X300/TwinRX: Fix for RuntimeError: Could not find block in list for device 0, radio 0, and port 1
Diffstat (limited to 'host')
-rw-r--r--host/lib/rfnoc/legacy_compat.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/host/lib/rfnoc/legacy_compat.cpp b/host/lib/rfnoc/legacy_compat.cpp
index ac3cc6e54..47eaf8c67 100644
--- a/host/lib/rfnoc/legacy_compat.cpp
+++ b/host/lib/rfnoc/legacy_compat.cpp
@@ -588,11 +588,9 @@ private: // methods
const size_t &port_index)
{
block_name_to_block_map_t legacy_block_map = get_legacy_blocks(_device);
- auto radio_src_flat = _flatten_blocks_by_n_ports(legacy_block_map[RADIO_BLOCK_NAME].first);
- auto radio_snk_flat = _flatten_blocks_by_n_ports(legacy_block_map[RADIO_BLOCK_NAME].second);
- size_t index_src = find_block<source_port_t>(radio_src_flat, mboard_idx, radio_index, port_index);
- size_t index_snk = find_block<sink_port_t>(radio_snk_flat, mboard_idx, radio_index, port_index);
if (dir == uhd::TX_DIRECTION){
+ auto radio_snk_flat = _flatten_blocks_by_n_ports(legacy_block_map[RADIO_BLOCK_NAME].second);
+ size_t index_snk = find_block<sink_port_t>(radio_snk_flat, mboard_idx, radio_index, port_index);
if (_has_sramfifo){
auto sfifo_snk_flat = _flatten_blocks_by_n_ports(legacy_block_map[SFIFO_BLOCK_NAME].second);
UHD_ASSERT_THROW(index_snk < sfifo_snk_flat.size());
@@ -607,7 +605,7 @@ private: // methods
if (_has_ducs){
return std::make_pair(block_id_t(mboard_idx, DUC_BLOCK_NAME, radio_index).to_string(),port_index);
auto duc_snk_flat = _flatten_blocks_by_n_ports(legacy_block_map[DUC_BLOCK_NAME].second);
- UHD_ASSERT_THROW(index_src < duc_snk_flat.size());
+ UHD_ASSERT_THROW(index_snk < duc_snk_flat.size());
auto duc_block = duc_snk_flat[index_snk].first->get_block_id();
return std::make_pair(duc_block, duc_snk_flat[index_snk].second);
}else{
@@ -615,6 +613,8 @@ private: // methods
}
}
}else{
+ auto radio_src_flat = _flatten_blocks_by_n_ports(legacy_block_map[RADIO_BLOCK_NAME].first);
+ size_t index_src = find_block<source_port_t>(radio_src_flat, mboard_idx, radio_index, port_index);
if (_has_ddcs){
auto ddc_src_flat = _flatten_blocks_by_n_ports(legacy_block_map[DDC_BLOCK_NAME].first);
UHD_ASSERT_THROW(index_src < ddc_src_flat.size());