diff options
| -rw-r--r-- | host/include/uhd/rfnoc/chdr_types.hpp | 12 | ||||
| -rw-r--r-- | host/lib/rfnoc/chdr_types.cpp | 3 | 
2 files changed, 12 insertions, 3 deletions
| diff --git a/host/include/uhd/rfnoc/chdr_types.hpp b/host/include/uhd/rfnoc/chdr_types.hpp index ceeb8d12a..7b64bc9a0 100644 --- a/host/include/uhd/rfnoc/chdr_types.hpp +++ b/host/include/uhd/rfnoc/chdr_types.hpp @@ -700,12 +700,19 @@ public:          }      }; -    mgmt_op_t(const op_code_t op_code, const payload_t op_payload = 0) -        : _op_code(op_code), _op_payload(op_payload) +    mgmt_op_t(const op_code_t op_code, const payload_t op_payload = 0, +        const uint8_t ops_pending = 0) +        : _op_code(op_code), _op_payload(op_payload), _ops_pending(ops_pending)      {      }      mgmt_op_t(const mgmt_op_t& rhs) = default; +    //! Get the ops pending for this transaction +    inline uint8_t get_ops_pending() const +    { +        return _ops_pending; +    } +      //! Get the op-code for this transaction      inline op_code_t get_op_code() const      { @@ -730,6 +737,7 @@ public:  private:      op_code_t _op_code;      payload_t _op_payload; +    uint8_t _ops_pending;  };  //! A class that represents a single management hop diff --git a/host/lib/rfnoc/chdr_types.cpp b/host/lib/rfnoc/chdr_types.cpp index aea76dbc4..d5600c1dd 100644 --- a/host/lib/rfnoc/chdr_types.cpp +++ b/host/lib/rfnoc/chdr_types.cpp @@ -450,7 +450,8 @@ void mgmt_hop_t::deserialize(std::list<uint64_t>& src,          uint64_t op_word = conv_byte_order(src.front());          ops_remaining    = static_cast<size_t>(op_word & 0xFF);          mgmt_op_t op(static_cast<mgmt_op_t::op_code_t>((op_word >> 8) & 0xFF), -            static_cast<uint64_t>((op_word >> 16))); +            static_cast<uint64_t>((op_word >> 16)), +            static_cast<uint8_t>(op_word & 0xFF));          _ops.push_back(op);          src.pop_front();          for (size_t i = 0; i < padding_size; i++) { | 
