diff options
author | Martin Braun <martin.braun@ettus.com> | 2019-05-30 14:21:41 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2019-11-26 11:49:18 -0800 |
commit | 6ec8cf3eeac70d4458ad7a4f7f1eea4f082c140d (patch) | |
tree | b85288ac4916432aba5ff287acaac0e014c36b0f /host/include | |
parent | 36853315741aaba41af91cca93c742a6171ae46d (diff) | |
download | uhd-6ec8cf3eeac70d4458ad7a4f7f1eea4f082c140d.tar.gz uhd-6ec8cf3eeac70d4458ad7a4f7f1eea4f082c140d.tar.bz2 uhd-6ec8cf3eeac70d4458ad7a4f7f1eea4f082c140d.zip |
rfnoc: Add default block controller
The default block controller should get instantiated when no other
suitable block controller can be found.
Diffstat (limited to 'host/include')
-rw-r--r-- | host/include/uhd/rfnoc/CMakeLists.txt | 1 | ||||
-rw-r--r-- | host/include/uhd/rfnoc/block_control.hpp | 25 | ||||
-rw-r--r-- | host/include/uhd/rfnoc/constants.hpp | 9 |
3 files changed, 30 insertions, 5 deletions
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 <uhd/config.hpp> +#include <uhd/rfnoc/noc_block_base.hpp> + +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 <uhd/types/dict.hpp> +#include <uhd/rfnoc/defaults.hpp> #include <stdint.h> #include <boost/assign/list_of.hpp> #include <string> @@ -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 |