aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2016-11-01 16:45:29 -0700
committerMartin Braun <martin.braun@ettus.com>2018-03-16 10:48:46 -0700
commit49520bfecb5e13126224ee915208c2cd936f911c (patch)
tree8daa638d55ffe5294306a6fe8e2c8b6261d8a375 /host/lib/usrp
parent60a911cd460ca1e29d838ee0039d67bf7c8fe7f3 (diff)
downloaduhd-49520bfecb5e13126224ee915208c2cd936f911c.tar.gz
uhd-49520bfecb5e13126224ee915208c2cd936f911c.tar.bz2
uhd-49520bfecb5e13126224ee915208c2cd936f911c.zip
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
Diffstat (limited to 'host/lib/usrp')
-rw-r--r--host/lib/usrp/device3/device3_impl.cpp12
1 files changed, 3 insertions, 9 deletions
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" ;