diff options
author | Sugandha Gupta <sugandha.gupta@ettus.com> | 2019-04-17 16:34:10 -0700 |
---|---|---|
committer | Brent Stapleton <brent.stapleton@ettus.com> | 2019-05-01 15:17:23 -0700 |
commit | 8a400f6a30942c9d6d3596f6989720eb4cff058b (patch) | |
tree | 43a25f8500e41c5f0ee62880271fdd0e52c57eff /host/lib | |
parent | 7bccabcda1128a412fe21203937cf54f92e0eb15 (diff) | |
download | uhd-8a400f6a30942c9d6d3596f6989720eb4cff058b.tar.gz uhd-8a400f6a30942c9d6d3596f6989720eb4cff058b.tar.bz2 uhd-8a400f6a30942c9d6d3596f6989720eb4cff058b.zip |
mpm: Add option for muxed data stream for liberio transport
If the number of channels for embedded mode streaming is 4
(1 for ctrl, 1 for async messages and 2 for data ), we need to
mux the data transport. This is needed for E310
Diffstat (limited to 'host/lib')
-rw-r--r-- | host/lib/usrp/mpmd/mpmd_xport_ctrl_liberio.cpp | 18 | ||||
-rw-r--r-- | host/lib/usrp/mpmd/mpmd_xport_ctrl_liberio.hpp | 2 |
2 files changed, 18 insertions, 2 deletions
diff --git a/host/lib/usrp/mpmd/mpmd_xport_ctrl_liberio.cpp b/host/lib/usrp/mpmd/mpmd_xport_ctrl_liberio.cpp index 8f3014bc7..78751c94f 100644 --- a/host/lib/usrp/mpmd/mpmd_xport_ctrl_liberio.cpp +++ b/host/lib/usrp/mpmd/mpmd_xport_ctrl_liberio.cpp @@ -107,8 +107,22 @@ uhd::both_xports_t mpmd_xport_ctrl_liberio::make_transport( << "making (muxed) stream with num " << xports.recv_sid.get_dst(); xports.recv = _async_msg_dma_xport->make_stream(xports.recv_sid.get_dst()); } else { - xports.recv = - transport::liberio_zero_copy::make(tx_dev, rx_dev, default_buff_args); + // Create muxed transport in case of less DMA channels + if (xport_info["muxed"] == "True") { + if (not _data_dma_xport) { + _data_dma_xport = + make_muxed_liberio_xport(tx_dev, rx_dev, default_buff_args, + uhd::rfnoc::MAX_NUM_BLOCKS * uhd::rfnoc::MAX_NUM_PORTS); + } + + UHD_LOGGER_TRACE("MPMD") + << "Making (muxed) stream with num " << xports.recv_sid.get_dst(); + xports.recv = _data_dma_xport->make_stream(xports.recv_sid.get_dst()); + } + else { + xports.recv = + transport::liberio_zero_copy::make(tx_dev, rx_dev, default_buff_args); + } } // Finish both_xports_t object and return: diff --git a/host/lib/usrp/mpmd/mpmd_xport_ctrl_liberio.hpp b/host/lib/usrp/mpmd/mpmd_xport_ctrl_liberio.hpp index 5f635e7e7..36f02fe46 100644 --- a/host/lib/usrp/mpmd/mpmd_xport_ctrl_liberio.hpp +++ b/host/lib/usrp/mpmd/mpmd_xport_ctrl_liberio.hpp @@ -45,6 +45,8 @@ private: //! Control transport for one liberio connection uhd::transport::muxed_zero_copy_if::sptr _ctrl_dma_xport; + //! Data transport for one liberio connection + uhd::transport::muxed_zero_copy_if::sptr _data_dma_xport; //! Control transport for one liberio connection uhd::transport::muxed_zero_copy_if::sptr _async_msg_dma_xport; }; |