From 8b16ab706fb4768f802ddb65a81fc26e1562cb0d Mon Sep 17 00:00:00 2001 From: Ashish Chaudhari Date: Thu, 19 Jul 2018 17:08:45 -0700 Subject: rfnoc: Enabled SW flush mechanism impl'd in noc_shell - UHD will now "disconnect" the noc_block data-path from the crossbar when the block's dtor is invoked. This allows long running or slow blocks to empty out rapidly during teardown. - UHD will also attempt to flush at init time in case a block is destroyed abnormally. The goal of the flush mechanism is to not lock up the FPGA - noc_shell compat number is now 3 --- host/include/uhd/rfnoc/block_ctrl_base.hpp | 3 +++ host/include/uhd/rfnoc/constants.hpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'host/include') diff --git a/host/include/uhd/rfnoc/block_ctrl_base.hpp b/host/include/uhd/rfnoc/block_ctrl_base.hpp index 63939a114..0405ed8b7 100644 --- a/host/include/uhd/rfnoc/block_ctrl_base.hpp +++ b/host/include/uhd/rfnoc/block_ctrl_base.hpp @@ -401,6 +401,9 @@ private: //! Helper to create a lambda to read tick rate double get_command_tick_rate(const size_t port); + //! Helper to flush any in-flight packets for this block + bool _flush(const size_t port = 0); + /*********************************************************************** * Private members **********************************************************************/ diff --git a/host/include/uhd/rfnoc/constants.hpp b/host/include/uhd/rfnoc/constants.hpp index 94cca3e7a..6df4c535f 100644 --- a/host/include/uhd/rfnoc/constants.hpp +++ b/host/include/uhd/rfnoc/constants.hpp @@ -25,7 +25,7 @@ static const std::string XML_PATH_ENV = "UHD_RFNOC_DIR"; //! If the block name can't be automatically detected, this name is used static const std::string DEFAULT_BLOCK_NAME = "Block"; static const uint64_t DEFAULT_NOC_ID = 0xFFFFFFFFFFFFFFFF; -static const size_t NOC_SHELL_COMPAT_MAJOR = 2; +static const size_t NOC_SHELL_COMPAT_MAJOR = 3; static const size_t NOC_SHELL_COMPAT_MINOR = 0; static const size_t MAX_PACKET_SIZE = 8000; // bytes -- cgit v1.2.3