Loading...
Searching...
No Matches
soft_register.hpp
Go to the documentation of this file.
//
// Copyright 2014 Ettus Research LLC
// Copyright 2018 Ettus Research, a National Instruments Company
//
// SPDX-License-Identifier: GPL-3.0-or-later
//
#pragma once
#include <uhd/exception.hpp>
#include <uhd/types/wb_iface.hpp>
#include <uhd/utils/dirty_tracked.hpp>
#include <uhd/utils/noncopyable.hpp>
#include <unordered_map>
#include <boost/tokenizer.hpp>
#include <cstdint>
#include <list>
#include <mutex>
//==================================================================
// Soft Register Definition
//==================================================================
#define UHD_DEFINE_SOFT_REG_FIELD(name, width, shift) \
static const uhd::soft_reg_field_t name = (((shift & 0xFF) << 8) | (width & 0xFF))
namespace uhd {
// TODO: These hints were added to boost 1.53.
UHD_INLINE bool likely(bool expr)
{
#ifdef __GNUC__
return __builtin_expect(expr, true);
#else
return expr;
#endif
}
UHD_INLINE bool unlikely(bool expr)
{
#ifdef __GNUC__
return __builtin_expect(expr, false);
#else
return expr;
#endif
}
typedef uint32_t soft_reg_field_t;
namespace soft_reg_field {
UHD_INLINE size_t width(const soft_reg_field_t field)
{
return (field & 0xFF);
}
UHD_INLINE size_t shift(const soft_reg_field_t field)
{
return ((field >> 8) & 0xFF);
}
template <typename data_t>
UHD_INLINE data_t mask(const soft_reg_field_t field)
{
constexpr data_t ONE = static_cast<data_t>(1);
constexpr data_t ALL_ONES = ~static_cast<data_t>(0);
// Behavior for the left shift operation is undefined in C++
// if the shift amount is >= bitwidth of the datatype
// So we treat that as a special case with a branch predicition hint
if (likely((sizeof(data_t) * 8) != width(field))) {
return ((ONE << width(field)) - ONE) << shift(field);
} else {
return ALL_ONES << shift(field);
}
}
} // namespace soft_reg_field
class soft_register_base : public uhd::noncopyable
{
public:
virtual ~soft_register_base() {}
virtual void initialize(wb_iface& iface, bool sync = false) = 0;
virtual void flush() = 0;
virtual void refresh() = 0;
virtual size_t get_bitwidth() = 0;
virtual bool is_readable() = 0;
virtual bool is_writable() = 0;
template <typename soft_reg_t>
UHD_INLINE static soft_reg_t& cast(soft_register_base& reg)
{
soft_reg_t* ptr = dynamic_cast<soft_reg_t*>(&reg);
if (ptr) {
return *ptr;
} else {
throw uhd::type_error("failed to cast register to specified type");
}
}
};
enum soft_reg_flush_mode_t { OPTIMIZED_FLUSH, ALWAYS_FLUSH };
template <typename reg_data_t, bool readable, bool writable>
class UHD_API soft_register_t : public soft_register_base
{
public:
typedef std::shared_ptr<soft_register_t<reg_data_t, readable, writable>> sptr;
// Reserved field. Represents all bits in the register.
UHD_DEFINE_SOFT_REG_FIELD(REGISTER, sizeof(reg_data_t) * 8, 0); //[WIDTH-1:0]
soft_register_t(wb_iface::wb_addr_type wr_addr,
wb_iface::wb_addr_type rd_addr,
soft_reg_flush_mode_t mode = ALWAYS_FLUSH)
: _iface(NULL)
, _wr_addr(wr_addr)
, _rd_addr(rd_addr)
, _soft_copy(0)
, _flush_mode(mode)
{
}
explicit soft_register_t(
wb_iface::wb_addr_type addr, soft_reg_flush_mode_t mode = ALWAYS_FLUSH)
: _iface(NULL), _wr_addr(addr), _rd_addr(addr), _soft_copy(0), _flush_mode(mode)
{
}
UHD_INLINE void initialize(wb_iface& iface, bool sync = false) override
{
_iface = &iface;
// Synchronize with hardware. For RW register, flush THEN refresh.
if (sync && writable)
flush();
if (sync && readable)
refresh();
}
UHD_INLINE void set(const soft_reg_field_t field, const reg_data_t value)
{
_soft_copy = (_soft_copy & ~soft_reg_field::mask<reg_data_t>(field))
| ((value << soft_reg_field::shift(field))
& soft_reg_field::mask<reg_data_t>(field));
}
UHD_INLINE reg_data_t get(const soft_reg_field_t field)
{
return (_soft_copy & soft_reg_field::mask<reg_data_t>(field))
>> soft_reg_field::shift(field);
}
UHD_INLINE void flush() override
{
if (writable && _iface) {
// If optimized flush then poke only if soft copy is dirty
// If flush mode is ALWAYS, the dirty flag should get optimized
// out by the compiler because it is never read
if (_flush_mode == ALWAYS_FLUSH || _soft_copy.is_dirty()) {
if (get_bitwidth() <= 32) {
_iface->poke32(_wr_addr, static_cast<uint32_t>(_soft_copy));
} else if (get_bitwidth() <= 64) {
_iface->poke64(_wr_addr, static_cast<uint64_t>(_soft_copy));
} else {
throw uhd::not_implemented_error(
"soft_register only supports up to 64 bits.");
}
_soft_copy.mark_clean();
}
} else {
throw uhd::not_implemented_error(
"soft_register is not writable or uninitialized.");
}
}
UHD_INLINE void refresh() override
{
if (readable && _iface) {
if (get_bitwidth() <= 32) {
_soft_copy = static_cast<reg_data_t>(_iface->peek32(_rd_addr));
} else if (get_bitwidth() <= 64) {
_soft_copy = static_cast<reg_data_t>(_iface->peek64(_rd_addr));
} else {
throw uhd::not_implemented_error(
"soft_register only supports up to 64 bits.");
}
_soft_copy.mark_clean();
} else {
throw uhd::not_implemented_error(
"soft_register is not readable or uninitialized.");
}
}
UHD_INLINE void write(const soft_reg_field_t field, const reg_data_t value)
{
set(field, value);
flush();
}
UHD_INLINE reg_data_t read(const soft_reg_field_t field)
{
refresh();
return get(field);
}
UHD_INLINE size_t get_bitwidth() override
{
static const size_t BITS_IN_BYTE = 8;
return sizeof(reg_data_t) * BITS_IN_BYTE;
}
UHD_INLINE bool is_readable() override
{
return readable;
}
UHD_INLINE bool is_writable() override
{
return writable;
}
private:
wb_iface* _iface;
const wb_iface::wb_addr_type _wr_addr;
const wb_iface::wb_addr_type _rd_addr;
dirty_tracked<reg_data_t> _soft_copy;
const soft_reg_flush_mode_t _flush_mode;
};
template <typename reg_data_t, bool readable, bool writable>
class UHD_API soft_register_sync_t
: public soft_register_t<reg_data_t, readable, writable>
{
public:
typedef std::shared_ptr<soft_register_sync_t<reg_data_t, readable, writable>> sptr;
soft_register_sync_t(wb_iface::wb_addr_type wr_addr,
wb_iface::wb_addr_type rd_addr,
soft_reg_flush_mode_t mode = ALWAYS_FLUSH)
: soft_register_t<reg_data_t, readable, writable>(wr_addr, rd_addr, mode)
, _mutex()
{
}
explicit soft_register_sync_t(
wb_iface::wb_addr_type addr, soft_reg_flush_mode_t mode = ALWAYS_FLUSH)
: soft_register_t<reg_data_t, readable, writable>(addr, mode), _mutex()
{
}
UHD_INLINE void initialize(wb_iface& iface, bool sync = false)
{
std::lock_guard<std::mutex> lock(_mutex);
soft_register_t<reg_data_t, readable, writable>::initialize(iface, sync);
}
UHD_INLINE void set(const soft_reg_field_t field, const reg_data_t value)
{
std::lock_guard<std::mutex> lock(_mutex);
soft_register_t<reg_data_t, readable, writable>::set(field, value);
}
UHD_INLINE reg_data_t get(const soft_reg_field_t field)
{
std::lock_guard<std::mutex> lock(_mutex);
return soft_register_t<reg_data_t, readable, writable>::get(field);
}
UHD_INLINE void flush()
{
std::lock_guard<std::mutex> lock(_mutex);
soft_register_t<reg_data_t, readable, writable>::flush();
}
UHD_INLINE void refresh()
{
std::lock_guard<std::mutex> lock(_mutex);
soft_register_t<reg_data_t, readable, writable>::refresh();
}
UHD_INLINE void write(const soft_reg_field_t field, const reg_data_t value)
{
std::lock_guard<std::mutex> lock(_mutex);
soft_register_t<reg_data_t, readable, writable>::write(field, value);
}
UHD_INLINE reg_data_t read(const soft_reg_field_t field)
{
std::lock_guard<std::mutex> lock(_mutex);
return soft_register_t<reg_data_t, readable, writable>::read(field);
}
private:
std::mutex _mutex;
};
/*
* Register Shortcut Formats:
* - soft_reg<bits>_<mode>_t: Soft register object with an unsynchronized soft-copy.
* Thread unsafe but lightweight. Mostly const propagated.
* - soft_reg<bits>_<mode>_sync_t: Soft register object with a synchronized soft-copy.
* Thread safe but with memory/speed overhead.
* where:
* - <bits> = {32 or 64}
* - <mode> = {wo(write-only), rw(read-write) or ro(read-only)}
*
*/
// 32-bit shortcuts
typedef soft_register_t<uint32_t, false, true> soft_reg32_wo_t;
typedef soft_register_t<uint32_t, true, false> soft_reg32_ro_t;
typedef soft_register_t<uint32_t, true, true> soft_reg32_rw_t;
typedef soft_register_sync_t<uint32_t, false, true> soft_reg32_wo_sync_t;
typedef soft_register_sync_t<uint32_t, true, false> soft_reg32_ro_sync_t;
typedef soft_register_sync_t<uint32_t, true, true> soft_reg32_rw_sync_t;
// 64-bit shortcuts
typedef soft_register_t<uint64_t, false, true> soft_reg64_wo_t;
typedef soft_register_t<uint64_t, true, false> soft_reg64_ro_t;
typedef soft_register_t<uint64_t, true, true> soft_reg64_rw_t;
typedef soft_register_sync_t<uint64_t, false, true> soft_reg64_wo_sync_t;
typedef soft_register_sync_t<uint64_t, true, false> soft_reg64_ro_sync_t;
typedef soft_register_sync_t<uint64_t, true, true> soft_reg64_rw_sync_t;
/*
* Usage example
*
//===Define bit width, RW mode, and synchronization using base class===
class example_reg_t : public soft_reg32_wo_sync_t (or soft_reg32_wo_t) {
public:
//===Define all the fields===
UHD_DEFINE_SOFT_REG_FIELD(FIELD0, 1, 0); //[0]
UHD_DEFINE_SOFT_REG_FIELD(FIELD1, 15, 1); //[15:1]
UHD_DEFINE_SOFT_REG_FIELD(FIELD2, 16, 16); //[31:16]
example_reg_t(): //ctor with no args
soft_reg32_wo_t(SR_CORE_EXAMPLE_REG_OFFSET)) //===Bind to offset===
{
//===Set Initial values===
set(FIELD0, 0);
set(FIELD1, 1);
set(FIELD2, 0xFFFF);
}
}; //===Full register definition encapsulated in one class===
void main() {
example_reg_t reg_obj;
reg_obj.initialize(iface);
reg_obj.write(example_reg_t::FIELD2, 0x1234);
example_reg_t::sptr reg_sptr = std::make_shared<example_reg_t>();
reg_obj->initialize(iface);
reg_obj->write(example_reg_t::FIELD2, 0x1234);
}
*/
} // namespace uhd
//==================================================================
// Soft Register Map and Database Definition
//==================================================================
namespace uhd {
class UHD_API soft_regmap_accessor_t
{
public:
typedef std::shared_ptr<soft_regmap_accessor_t> sptr;
virtual ~soft_regmap_accessor_t(){};
virtual soft_register_base& lookup(const std::string& path) const = 0;
virtual std::vector<std::string> enumerate() const = 0;
virtual const std::string& get_name() const = 0;
};
class UHD_API soft_regmap_t : public soft_regmap_accessor_t, public uhd::noncopyable
{
public:
soft_regmap_t(const std::string& name) : _name(name) {}
~soft_regmap_t() override{};
UHD_INLINE const std::string& get_name() const override
{
return _name;
}
void initialize(wb_iface& iface, bool sync = false)
{
std::lock_guard<std::mutex> lock(_mutex);
for (soft_register_base* reg : _reglist) {
reg->initialize(iface, sync);
}
}
void flush()
{
std::lock_guard<std::mutex> lock(_mutex);
for (soft_register_base* reg : _reglist) {
reg->flush();
}
}
void refresh()
{
std::lock_guard<std::mutex> lock(_mutex);
for (soft_register_base* reg : _reglist) {
reg->refresh();
}
}
soft_register_base& lookup(const std::string& name) const override
{
regmap_t::const_iterator iter = _regmap.find(name);
if (iter != _regmap.end()) {
return *(iter->second);
} else {
throw uhd::runtime_error("register not found in map: " + name);
}
}
std::vector<std::string> enumerate() const override
{
std::vector<std::string> temp;
for (const regmap_t::value_type& reg : _regmap) {
temp.push_back(_name + "/" + reg.first);
}
return temp;
}
protected:
enum visibility_t {
PUBLIC, // Is accessible through the soft_regmap_accessor_t interface
PRIVATE // Is NOT accessible through the soft_regmap_accessor_t interface
};
UHD_INLINE void add_to_map(soft_register_base& reg,
const std::string& name,
const visibility_t visible = PRIVATE)
{
std::lock_guard<std::mutex> lock(_mutex);
if (visible == PUBLIC) {
// Only add to the map if this register is publicly visible
if (not _regmap.insert(regmap_t::value_type(name, &reg)).second) {
throw uhd::assertion_error(
"cannot add two registers with the same name to regmap: " + name);
}
}
_reglist.push_back(&reg);
}
private:
typedef std::unordered_map<std::string, soft_register_base*> regmap_t;
typedef std::list<soft_register_base*> reglist_t;
const std::string _name;
regmap_t _regmap; // For lookups
reglist_t _reglist; // To maintain order
std::mutex _mutex;
};
class UHD_API soft_regmap_db_t : public soft_regmap_accessor_t, public uhd::noncopyable
{
public:
typedef std::shared_ptr<soft_regmap_db_t> sptr;
soft_regmap_db_t() : _name("") {}
soft_regmap_db_t(const std::string& name) : _name(name) {}
const std::string& get_name() const override
{
return _name;
}
void add(soft_regmap_t& regmap)
{
std::lock_guard<std::mutex> lock(_mutex);
_regmaps.push_back(&regmap);
}
void add(soft_regmap_db_t& db)
{
std::lock_guard<std::mutex> lock(_mutex);
if (&db == this) {
throw uhd::assertion_error("cannot add regmap db to itself" + _name);
} else {
_regmap_dbs.push_back(&db);
}
}
soft_register_base& lookup(const std::string& path) const override
{
// Turn the slash separated path string into tokens
std::list<std::string> tokens;
for (const std::string& node : boost::tokenizer<boost::char_separator<char>>(
path, boost::char_separator<char>("/"))) {
tokens.push_back(node);
}
if ((tokens.size() > 2 && tokens.front() == _name) || // If this is a nested DB
(tokens.size() > 1 && _name.empty())) { // If this is a top-level DB
if (!_name.empty())
tokens.pop_front();
if (tokens.size() == 2) { // 2 tokens => regmap/register path
for (const soft_regmap_accessor_t* regmap : _regmaps) {
if (regmap->get_name() == tokens.front()) {
return regmap->lookup(tokens.back());
}
}
throw uhd::runtime_error("could not find register map: " + path);
} else if (not _regmap_dbs
.empty()) { //>2 tokens => <1 or more dbs>/regmap/register
// Reconstruct path from tokens
std::string newpath;
for (const std::string& node : tokens) {
newpath += ("/" + node);
}
// Dispatch path to hierarchical DB
for (const soft_regmap_accessor_t* db : _regmap_dbs) {
try {
return db->lookup(newpath.substr(1));
} catch (std::exception&) {
continue;
}
}
}
}
throw uhd::runtime_error("could not find register: " + path);
}
std::vector<std::string> enumerate() const override
{
std::vector<std::string> paths;
for (const soft_regmap_accessor_t* regmap : _regmaps) {
const std::vector<std::string>& regs = regmap->enumerate();
paths.insert(paths.end(), regs.begin(), regs.end());
}
for (const soft_regmap_accessor_t* db : _regmap_dbs) {
const std::vector<std::string>& regs = db->enumerate();
paths.insert(paths.end(), regs.begin(), regs.end());
}
return paths;
}
private:
typedef std::list<soft_regmap_accessor_t*> db_t;
const std::string _name;
db_t _regmaps;
db_t _regmap_dbs;
std::mutex _mutex;
};
} // namespace uhd
uhd::dirty_tracked
Definition dirty_tracked.hpp:25
uhd::soft_register_base
Definition soft_register.hpp:102
uhd::soft_register_base::is_writable
virtual bool is_writable()=0
uhd::soft_register_base::initialize
virtual void initialize(wb_iface &iface, bool sync=false)=0
uhd::soft_register_base::cast
static UHD_INLINE soft_reg_t & cast(soft_register_base &reg)
Definition soft_register.hpp:117
uhd::soft_register_base::is_readable
virtual bool is_readable()=0
uhd::soft_register_base::refresh
virtual void refresh()=0
uhd::soft_register_base::flush
virtual void flush()=0
uhd::soft_register_base::get_bitwidth
virtual size_t get_bitwidth()=0
uhd::soft_register_base::~soft_register_base
virtual ~soft_register_base()
Definition soft_register.hpp:104
uhd::soft_register_sync_t
Definition soft_register.hpp:311
uhd::soft_register_sync_t::soft_register_sync_t
soft_register_sync_t(wb_iface::wb_addr_type addr, soft_reg_flush_mode_t mode=ALWAYS_FLUSH)
Definition soft_register.hpp:323
uhd::soft_register_sync_t::soft_register_sync_t
soft_register_sync_t(wb_iface::wb_addr_type wr_addr, wb_iface::wb_addr_type rd_addr, soft_reg_flush_mode_t mode=ALWAYS_FLUSH)
Definition soft_register.hpp:315
uhd::soft_register_sync_t::set
UHD_INLINE void set(const soft_reg_field_t field, const reg_data_t value)
Definition soft_register.hpp:335
uhd::soft_register_sync_t::refresh
UHD_INLINE void refresh()
Definition soft_register.hpp:353
uhd::soft_register_sync_t::flush
UHD_INLINE void flush()
Definition soft_register.hpp:347
uhd::soft_register_sync_t::write
UHD_INLINE void write(const soft_reg_field_t field, const reg_data_t value)
Definition soft_register.hpp:359
uhd::soft_register_sync_t::read
UHD_INLINE reg_data_t read(const soft_reg_field_t field)
Definition soft_register.hpp:365
uhd::soft_register_sync_t::initialize
UHD_INLINE void initialize(wb_iface &iface, bool sync=false)
Definition soft_register.hpp:329
uhd::soft_register_sync_t::get
UHD_INLINE reg_data_t get(const soft_reg_field_t field)
Definition soft_register.hpp:341
uhd::soft_register_sync_t::sptr
std::shared_ptr< soft_register_sync_t< reg_data_t, readable, writable > > sptr
Definition soft_register.hpp:313
uhd::soft_register_t
Definition soft_register.hpp:137
uhd::soft_register_t::soft_register_t
soft_register_t(wb_iface::wb_addr_type addr, soft_reg_flush_mode_t mode=ALWAYS_FLUSH)
Definition soft_register.hpp:162
uhd::soft_register_t::write
UHD_INLINE void write(const soft_reg_field_t field, const reg_data_t value)
Definition soft_register.hpp:256
uhd::soft_register_t< uint32_t, false, true >::refresh
UHD_INLINE void refresh() override
Definition soft_register.hpp:235
uhd::soft_register_t::set
UHD_INLINE void set(const soft_reg_field_t field, const reg_data_t value)
Definition soft_register.hpp:189
uhd::soft_register_t< uint32_t, false, true >::flush
UHD_INLINE void flush() override
Definition soft_register.hpp:209
uhd::soft_register_t< uint32_t, false, true >::get_bitwidth
UHD_INLINE size_t get_bitwidth() override
Definition soft_register.hpp:274
uhd::soft_register_t::is_writable
UHD_INLINE bool is_writable() override
Definition soft_register.hpp:291
uhd::soft_register_t::read
UHD_INLINE reg_data_t read(const soft_reg_field_t field)
Definition soft_register.hpp:265
uhd::soft_register_t< uint32_t, false, true >::REGISTER
static const uhd::soft_reg_field_t REGISTER
Definition soft_register.hpp:142
uhd::soft_register_t::get
UHD_INLINE reg_data_t get(const soft_reg_field_t field)
Definition soft_register.hpp:200
uhd::soft_register_t::sptr
std::shared_ptr< soft_register_t< reg_data_t, readable, writable > > sptr
Definition soft_register.hpp:139
uhd::soft_register_t::soft_register_t
soft_register_t(wb_iface::wb_addr_type wr_addr, wb_iface::wb_addr_type rd_addr, soft_reg_flush_mode_t mode=ALWAYS_FLUSH)
Definition soft_register.hpp:147
uhd::soft_register_t::is_readable
UHD_INLINE bool is_readable() override
Definition soft_register.hpp:283
uhd::soft_register_t::initialize
UHD_INLINE void initialize(wb_iface &iface, bool sync=false) override
Definition soft_register.hpp:173
uhd::soft_regmap_accessor_t
Definition soft_register.hpp:443
uhd::soft_regmap_accessor_t::~soft_regmap_accessor_t
virtual ~soft_regmap_accessor_t()
Definition soft_register.hpp:447
uhd::soft_regmap_accessor_t::sptr
std::shared_ptr< soft_regmap_accessor_t > sptr
Definition soft_register.hpp:445
uhd::soft_regmap_accessor_t::lookup
virtual soft_register_base & lookup(const std::string &path) const =0
uhd::soft_regmap_accessor_t::enumerate
virtual std::vector< std::string > enumerate() const =0
uhd::soft_regmap_accessor_t::get_name
virtual const std::string & get_name() const =0
uhd::soft_regmap_db_t::lookup
soft_register_base & lookup(const std::string &path) const override
Definition soft_register.hpp:640
uhd::soft_regmap_db_t::add
void add(soft_regmap_t &regmap)
Definition soft_register.hpp:611
uhd::soft_regmap_db_t::enumerate
std::vector< std::string > enumerate() const override
Definition soft_register.hpp:682
uhd::soft_regmap_db_t::sptr
std::shared_ptr< soft_regmap_db_t > sptr
Definition soft_register.hpp:588
uhd::soft_regmap_db_t::soft_regmap_db_t
soft_regmap_db_t(const std::string &name)
Definition soft_register.hpp:598
uhd::soft_regmap_db_t::add
void add(soft_regmap_db_t &db)
Definition soft_register.hpp:620
uhd::soft_regmap_db_t::get_name
const std::string & get_name() const override
Definition soft_register.hpp:603
uhd::soft_regmap_db_t::soft_regmap_db_t
soft_regmap_db_t()
Definition soft_register.hpp:593
uhd::soft_regmap_t
Definition soft_register.hpp:464
uhd::soft_regmap_t::initialize
void initialize(wb_iface &iface, bool sync=false)
Definition soft_register.hpp:483
uhd::soft_regmap_t::get_name
UHD_INLINE const std::string & get_name() const override
Definition soft_register.hpp:472
uhd::soft_regmap_t::enumerate
std::vector< std::string > enumerate() const override
Definition soft_register.hpp:535
uhd::soft_regmap_t::soft_regmap_t
soft_regmap_t(const std::string &name)
Definition soft_register.hpp:466
uhd::soft_regmap_t::~soft_regmap_t
~soft_regmap_t() override
Definition soft_register.hpp:467
uhd::soft_regmap_t::lookup
soft_register_base & lookup(const std::string &name) const override
Definition soft_register.hpp:521
uhd::soft_regmap_t::flush
void flush()
Definition soft_register.hpp:496
uhd::soft_regmap_t::visibility_t
visibility_t
Definition soft_register.hpp:545
uhd::soft_regmap_t::PRIVATE
@ PRIVATE
Definition soft_register.hpp:547
uhd::soft_regmap_t::PUBLIC
@ PUBLIC
Definition soft_register.hpp:546
uhd::soft_regmap_t::add_to_map
UHD_INLINE void add_to_map(soft_register_base &reg, const std::string &name, const visibility_t visible=PRIVATE)
Definition soft_register.hpp:553
uhd::soft_regmap_t::refresh
void refresh()
Definition soft_register.hpp:509
uhd::wb_iface
Definition wb_iface.hpp:18
uhd::wb_iface::wb_addr_type
uint32_t wb_addr_type
Definition wb_iface.hpp:21
UHD_INLINE
#define UHD_INLINE
Definition config.h:65
UHD_API
#define UHD_API
Definition config.h:87
dirty_tracked.hpp
exception.hpp
uhd::soft_reg_field
Definition soft_register.hpp:74
uhd::soft_reg_field::mask
UHD_INLINE data_t mask(const soft_reg_field_t field)
Definition soft_register.hpp:86
uhd::soft_reg_field::shift
UHD_INLINE size_t shift(const soft_reg_field_t field)
Definition soft_register.hpp:80
uhd::soft_reg_field::width
UHD_INLINE size_t width(const soft_reg_field_t field)
Definition soft_register.hpp:75
uhd
Definition build_info.hpp:12
uhd::likely
UHD_INLINE bool likely(bool expr)
hint for the branch prediction
Definition soft_register.hpp:46
uhd::soft_reg64_wo_t
soft_register_t< uint64_t, false, true > soft_reg64_wo_t
Definition soft_register.hpp:395
uhd::soft_reg64_ro_sync_t
soft_register_sync_t< uint64_t, true, false > soft_reg64_ro_sync_t
Definition soft_register.hpp:399
uhd::unlikely
UHD_INLINE bool unlikely(bool expr)
hint for the branch prediction
Definition soft_register.hpp:56
uhd::soft_reg32_ro_sync_t
soft_register_sync_t< uint32_t, true, false > soft_reg32_ro_sync_t
Definition soft_register.hpp:392
uhd::noncopyable
boost::noncopyable noncopyable
Definition noncopyable.hpp:45
uhd::soft_reg_field_t
uint32_t soft_reg_field_t
Definition soft_register.hpp:72
uhd::soft_reg32_ro_t
soft_register_t< uint32_t, true, false > soft_reg32_ro_t
Definition soft_register.hpp:389
uhd::soft_reg32_rw_t
soft_register_t< uint32_t, true, true > soft_reg32_rw_t
Definition soft_register.hpp:390
uhd::soft_reg32_rw_sync_t
soft_register_sync_t< uint32_t, true, true > soft_reg32_rw_sync_t
Definition soft_register.hpp:393
uhd::soft_reg64_ro_t
soft_register_t< uint64_t, true, false > soft_reg64_ro_t
Definition soft_register.hpp:396
uhd::soft_reg64_rw_sync_t
soft_register_sync_t< uint64_t, true, true > soft_reg64_rw_sync_t
Definition soft_register.hpp:400
uhd::soft_reg32_wo_sync_t
soft_register_sync_t< uint32_t, false, true > soft_reg32_wo_sync_t
Definition soft_register.hpp:391
uhd::soft_reg_flush_mode_t
soft_reg_flush_mode_t
Definition soft_register.hpp:128
uhd::OPTIMIZED_FLUSH
@ OPTIMIZED_FLUSH
Definition soft_register.hpp:128
uhd::ALWAYS_FLUSH
@ ALWAYS_FLUSH
Definition soft_register.hpp:128
uhd::soft_reg64_rw_t
soft_register_t< uint64_t, true, true > soft_reg64_rw_t
Definition soft_register.hpp:397
uhd::soft_reg32_wo_t
soft_register_t< uint32_t, false, true > soft_reg32_wo_t
Definition soft_register.hpp:388
uhd::soft_reg64_wo_sync_t
soft_register_sync_t< uint64_t, false, true > soft_reg64_wo_sync_t
Definition soft_register.hpp:398
noncopyable.hpp
UHD_DEFINE_SOFT_REG_FIELD
#define UHD_DEFINE_SOFT_REG_FIELD(name, width, shift)
Definition soft_register.hpp:38
uhd::assertion_error
Definition exception.hpp:48
uhd::not_implemented_error
Definition exception.hpp:157
uhd::runtime_error
Definition exception.hpp:132
uhd::type_error
Definition exception.hpp:96
wb_iface.hpp