aboutsummaryrefslogtreecommitdiffstats
path: root/host/include
diff options
context:
space:
mode:
authormichael-west <michael.west@ettus.com>2019-01-24 19:13:44 -0800
committerAshish Chaudhari <ashish.chaudhari@ettus.com>2019-01-31 13:47:31 -0800
commit13663f459d67fb3c0f289bbcbddc4534224381f5 (patch)
treeb73fae267648f1324a1b185c0515df8762a0f3f1 /host/include
parentbbb3aa78836a31e9df847a228c2f87e9e2a15fad (diff)
downloaduhd-13663f459d67fb3c0f289bbcbddc4534224381f5.tar.gz
uhd-13663f459d67fb3c0f289bbcbddc4534224381f5.tar.bz2
uhd-13663f459d67fb3c0f289bbcbddc4534224381f5.zip
RFNoC: More graph traversal fixes
- Store number of input and ouptput ports from block definition. - Use number of input and ouptut ports for graph traversal rather than number of connected blocks. - Fixes DAC synchronization failure errors when using only one TX channel on X300. Signed-off-by: michael-west <michael.west@ettus.com>
Diffstat (limited to 'host/include')
-rw-r--r--host/include/uhd/rfnoc/node_ctrl_base.hpp30
-rw-r--r--host/include/uhd/rfnoc/node_ctrl_base.ipp4
2 files changed, 31 insertions, 3 deletions
diff --git a/host/include/uhd/rfnoc/node_ctrl_base.hpp b/host/include/uhd/rfnoc/node_ctrl_base.hpp
index 0fed28bed..db552ff4c 100644
--- a/host/include/uhd/rfnoc/node_ctrl_base.hpp
+++ b/host/include/uhd/rfnoc/node_ctrl_base.hpp
@@ -166,11 +166,31 @@ public:
get_property, null_value, exclude_nodes);
}
+ UHD_INLINE size_t get_num_input_ports(void)
+ {
+ return _num_input_ports;
+ }
+
+ UHD_INLINE void set_num_input_ports(size_t num_ports)
+ {
+ _num_input_ports = num_ports;
+ }
+
+ UHD_INLINE size_t get_num_output_ports(void)
+ {
+ return _num_output_ports;
+ }
+
+ UHD_INLINE void set_num_output_ports(size_t num_ports)
+ {
+ _num_output_ports = num_ports;
+ }
+
protected:
/***********************************************************************
* Structors
**********************************************************************/
- node_ctrl_base(void) {}
+ node_ctrl_base(void) : _num_input_ports(0), _num_output_ports(0) {}
virtual ~node_ctrl_base()
{
disconnect();
@@ -263,6 +283,14 @@ private:
*/
std::map<size_t, size_t> _downstream_ports;
+ /*! Stores the number of input ports.
+ */
+ size_t _num_input_ports;
+
+ /*! Stores the number of output ports.
+ */
+ size_t _num_output_ports;
+
}; /* class node_ctrl_base */
}} /* namespace uhd::rfnoc */
diff --git a/host/include/uhd/rfnoc/node_ctrl_base.ipp b/host/include/uhd/rfnoc/node_ctrl_base.ipp
index cb56e2d90..43a3cb162 100644
--- a/host/include/uhd/rfnoc/node_ctrl_base.ipp
+++ b/host/include/uhd/rfnoc/node_ctrl_base.ipp
@@ -85,8 +85,8 @@ namespace uhd {
// map each input port directly to the same output
// port. This limits the graph traversal to prevent
// finding nodes that are not part of this chain.
- if (one_next_node->list_upstream_nodes().size() ==
- one_next_node->list_downstream_nodes().size())
+ if (one_next_node->get_num_input_ports() ==
+ one_next_node->get_num_output_ports())
{
next_port = (downstream ?
node->get_downstream_port(connected_port) :