10 #include <uhd/types/endianness.hpp>
21 namespace uhd {
namespace rfnoc {
namespace chdr {
49 return get_field<uint8_t>(_flat_hdr, VC_OFFSET, VC_WIDTH);
55 _flat_hdr = set_field(_flat_hdr, vc, VC_OFFSET, VC_WIDTH);
61 return get_field<bool>(_flat_hdr, EOB_OFFSET, EOB_WIDTH);
67 _flat_hdr = set_field(_flat_hdr, eob, EOB_OFFSET, EOB_WIDTH);
73 return get_field<bool>(_flat_hdr, EOV_OFFSET, EOV_WIDTH);
79 _flat_hdr = set_field(_flat_hdr, eov, EOV_OFFSET, EOV_WIDTH);
85 return get_field<packet_type_t>(_flat_hdr, PKT_TYPE_OFFSET, PKT_TYPE_WIDTH);
91 _flat_hdr = set_field(_flat_hdr, pkt_type, PKT_TYPE_OFFSET, PKT_TYPE_WIDTH);
97 return get_field<uint8_t>(_flat_hdr, NUM_MDATA_OFFSET, NUM_MDATA_WIDTH);
103 _flat_hdr = set_field(_flat_hdr, num_mdata, NUM_MDATA_OFFSET, NUM_MDATA_WIDTH);
109 return get_field<uint16_t>(_flat_hdr, SEQ_NUM_OFFSET, SEQ_NUM_WIDTH);
115 _flat_hdr = set_field(_flat_hdr, seq_num, SEQ_NUM_OFFSET, SEQ_NUM_WIDTH);
121 return get_field<uint16_t>(_flat_hdr, LENGTH_OFFSET, LENGTH_WIDTH);
127 _flat_hdr = set_field(_flat_hdr, length, LENGTH_OFFSET, LENGTH_WIDTH);
133 return get_field<uint16_t>(_flat_hdr, DST_EPID_OFFSET, DST_EPID_WIDTH);
139 _flat_hdr = set_field(_flat_hdr, dst_epid, DST_EPID_OFFSET, DST_EPID_WIDTH);
149 inline operator uint64_t()
const
157 return _flat_hdr == rhs._flat_hdr;
163 return _flat_hdr != rhs._flat_hdr;
169 _flat_hdr = rhs._flat_hdr;
185 uint64_t _flat_hdr = 0;
187 static constexpr
size_t VC_WIDTH = 6;
188 static constexpr
size_t EOB_WIDTH = 1;
189 static constexpr
size_t EOV_WIDTH = 1;
190 static constexpr
size_t PKT_TYPE_WIDTH = 3;
191 static constexpr
size_t NUM_MDATA_WIDTH = 5;
192 static constexpr
size_t SEQ_NUM_WIDTH = 16;
193 static constexpr
size_t LENGTH_WIDTH = 16;
194 static constexpr
size_t DST_EPID_WIDTH = 16;
196 static constexpr
size_t VC_OFFSET = 58;
197 static constexpr
size_t EOB_OFFSET = 57;
198 static constexpr
size_t EOV_OFFSET = 56;
199 static constexpr
size_t PKT_TYPE_OFFSET = 53;
200 static constexpr
size_t NUM_MDATA_OFFSET = 48;
201 static constexpr
size_t SEQ_NUM_OFFSET = 32;
202 static constexpr
size_t LENGTH_OFFSET = 16;
203 static constexpr
size_t DST_EPID_OFFSET = 0;
205 static inline uint64_t
mask(
const size_t width)
207 return ((uint64_t(1) <<
width) - 1);
210 template <
typename field_t>
211 static inline field_t get_field(
212 const uint64_t flat_hdr,
const size_t offset,
const size_t width)
214 return static_cast<field_t
>((flat_hdr >> offset) &
mask(
width));
217 template <
typename field_t>
218 static inline uint64_t set_field(
const uint64_t old_val,
223 return (old_val & ~(
mask(
width) << offset))
224 | ((
static_cast<uint64_t
>(field) &
mask(
width)) << offset);
260 uint16_t dst_port = 0;
262 uint16_t src_port = 0;
266 std::optional<uint64_t> timestamp{};
270 uint16_t src_epid = 0;
272 uint32_t address = 0;
274 std::vector<uint32_t> data_vtr = {0};
280 uint8_t byte_enable = 0xF;
298 size_t max_size_bytes,
299 const std::function<uint32_t(uint32_t)>& conv_byte_order)
const;
302 template <endianness_t endianness>
303 size_t serialize(uint32_t* buff,
size_t max_size_bytes)
const
305 auto conv_byte_order = [](uint32_t x) -> uint32_t {
306 return (endianness == uhd::ENDIANNESS_BIG) ? uhd::htonx<uint32_t>(x)
307 : uhd::htowx<uint32_t>(x);
309 return serialize(buff, max_size_bytes, conv_byte_order);
320 const std::function<uint32_t(uint32_t)>& conv_byte_order);
327 template <endianness_t endianness>
330 auto conv_byte_order = [](uint32_t x) -> uint32_t {
331 return (endianness == uhd::ENDIANNESS_BIG) ? uhd::ntohx<uint32_t>(x)
332 : uhd::wtohx<uint32_t>(x);
334 deserialize(buff, buff_size, conv_byte_order);
343 return bool(timestamp);
378 return !(*
this == rhs);
385 static constexpr
size_t DST_PORT_WIDTH = 10;
386 static constexpr
size_t SRC_PORT_WIDTH = 10;
387 static constexpr
size_t NUM_DATA_WIDTH = 4;
388 static constexpr
size_t REQ_SIZE_WIDTH = 4;
389 static constexpr
size_t SEQ_NUM_WIDTH = 8;
390 static constexpr
size_t HAS_TIME_WIDTH = 1;
391 static constexpr
size_t IS_ACK_WIDTH = 1;
392 static constexpr
size_t SRC_EPID_WIDTH = 16;
393 static constexpr
size_t ADDRESS_WIDTH = 20;
394 static constexpr
size_t BYTE_ENABLE_WIDTH = 4;
395 static constexpr
size_t OPCODE_WIDTH = 4;
396 static constexpr
size_t STATUS_WIDTH = 2;
400 static constexpr
size_t DST_PORT_OFFSET = 0;
401 static constexpr
size_t NUM_DATA_OFFSET = 10;
402 static constexpr
size_t HAS_TIME_OFFSET = 14;
403 static constexpr
size_t IS_ACK_OFFSET = 15;
404 static constexpr
size_t SRC_EPID_OFFSET = 16;
406 static constexpr
size_t SRC_PORT_OFFSET = 0;
407 static constexpr
size_t SEQ_NUM_OFFSET = 20;
408 static constexpr
size_t REQ_SIZE_OFFSET = 28;
410 static constexpr
size_t ADDRESS_OFFSET = 0;
411 static constexpr
size_t BYTE_ENABLE_OFFSET = 20;
412 static constexpr
size_t OPCODE_OFFSET = 24;
413 static constexpr
size_t STATUS_OFFSET = 30;
417 static constexpr
size_t MAX_DATA_WORDS = (size_t(1) << NUM_DATA_WIDTH) - 1;
436 uint16_t src_epid = 0;
440 uint64_t capacity_bytes = 0;
442 uint32_t capacity_pkts = 0;
444 uint64_t xfer_count_bytes = 0;
446 uint64_t xfer_count_pkts = 0;
448 uint16_t buff_info = 0;
465 uint16_t expected_seq_num : 16;
467 uint16_t reserved_1 : 9;
468 bool stop_on_seq_error_enabled : 1;
469 bool seq_error_occoured : 1;
493 size_t max_size_bytes,
494 const std::function<uint64_t(uint64_t)>& conv_byte_order)
const;
497 template <endianness_t endianness>
498 size_t serialize(uint64_t* buff,
size_t max_size_bytes)
const
500 auto conv_byte_order = [](uint64_t x) -> uint64_t {
501 return (endianness == uhd::ENDIANNESS_BIG) ? uhd::htonx<uint64_t>(x)
502 : uhd::htowx<uint64_t>(x);
504 return serialize(buff, max_size_bytes, conv_byte_order);
515 const std::function<uint64_t(uint64_t)>& conv_byte_order);
522 template <endianness_t endianness>
525 auto conv_byte_order = [](uint64_t x) -> uint64_t {
526 return (endianness == uhd::ENDIANNESS_BIG) ? uhd::ntohx<uint64_t>(x)
527 : uhd::wtohx<uint64_t>(x);
529 deserialize(buff, buff_size, conv_byte_order);
541 return !(*
this == rhs);
548 static constexpr
size_t SRC_EPID_WIDTH = 16;
549 static constexpr
size_t STATUS_WIDTH = 4;
550 static constexpr
size_t CAPACITY_BYTES_WIDTH = 40;
551 static constexpr
size_t CAPACITY_PKTS_WIDTH = 24;
552 static constexpr
size_t XFER_COUNT_PKTS_WIDTH = 40;
553 static constexpr
size_t BUFF_INFO_WIDTH = 16;
554 static constexpr
size_t STATUS_INFO_WIDTH = 48;
557 static constexpr
size_t SRC_EPID_OFFSET = 0;
558 static constexpr
size_t STATUS_OFFSET = 16;
559 static constexpr
size_t CAPACITY_BYTES_OFFSET = 24;
560 static constexpr
size_t CAPACITY_PKTS_OFFSET = 0;
561 static constexpr
size_t XFER_COUNT_PKTS_OFFSET = 24;
562 static constexpr
size_t BUFF_INFO_OFFSET = 0;
563 static constexpr
size_t STATUS_INFO_OFFSET = 16;
580 uint16_t src_epid = 0;
586 uint64_t num_pkts = 0;
588 uint64_t num_bytes = 0;
590 static constexpr
size_t MAX_PACKET_SIZE = 128;
604 size_t max_size_bytes,
605 const std::function<uint64_t(uint64_t)>& conv_byte_order)
const;
608 template <endianness_t endianness>
609 size_t serialize(uint64_t* buff,
size_t max_size_bytes)
const
611 auto conv_byte_order = [](uint64_t x) -> uint64_t {
612 return (endianness == uhd::ENDIANNESS_BIG) ? uhd::htonx<uint64_t>(x)
613 : uhd::htowx<uint64_t>(x);
615 return serialize(buff, max_size_bytes, conv_byte_order);
626 const std::function<uint64_t(uint64_t)>& conv_byte_order);
633 template <endianness_t endianness>
636 auto conv_byte_order = [](uint64_t x) -> uint64_t {
637 return (endianness == uhd::ENDIANNESS_BIG) ? uhd::ntohx<uint64_t>(x)
638 : uhd::wtohx<uint64_t>(x);
640 deserialize(buff, buff_size, conv_byte_order);
652 return !(*
this == rhs);
659 static constexpr
size_t SRC_EPID_WIDTH = 16;
660 static constexpr
size_t OP_CODE_WIDTH = 4;
661 static constexpr
size_t OP_DATA_WIDTH = 4;
662 static constexpr
size_t NUM_PKTS_WIDTH = 40;
665 static constexpr
size_t SRC_EPID_OFFSET = 0;
666 static constexpr
size_t OP_CODE_OFFSET = 16;
667 static constexpr
size_t OP_DATA_OFFSET = 20;
668 static constexpr
size_t NUM_PKTS_OFFSET = 24;
692 MGMT_OP_ADVERTISE = 1,
694 MGMT_OP_SEL_DEST = 2,
698 MGMT_OP_INFO_REQ = 4,
700 MGMT_OP_INFO_RESP = 5,
702 MGMT_OP_CFG_WR_REQ = 6,
704 MGMT_OP_CFG_RD_REQ = 7,
706 MGMT_OP_CFG_RD_RESP = 8
733 cfg_payload(uint16_t addr_, uint32_t data_ = 0) : addr(addr_), data(data_) {}
735 : addr(static_cast<uint16_t>(payload_ >> 0))
736 , data(static_cast<uint32_t>(payload_ >> 16))
757 : device_id(device_id_)
758 , node_type(node_type_)
759 , node_inst(node_inst_)
760 , ext_info(ext_info_)
764 : device_id(static_cast<uint16_t>(payload_ >> 0))
765 , node_type(static_cast<uint8_t>((payload_ >> 16) & 0xF))
766 , node_inst(static_cast<uint16_t>((payload_ >> 20) & 0x3FF))
767 , ext_info(static_cast<uint32_t>((payload_ >> 30) & 0x3FFFF))
772 return ((
static_cast<payload_t>(device_id) << 0)
773 | (
static_cast<payload_t>(node_type & 0xF) << 16)
774 | (
static_cast<payload_t>(node_inst & 0x3FF) << 20)
775 | (
static_cast<payload_t>(ext_info & 0x3FFFF) << 30));
781 const uint8_t ops_pending = 0)
782 : _op_code(op_code), _op_payload(op_payload), _ops_pending(ops_pending)
816 return (_op_code == rhs._op_code) && (_op_payload == rhs._op_payload);
825 uint8_t _ops_pending;
866 const std::function<uint64_t(uint64_t)>& conv_byte_order,
867 const size_t padding_size)
const;
875 const std::function<uint64_t(uint64_t)>& conv_byte_order,
876 const size_t padding_size);
881 return _ops == rhs._ops;
888 std::vector<mgmt_op_t> _ops;
907 set_src_epid(src_epid);
909 set_proto_ver(protover);
918 _hops.push_back(hop);
936 auto hop = _hops.front();
943 size_t num_lines = 1;
944 for (
const auto& hop : _hops) {
945 num_lines += hop.get_num_ops();
955 size_t max_size_bytes,
956 const std::function<uint64_t(uint64_t)>& conv_byte_order)
const;
959 template <endianness_t endianness>
960 size_t serialize(uint64_t* buff,
size_t max_size_bytes)
const
962 auto conv_byte_order = [](uint64_t x) -> uint64_t {
963 return (endianness == uhd::ENDIANNESS_BIG) ? uhd::htonx<uint64_t>(x)
964 : uhd::htowx<uint64_t>(x);
966 return serialize(buff, max_size_bytes, conv_byte_order);
977 const std::function<uint64_t(uint64_t)>& conv_byte_order);
984 template <endianness_t endianness>
987 auto conv_byte_order = [](uint64_t x) -> uint64_t {
988 return (endianness == uhd::ENDIANNESS_BIG) ? uhd::ntohx<uint64_t>(x)
989 : uhd::wtohx<uint64_t>(x);
991 deserialize(buff, buff_size, conv_byte_order);
1012 _src_epid = src_epid;
1040 _protover = proto_ver;
1045 uint16_t _protover = 0;
1047 size_t _padding_size = 0;
1048 std::deque<mgmt_hop_t> _hops;
1052 template <
typename payload_t>
Definition: chdr_types.hpp:257
bool has_timestamp() const
Definition: chdr_types.hpp:341
size_t get_length() const
Get the serialized size of this payload in bytes.
void deserialize(const uint32_t *buff, size_t buff_size)
Deserialize the payload from a uint32_t buffer (no conversion function).
Definition: chdr_types.hpp:328
bool is_read_response() const
Definition: chdr_types.hpp:367
std::string to_string() const
Return a string representation of this object.
bool is_write_response() const
Definition: chdr_types.hpp:358
bool is_read_request() const
Definition: chdr_types.hpp:350
size_t serialize(uint32_t *buff, size_t max_size_bytes) const
Serialize the payload to a uint32_t buffer (no conversion function)
Definition: chdr_types.hpp:303
ctrl_payload(const ctrl_payload &rhs)=default
bool operator==(const ctrl_payload &rhs) const
Comparison operator (==)
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.
ctrl_payload & operator=(const ctrl_payload &rhs)=default
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.
bool operator!=(const ctrl_payload &rhs) const
Comparison operator (!=)
Definition: chdr_types.hpp:376
void populate_header(chdr_header &header) const
Populate the header for this type of packet.
ctrl_payload(ctrl_payload &&rhs)=default
A class that represents a single management hop.
Definition: chdr_types.hpp:834
void deserialize(std::list< uint64_t > &src, const std::function< uint64_t(uint64_t)> &conv_byte_order, const size_t padding_size)
Deserialize the payload from a uint64_t buffer.
bool operator==(const mgmt_hop_t &rhs) const
Comparison operator (==)
Definition: chdr_types.hpp:879
const mgmt_op_t & get_op(size_t i) const
Get the n'th operation in the hop.
Definition: chdr_types.hpp:855
size_t serialize(std::vector< uint64_t > &target, const std::function< uint64_t(uint64_t)> &conv_byte_order, const size_t padding_size) const
Serialize the payload to a uint64_t buffer.
void add_op(const mgmt_op_t &op)
Add a management operation to this hop.
Definition: chdr_types.hpp:843
std::string to_string() const
Return a string representation of this object.
mgmt_hop_t(const mgmt_hop_t &rhs)=default
size_t get_num_ops() const
Get the number of management operations in this hop.
Definition: chdr_types.hpp:849
Definition: chdr_types.hpp:680
mgmt_op_t(const op_code_t op_code, const payload_t op_payload=0, const uint8_t ops_pending=0)
Definition: chdr_types.hpp:779
mgmt_op_t(const mgmt_op_t &rhs)=default
op_code_t
Operation code.
Definition: chdr_types.hpp:688
std::string to_string() const
Return a string representation of this object.
op_code_t get_op_code() const
Get the op-code for this transaction.
Definition: chdr_types.hpp:802
mgmt_op_t & operator=(const mgmt_op_t &rhs)=default
uint8_t get_ops_pending() const
Get the ops pending for this transaction.
Definition: chdr_types.hpp:796
uint64_t get_op_payload() const
Get the payload for this transaction.
Definition: chdr_types.hpp:808
uint64_t payload_t
The payload for an operation is 48 bits wide.
Definition: chdr_types.hpp:710
bool operator==(const mgmt_op_t &rhs) const
Comparison operator (==)
Definition: chdr_types.hpp:814
A class that represents a complete multi-hop management transaction.
Definition: chdr_types.hpp:897
size_t get_num_hops() const
Get the number of management hops in this hop.
Definition: chdr_types.hpp:922
const mgmt_hop_t & get_hop(size_t i) const
Get the n'th hop in the transaction.
Definition: chdr_types.hpp:928
void set_proto_ver(uint16_t proto_ver)
Set the protocol version for this transaction.
Definition: chdr_types.hpp:1038
chdr_w_t get_chdr_w() const
Return the CHDR_W for this transaction.
Definition: chdr_types.hpp:1019
void deserialize(const uint64_t *buff, size_t buff_size, const std::function< uint64_t(uint64_t)> &conv_byte_order)
Deserialize the payload from a uint64_t buffer.
void set_src_epid(sep_id_t src_epid)
Set the source EPID for this transaction.
Definition: chdr_types.hpp:1010
void set_chdr_w(chdr_w_t chdr_w)
Set the CHDR_W for this transaction.
Definition: chdr_types.hpp:1025
mgmt_payload(const mgmt_payload &rhs)=default
void set_header(sep_id_t src_epid, uint16_t protover, chdr_w_t chdr_w)
Definition: chdr_types.hpp:905
size_t get_length() const
Get the serialized size of this payload in 64 bit words.
mgmt_hop_t pop_hop()
Pop the first hop of the transaction and return it.
Definition: chdr_types.hpp:934
void add_hop(const mgmt_hop_t &hop)
Add a management hop to this transaction.
Definition: chdr_types.hpp:916
void populate_header(chdr_header &header) const
Populate the header for this type of packet.
mgmt_payload & operator=(const mgmt_payload &rhs)=default
void deserialize(const uint64_t *buff, size_t buff_size)
Deserialize the payload from a uint64_t buffer (no conversion function).
Definition: chdr_types.hpp:985
std::string hops_to_string() const
Return a string representaiton of the hops contained by this object.
size_t get_size_bytes() const
Definition: chdr_types.hpp:941
size_t serialize(uint64_t *buff, size_t max_size_bytes) const
Serialize the payload to a uint64_t buffer (no conversion function)
Definition: chdr_types.hpp:960
sep_id_t get_src_epid() const
Return the source EPID for this transaction.
Definition: chdr_types.hpp:1004
uint16_t get_proto_ver() const
Return the protocol version for this transaction.
Definition: chdr_types.hpp:1032
std::string to_string() const
Return a string representation of this object.
mgmt_payload(mgmt_payload &&rhs)=default
size_t serialize(uint64_t *buff, size_t max_size_bytes, const std::function< uint64_t(uint64_t)> &conv_byte_order) const
Serialize the payload to a uint64_t buffer.
bool operator==(const mgmt_payload &rhs) const
Comparison operator (==)
Definition: chdr_types.hpp:577
bool operator==(const strc_payload &rhs) const
Comparison operator (==)
void deserialize(const uint64_t *buff, size_t buff_size, const std::function< uint64_t(uint64_t)> &conv_byte_order)
Deserialize the payload from a uint64_t buffer.
strc_payload(const strc_payload &rhs)=default
strc_payload(strc_payload &&rhs)=default
size_t serialize(uint64_t *buff, size_t max_size_bytes) const
Serialize the payload to a uint64_t buffer (no conversion function)
Definition: chdr_types.hpp:609
std::string to_string() const
Return a string representation of this object.
size_t get_length() const
Get the serialized size of this payload in 64 bit words.
size_t serialize(uint64_t *buff, size_t max_size_bytes, const std::function< uint64_t(uint64_t)> &conv_byte_order) const
Serialize the payload to a uint64_t buffer.
void populate_header(chdr_header &header) const
Populate the header for this type of packet.
void deserialize(const uint64_t *buff, size_t buff_size)
Deserialize the payload from a uint64_t buffer (no conversion function).
Definition: chdr_types.hpp:634
strc_payload & operator=(const strc_payload &rhs)=default
bool operator!=(const strc_payload &rhs) const
Comparison operator (!=)
Definition: chdr_types.hpp:650
Definition: chdr_types.hpp:433
size_t serialize(uint64_t *buff, size_t max_size_bytes, const std::function< uint64_t(uint64_t)> &conv_byte_order) const
Serialize the payload to a uint64_t buffer.
bool operator!=(const strs_payload &rhs) const
Comparison operator (!=)
Definition: chdr_types.hpp:539
bool seq_error_occoured
Definition: chdr_types.hpp:458
uint32_t reserved_1
Definition: chdr_types.hpp:477
uint16_t current_seq_num
Definition: chdr_types.hpp:464
strs_payload & operator=(const strs_payload &rhs)=default
bool reserved_3
Definition: chdr_types.hpp:471
bool operator==(const strs_payload &rhs) const
Comparison operator (==)
void deserialize(const uint64_t *buff, size_t buff_size)
Deserialize the payload from a uint64_t buffer (no conversion function).
Definition: chdr_types.hpp:523
std::string to_string() const
Return a string representation of this object.
uint16_t last_control_seq_num
Definition: chdr_types.hpp:454
uint16_t reserved_1
Definition: chdr_types.hpp:456
size_t serialize(uint64_t *buff, size_t max_size_bytes) const
Serialize the payload to a uint64_t buffer (no conversion function)
Definition: chdr_types.hpp:498
bool flow_control_due
Definition: chdr_types.hpp:460
strs_payload(strs_payload &&rhs)=default
void deserialize(const uint64_t *buff, size_t buff_size, const std::function< uint64_t(uint64_t)> &conv_byte_order)
Deserialize the payload from a uint64_t buffer.
uint16_t this_epid
Definition: chdr_types.hpp:476
strs_payload(const strs_payload &rhs)=default
uint16_t expected_seq_num
Definition: chdr_types.hpp:455
bool reserved_2
Definition: chdr_types.hpp:459
size_t get_length() const
Get the serialized size of this payload in 64 bit words.
uint8_t chdr_packet_type
Definition: chdr_types.hpp:466
uint16_t dest_epid
Definition: chdr_types.hpp:475
bool stop_on_seq_error_enabled
Definition: chdr_types.hpp:457
void populate_header(chdr_header &header) const
Populate the header for this type of packet.
#define UHD_API
Definition: config.h:87
@ info
Definition: log.hpp:122
strs_status_t
Definition: chdr_types.hpp:424
@ STRS_CMDERR
No error.
Definition: chdr_types.hpp:426
@ STRS_OKAY
Definition: chdr_types.hpp:425
@ STRS_DATAERR
Packet out of sequence (sequence error)
Definition: chdr_types.hpp:428
@ STRS_RTERR
Data integrity check failed.
Definition: chdr_types.hpp:429
@ STRS_SEQERR
A stream command signalled an error.
Definition: chdr_types.hpp:427
constexpr packet_type_t payload_to_packet_type< mgmt_payload >()
Definition: chdr_types.hpp:1062
constexpr packet_type_t payload_to_packet_type< strs_payload >()
Definition: chdr_types.hpp:1074
strc_op_code_t
Definition: chdr_types.hpp:570
@ STRC_RESYNC
Trigger a stream status response.
Definition: chdr_types.hpp:573
@ STRC_INIT
Definition: chdr_types.hpp:571
@ STRC_PING
Initialize stream.
Definition: chdr_types.hpp:572
constexpr packet_type_t payload_to_packet_type< strc_payload >()
Definition: chdr_types.hpp:1068
ctrl_opcode_t
Definition: chdr_types.hpp:240
@ OP_WRITE
Definition: chdr_types.hpp:242
@ OP_SLEEP
Definition: chdr_types.hpp:241
@ OP_USER1
Definition: chdr_types.hpp:248
@ OP_POLL
Definition: chdr_types.hpp:247
@ OP_USER2
Definition: chdr_types.hpp:249
@ OP_BLOCK_WRITE
Definition: chdr_types.hpp:245
@ OP_USER6
Definition: chdr_types.hpp:253
@ OP_READ
Definition: chdr_types.hpp:243
@ OP_READ_WRITE
Definition: chdr_types.hpp:244
@ OP_BLOCK_READ
Definition: chdr_types.hpp:246
@ OP_USER3
Definition: chdr_types.hpp:250
@ OP_USER4
Definition: chdr_types.hpp:251
@ OP_USER5
Definition: chdr_types.hpp:252
ctrl_status_t
Definition: chdr_types.hpp:233
@ CMD_TSERR
Slave asserted a command error.
Definition: chdr_types.hpp:236
@ CMD_OKAY
Definition: chdr_types.hpp:234
@ CMD_CMDERR
Transaction successful.
Definition: chdr_types.hpp:235
@ CMD_WARNING
Slave asserted a time stamp error.
Definition: chdr_types.hpp:237
constexpr packet_type_t payload_to_packet_type< ctrl_payload >()
Definition: chdr_types.hpp:1056
constexpr packet_type_t payload_to_packet_type()
Conversion from payload_t to pkt_type.
packet_type_t
Definition: chdr_types.hpp:23
@ PKT_TYPE_DATA_WITH_TS
Data Packet without TimeStamp.
Definition: chdr_types.hpp:29
@ PKT_TYPE_DATA_NO_TS
Control Transaction.
Definition: chdr_types.hpp:28
@ PKT_TYPE_MGMT
Definition: chdr_types.hpp:24
@ PKT_TYPE_STRS
Management packet.
Definition: chdr_types.hpp:25
@ PKT_TYPE_CTRL
Stream Command.
Definition: chdr_types.hpp:27
@ PKT_TYPE_STRC
Stream status.
Definition: chdr_types.hpp:26
uint16_t sep_id_t
Stream Endpoint ID Type.
Definition: rfnoc_types.hpp:75
chdr_w_t
Type that indicates the CHDR Width in bits.
Definition: rfnoc_types.hpp:19
@ CHDR_W_64
Definition: rfnoc_types.hpp:19
constexpr size_t chdr_w_to_bits(chdr_w_t chdr_w)
Conversion from chdr_w_t to a number of bits.
Definition: rfnoc_types.hpp:22
UHD_INLINE data_t mask(const soft_reg_field_t field)
Definition: soft_register.hpp:86
UHD_INLINE size_t width(const soft_reg_field_t field)
Definition: soft_register.hpp:75
Definition: build_info.hpp:12
Definition: chdr_types.hpp:729
cfg_payload(payload_t payload_)
Definition: chdr_types.hpp:734
const uint32_t data
Definition: chdr_types.hpp:731
cfg_payload(uint16_t addr_, uint32_t data_=0)
Definition: chdr_types.hpp:733
const uint16_t addr
Definition: chdr_types.hpp:730
An interpretation class for the payload for MGMT_OP_INFO_RESP.
Definition: chdr_types.hpp:747
const uint16_t node_inst
Definition: chdr_types.hpp:750
node_info_payload(payload_t payload_)
Definition: chdr_types.hpp:763
const uint8_t node_type
Definition: chdr_types.hpp:749
const uint32_t ext_info
Definition: chdr_types.hpp:751
const uint16_t device_id
Definition: chdr_types.hpp:748
node_info_payload(uint16_t device_id_, uint8_t node_type_, uint16_t node_inst_, uint32_t ext_info_)
Definition: chdr_types.hpp:753
An interpretation class for the payload for MGMT_OP_SEL_DEST.
Definition: chdr_types.hpp:714
sel_dest_payload(uint16_t dest_)
Definition: chdr_types.hpp:717
const uint16_t dest
Definition: chdr_types.hpp:715
sel_dest_payload(payload_t payload_)
Definition: chdr_types.hpp:718
Definition: exception.hpp:291