aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
authorAlex Williams <alex.williams@ni.com>2019-07-08 16:44:15 -0700
committerMartin Braun <martin.braun@ettus.com>2019-11-26 11:49:29 -0800
commitd8e9705bc6c34b8d015b56a76955ee2f15426bd8 (patch)
tree939b9dd2e3eee34dd545befc2a910235f80bf5b1 /host/lib
parent52c38e3c22d7c83943c0e1fc0bc69a967d6fe25c (diff)
downloaduhd-d8e9705bc6c34b8d015b56a76955ee2f15426bd8.tar.gz
uhd-d8e9705bc6c34b8d015b56a76955ee2f15426bd8.tar.bz2
uhd-d8e9705bc6c34b8d015b56a76955ee2f15426bd8.zip
rfnoc: Add tracking of 'valid' bit to properties
The valid bit helps prevent placeholder defaults from being propagated through the graph. Values that are not valid will not be forwarded.
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/include/uhdlib/rfnoc/prop_accessor.hpp2
-rw-r--r--host/lib/rfnoc/node.cpp9
2 files changed, 10 insertions, 1 deletions
diff --git a/host/lib/include/uhdlib/rfnoc/prop_accessor.hpp b/host/lib/include/uhdlib/rfnoc/prop_accessor.hpp
index a62f54620..2f39cbbec 100644
--- a/host/lib/include/uhdlib/rfnoc/prop_accessor.hpp
+++ b/host/lib/include/uhdlib/rfnoc/prop_accessor.hpp
@@ -65,7 +65,7 @@ public:
*
* Note: This method will grant temporary write access to the destination
* property!
- * If \p safe is set to true, it'll only allow RWLOCKED forwarding, i.e.,
+ * If \p safe is set to true, it'll only allow RWLOCKED forwarding, i.e.,
* the new value cannot be different.
*
* \throws uhd::type_error if types mismatch
diff --git a/host/lib/rfnoc/node.cpp b/host/lib/rfnoc/node.cpp
index b3ad2b380..cdb69e158 100644
--- a/host/lib/rfnoc/node.cpp
+++ b/host/lib/rfnoc/node.cpp
@@ -444,6 +444,15 @@ void node_t::forward_edge_property(
"Incoming edge property: `" << incoming_prop->get_id() << "`, source info: "
<< incoming_prop->get_src_info().to_string());
+ // Don't forward properties that are not yet valid
+ if (!incoming_prop->is_valid()) {
+ UHD_LOG_TRACE(get_unique_id(),
+ "Skipped empty edge property: `"
+ << incoming_prop->get_id()
+ << "`, source info: " << incoming_prop->get_src_info().to_string());
+ return;
+ }
+
// The source type of my local prop (it's the opposite of the source type
// of incoming_prop)
const auto prop_src_type =