aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--host/lib/rfnoc/block_id.cpp2
-rw-r--r--host/tests/block_id_test.cpp2
2 files changed, 3 insertions, 1 deletions
diff --git a/host/lib/rfnoc/block_id.cpp b/host/lib/rfnoc/block_id.cpp
index da14632b2..b7eb2b2cc 100644
--- a/host/lib/rfnoc/block_id.cpp
+++ b/host/lib/rfnoc/block_id.cpp
@@ -59,7 +59,7 @@ std::string block_id_t::get_local() const
uhd::fs_path block_id_t::get_tree_root() const
{
- return str(boost::format("/mboards/%d/xbar/%s") % get_device_no() % get_local());
+ return uhd::fs_path("/blocks") / to_string();
}
bool block_id_t::match(const std::string& block_str)
diff --git a/host/tests/block_id_test.cpp b/host/tests/block_id_test.cpp
index cf819300a..43c1ef680 100644
--- a/host/tests/block_id_test.cpp
+++ b/host/tests/block_id_test.cpp
@@ -6,6 +6,7 @@
//
#include <uhd/exception.hpp>
+#include <uhd/property_tree.hpp>
#include <uhd/rfnoc/block_id.hpp>
#include <boost/test/unit_test.hpp>
#include <iostream>
@@ -37,6 +38,7 @@ BOOST_AUTO_TEST_CASE(test_block_id)
BOOST_CHECK_EQUAL(block_id.get_device_no(), 0);
BOOST_CHECK_EQUAL(block_id.get_block_name(), "FFT");
BOOST_CHECK_EQUAL(block_id.get_block_count(), 1);
+ BOOST_CHECK_EQUAL(block_id.get_tree_root(), "/blocks/0/FFT#1");
block_id.set_device_no(17);
BOOST_CHECK_EQUAL(block_id.get_device_no(), 17);