12#include <boost/format.hpp>
13#include <boost/optional.hpp>
47 return get_field<uint8_t>(_flat_hdr, VC_OFFSET, VC_WIDTH);
53 _flat_hdr = set_field(_flat_hdr, vc, VC_OFFSET, VC_WIDTH);
59 return get_field<bool>(_flat_hdr, EOB_OFFSET, EOB_WIDTH);
65 _flat_hdr = set_field(_flat_hdr, eob, EOB_OFFSET, EOB_WIDTH);
71 return get_field<bool>(_flat_hdr, EOV_OFFSET, EOV_WIDTH);
77 _flat_hdr = set_field(_flat_hdr, eov, EOV_OFFSET, EOV_WIDTH);
83 return get_field<packet_type_t>(_flat_hdr, PKT_TYPE_OFFSET, PKT_TYPE_WIDTH);
89 _flat_hdr = set_field(_flat_hdr, pkt_type, PKT_TYPE_OFFSET, PKT_TYPE_WIDTH);
95 return get_field<uint8_t>(_flat_hdr, NUM_MDATA_OFFSET, NUM_MDATA_WIDTH);
101 _flat_hdr = set_field(_flat_hdr, num_mdata, NUM_MDATA_OFFSET, NUM_MDATA_WIDTH);
107 return get_field<uint16_t>(_flat_hdr, SEQ_NUM_OFFSET, SEQ_NUM_WIDTH);
113 _flat_hdr = set_field(_flat_hdr, seq_num, SEQ_NUM_OFFSET, SEQ_NUM_WIDTH);
119 return get_field<uint16_t>(_flat_hdr, LENGTH_OFFSET, LENGTH_WIDTH);
125 _flat_hdr = set_field(_flat_hdr, length, LENGTH_OFFSET, LENGTH_WIDTH);
131 return get_field<uint16_t>(_flat_hdr, DST_EPID_OFFSET, DST_EPID_WIDTH);
137 _flat_hdr = set_field(_flat_hdr, dst_epid, DST_EPID_OFFSET, DST_EPID_WIDTH);
147 inline operator uint64_t()
const
155 return _flat_hdr == rhs._flat_hdr;
161 return _flat_hdr != rhs._flat_hdr;
167 _flat_hdr = rhs._flat_hdr;
184 return str(boost::format(
"chdr_header{vc:%u, eob:%c, eov:%c, pkt_type:%u, "
185 "num_mdata:%u, seq_num:%u, length:%u, dst_epid:%u}\n")
194 uint64_t _flat_hdr = 0;
196 static constexpr size_t VC_WIDTH = 6;
197 static constexpr size_t EOB_WIDTH = 1;
198 static constexpr size_t EOV_WIDTH = 1;
199 static constexpr size_t PKT_TYPE_WIDTH = 3;
200 static constexpr size_t NUM_MDATA_WIDTH = 5;
201 static constexpr size_t SEQ_NUM_WIDTH = 16;
202 static constexpr size_t LENGTH_WIDTH = 16;
203 static constexpr size_t DST_EPID_WIDTH = 16;
205 static constexpr size_t VC_OFFSET = 58;
206 static constexpr size_t EOB_OFFSET = 57;
207 static constexpr size_t EOV_OFFSET = 56;
208 static constexpr size_t PKT_TYPE_OFFSET = 53;
209 static constexpr size_t NUM_MDATA_OFFSET = 48;
210 static constexpr size_t SEQ_NUM_OFFSET = 32;
211 static constexpr size_t LENGTH_OFFSET = 16;
212 static constexpr size_t DST_EPID_OFFSET = 0;
214 static inline uint64_t mask(
const size_t width)
216 return ((uint64_t(1) << width) - 1);
219 template <
typename field_t>
220 static inline field_t get_field(
221 const uint64_t flat_hdr,
const size_t offset,
const size_t width)
223 return static_cast<field_t
>((flat_hdr >> offset) & mask(width));
226 template <
typename field_t>
227 static inline uint64_t set_field(
const uint64_t old_val,
232 return (old_val & ~(mask(width) << offset))
233 | ((
static_cast<uint64_t
>(field) & mask(width)) << offset);
303 size_t max_size_bytes,
304 const std::function<uint64_t(uint64_t)>& conv_byte_order)
const;
307 template <endianness_t endianness>
308 size_t serialize(uint64_t* buff,
size_t max_size_bytes)
const
310 auto conv_byte_order = [](uint64_t x) -> uint64_t {
314 return serialize(buff, max_size_bytes, conv_byte_order);
323 const std::function<uint64_t(uint64_t)>& conv_byte_order);
328 template <endianness_t endianness>
331 auto conv_byte_order = [](uint64_t x) -> uint64_t {
353 return !(*
this == rhs);
360 static constexpr size_t DST_PORT_WIDTH = 10;
361 static constexpr size_t SRC_PORT_WIDTH = 10;
362 static constexpr size_t NUM_DATA_WIDTH = 4;
363 static constexpr size_t SEQ_NUM_WIDTH = 6;
364 static constexpr size_t HAS_TIME_WIDTH = 1;
365 static constexpr size_t IS_ACK_WIDTH = 1;
366 static constexpr size_t SRC_EPID_WIDTH = 16;
367 static constexpr size_t ADDRESS_WIDTH = 20;
368 static constexpr size_t BYTE_ENABLE_WIDTH = 4;
369 static constexpr size_t OPCODE_WIDTH = 4;
370 static constexpr size_t STATUS_WIDTH = 2;
373 static constexpr size_t DST_PORT_OFFSET = 0;
374 static constexpr size_t SRC_PORT_OFFSET = 10;
375 static constexpr size_t NUM_DATA_OFFSET = 20;
376 static constexpr size_t SEQ_NUM_OFFSET = 24;
377 static constexpr size_t HAS_TIME_OFFSET = 30;
378 static constexpr size_t IS_ACK_OFFSET = 31;
379 static constexpr size_t SRC_EPID_OFFSET = 32;
380 static constexpr size_t ADDRESS_OFFSET = 0;
381 static constexpr size_t BYTE_ENABLE_OFFSET = 20;
382 static constexpr size_t OPCODE_OFFSET = 24;
383 static constexpr size_t STATUS_OFFSET = 30;
384 static constexpr size_t LO_DATA_OFFSET = 0;
385 static constexpr size_t HI_DATA_OFFSET = 32;
461 size_t max_size_bytes,
462 const std::function<uint64_t(uint64_t)>& conv_byte_order)
const;
465 template <endianness_t endianness>
466 size_t serialize(uint64_t* buff,
size_t max_size_bytes)
const
468 auto conv_byte_order = [](uint64_t x) -> uint64_t {
472 return serialize(buff, max_size_bytes, conv_byte_order);
481 const std::function<uint64_t(uint64_t)>& conv_byte_order);
486 template <endianness_t endianness>
489 auto conv_byte_order = [](uint64_t x) -> uint64_t {
505 return !(*
this == rhs);
512 static constexpr size_t SRC_EPID_WIDTH = 16;
513 static constexpr size_t STATUS_WIDTH = 4;
514 static constexpr size_t CAPACITY_BYTES_WIDTH = 40;
515 static constexpr size_t CAPACITY_PKTS_WIDTH = 24;
516 static constexpr size_t XFER_COUNT_PKTS_WIDTH = 40;
517 static constexpr size_t BUFF_INFO_WIDTH = 16;
518 static constexpr size_t STATUS_INFO_WIDTH = 48;
521 static constexpr size_t SRC_EPID_OFFSET = 0;
522 static constexpr size_t STATUS_OFFSET = 16;
523 static constexpr size_t CAPACITY_BYTES_OFFSET = 24;
524 static constexpr size_t CAPACITY_PKTS_OFFSET = 0;
525 static constexpr size_t XFER_COUNT_PKTS_OFFSET = 24;
526 static constexpr size_t BUFF_INFO_OFFSET = 0;
527 static constexpr size_t STATUS_INFO_OFFSET = 16;
568 size_t max_size_bytes,
569 const std::function<uint64_t(uint64_t)>& conv_byte_order)
const;
572 template <endianness_t endianness>
573 size_t serialize(uint64_t* buff,
size_t max_size_bytes)
const
575 auto conv_byte_order = [](uint64_t x) -> uint64_t {
579 return serialize(buff, max_size_bytes, conv_byte_order);
588 const std::function<uint64_t(uint64_t)>& conv_byte_order);
593 template <endianness_t endianness>
596 auto conv_byte_order = [](uint64_t x) -> uint64_t {
612 return !(*
this == rhs);
619 static constexpr size_t SRC_EPID_WIDTH = 16;
620 static constexpr size_t OP_CODE_WIDTH = 4;
621 static constexpr size_t OP_DATA_WIDTH = 4;
622 static constexpr size_t NUM_PKTS_WIDTH = 40;
625 static constexpr size_t SRC_EPID_OFFSET = 0;
626 static constexpr size_t OP_CODE_OFFSET = 16;
627 static constexpr size_t OP_DATA_OFFSET = 20;
628 static constexpr size_t NUM_PKTS_OFFSET = 24;
691 :
addr(static_cast<uint16_t>(payload_ >> 0))
692 ,
data(static_cast<uint32_t>(payload_ >> 16))
720 :
device_id(static_cast<uint16_t>(payload_ >> 0))
721 ,
node_type(static_cast<uint8_t>((payload_ >> 16) & 0xF))
722 ,
node_inst(static_cast<uint16_t>((payload_ >> 20) & 0x3FF))
723 ,
ext_info(static_cast<uint32_t>((payload_ >> 30) & 0x3FFFF))
737 const uint8_t ops_pending = 0)
738 : _op_code(op_code), _op_payload(op_payload), _ops_pending(ops_pending)
770 return (_op_code == rhs._op_code) && (_op_payload == rhs._op_payload);
779 uint8_t _ops_pending;
814 const std::function<uint64_t(uint64_t)>& conv_byte_order,
815 const size_t padding_size)
const;
821 const std::function<uint64_t(uint64_t)>& conv_byte_order,
822 const size_t padding_size);
827 return _ops == rhs._ops;
834 std::vector<mgmt_op_t> _ops;
860 _hops.push_back(hop);
878 auto hop = _hops.front();
885 size_t num_lines = 1;
886 for (
const auto& hop : _hops) {
887 num_lines += hop.get_num_ops();
897 size_t max_size_bytes,
898 const std::function<uint64_t(uint64_t)>& conv_byte_order)
const;
901 template <endianness_t endianness>
902 size_t serialize(uint64_t* buff,
size_t max_size_bytes)
const
904 auto conv_byte_order = [](uint64_t x) -> uint64_t {
908 return serialize(buff, max_size_bytes, conv_byte_order);
917 const std::function<uint64_t(uint64_t)>& conv_byte_order);
922 template <endianness_t endianness>
925 auto conv_byte_order = [](uint64_t x) -> uint64_t {
950 _src_epid = src_epid;
978 _protover = proto_ver;
983 uint16_t _protover = 0;
985 size_t _padding_size = 0;
986 std::deque<mgmt_hop_t> _hops;
990template <
typename payload_t>
ctrl_payload & operator=(const ctrl_payload &rhs)=default
bool has_timestamp() const
Definition chdr_types.hpp:342
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.
bool is_ack
Is Acknowledgment Flag (1 bit)
Definition chdr_types.hpp:277
void deserialize(const uint64_t *buff, size_t buff_size)
Definition chdr_types.hpp:329
std::string to_string() const
Return a string representation of this object.
uint16_t src_port
Source port for transaction (10 bits)
Definition chdr_types.hpp:271
boost::optional< uint64_t > timestamp
Has Time Flag (1 bit) and timestamp (64 bits)
Definition chdr_types.hpp:275
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:308
uint16_t src_epid
Source endpoint ID of transaction (16 bits)
Definition chdr_types.hpp:279
ctrl_payload(const ctrl_payload &rhs)=default
ctrl_status_t status
Transaction status (4 bits)
Definition chdr_types.hpp:289
bool operator==(const ctrl_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)
uint32_t address
Address for transaction (20 bits)
Definition chdr_types.hpp:281
uint8_t seq_num
Sequence number (6 bits)
Definition chdr_types.hpp:273
bool operator!=(const ctrl_payload &rhs) const
Comparison operator (!=)
Definition chdr_types.hpp:351
ctrl_opcode_t op_code
Operation code (4 bits)
Definition chdr_types.hpp:287
uint16_t dst_port
Destination port for transaction (10 bits)
Definition chdr_types.hpp:269
void populate_header(chdr_header &header) const
Populate the header for this type of packet.
std::vector< uint32_t > data_vtr
Data for transaction (vector of 32 bits)
Definition chdr_types.hpp:283
ctrl_payload(ctrl_payload &&rhs)=default
uint8_t byte_enable
Byte-enable mask for transaction (4 bits)
Definition chdr_types.hpp:285
A class that represents a single management hop.
Definition chdr_types.hpp:786
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:825
const mgmt_op_t & get_op(size_t i) const
Get the n'th operation in the hop.
Definition chdr_types.hpp:805
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:793
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:799
A class that represents a single management operation.
Definition chdr_types.hpp:639
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:735
mgmt_op_t(const mgmt_op_t &rhs)=default
op_code_t
Definition chdr_types.hpp:645
@ MGMT_OP_INFO_RESP
A response to an information request.
Definition chdr_types.hpp:657
@ MGMT_OP_NOP
Do nothing.
Definition chdr_types.hpp:647
@ MGMT_OP_CFG_WR_REQ
Perform a configuration write on the node.
Definition chdr_types.hpp:659
@ MGMT_OP_RETURN
Return the management packet back to its source.
Definition chdr_types.hpp:653
@ MGMT_OP_ADVERTISE
Advertise this operation to the outside logic.
Definition chdr_types.hpp:649
@ MGMT_OP_CFG_RD_RESP
A response to a configuration read.
Definition chdr_types.hpp:663
@ MGMT_OP_INFO_REQ
Request information about the current node.
Definition chdr_types.hpp:655
@ MGMT_OP_SEL_DEST
Select the next destination for routing.
Definition chdr_types.hpp:651
@ MGMT_OP_CFG_RD_REQ
Perform a configuration read on the node.
Definition chdr_types.hpp:661
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:756
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:750
uint64_t get_op_payload() const
Get the payload for this transaction.
Definition chdr_types.hpp:762
uint64_t payload_t
The payload for an operation is 48 bits wide.
Definition chdr_types.hpp:667
bool operator==(const mgmt_op_t &rhs) const
Comparison operator (==)
Definition chdr_types.hpp:768
size_t get_num_hops() const
Get the number of management hops in this hop.
Definition chdr_types.hpp:864
void set_proto_ver(uint16_t proto_ver)
Set the protocol version for this transaction.
Definition chdr_types.hpp:976
chdr_w_t get_chdr_w() const
Return the CHDR_W for this transaction.
Definition chdr_types.hpp:957
void deserialize(const uint64_t *buff, size_t buff_size, const std::function< uint64_t(uint64_t)> &conv_byte_order)
void set_src_epid(sep_id_t src_epid)
Set the source EPID for this transaction.
Definition chdr_types.hpp:948
void set_chdr_w(chdr_w_t chdr_w)
Set the CHDR_W for this transaction.
Definition chdr_types.hpp:963
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:849
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:876
mgmt_payload & operator=(const mgmt_payload &rhs)=default
void add_hop(const mgmt_hop_t &hop)
Add a management hop to this transaction.
Definition chdr_types.hpp:858
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)
Definition chdr_types.hpp:923
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:883
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:902
sep_id_t get_src_epid() const
Return the source EPID for this transaction.
Definition chdr_types.hpp:942
uint16_t get_proto_ver() const
Return the protocol version for this transaction.
Definition chdr_types.hpp:970
std::string to_string() const
Return a string representation of this object.
mgmt_payload(mgmt_payload &&rhs)=default
const mgmt_hop_t & get_hop(size_t i) const
Get the n'th hop in the transaction.
Definition chdr_types.hpp:870
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 (==)
uint16_t src_epid
The source EPID for the stream (16 bits)
Definition chdr_types.hpp:544
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)
strc_payload(const strc_payload &rhs)=default
static constexpr size_t MAX_PACKET_SIZE
Worst-case size of a strc packet (including header)
Definition chdr_types.hpp:554
strc_op_code_t op_code
Operation code for the command (4 bits)
Definition chdr_types.hpp:546
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:573
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.
uint64_t num_bytes
Number of bytes to use for operation (64 bits)
Definition chdr_types.hpp:552
uint64_t num_pkts
Number of packets to use for operation (40 bits)
Definition chdr_types.hpp:550
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.
uint8_t op_data
Data associated with the operation (4 bits)
Definition chdr_types.hpp:548
void deserialize(const uint64_t *buff, size_t buff_size)
Definition chdr_types.hpp:594
bool operator!=(const strc_payload &rhs) const
Comparison operator (!=)
Definition chdr_types.hpp:610
strc_payload & operator=(const strc_payload &rhs)=default
uint64_t capacity_bytes
Buffer capacity in bytes (40 bits)
Definition chdr_types.hpp:408
uint16_t src_epid
The source EPID for the stream (16 bits)
Definition chdr_types.hpp:404
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:503
bool seq_error_occoured
Definition chdr_types.hpp:426
uint16_t current_seq_num
Definition chdr_types.hpp:432
bool reserved_3
Definition chdr_types.hpp:439
bool operator==(const strs_payload &rhs) const
Comparison operator (==)
void deserialize(const uint64_t *buff, size_t buff_size)
Definition chdr_types.hpp:487
std::string to_string() const
Return a string representation of this object.
uint16_t buff_info
Buffer info (16 bits)
Definition chdr_types.hpp:416
uint16_t last_control_seq_num
Definition chdr_types.hpp:422
strs_payload & operator=(const strs_payload &rhs)=default
uint16_t reserved_1
Definition chdr_types.hpp:424
uint64_t info
Definition chdr_types.hpp:419
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:466
bool flow_control_due
Definition chdr_types.hpp:428
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)
uint64_t xfer_count_bytes
Transfer count in bytes (64 bits)
Definition chdr_types.hpp:412
uint16_t this_epid
Definition chdr_types.hpp:444
strs_payload(const strs_payload &rhs)=default
uint16_t expected_seq_num
Definition chdr_types.hpp:423
bool reserved_2
Definition chdr_types.hpp:427
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:434
uint32_t capacity_pkts
Buffer capacity in packets (24 bits)
Definition chdr_types.hpp:410
strs_status_t status
The status of the stream (4 bits)
Definition chdr_types.hpp:406
uint64_t xfer_count_pkts
Transfer count in packets (40 bits)
Definition chdr_types.hpp:414
uint16_t dest_epid
Definition chdr_types.hpp:443
bool stop_on_seq_error_enabled
Definition chdr_types.hpp:425
void populate_header(chdr_header &header) const
Populate the header for this type of packet.
#define UHD_API
Definition config.h:87
Definition chdr_types.hpp:19
strs_status_t
Definition chdr_types.hpp:392
@ STRS_CMDERR
No error.
Definition chdr_types.hpp:394
@ STRS_OKAY
Definition chdr_types.hpp:393
@ STRS_DATAERR
Packet out of sequence (sequence error)
Definition chdr_types.hpp:396
@ STRS_RTERR
Data integrity check failed.
Definition chdr_types.hpp:397
@ STRS_SEQERR
A stream command signalled an error.
Definition chdr_types.hpp:395
constexpr packet_type_t payload_to_packet_type< mgmt_payload >()
Definition chdr_types.hpp:1000
constexpr packet_type_t payload_to_packet_type< strs_payload >()
Definition chdr_types.hpp:1012
strc_op_code_t
Definition chdr_types.hpp:534
@ STRC_RESYNC
Trigger a stream status response.
Definition chdr_types.hpp:537
@ STRC_INIT
Definition chdr_types.hpp:535
@ STRC_PING
Initialize stream.
Definition chdr_types.hpp:536
constexpr packet_type_t payload_to_packet_type< strc_payload >()
Definition chdr_types.hpp:1006
ctrl_opcode_t
Definition chdr_types.hpp:249
@ OP_WRITE
Definition chdr_types.hpp:251
@ OP_SLEEP
Definition chdr_types.hpp:250
@ OP_USER1
Definition chdr_types.hpp:257
@ OP_POLL
Definition chdr_types.hpp:256
@ OP_USER2
Definition chdr_types.hpp:258
@ OP_BLOCK_WRITE
Definition chdr_types.hpp:254
@ OP_USER6
Definition chdr_types.hpp:262
@ OP_READ
Definition chdr_types.hpp:252
@ OP_READ_WRITE
Definition chdr_types.hpp:253
@ OP_BLOCK_READ
Definition chdr_types.hpp:255
@ OP_USER3
Definition chdr_types.hpp:259
@ OP_USER4
Definition chdr_types.hpp:260
@ OP_USER5
Definition chdr_types.hpp:261
ctrl_status_t
Definition chdr_types.hpp:242
@ CMD_TSERR
Slave asserted a command error.
Definition chdr_types.hpp:245
@ CMD_OKAY
Definition chdr_types.hpp:243
@ CMD_CMDERR
Transaction successful.
Definition chdr_types.hpp:244
@ CMD_WARNING
Slave asserted a time stamp error.
Definition chdr_types.hpp:246
constexpr packet_type_t payload_to_packet_type< ctrl_payload >()
Definition chdr_types.hpp:994
constexpr packet_type_t payload_to_packet_type()
Conversion from payload_t to pkt_type.
packet_type_t
Definition chdr_types.hpp:21
@ PKT_TYPE_DATA_WITH_TS
Data Packet without TimeStamp.
Definition chdr_types.hpp:27
@ PKT_TYPE_DATA_NO_TS
Control Transaction.
Definition chdr_types.hpp:26
@ PKT_TYPE_MGMT
Definition chdr_types.hpp:22
@ PKT_TYPE_STRS
Management packet.
Definition chdr_types.hpp:23
@ PKT_TYPE_CTRL
Stream Command.
Definition chdr_types.hpp:25
@ PKT_TYPE_STRC
Stream status.
Definition chdr_types.hpp:24
Definition actions.hpp:24
uint16_t sep_id_t
Stream Endpoint ID Type.
Definition rfnoc_types.hpp:73
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
Definition build_info.hpp:12
T ntohx(T)
network to host: short, long, or long-long
Definition byteswap.ipp:112
T htowx(T)
host to worknet: short, long, or long-long
Definition byteswap.ipp:142
T wtohx(T)
worknet to host: short, long, or long-long
Definition byteswap.ipp:132
T htonx(T)
host to network: short, long, or long-long
Definition byteswap.ipp:122
@ ENDIANNESS_BIG
Definition endianness.hpp:30
cfg_payload(payload_t payload_)
Definition chdr_types.hpp:690
const uint32_t data
Definition chdr_types.hpp:687
cfg_payload(uint16_t addr_, uint32_t data_=0)
Definition chdr_types.hpp:689
const uint16_t addr
Definition chdr_types.hpp:686
const uint16_t node_inst
Definition chdr_types.hpp:706
node_info_payload(payload_t payload_)
Definition chdr_types.hpp:719
const uint8_t node_type
Definition chdr_types.hpp:705
const uint32_t ext_info
Definition chdr_types.hpp:707
const uint16_t device_id
Definition chdr_types.hpp:704
node_info_payload(uint16_t device_id_, uint8_t node_type_, uint16_t node_inst_, uint32_t ext_info_)
Definition chdr_types.hpp:709
sel_dest_payload(uint16_t dest_)
Definition chdr_types.hpp:674
const uint16_t dest
Definition chdr_types.hpp:672
sel_dest_payload(payload_t payload_)
Definition chdr_types.hpp:675
Definition exception.hpp:291