aboutsummaryrefslogtreecommitdiffstats
path: root/host/tests/rfnoc_blocks_test.cpp
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2019-06-03 19:22:23 -0700
committerMartin Braun <martin.braun@ettus.com>2019-11-26 11:49:23 -0800
commit6460e07f91bc468e7c094785093426ee07e26bcb (patch)
tree649ac875f5c54c7a94ff8fee1b470d63f5a265d1 /host/tests/rfnoc_blocks_test.cpp
parent0f8718176993b3460b12720e639b030be9b86943 (diff)
downloaduhd-6460e07f91bc468e7c094785093426ee07e26bcb.tar.gz
uhd-6460e07f91bc468e7c094785093426ee07e26bcb.tar.bz2
uhd-6460e07f91bc468e7c094785093426ee07e26bcb.zip
rfnoc: noc_block_base: Pass args into block on construction
These args come from the framework, e.g., because the UHD session was launched with them.
Diffstat (limited to 'host/tests/rfnoc_blocks_test.cpp')
-rw-r--r--host/tests/rfnoc_blocks_test.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/host/tests/rfnoc_blocks_test.cpp b/host/tests/rfnoc_blocks_test.cpp
index 113fbf630..4b393eb36 100644
--- a/host/tests/rfnoc_blocks_test.cpp
+++ b/host/tests/rfnoc_blocks_test.cpp
@@ -49,12 +49,14 @@ BOOST_AUTO_TEST_CASE(test_ddc_block)
constexpr noc_block_base::noc_id_t mock_noc_id = 0x7E57DDC0;
auto ddc_make_args = make_make_args(mock_noc_id, "0/DDC#0", num_chans, num_chans);
+ ddc_make_args->args = uhd::device_addr_t("foo=bar");
auto ddc_reg_iface = std::dynamic_pointer_cast<mock_reg_iface_t>(ddc_make_args->reg_iface);
ddc_reg_iface->read_memory[ddc_block_control::RB_COMPAT_NUM] =
(ddc_block_control::MAJOR_COMPAT << 16) | ddc_block_control::MINOR_COMPAT;
ddc_reg_iface->read_memory[ddc_block_control::RB_NUM_HB] = num_hb;
ddc_reg_iface->read_memory[ddc_block_control::RB_CIC_MAX_DECIM] = max_cic;
auto test_ddc = ddc_block_control_make(std::move(ddc_make_args));
+ BOOST_CHECK_EQUAL(test_ddc->get_block_args().get("foo"), "bar");
node_accessor.init_props(test_ddc.get());
UHD_LOG_DEBUG("TEST", "Init done.");