From 50f8e9f35f776016ec8df7edad570d9d8084afdb Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Sun, 30 Jun 2019 21:33:14 -0700 Subject: rfnoc: rfnoc_graph: Change block's subtrees to be /blocks/$BLOCKID --- host/lib/rfnoc/rfnoc_graph.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'host/lib') diff --git a/host/lib/rfnoc/rfnoc_graph.cpp b/host/lib/rfnoc/rfnoc_graph.cpp index ca9c8573b..1fbf440cf 100644 --- a/host/lib/rfnoc/rfnoc_graph.cpp +++ b/host/lib/rfnoc/rfnoc_graph.cpp @@ -230,8 +230,13 @@ private: make_args_uptr->reg_iface = block_reg_iface; make_args_uptr->tb_clk_iface = tb_clk_iface; make_args_uptr->ctrlport_clk_iface = ctrlport_clk_iface; - make_args_uptr->mb_control = (factory::has_requested_mb_access(noc_id) ? _mb_controllers.at(mb_idx) : nullptr); - make_args_uptr->tree = _tree->subtree("/mboards/0"); /* FIXME Get the block's subtree */ + make_args_uptr->mb_control = (factory::has_requested_mb_access(noc_id) + ? _mb_controllers.at(mb_idx) + : nullptr); + const uhd::fs_path block_path( + uhd::fs_path("/blocks") / block_id.to_string()); + _tree->create(block_path / "noc_id").set(noc_id); + make_args_uptr->tree = _tree->subtree(block_path); make_args_uptr->args = dev_addr; // TODO filter the device args _block_registry->register_block( block_factory_info.factory_fn(std::move(make_args_uptr))); -- cgit v1.2.3