USRP Hardware Driver and USRP Manual  Version: 4.4.0.HEAD-0-g5fac246b
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>
11 #include <uhd/types/stream_cmd.hpp>
12 
13 namespace uhd { namespace rfnoc {
14 
20 {
21 public:
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::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_LINES_PER_PKT
static const uint32_t REG_SRC_LINES_PER_PKT
Definition: null_block_control.hpp:28
config.hpp
uhd::rfnoc::noc_block_base
Definition: noc_block_base.hpp:42
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_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_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_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_HI
static const uint32_t REG_LOOP_PKT_CNT_HI
Definition: null_block_control.hpp:42
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_LINE_CNT_HI
static const uint32_t REG_SRC_LINE_CNT_HI
Definition: null_block_control.hpp:36
UHD_API
#define UHD_API
Definition: config.h:87
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
Definition: null_block_control.hpp:19
uhd::rfnoc::null_block_control::count_type_t
count_type_t
Definition: null_block_control.hpp:25
stream_cmd.hpp
uhd::rfnoc::null_block_control::SOURCE
@ SOURCE
Definition: null_block_control.hpp:24
uhd
Definition: build_info.hpp:12
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::stream_cmd_t
Definition: stream_cmd.hpp:39
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
noc_block_base.hpp
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::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::port_type_t
port_type_t
Definition: null_block_control.hpp:24
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::REG_CTRL_STATUS
static const uint32_t REG_CTRL_STATUS
Definition: null_block_control.hpp:27
RFNOC_DECLARE_BLOCK
#define RFNOC_DECLARE_BLOCK(CLASS_NAME)
Definition: noc_block_base.hpp:22