aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/include/uhdlib/rfnoc/node_accessor.hpp9
-rw-r--r--host/lib/rfnoc/graph.cpp13
-rw-r--r--host/lib/rfnoc/node.cpp1
3 files changed, 23 insertions, 0 deletions
diff --git a/host/lib/include/uhdlib/rfnoc/node_accessor.hpp b/host/lib/include/uhdlib/rfnoc/node_accessor.hpp
index 4c63d29e2..5a9fd3a7f 100644
--- a/host/lib/include/uhdlib/rfnoc/node_accessor.hpp
+++ b/host/lib/include/uhdlib/rfnoc/node_accessor.hpp
@@ -69,6 +69,15 @@ public:
node->set_resolve_all_callback(std::move(resolver));
}
+ /* Restore the resolver callback to its default implementation
+ *
+ * See node_t::clear_resolve_all_callback() for details.
+ */
+ void clear_resolve_all_callback(node_t* node)
+ {
+ node->clear_resolve_all_callback();
+ }
+
/*! Forward an edge property to \p dst_node
*
* See node_t::forward_edge_property() for details.
diff --git a/host/lib/rfnoc/graph.cpp b/host/lib/rfnoc/graph.cpp
index a26ed33fc..1fc60cf6e 100644
--- a/host/lib/rfnoc/graph.cpp
+++ b/host/lib/rfnoc/graph.cpp
@@ -183,11 +183,18 @@ void graph_t::disconnect(node_ref_t src_node, node_ref_t dst_node, graph_edge_t
{
std::lock_guard<std::recursive_mutex> l(_graph_mutex);
+ node_accessor_t node_accessor{};
+
// Find vertex descriptor
if (_node_map.count(src_node) == 0 && _node_map.count(dst_node) == 0) {
return;
}
+ UHD_LOG_TRACE(LOG_ID,
+ "Disconnecting block " << src_node->get_unique_id() << ":" << edge_info.src_port
+ << " -> " << dst_node->get_unique_id() << ":"
+ << edge_info.dst_port);
+
auto src_vertex_desc = _node_map.at(src_node);
auto dst_vertex_desc = _node_map.at(dst_node);
@@ -202,6 +209,9 @@ void graph_t::disconnect(node_ref_t src_node, node_ref_t dst_node, graph_edge_t
if (boost::degree(src_vertex_desc, _graph) == 0) {
_remove_node(src_node);
+ UHD_LOG_TRACE(LOG_ID,
+ "Removing block " << src_node->get_unique_id() << ":" << edge_info.src_port);
+ node_accessor.clear_resolve_all_callback(src_node);
}
// Re-look up the vertex descriptor for dst_node, as the act of removing
@@ -209,6 +219,9 @@ void graph_t::disconnect(node_ref_t src_node, node_ref_t dst_node, graph_edge_t
dst_vertex_desc = _node_map.at(dst_node);
if (boost::degree(dst_vertex_desc, _graph) == 0) {
_remove_node(dst_node);
+ UHD_LOG_TRACE(LOG_ID,
+ "Removing block " << dst_node->get_unique_id() << ":" << edge_info.dst_port);
+ node_accessor.clear_resolve_all_callback(dst_node);
}
}
diff --git a/host/lib/rfnoc/node.cpp b/host/lib/rfnoc/node.cpp
index 062645b93..e7f166e93 100644
--- a/host/lib/rfnoc/node.cpp
+++ b/host/lib/rfnoc/node.cpp
@@ -19,6 +19,7 @@ dirtifier_t node_t::ALWAYS_DIRTY{};
node_t::node_t()
{
+ _resolve_all_cb = _default_resolve_all_cb;
register_property(&ALWAYS_DIRTY);
}