| USRP Hardware Driver and USRP Manual Version: 4.9.0.makepkg-0-g9ec1f582 UHD and USRP Manual |

Loading...
Searching...
No Matches
fosphor_block_control.hpp
Go to the documentation of this file.
1//
2// Copyright 2020 Ettus Research, a National Instruments Brand
3//
4// SPDX-License-Identifier: GPL-3.0-or-later
5//
6
7#pragma once
8
9#include <uhd/config.hpp>
10#include <uhd/rfnoc/noc_block_base.hpp>
11
12 namespace uhd { namespace rfnoc {
13
14 enum class fosphor_waterfall_mode { MAX_HOLD, AVERAGE };
15 enum class fosphor_waterfall_predivision_ratio {
16 RATIO_1_1,
17 RATIO_1_8,
18 RATIO_1_64,
19 RATIO_1_256
20};
21
99 class UHD_API fosphor_block_control : public noc_block_base
100{
101 public:
102 RFNOC_DECLARE_BLOCK(fosphor_block_control)
103
104 // Block registers
105 static const uint32_t REG_ENABLE_ADDR;
106 static const uint32_t REG_CLEAR_ADDR;
107 static const uint32_t REG_RANDOM_ADDR;
108 static const uint32_t REG_DECIM_ADDR;
109 static const uint32_t REG_OFFSET_ADDR;
110 static const uint32_t REG_SCALE_ADDR;
111 static const uint32_t REG_TRISE_ADDR;
112 static const uint32_t REG_TDECAY_ADDR;
113 static const uint32_t REG_ALPHA_ADDR;
114 static const uint32_t REG_EPSILON_ADDR;
115 static const uint32_t REG_WF_CTRL_ADDR;
116 static const uint32_t REG_WF_DECIM_ADDR;
117
124 virtual void set_enable_histogram(const bool enable_histogram) = 0;
125
132 virtual bool get_enable_histogram() const = 0;
133
140 virtual void set_enable_waterfall(const bool enable_waterfall) = 0;
141
148 virtual bool get_enable_waterfall() const = 0;
149
155 virtual void clear_history() = 0;
156
164 virtual void set_enable_dither(const bool enable_dither) = 0;
165
172 virtual bool get_enable_dither() const = 0;
173
181 virtual void set_enable_noise(const bool enable_noise) = 0;
182
189 virtual bool get_enable_noise() const = 0;
190
201 virtual void set_histogram_decimation(const uint16_t decimation) = 0;
202
209 virtual uint16_t get_histogram_decimation() const = 0;
210
218 virtual void set_histogram_offset(const uint16_t offset) = 0;
219
226 virtual uint16_t get_histogram_offset() const = 0;
227
235 virtual void set_histogram_scale(const uint16_t scale) = 0;
236
243 virtual uint16_t get_histogram_scale() const = 0;
244
256 virtual void set_histogram_rise_rate(const uint16_t rise_rate) = 0;
257
264 virtual uint16_t get_histogram_rise_rate() const = 0;
265
277 virtual void set_histogram_decay_rate(const uint16_t decay_rate) = 0;
278
285 virtual uint16_t get_histogram_decay_rate() const = 0;
286
296 virtual void set_spectrum_alpha(const uint16_t alpha) = 0;
297
305 virtual uint16_t get_spectrum_alpha() const = 0;
306
315 virtual void set_spectrum_max_hold_decay(const uint16_t epsilon) = 0;
316
324 virtual uint16_t get_spectrum_max_hold_decay() const = 0;
325
332 virtual void set_waterfall_predivision(
333 const fosphor_waterfall_predivision_ratio waterfall_predivision) = 0;
334
341 virtual fosphor_waterfall_predivision_ratio get_waterfall_predivision() const = 0;
342
354 virtual void set_waterfall_mode(const fosphor_waterfall_mode waterfall_mode) = 0;
355
362 virtual fosphor_waterfall_mode get_waterfall_mode() const = 0;
363
373 virtual void set_waterfall_decimation(const uint16_t waterfall_decimation) = 0;
374
381 virtual uint16_t get_waterfall_decimation() const = 0;
382};
383
384}} // namespace uhd::rfnoc
uhd::rfnoc::fosphor_block_control
Definition fosphor_block_control.hpp:100
uhd::rfnoc::fosphor_block_control::set_waterfall_mode
virtual void set_waterfall_mode(const fosphor_waterfall_mode waterfall_mode)=0
uhd::rfnoc::fosphor_block_control::REG_SCALE_ADDR
static const uint32_t REG_SCALE_ADDR
Definition fosphor_block_control.hpp:110
uhd::rfnoc::fosphor_block_control::set_enable_waterfall
virtual void set_enable_waterfall(const bool enable_waterfall)=0
uhd::rfnoc::fosphor_block_control::set_histogram_rise_rate
virtual void set_histogram_rise_rate(const uint16_t rise_rate)=0
uhd::rfnoc::fosphor_block_control::set_waterfall_decimation
virtual void set_waterfall_decimation(const uint16_t waterfall_decimation)=0
uhd::rfnoc::fosphor_block_control::get_histogram_offset
virtual uint16_t get_histogram_offset() const =0
uhd::rfnoc::fosphor_block_control::REG_TDECAY_ADDR
static const uint32_t REG_TDECAY_ADDR
Definition fosphor_block_control.hpp:112
uhd::rfnoc::fosphor_block_control::REG_OFFSET_ADDR
static const uint32_t REG_OFFSET_ADDR
Definition fosphor_block_control.hpp:109
uhd::rfnoc::fosphor_block_control::get_histogram_decimation
virtual uint16_t get_histogram_decimation() const =0
uhd::rfnoc::fosphor_block_control::get_histogram_rise_rate
virtual uint16_t get_histogram_rise_rate() const =0
uhd::rfnoc::fosphor_block_control::set_histogram_decay_rate
virtual void set_histogram_decay_rate(const uint16_t decay_rate)=0
uhd::rfnoc::fosphor_block_control::get_waterfall_predivision
virtual fosphor_waterfall_predivision_ratio get_waterfall_predivision() const =0
uhd::rfnoc::fosphor_block_control::get_waterfall_decimation
virtual uint16_t get_waterfall_decimation() const =0
uhd::rfnoc::fosphor_block_control::set_enable_histogram
virtual void set_enable_histogram(const bool enable_histogram)=0
uhd::rfnoc::fosphor_block_control::set_histogram_decimation
virtual void set_histogram_decimation(const uint16_t decimation)=0
uhd::rfnoc::fosphor_block_control::get_waterfall_mode
virtual fosphor_waterfall_mode get_waterfall_mode() const =0
uhd::rfnoc::fosphor_block_control::clear_history
virtual void clear_history()=0
uhd::rfnoc::fosphor_block_control::get_enable_histogram
virtual bool get_enable_histogram() const =0
uhd::rfnoc::fosphor_block_control::REG_CLEAR_ADDR
static const uint32_t REG_CLEAR_ADDR
Definition fosphor_block_control.hpp:106
uhd::rfnoc::fosphor_block_control::set_spectrum_max_hold_decay
virtual void set_spectrum_max_hold_decay(const uint16_t epsilon)=0
uhd::rfnoc::fosphor_block_control::set_histogram_scale
virtual void set_histogram_scale(const uint16_t scale)=0
uhd::rfnoc::fosphor_block_control::get_histogram_decay_rate
virtual uint16_t get_histogram_decay_rate() const =0
uhd::rfnoc::fosphor_block_control::REG_WF_CTRL_ADDR
static const uint32_t REG_WF_CTRL_ADDR
Definition fosphor_block_control.hpp:115
uhd::rfnoc::fosphor_block_control::get_enable_waterfall
virtual bool get_enable_waterfall() const =0
uhd::rfnoc::fosphor_block_control::set_spectrum_alpha
virtual void set_spectrum_alpha(const uint16_t alpha)=0
uhd::rfnoc::fosphor_block_control::REG_EPSILON_ADDR
static const uint32_t REG_EPSILON_ADDR
Definition fosphor_block_control.hpp:114
uhd::rfnoc::fosphor_block_control::set_histogram_offset
virtual void set_histogram_offset(const uint16_t offset)=0
uhd::rfnoc::fosphor_block_control::set_waterfall_predivision
virtual void set_waterfall_predivision(const fosphor_waterfall_predivision_ratio waterfall_predivision)=0
uhd::rfnoc::fosphor_block_control::set_enable_noise
virtual void set_enable_noise(const bool enable_noise)=0
uhd::rfnoc::fosphor_block_control::get_spectrum_alpha
virtual uint16_t get_spectrum_alpha() const =0
uhd::rfnoc::fosphor_block_control::REG_WF_DECIM_ADDR
static const uint32_t REG_WF_DECIM_ADDR
Definition fosphor_block_control.hpp:116
uhd::rfnoc::fosphor_block_control::REG_RANDOM_ADDR
static const uint32_t REG_RANDOM_ADDR
Definition fosphor_block_control.hpp:107
uhd::rfnoc::fosphor_block_control::get_enable_dither
virtual bool get_enable_dither() const =0
uhd::rfnoc::fosphor_block_control::set_enable_dither
virtual void set_enable_dither(const bool enable_dither)=0
uhd::rfnoc::fosphor_block_control::REG_ALPHA_ADDR
static const uint32_t REG_ALPHA_ADDR
Definition fosphor_block_control.hpp:113
uhd::rfnoc::fosphor_block_control::REG_ENABLE_ADDR
static const uint32_t REG_ENABLE_ADDR
Definition fosphor_block_control.hpp:105
uhd::rfnoc::fosphor_block_control::get_histogram_scale
virtual uint16_t get_histogram_scale() const =0
uhd::rfnoc::fosphor_block_control::get_enable_noise
virtual bool get_enable_noise() const =0
uhd::rfnoc::fosphor_block_control::REG_TRISE_ADDR
static const uint32_t REG_TRISE_ADDR
Definition fosphor_block_control.hpp:111
uhd::rfnoc::fosphor_block_control::get_spectrum_max_hold_decay
virtual uint16_t get_spectrum_max_hold_decay() const =0
uhd::rfnoc::fosphor_block_control::REG_DECIM_ADDR
static const uint32_t REG_DECIM_ADDR
Definition fosphor_block_control.hpp:108
uhd::rfnoc::noc_block_base::noc_block_base
noc_block_base(make_args_ptr make_args)
UHD_API
#define UHD_API
Definition config.h:87
config.hpp
uhd::rfnoc
Definition actions.hpp:24
uhd::rfnoc::fosphor_waterfall_predivision_ratio
fosphor_waterfall_predivision_ratio
Definition fosphor_block_control.hpp:15
uhd::rfnoc::fosphor_waterfall_predivision_ratio::RATIO_1_8
@ RATIO_1_8
Definition fosphor_block_control.hpp:17
uhd::rfnoc::fosphor_waterfall_predivision_ratio::RATIO_1_256
@ RATIO_1_256
Definition fosphor_block_control.hpp:19
uhd::rfnoc::fosphor_waterfall_predivision_ratio::RATIO_1_1
@ RATIO_1_1
Definition fosphor_block_control.hpp:16
uhd::rfnoc::fosphor_waterfall_predivision_ratio::RATIO_1_64
@ RATIO_1_64
Definition fosphor_block_control.hpp:18
uhd::rfnoc::fosphor_waterfall_mode
fosphor_waterfall_mode
Definition fosphor_block_control.hpp:14
uhd::rfnoc::fosphor_waterfall_mode::AVERAGE
@ AVERAGE
Definition fosphor_block_control.hpp:14
uhd::rfnoc::fosphor_waterfall_mode::MAX_HOLD
@ MAX_HOLD
Definition fosphor_block_control.hpp:14
uhd
Definition build_info.hpp:12
noc_block_base.hpp
RFNOC_DECLARE_BLOCK
#define RFNOC_DECLARE_BLOCK(CLASS_NAME)
Definition noc_block_base.hpp:22