#include <uhd/rfnoc/chdr_types.hpp>
|
| | ctrl_payload ()=default |
| | ctrl_payload (const ctrl_payload &rhs)=default |
| | ctrl_payload (ctrl_payload &&rhs)=default |
| ctrl_payload & | operator= (const ctrl_payload &rhs)=default |
| void | populate_header (chdr_header &header) const |
| | Populate the header for this type of packet.
|
| size_t | serialize (uint32_t *buff, size_t max_size_bytes, const std::function< uint32_t(uint32_t)> &conv_byte_order) const |
| | Serialize the payload to a uint32_t buffer.
|
| template<endianness_t endianness> |
| size_t | serialize (uint32_t *buff, size_t max_size_bytes) const |
| | Serialize the payload to a uint32_t buffer (no conversion function).
|
| void | deserialize (const uint32_t *buff, size_t buff_size, const std::function< uint32_t(uint32_t)> &conv_byte_order) |
| | Deserialize the payload from a uint32_t buffer.
|
| template<endianness_t endianness> |
| void | deserialize (const uint32_t *buff, size_t buff_size) |
| | Deserialize the payload from a uint32_t buffer (no conversion function).
|
| size_t | get_length () const |
| | Get the serialized size of this payload in bytes.
|
| bool | has_timestamp () const |
| bool | is_read_request () const |
| bool | is_write_response () const |
| bool | is_read_response () const |
| bool | operator== (const ctrl_payload &rhs) const |
| | Comparison operator (==).
|
| bool | operator!= (const ctrl_payload &rhs) const |
| | Comparison operator (!=).
|
| std::string | to_string () const |
| | Return a string representation of this object.
|
|
| uint16_t | dst_port = 0 |
| | Destination port for transaction (10 bits).
|
| uint16_t | src_port = 0 |
| | Source port for transaction (10 bits).
|
| uint8_t | seq_num = 0 |
| | Sequence number (8 bits).
|
| std::optional< uint64_t > | timestamp {} |
| | Has Time Flag (1 bit) and timestamp (64 bits).
|
| bool | is_ack = false |
| | Is Acknowledgment Flag (1 bit).
|
| uint16_t | src_epid = 0 |
| | Source endpoint ID of transaction (16 bits).
|
| uint32_t | address = 0 |
| | Address for transaction (20 bits).
|
| std::vector< uint32_t > | data_vtr = {0} |
| | Data for transaction (vector of 32 bits).
|
| size_t | num_data = 1 |
| | Number of 32-bit data words present in the packet (4 bits).
|
| size_t | req_size = 0 |
| | Number of 32-bit data words requested (4 bits).
|
| uint8_t | byte_enable = 0xF |
| | Byte-enable mask for transaction (4 bits).
|
| ctrl_opcode_t | op_code = OP_SLEEP |
| | Operation code (4 bits).
|
| ctrl_status_t | status = CMD_OKAY |
| | Transaction status (4 bits).
|
|
| static constexpr size_t | MAX_DATA_WORDS = (size_t(1) << NUM_DATA_WIDTH) - 1 |
| | Maximum number of 32-bit data words in a CTRL payload.
|
◆ ctrl_payload() [1/3]
| uhd::rfnoc::chdr::ctrl_payload::ctrl_payload |
( |
| ) |
|
|
default |
◆ ctrl_payload() [2/3]
| uhd::rfnoc::chdr::ctrl_payload::ctrl_payload |
( |
const ctrl_payload & | rhs | ) |
|
|
default |
◆ ctrl_payload() [3/3]
| uhd::rfnoc::chdr::ctrl_payload::ctrl_payload |
( |
ctrl_payload && | rhs | ) |
|
|
default |
◆ deserialize() [1/2]
template<endianness_t endianness>
| void uhd::rfnoc::chdr::ctrl_payload::deserialize |
( |
const uint32_t * | buff, |
|
|
size_t | buff_size ) |
|
inline |
Deserialize the payload from a uint32_t buffer (no conversion function).
- Parameters
-
| buff | Buffer to deserialize the payload from |
| buff_size | Number of elements in the buffer |
◆ deserialize() [2/2]
| void uhd::rfnoc::chdr::ctrl_payload::deserialize |
( |
const uint32_t * | buff, |
|
|
size_t | buff_size, |
|
|
const std::function< uint32_t(uint32_t)> & | conv_byte_order ) |
Deserialize the payload from a uint32_t buffer.
- Parameters
-
| buff | Buffer to deserialize the payload from |
| buff_size | Number of elements in the buffer |
| conv_byte_order | Byte order converter function (buffer to host endianness) |
◆ get_length()
| size_t uhd::rfnoc::chdr::ctrl_payload::get_length |
( |
| ) |
const |
Get the serialized size of this payload in bytes.
◆ has_timestamp()
| bool uhd::rfnoc::chdr::ctrl_payload::has_timestamp |
( |
| ) |
const |
|
inline |
◆ is_read_request()
| bool uhd::rfnoc::chdr::ctrl_payload::is_read_request |
( |
| ) |
const |
|
inline |
Returns true if this is a read request (OP_READ or OP_BLOCK_READ, not an ACK). For such packets, req_size in the header encodes the requested word count, and num_data is 0 since no data beats are transmitted on the wire.
◆ is_read_response()
| bool uhd::rfnoc::chdr::ctrl_payload::is_read_response |
( |
| ) |
const |
|
inline |
Returns true if this is a read ACK (OP_READ or OP_BLOCK_READ, with is_ack set). For such packets, data beats are transmitted on the wire.
◆ is_write_response()
| bool uhd::rfnoc::chdr::ctrl_payload::is_write_response |
( |
| ) |
const |
|
inline |
Returns true if this is a write ACK (OP_WRITE, OP_BLOCK_WRITE, or OP_SLEEP, with is_ack set). For such packets, no data beats are transmitted on the wire.
◆ operator!=()
| bool uhd::rfnoc::chdr::ctrl_payload::operator!= |
( |
const ctrl_payload & | rhs | ) |
const |
|
inline |
Comparison operator (!=).
◆ operator=()
◆ operator==()
| bool uhd::rfnoc::chdr::ctrl_payload::operator== |
( |
const ctrl_payload & | rhs | ) |
const |
Comparison operator (==).
◆ populate_header()
| void uhd::rfnoc::chdr::ctrl_payload::populate_header |
( |
chdr_header & | header | ) |
const |
Populate the header for this type of packet.
◆ serialize() [1/2]
template<endianness_t endianness>
| size_t uhd::rfnoc::chdr::ctrl_payload::serialize |
( |
uint32_t * | buff, |
|
|
size_t | max_size_bytes ) const |
|
inline |
Serialize the payload to a uint32_t buffer (no conversion function).
◆ serialize() [2/2]
| size_t uhd::rfnoc::chdr::ctrl_payload::serialize |
( |
uint32_t * | buff, |
|
|
size_t | max_size_bytes, |
|
|
const std::function< uint32_t(uint32_t)> & | conv_byte_order ) const |
Serialize the payload to a uint32_t buffer.
◆ to_string()
| std::string uhd::rfnoc::chdr::ctrl_payload::to_string |
( |
| ) |
const |
Return a string representation of this object.
◆ address
| uint32_t uhd::rfnoc::chdr::ctrl_payload::address = 0 |
Address for transaction (20 bits).
◆ byte_enable
| uint8_t uhd::rfnoc::chdr::ctrl_payload::byte_enable = 0xF |
Byte-enable mask for transaction (4 bits).
◆ data_vtr
| std::vector<uint32_t> uhd::rfnoc::chdr::ctrl_payload::data_vtr = {0} |
Data for transaction (vector of 32 bits).
◆ dst_port
| uint16_t uhd::rfnoc::chdr::ctrl_payload::dst_port = 0 |
Destination port for transaction (10 bits).
◆ is_ack
| bool uhd::rfnoc::chdr::ctrl_payload::is_ack = false |
Is Acknowledgment Flag (1 bit).
◆ MAX_DATA_WORDS
| size_t uhd::rfnoc::chdr::ctrl_payload::MAX_DATA_WORDS = (size_t(1) << NUM_DATA_WIDTH) - 1 |
|
staticconstexpr |
Maximum number of 32-bit data words in a CTRL payload.
◆ num_data
| size_t uhd::rfnoc::chdr::ctrl_payload::num_data = 1 |
Number of 32-bit data words present in the packet (4 bits).
◆ op_code
◆ req_size
| size_t uhd::rfnoc::chdr::ctrl_payload::req_size = 0 |
Number of 32-bit data words requested (4 bits).
◆ seq_num
| uint8_t uhd::rfnoc::chdr::ctrl_payload::seq_num = 0 |
Sequence number (8 bits).
◆ src_epid
| uint16_t uhd::rfnoc::chdr::ctrl_payload::src_epid = 0 |
Source endpoint ID of transaction (16 bits).
◆ src_port
| uint16_t uhd::rfnoc::chdr::ctrl_payload::src_port = 0 |
Source port for transaction (10 bits).
◆ status
Transaction status (4 bits).
◆ timestamp
| std::optional<uint64_t> uhd::rfnoc::chdr::ctrl_payload::timestamp {} |
Has Time Flag (1 bit) and timestamp (64 bits).
The documentation for this class was generated from the following file: