aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/rfnoc/graph_impl.cpp
diff options
context:
space:
mode:
authorTrung Tran <trung.tran@ettus.com>2018-08-03 09:09:03 -0700
committerMartin Braun <martin.braun@ettus.com>2018-09-14 22:15:56 -0700
commitb6b507ccfcf31cead47faff4a2ba5550d0469113 (patch)
treef7163d03a03fe41dbe4e729b5cbfe30fde6d9371 /host/lib/rfnoc/graph_impl.cpp
parent29f896182a6b9d2b6831dfcc0b22711f05fde0c2 (diff)
downloaduhd-b6b507ccfcf31cead47faff4a2ba5550d0469113.tar.gz
uhd-b6b507ccfcf31cead47faff4a2ba5550d0469113.tar.bz2
uhd-b6b507ccfcf31cead47faff4a2ba5550d0469113.zip
uhd: rfnoc: add async message handler
Diffstat (limited to 'host/lib/rfnoc/graph_impl.cpp')
-rw-r--r--host/lib/rfnoc/graph_impl.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/host/lib/rfnoc/graph_impl.cpp b/host/lib/rfnoc/graph_impl.cpp
index d9e069993..0d90150c1 100644
--- a/host/lib/rfnoc/graph_impl.cpp
+++ b/host/lib/rfnoc/graph_impl.cpp
@@ -17,15 +17,15 @@ using namespace uhd::rfnoc;
***************************************************************************/
graph_impl::graph_impl(
const std::string &name,
- boost::weak_ptr<uhd::device3> device_ptr
- //async_msg_handler::sptr msg_handler
+ boost::weak_ptr<uhd::device3> device_ptr,
+ async_msg_handler::sptr msg_handler
) : _name(name)
, _device_ptr(device_ptr)
+ , _msg_handler(msg_handler)
{
UHD_LOG_TRACE("RFNOC", "Instantiating RFNoC graph " << _name);
}
-
/****************************************************************************
* Connection API
***************************************************************************/
@@ -154,6 +154,12 @@ void graph_impl::connect(
* 5. Configure error policy
********************************************************************/
dst->set_error_policy("next_burst");
+
+ /********************************************************************
+ * 6. Set async message handling
+ ********************************************************************/
+ src->sr_write(uhd::rfnoc::SR_RESP_OUT_DST_SID, _msg_handler->get_local_addr(), src_block_port);
+ dst->sr_write(uhd::rfnoc::SR_RESP_IN_DST_SID, _msg_handler->get_local_addr(), dst_block_port);
}
void graph_impl::connect(
@@ -230,5 +236,5 @@ void graph_impl::connect_sink(
* 5. Configure error policy
********************************************************************/
dst->set_error_policy("next_burst");
-
}
+