From 175e553c44996925dc0f3e135f78716ce6f0e4ea Mon Sep 17 00:00:00 2001 From: michael-west Date: Mon, 26 Jul 2021 14:42:41 -0700 Subject: B200: Fix overflow handling - Use FPGA images with fixed sc12 converter. - Properly flush channels and restart streaming in the case of an overrun. Signed-off-by: michael-west --- host/lib/usrp/b200/b200_io_impl.cpp | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'host/lib/usrp/b200') diff --git a/host/lib/usrp/b200/b200_io_impl.cpp b/host/lib/usrp/b200/b200_io_impl.cpp index 2433ab2db..dac39915b 100644 --- a/host/lib/usrp/b200/b200_io_impl.cpp +++ b/host/lib/usrp/b200/b200_io_impl.cpp @@ -496,28 +496,23 @@ void b200_impl::handle_overflow(const size_t radio_index) _radio_perifs[radio_index].framer->in_continuous_streaming_mode(); // stop streaming my_streamer->issue_stream_cmd(stream_cmd_t::STREAM_MODE_STOP_CONTINUOUS); - // flush demux - _demux->realloc_sid(B200_RX_DATA0_SID); - _demux->realloc_sid(B200_RX_DATA1_SID); - // flush actual transport - while (_data_transport->get_recv_buff(0.001)) { - } + // flush data + while (_demux->get_recv_buff(B200_RX_DATA0_SID, 0.001)) {} + while (_demux->get_recv_buff(B200_RX_DATA1_SID, 0.001)) {} // restart streaming if (in_continuous_streaming_mode) { stream_cmd_t stream_cmd(stream_cmd_t::STREAM_MODE_START_CONTINUOUS); stream_cmd.stream_now = false; stream_cmd.time_spec = _radio_perifs[radio_index].time64->get_time_now() + time_spec_t(0.01); - // FIXME: temporarily remove the start stream command. - // This will avoid an issue that gets the b210 in a bad state. - // my_streamer->issue_stream_cmd(stream_cmd); + my_streamer->issue_stream_cmd(stream_cmd); } } else { - while (_data_transport->get_recv_buff(0.001)) { - } - // FIXME: temporarily remove the overflow handling that re-issues a stream - // command. This will avoid an issue that gets the b210 in a bad state. - // _radio_perifs[radio_index].framer->handle_overflow(); + const uint32_t sid = radio_index == 0 ? B200_RX_DATA0_SID : B200_RX_DATA1_SID; + // flush data + while (_demux->get_recv_buff(sid, 0.001)) {} + // restart streaming + _radio_perifs[radio_index].framer->handle_overflow(); } } -- cgit v1.2.3