diff options
Diffstat (limited to 'host/lib')
| -rw-r--r-- | host/lib/rfnoc/graph_impl.cpp | 17 | ||||
| -rw-r--r-- | host/lib/rfnoc/source_block_ctrl_base.cpp | 6 | ||||
| -rw-r--r-- | host/lib/usrp/device3/device3_io_impl.cpp | 1 | 
3 files changed, 16 insertions, 8 deletions
| diff --git a/host/lib/rfnoc/graph_impl.cpp b/host/lib/rfnoc/graph_impl.cpp index 989bcb0c4..326e9205d 100644 --- a/host/lib/rfnoc/graph_impl.cpp +++ b/host/lib/rfnoc/graph_impl.cpp @@ -120,17 +120,17 @@ void graph_impl::connect(const block_id_t& src_block,                  % dst->get_block_id().get() % (dst->get_fifo_size(dst_block_port) / 1024)                  % (pkt_size / 1024) % src->get_block_id().get()));      } +    const bool same_xbar = sid.get_src_addr() == sid.get_dst_addr();      src->configure_flow_control_out(true, /* enable output */ +        same_xbar, // Lossless link if on same crossbar          buf_size_bytes,          0, /* no packet limit. We need to revisit this at some point. */          src_block_port);      // On the same crossbar, use lots of FC packets -    size_t bytes_per_response = -        buf_size_bytes / uhd::rfnoc::DEFAULT_FC_XBAR_RESPONSE_FREQ;      // Over the network, use less or we'd flood the transport -    if (sid.get_src_addr() != sid.get_dst_addr()) { -        bytes_per_response = buf_size_bytes / uhd::rfnoc::DEFAULT_FC_TX_RESPONSE_FREQ; -    } +    const size_t bytes_per_response = +        same_xbar ? buf_size_bytes / uhd::rfnoc::DEFAULT_FC_XBAR_RESPONSE_FREQ +                  : buf_size_bytes / uhd::rfnoc::DEFAULT_FC_TX_RESPONSE_FREQ;      UHD_ASSERT_THROW(bytes_per_response != 0);      dst->configure_flow_control_in(bytes_per_response, dst_block_port); @@ -189,7 +189,12 @@ void graph_impl::connect_src(const block_id_t& src_block,                  % (buf_size_dst_bytes / 1024) % (pkt_size / 1024)                  % src->get_block_id().get()));      } -    src->configure_flow_control_out(buf_size_pkts, src_block_port); + +    src->configure_flow_control_out(true, /* enable output */ +        (dst_sid.get_src_addr() == dst_sid.get_dst_addr()), +        buf_size_dst_bytes, +        0, /* no packet limit. We need to revisit this at some point. */ +        src_block_port);  }  void graph_impl::connect_sink( diff --git a/host/lib/rfnoc/source_block_ctrl_base.cpp b/host/lib/rfnoc/source_block_ctrl_base.cpp index 6c41fae14..656ab26af 100644 --- a/host/lib/rfnoc/source_block_ctrl_base.cpp +++ b/host/lib/rfnoc/source_block_ctrl_base.cpp @@ -86,6 +86,7 @@ void source_block_ctrl_base::set_destination(  }  void source_block_ctrl_base::configure_flow_control_out(const bool enable_fc_output, +    const bool lossless_link,      const size_t buf_size_bytes,      const size_t pkt_limit,      const size_t block_port, @@ -124,8 +125,9 @@ void source_block_ctrl_base::configure_flow_control_out(const bool enable_fc_out      // count based flow control      const bool enable_byte_fc    = (buf_size_bytes != 0);      const bool enable_pkt_cnt_fc = (pkt_limit != 0); -    const uint32_t config        = (enable_fc_output ? 1 : 0) | (enable_byte_fc << 1) -                            | (enable_pkt_cnt_fc << 2); +    const uint32_t config = (enable_fc_output ? 1 : 0) | ((enable_byte_fc ? 1 : 0) << 1) +                            | ((enable_pkt_cnt_fc ? 1 : 0) << 2) +                            | ((lossless_link ? 1 : 0) << 3);      // Resize the FC window.      // Precondition: No data can be buffered upstream. diff --git a/host/lib/usrp/device3/device3_io_impl.cpp b/host/lib/usrp/device3/device3_io_impl.cpp index 2bc59f1a8..ce8ff2cbf 100644 --- a/host/lib/usrp/device3/device3_io_impl.cpp +++ b/host/lib/usrp/device3/device3_io_impl.cpp @@ -357,6 +357,7 @@ rx_streamer::sptr device3_impl::get_rx_stream(const stream_args_t& args_)          UHD_RX_STREAMER_LOG() << "Flow Control Window = " << (fc_window)                                << ", Flow Control Handler Window = " << fc_handle_window;          blk_ctrl->configure_flow_control_out(true, +            xport.lossless,              fc_window,              rx_hints.cast<size_t>("recv_pkt_limit",                  0), // On rfnoc-devel, update e300_impl::get_rx_hints() to set this to 32 | 
