18 namespace uhd {
namespace rfnoc {
33 using sptr = std::shared_ptr<multichan_register_iface>;
36 const uint32_t block_base_addr,
37 const size_t block_size)
38 : _reg_iface_holder(reg_iface_holder)
39 , _block_base_addr(block_base_addr)
40 , _block_size(block_size)
61 const size_t instance = 0,
65 _reg_iface_holder.
regs().
poke32(_get_addr(addr, instance), data, time, ack);
88 const size_t instance = 0,
92 _reg_iface_holder.
regs().
poke64(_get_addr(addr, instance), data, time, ack);
115 const std::vector<uint32_t> data,
116 const size_t instance = 0,
120 std::vector<uint32_t> abs_addrs(addrs.size());
121 std::transform(addrs.begin(),
125 uint32_t addr) -> uint32_t {
return _get_addr(addr, instance); });
151 const std::vector<uint32_t> data,
152 const size_t instance = 0,
157 _get_addr(first_addr, instance), data, time, ack);
171 const size_t instance = 0,
174 return _reg_iface_holder.
regs().
peek32(_get_addr(addr, instance), time);
194 const size_t instance = 0,
197 return _reg_iface_holder.
regs().
peek64(_get_addr(addr, instance), time);
222 const size_t instance = 0,
226 _get_addr(first_addr, instance), length, time);
271 const size_t instance = 0,
276 _get_addr(addr, instance), data, mask, timeout, time, ack);
281 uint32_t _block_base_addr;
284 inline uint32_t _get_addr(
const uint32_t reg_offset,
const size_t instance)
const 286 return _block_base_addr + reg_offset + _block_size * instance;
std::shared_ptr< multichan_register_iface > sptr
Definition: multichan_register_iface.hpp:33
~multichan_register_iface()=default
std::vector< uint32_t > block_peek32(uint32_t first_addr, size_t length, const size_t instance=0, time_spec_t time=uhd::time_spec_t::ASAP)
Definition: multichan_register_iface.hpp:220
Definition: register_iface_holder.hpp:18
uint64_t peek64(uint32_t addr, time_spec_t time=uhd::time_spec_t::ASAP)
Definition: register_iface.hpp:177
Definition: time_spec.hpp:28
void block_poke32(uint32_t first_addr, const std::vector< uint32_t > data, const size_t instance=0, uhd::time_spec_t time=uhd::time_spec_t::ASAP, bool ack=false)
Definition: multichan_register_iface.hpp:150
virtual void poll32(uint32_t addr, uint32_t data, uint32_t mask, time_spec_t timeout, time_spec_t time=uhd::time_spec_t::ASAP, bool ack=false)=0
uint32_t peek32(uint32_t addr, const size_t instance=0, time_spec_t time=uhd::time_spec_t::ASAP)
Definition: multichan_register_iface.hpp:170
static constexpr double ASAP
Definition: time_spec.hpp:34
virtual void block_poke32(uint32_t first_addr, const std::vector< uint32_t > data, uhd::time_spec_t time=uhd::time_spec_t::ASAP, bool ack=false)=0
multichan_register_iface(register_iface_holder ®_iface_holder, const uint32_t block_base_addr, const size_t block_size)
Definition: multichan_register_iface.hpp:35
void poke32(uint32_t addr, uint32_t data, const size_t instance=0, uhd::time_spec_t time=uhd::time_spec_t::ASAP, bool ack=false)
Definition: multichan_register_iface.hpp:59
virtual uint32_t peek32(uint32_t addr, time_spec_t time=uhd::time_spec_t::ASAP)=0
register_iface & regs()
Definition: register_iface_holder.hpp:28
virtual void poke32(uint32_t addr, uint32_t data, uhd::time_spec_t time=uhd::time_spec_t::ASAP, bool ack=false)=0
Definition: build_info.hpp:12
void poke64(uint32_t addr, uint64_t data, const size_t instance=0, time_spec_t time=uhd::time_spec_t::ASAP, bool ack=false)
Definition: multichan_register_iface.hpp:86
void poke64(uint32_t addr, uint64_t data, time_spec_t time=uhd::time_spec_t::ASAP, bool ack=false)
Definition: register_iface.hpp:92
void multi_poke32(const std::vector< uint32_t > addrs, const std::vector< uint32_t > data, const size_t instance=0, uhd::time_spec_t time=uhd::time_spec_t::ASAP, bool ack=false)
Definition: multichan_register_iface.hpp:114
virtual void multi_poke32(const std::vector< uint32_t > addrs, const std::vector< uint32_t > data, uhd::time_spec_t time=uhd::time_spec_t::ASAP, bool ack=false)=0
virtual std::vector< uint32_t > block_peek32(uint32_t first_addr, size_t length, time_spec_t time=uhd::time_spec_t::ASAP)=0
UHD_INLINE data_t mask(const soft_reg_field_t field)
Definition: soft_register.hpp:86
uint64_t peek64(uint32_t addr, const size_t instance=0, time_spec_t time=uhd::time_spec_t::ASAP)
Definition: multichan_register_iface.hpp:193
Definition: multichan_register_iface.hpp:30
void poll32(uint32_t addr, uint32_t data, uint32_t mask, time_spec_t timeout, const size_t instance=0, time_spec_t time=uhd::time_spec_t::ASAP, bool ack=false)
Definition: multichan_register_iface.hpp:267