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

Loading...
Searching...
No Matches
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>
10#include <uhd/rfnoc/noc_block_base.hpp>
11#include <uhd/types/stream_cmd.hpp>
12
13 namespace uhd { namespace rfnoc {
14
19 class UHD_API null_block_control : public noc_block_base
20{
21 public:
22 RFNOC_DECLARE_BLOCK(null_block_control)
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
uhd::rfnoc::noc_block_base::noc_block_base
noc_block_base(make_args_ptr make_args)
uhd::rfnoc::null_block_control
Definition null_block_control.hpp:20
uhd::rfnoc::null_block_control::issue_stream_cmd
virtual void issue_stream_cmd(const uhd::stream_cmd_t &stream_cmd)=0
uhd::rfnoc::null_block_control::reset_counters
virtual void reset_counters()=0
uhd::rfnoc::null_block_control::set_throttle_cycles
virtual void set_throttle_cycles(const uint32_t cycs)=0
uhd::rfnoc::null_block_control::REG_SRC_PKT_CNT_LO
static const uint32_t REG_SRC_PKT_CNT_LO
Definition null_block_control.hpp:37
uhd::rfnoc::null_block_control::REG_SRC_THROTTLE_CYC
static const uint32_t REG_SRC_THROTTLE_CYC
Definition null_block_control.hpp:30
uhd::rfnoc::null_block_control::get_throttle_cycles
virtual uint32_t get_throttle_cycles()=0
uhd::rfnoc::null_block_control::REG_SRC_PKT_CNT_HI
static const uint32_t REG_SRC_PKT_CNT_HI
Definition null_block_control.hpp:38
uhd::rfnoc::null_block_control::REG_SRC_LINE_CNT_HI
static const uint32_t REG_SRC_LINE_CNT_HI
Definition null_block_control.hpp:36
uhd::rfnoc::null_block_control::get_count
virtual uint64_t get_count(const port_type_t port_type, const count_type_t count_type)=0
uhd::rfnoc::null_block_control::get_nipc
virtual uint32_t get_nipc()=0
uhd::rfnoc::null_block_control::REG_SRC_LINE_CNT_LO
static const uint32_t REG_SRC_LINE_CNT_LO
Definition null_block_control.hpp:35
uhd::rfnoc::null_block_control::REG_SNK_LINE_CNT_HI
static const uint32_t REG_SNK_LINE_CNT_HI
Definition null_block_control.hpp:32
uhd::rfnoc::null_block_control::get_bytes_per_packet
virtual uint32_t get_bytes_per_packet()=0
uhd::rfnoc::null_block_control::set_bytes_per_packet
virtual void set_bytes_per_packet(const uint32_t bpp)=0
uhd::rfnoc::null_block_control::REG_CTRL_STATUS
static const uint32_t REG_CTRL_STATUS
Definition null_block_control.hpp:27
uhd::rfnoc::null_block_control::count_type_t
count_type_t
Definition null_block_control.hpp:25
uhd::rfnoc::null_block_control::PACKETS
@ PACKETS
Definition null_block_control.hpp:25
uhd::rfnoc::null_block_control::LINES
@ LINES
Definition null_block_control.hpp:25
uhd::rfnoc::null_block_control::get_lines_per_packet
virtual uint32_t get_lines_per_packet()=0
uhd::rfnoc::null_block_control::get_item_width
virtual uint32_t get_item_width()=0
uhd::rfnoc::null_block_control::REG_LOOP_LINE_CNT_HI
static const uint32_t REG_LOOP_LINE_CNT_HI
Definition null_block_control.hpp:40
uhd::rfnoc::null_block_control::REG_SRC_LINES_PER_PKT
static const uint32_t REG_SRC_LINES_PER_PKT
Definition null_block_control.hpp:28
uhd::rfnoc::null_block_control::port_type_t
port_type_t
Definition null_block_control.hpp:24
uhd::rfnoc::null_block_control::LOOP
@ LOOP
Definition null_block_control.hpp:24
uhd::rfnoc::null_block_control::SOURCE
@ SOURCE
Definition null_block_control.hpp:24
uhd::rfnoc::null_block_control::SINK
@ SINK
Definition null_block_control.hpp:24
uhd::rfnoc::null_block_control::REG_LOOP_LINE_CNT_LO
static const uint32_t REG_LOOP_LINE_CNT_LO
Definition null_block_control.hpp:39
uhd::rfnoc::null_block_control::REG_LOOP_PKT_CNT_HI
static const uint32_t REG_LOOP_PKT_CNT_HI
Definition null_block_control.hpp:42
uhd::rfnoc::null_block_control::REG_SNK_PKT_CNT_HI
static const uint32_t REG_SNK_PKT_CNT_HI
Definition null_block_control.hpp:34
uhd::rfnoc::null_block_control::REG_SRC_BYTES_PER_PKT
static const uint32_t REG_SRC_BYTES_PER_PKT
Definition null_block_control.hpp:29
uhd::rfnoc::null_block_control::REG_SNK_PKT_CNT_LO
static const uint32_t REG_SNK_PKT_CNT_LO
Definition null_block_control.hpp:33
uhd::rfnoc::null_block_control::REG_LOOP_PKT_CNT_LO
static const uint32_t REG_LOOP_PKT_CNT_LO
Definition null_block_control.hpp:41
uhd::rfnoc::null_block_control::REG_SNK_LINE_CNT_LO
static const uint32_t REG_SNK_LINE_CNT_LO
Definition null_block_control.hpp:31
UHD_API
#define UHD_API
Definition config.h:87
config.hpp
uhd::rfnoc
Definition actions.hpp:24
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
stream_cmd.hpp
uhd::stream_cmd_t
Definition stream_cmd.hpp:40