From 49520bfecb5e13126224ee915208c2cd936f911c Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Tue, 1 Nov 2016 16:45:29 -0700 Subject: rfnoc: ctrl_iface cleanup - ctrl_iface is now longer a wb_iface. All it can do now is send command packets, and receive responses to those. - ctrl_iface does not store command time or tick rate - wb_iface_adapter is no longer a set of functors, but a wrapper around ctrl_iface. Command times are stored once, in the block. - DMA FIFO and radio block controllers have an easier time getting access to a timed_wb_iface --- host/lib/usrp/device3/device3_impl.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'host/lib/usrp') diff --git a/host/lib/usrp/device3/device3_impl.cpp b/host/lib/usrp/device3/device3_impl.cpp index d4ea8a19f..6f1719500 100644 --- a/host/lib/usrp/device3/device3_impl.cpp +++ b/host/lib/usrp/device3/device3_impl.cpp @@ -119,13 +119,10 @@ void device3_impl::enumerate_rfnoc_blocks( ); UHD_DEVICE3_LOG() << str(boost::format("Setting up NoC-Shell Control for port #0 (SID: %s)...") % xport.send_sid.to_pp_string_hex()); uhd::rfnoc::ctrl_iface::sptr ctrl = uhd::rfnoc::ctrl_iface::make( - xport.endianness == uhd::ENDIANNESS_BIG, - xport.send, - xport.recv, - xport.send_sid, + xport, str(boost::format("CE_%02d_Port_%02X") % i % ctrl_sid.get_dst_endpoint()) ); - uint64_t noc_id = ctrl->peek64(uhd::rfnoc::SR_READBACK_REG_ID); + uint64_t noc_id = ctrl->send_cmd_pkt(uhd::rfnoc::SR_READBACK, uhd::rfnoc::SR_READBACK_REG_ID, true); UHD_DEVICE3_LOG() << str(boost::format("Port %d: Found NoC-Block with ID %016X.") % int(ctrl_sid.get_dst_endpoint()) % noc_id) ; uhd::rfnoc::make_args_t make_args; uhd::rfnoc::blockdef::sptr block_def = uhd::rfnoc::blockdef::make_from_noc_id(noc_id); @@ -147,10 +144,7 @@ void device3_impl::enumerate_rfnoc_blocks( ); UHD_DEVICE3_LOG() << str(boost::format("Setting up NoC-Shell Control for port #%d (SID: %s)...") % port_number % xport1.send_sid.to_pp_string_hex()); uhd::rfnoc::ctrl_iface::sptr ctrl1 = uhd::rfnoc::ctrl_iface::make( - xport1.endianness == uhd::ENDIANNESS_BIG, - xport1.send, - xport1.recv, - xport1.send_sid, + xport1, str(boost::format("CE_%02d_Port_%02d") % i % ctrl_sid.get_dst_endpoint()) ); UHD_DEVICE3_LOG() << "OK" ; -- cgit v1.2.3