USRP Hardware Driver and USRP Manual  Version: 3.13.1.0-3
UHD and USRP Manual
null_block_ctrl.hpp
Go to the documentation of this file.
1 //
2 // Copyright 2014-2018 Ettus Research, a National Instruments Company
3 //
4 // SPDX-License-Identifier: GPL-3.0-or-later
5 //
6 
7 #ifndef INCLUDED_LIBUHD_RFNOC_NULL_BLOCK_CTRL_HPP
8 #define INCLUDED_LIBUHD_RFNOC_NULL_BLOCK_CTRL_HPP
9 
12 
13 namespace uhd {
14  namespace rfnoc {
15 
35 {
36 public:
37  // This macro must always be at the top of the public section in an RFNoC block class
39 
40 
41  static const uint32_t SR_LINES_PER_PACKET = 129;
43  static const uint32_t SR_LINE_RATE = 130;
45  static const uint32_t SR_ENABLE_STREAM = 131;
46 
47  static const size_t DEFAULT_LINES_PER_PACKET = 32;
48  static const size_t BYTES_PER_LINE = 8;
49 
51  // Note: This is 'cycles per line', so the bit rate is actually
52  // 64 times this value (byte/s is 8*rate etc.)
53  //
54  // Equivalent to writing to line_rate/value in the property tree.
55  //
56  // \param The rate you want to set this to
57  // \param The clock rate of this block's clock domain
58  // \returns the actual line rate (will find closest possible).
59  virtual double set_line_rate(double rate, double clock_rate=166.6e6) = 0;
60 
62  // from the property tree.
63  virtual double get_line_rate(double clock_rate=166.6e6) const = 0;
64 
65 }; /* class null_block_ctrl*/
66 
67 }} /* namespace uhd::rfnoc */
68 
69 #endif /* INCLUDED_LIBUHD_RFNOC_NULL_BLOCK_CTRL_HPP */
70 // vim: sw=4 et:
static const uint32_t SR_LINE_RATE
Set this register to number of cycles between producing a line.
Definition: null_block_ctrl.hpp:43
static const uint32_t SR_LINES_PER_PACKET
Set this register to number of lines per packet.
Definition: null_block_ctrl.hpp:41
#define UHD_RFNOC_BLOCK_OBJECT(class_name)
This macro must be put in the public section of an RFNoC.
Definition: block_ctrl_base.hpp:61
Definition: sink_block_ctrl_base.hpp:26
virtual double set_line_rate(double rate, double clock_rate=166.6e6)=0
Custom function to set the rate at which data is produced.
static const size_t DEFAULT_LINES_PER_PACKET
Definition: null_block_ctrl.hpp:47
Provide access to a 'null block'.
Definition: null_block_ctrl.hpp:34
Definition: build_info.hpp:14
Definition: source_block_ctrl_base.hpp:25
virtual double get_line_rate(double clock_rate=166.6e6) const =0
Return the current line rate. Equivalent to reading line_rate/value.
static const uint32_t SR_ENABLE_STREAM
Set this register to non-zero to start producing data.
Definition: null_block_ctrl.hpp:45
static const size_t BYTES_PER_LINE
Definition: null_block_ctrl.hpp:48