USRP Hardware Driver and USRP Manual Version: 4.2.0.0
UHD and USRP Manual
null_block_control.hpp
Go to the documentation of this file.
1//
2// Copyright 2019 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>
12
13namespace uhd { namespace rfnoc {
14
20{
21public:
23
24 enum port_type_t { SINK, SOURCE, LOOP };
25 enum count_type_t { LINES, PACKETS };
26
27 static const uint32_t REG_CTRL_STATUS;
28 static const uint32_t REG_SRC_LINES_PER_PKT;
29 static const uint32_t REG_SRC_BYTES_PER_PKT;
30 static const uint32_t REG_SRC_THROTTLE_CYC;
31 static const uint32_t REG_SNK_LINE_CNT_LO;
32 static const uint32_t REG_SNK_LINE_CNT_HI;
33 static const uint32_t REG_SNK_PKT_CNT_LO;
34 static const uint32_t REG_SNK_PKT_CNT_HI;
35 static const uint32_t REG_SRC_LINE_CNT_LO;
36 static const uint32_t REG_SRC_LINE_CNT_HI;
37 static const uint32_t REG_SRC_PKT_CNT_LO;
38 static const uint32_t REG_SRC_PKT_CNT_HI;
39 static const uint32_t REG_LOOP_LINE_CNT_LO;
40 static const uint32_t REG_LOOP_LINE_CNT_HI;
41 static const uint32_t REG_LOOP_PKT_CNT_LO;
42 static const uint32_t REG_LOOP_PKT_CNT_HI;
43
46 virtual void issue_stream_cmd(const uhd::stream_cmd_t& stream_cmd) = 0;
47
50 virtual void reset_counters() = 0;
51
56 virtual void set_bytes_per_packet(const uint32_t bpp) = 0;
57
63 virtual void set_throttle_cycles(const uint32_t cycs) = 0;
64
67 virtual uint32_t get_item_width() = 0;
68
71 virtual uint32_t get_nipc() = 0;
72
75 virtual uint32_t get_lines_per_packet() = 0;
76
79 virtual uint32_t get_bytes_per_packet() = 0;
80
83 virtual uint32_t get_throttle_cycles() = 0;
84
92 virtual uint64_t get_count(
93 const port_type_t port_type, const count_type_t count_type) = 0;
94};
95
96}} // namespace uhd::rfnoc
Definition: noc_block_base.hpp:43
Definition: null_block_control.hpp:20
virtual void issue_stream_cmd(const uhd::stream_cmd_t &stream_cmd)=0
virtual void reset_counters()=0
virtual void set_throttle_cycles(const uint32_t cycs)=0
static const uint32_t REG_SRC_PKT_CNT_LO
Definition: null_block_control.hpp:37
static const uint32_t REG_SRC_THROTTLE_CYC
Definition: null_block_control.hpp:30
virtual uint32_t get_throttle_cycles()=0
static const uint32_t REG_SRC_PKT_CNT_HI
Definition: null_block_control.hpp:38
static const uint32_t REG_SRC_LINE_CNT_HI
Definition: null_block_control.hpp:36
virtual uint64_t get_count(const port_type_t port_type, const count_type_t count_type)=0
virtual uint32_t get_nipc()=0
static const uint32_t REG_SRC_LINE_CNT_LO
Definition: null_block_control.hpp:35
static const uint32_t REG_SNK_LINE_CNT_HI
Definition: null_block_control.hpp:32
virtual uint32_t get_bytes_per_packet()=0
virtual void set_bytes_per_packet(const uint32_t bpp)=0
static const uint32_t REG_CTRL_STATUS
Definition: null_block_control.hpp:27
count_type_t
Definition: null_block_control.hpp:25
virtual uint32_t get_lines_per_packet()=0
virtual uint32_t get_item_width()=0
static const uint32_t REG_LOOP_LINE_CNT_HI
Definition: null_block_control.hpp:40
static const uint32_t REG_SRC_LINES_PER_PKT
Definition: null_block_control.hpp:28
port_type_t
Definition: null_block_control.hpp:24
static const uint32_t REG_LOOP_LINE_CNT_LO
Definition: null_block_control.hpp:39
static const uint32_t REG_LOOP_PKT_CNT_HI
Definition: null_block_control.hpp:42
static const uint32_t REG_SNK_PKT_CNT_HI
Definition: null_block_control.hpp:34
static const uint32_t REG_SRC_BYTES_PER_PKT
Definition: null_block_control.hpp:29
static const uint32_t REG_SNK_PKT_CNT_LO
Definition: null_block_control.hpp:33
static const uint32_t REG_LOOP_PKT_CNT_LO
Definition: null_block_control.hpp:41
static const uint32_t REG_SNK_LINE_CNT_LO
Definition: null_block_control.hpp:31
#define UHD_API
Definition: config.h:87
Definition: build_info.hpp:12
#define RFNOC_DECLARE_BLOCK(CLASS_NAME)
Definition: noc_block_base.hpp:22
Definition: stream_cmd.hpp:40