USRP Hardware Driver and USRP Manual Version: 4.1.0.1
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
16{
17public:
19
20 enum port_type_t { SINK, SOURCE, LOOP };
21 enum count_type_t { LINES, PACKETS };
22
23 static const uint32_t REG_CTRL_STATUS;
24 static const uint32_t REG_SRC_LINES_PER_PKT;
25 static const uint32_t REG_SRC_BYTES_PER_PKT;
26 static const uint32_t REG_SRC_THROTTLE_CYC;
27 static const uint32_t REG_SNK_LINE_CNT_LO;
28 static const uint32_t REG_SNK_LINE_CNT_HI;
29 static const uint32_t REG_SNK_PKT_CNT_LO;
30 static const uint32_t REG_SNK_PKT_CNT_HI;
31 static const uint32_t REG_SRC_LINE_CNT_LO;
32 static const uint32_t REG_SRC_LINE_CNT_HI;
33 static const uint32_t REG_SRC_PKT_CNT_LO;
34 static const uint32_t REG_SRC_PKT_CNT_HI;
35 static const uint32_t REG_LOOP_LINE_CNT_LO;
36 static const uint32_t REG_LOOP_LINE_CNT_HI;
37 static const uint32_t REG_LOOP_PKT_CNT_LO;
38 static const uint32_t REG_LOOP_PKT_CNT_HI;
39
42 virtual void issue_stream_cmd(const uhd::stream_cmd_t& stream_cmd) = 0;
43
46 virtual void reset_counters() = 0;
47
52 virtual void set_bytes_per_packet(const uint32_t bpp) = 0;
53
59 virtual void set_throttle_cycles(const uint32_t cycs) = 0;
60
63 virtual uint32_t get_item_width() = 0;
64
67 virtual uint32_t get_nipc() = 0;
68
71 virtual uint32_t get_lines_per_packet() = 0;
72
75 virtual uint32_t get_bytes_per_packet() = 0;
76
79 virtual uint32_t get_throttle_cycles() = 0;
80
88 virtual uint64_t get_count(
89 const port_type_t port_type, const count_type_t count_type) = 0;
90};
91
92}} // namespace uhd::rfnoc
Definition: noc_block_base.hpp:42
Definition: null_block_control.hpp:16
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:33
static const uint32_t REG_SRC_THROTTLE_CYC
Definition: null_block_control.hpp:26
virtual uint32_t get_throttle_cycles()=0
static const uint32_t REG_SRC_PKT_CNT_HI
Definition: null_block_control.hpp:34
static const uint32_t REG_SRC_LINE_CNT_HI
Definition: null_block_control.hpp:32
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:31
static const uint32_t REG_SNK_LINE_CNT_HI
Definition: null_block_control.hpp:28
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:23
count_type_t
Definition: null_block_control.hpp:21
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:36
static const uint32_t REG_SRC_LINES_PER_PKT
Definition: null_block_control.hpp:24
port_type_t
Definition: null_block_control.hpp:20
static const uint32_t REG_LOOP_LINE_CNT_LO
Definition: null_block_control.hpp:35
static const uint32_t REG_LOOP_PKT_CNT_HI
Definition: null_block_control.hpp:38
static const uint32_t REG_SNK_PKT_CNT_HI
Definition: null_block_control.hpp:30
static const uint32_t REG_SRC_BYTES_PER_PKT
Definition: null_block_control.hpp:25
static const uint32_t REG_SNK_PKT_CNT_LO
Definition: null_block_control.hpp:29
static const uint32_t REG_LOOP_PKT_CNT_LO
Definition: null_block_control.hpp:37
static const uint32_t REG_SNK_LINE_CNT_LO
Definition: null_block_control.hpp:27
#define UHD_API
Definition: config.h:70
Definition: build_info.hpp:12
#define RFNOC_DECLARE_BLOCK(CLASS_NAME)
Definition: noc_block_base.hpp:21
Definition: stream_cmd.hpp:40