diff options
author | Moritz Fischer <moritz.fischer@ettus.com> | 2015-02-23 14:12:59 -0800 |
---|---|---|
committer | Ashish Chaudhari <ashish@ettus.com> | 2015-02-26 13:40:23 -0800 |
commit | 963dcaa6a75862aec9ee4924dd88fa0901b39934 (patch) | |
tree | eef293a2fc1515522b74c66649cada0562a4bb60 /host/lib/usrp/e300 | |
parent | 78be3d548be78ffd871a0563499a6df0bfdf14b4 (diff) | |
download | uhd-963dcaa6a75862aec9ee4924dd88fa0901b39934.tar.gz uhd-963dcaa6a75862aec9ee4924dd88fa0901b39934.tar.bz2 uhd-963dcaa6a75862aec9ee4924dd88fa0901b39934.zip |
e300: fc: Clean up the TX flowcontrol setup a bit.
Use named constant instant of magic constant for response
frequency.
Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
Diffstat (limited to 'host/lib/usrp/e300')
-rw-r--r-- | host/lib/usrp/e300/e300_impl.hpp | 1 | ||||
-rw-r--r-- | host/lib/usrp/e300/e300_io_impl.cpp | 8 |
2 files changed, 8 insertions, 1 deletions
diff --git a/host/lib/usrp/e300/e300_impl.hpp b/host/lib/usrp/e300/e300_impl.hpp index 59e0d59ce..c7d683f58 100644 --- a/host/lib/usrp/e300/e300_impl.hpp +++ b/host/lib/usrp/e300/e300_impl.hpp @@ -71,6 +71,7 @@ static std::string E300_SERVER_SENSOR_PORT = "21762"; static const double E300_RX_SW_BUFF_FULLNESS = 0.9; //Buffer should be half full static const size_t E300_RX_FC_REQUEST_FREQ = 32; // per flow ctrl window +static const size_t E300_TX_FC_RESPONSE_FREQ = 8; // per flow ctrl window // crossbar settings static const boost::uint8_t E300_RADIO_DEST_PREFIX_TX = 0; diff --git a/host/lib/usrp/e300/e300_io_impl.cpp b/host/lib/usrp/e300/e300_io_impl.cpp index a1d0a8da1..fa4915ed1 100644 --- a/host/lib/usrp/e300/e300_io_impl.cpp +++ b/host/lib/usrp/e300/e300_io_impl.cpp @@ -590,7 +590,13 @@ tx_streamer::sptr e300_impl::get_tx_stream(const uhd::stream_args_t &args_) //flow control setup const size_t fc_window = data_xports.send->get_num_send_frames(); - perif.deframer->configure_flow_control(0/*cycs off*/, fc_window/8/*pkts*/); + const size_t fc_handle_window = std::max<size_t>(1, fc_window/E300_TX_FC_RESPONSE_FREQ); + + UHD_LOG << "TX Flow Control Window = " << fc_window + << ", TX Flow Control Handler Window = " + << fc_handle_window << std::endl; + + perif.deframer->configure_flow_control(0/*cycs off*/, fc_handle_window/*pkts*/); boost::shared_ptr<e300_tx_fc_cache_t> fc_cache(new e300_tx_fc_cache_t()); fc_cache->stream_channel = stream_i; fc_cache->device_channel = args.channels[stream_i]; |