From 6ec8cf3eeac70d4458ad7a4f7f1eea4f082c140d Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Thu, 30 May 2019 14:21:41 -0700 Subject: rfnoc: Add default block controller The default block controller should get instantiated when no other suitable block controller can be found. --- host/include/uhd/rfnoc/CMakeLists.txt | 1 + host/include/uhd/rfnoc/block_control.hpp | 25 +++++++++++++++++++++++++ host/include/uhd/rfnoc/constants.hpp | 9 ++++----- 3 files changed, 30 insertions(+), 5 deletions(-) create mode 100644 host/include/uhd/rfnoc/block_control.hpp (limited to 'host/include') diff --git a/host/include/uhd/rfnoc/CMakeLists.txt b/host/include/uhd/rfnoc/CMakeLists.txt index dab5715d8..5b81ae6e1 100644 --- a/host/include/uhd/rfnoc/CMakeLists.txt +++ b/host/include/uhd/rfnoc/CMakeLists.txt @@ -10,6 +10,7 @@ if(ENABLE_RFNOC) # Infrastructure block_ctrl_base.hpp block_ctrl.hpp + block_control.hpp blockdef.hpp block_id.hpp constants.hpp diff --git a/host/include/uhd/rfnoc/block_control.hpp b/host/include/uhd/rfnoc/block_control.hpp new file mode 100644 index 000000000..5995f6865 --- /dev/null +++ b/host/include/uhd/rfnoc/block_control.hpp @@ -0,0 +1,25 @@ +// +// Copyright 2019 Ettus Research, a National Instruments Brand +// +// SPDX-License-Identifier: GPL-3.0-or-later +// + +#ifndef INCLUDED_LIBUHD_BLOCK_CONTROL_HPP +#define INCLUDED_LIBUHD_BLOCK_CONTROL_HPP + +#include +#include + +namespace uhd { namespace rfnoc { + +/*! A default block controller for blocks that can't be found in the registry + */ +class UHD_API block_control : public noc_block_base +{ +public: + RFNOC_DECLARE_BLOCK(block_control) +}; + +}} // namespace uhd::rfnoc + +#endif /* INCLUDED_LIBUHD_BLOCK_CONTROL_HPP */ diff --git a/host/include/uhd/rfnoc/constants.hpp b/host/include/uhd/rfnoc/constants.hpp index d18494d4c..1a992378c 100644 --- a/host/include/uhd/rfnoc/constants.hpp +++ b/host/include/uhd/rfnoc/constants.hpp @@ -9,6 +9,7 @@ #define INCLUDED_LIBUHD_RFNOC_CONSTANTS_HPP #include +#include #include #include #include @@ -21,11 +22,9 @@ static const std::string XML_DEFAULT_PATH = "share/uhd/rfnoc"; //! The name of the environment variable storing the bath to the block definition files 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 = 6; -static const size_t NOC_SHELL_COMPAT_MINOR = 0; +static const uint64_t DEFAULT_NOC_ID_64 = 0xFFFFFFFFFFFFFFFF; +static const size_t NOC_SHELL_COMPAT_MAJOR = 5; +static const size_t NOC_SHELL_COMPAT_MINOR = 1; static const size_t MAX_PACKET_SIZE = 8000; // bytes static const size_t DEFAULT_PACKET_SIZE = 1456; // bytes -- cgit v1.2.3