#include <uhd/utils/soft_register.hpp>
Public Types | |
typedef std::shared_ptr< soft_register_t< reg_data_t, readable, writable > > | sptr |
Public Member Functions | |
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) | |
soft_register_t (wb_iface::wb_addr_type addr, soft_reg_flush_mode_t mode=ALWAYS_FLUSH) | |
UHD_INLINE void | initialize (wb_iface &iface, bool sync=false) override |
UHD_INLINE void | set (const soft_reg_field_t field, const reg_data_t value) |
UHD_INLINE reg_data_t | get (const soft_reg_field_t field) |
UHD_INLINE void | flush () override |
UHD_INLINE void | refresh () override |
UHD_INLINE void | write (const soft_reg_field_t field, const reg_data_t value) |
UHD_INLINE reg_data_t | read (const soft_reg_field_t field) |
UHD_INLINE size_t | get_bitwidth () override |
UHD_INLINE bool | is_readable () override |
UHD_INLINE bool | is_writable () override |
Public Member Functions inherited from uhd::soft_register_base | |
virtual | ~soft_register_base () |
Static Public Attributes | |
static const uhd::soft_reg_field_t | REGISTER = ((( 0 & 0xFF) << 8) | ( sizeof(reg_data_t) * 8 & 0xFF)) |
Additional Inherited Members | |
Static Public Member Functions inherited from uhd::soft_register_base | |
template<typename soft_reg_t > | |
static UHD_INLINE soft_reg_t & | cast (soft_register_base ®) |
Soft register object that holds offset, soft-copy and the control iface. Methods give convenient field-level access to soft-copy and the ability to do read-modify-write operations.
typedef std::shared_ptr<soft_register_t<reg_data_t, readable, writable> > uhd::soft_register_t< reg_data_t, readable, writable >::sptr |
|
inline |
Generic constructor for all soft_register types
|
inlineexplicit |
Constructor for read-only, write-only registers and read-write registers with rd_addr == wr_addr
|
inlineoverridevirtual |
Write the contents of the soft-copy to hardware.
Implements uhd::soft_register_base.
Reimplemented in uhd::soft_register_sync_t< reg_data_t, readable, writable >.
|
inline |
Get the value of the specified field from the soft-copy. NOTE: This does not read anything from hardware.
|
inlineoverridevirtual |
Get bitwidth for this register
Implements uhd::soft_register_base.
|
inlineoverridevirtual |
Initialize the register when the underlying bus is usable. Can be optionally synced with hardware. NOTE: Memory management of the iface is up to the caller
Implements uhd::soft_register_base.
Reimplemented in uhd::soft_register_sync_t< reg_data_t, readable, writable >.
|
inlineoverridevirtual |
Is the register readable?
Implements uhd::soft_register_base.
|
inlineoverridevirtual |
Is the register writable?
Implements uhd::soft_register_base.
|
inline |
Shortcut for refresh and get
|
inlineoverridevirtual |
Read the contents of the register from hardware and update the soft copy.
Implements uhd::soft_register_base.
Reimplemented in uhd::soft_register_sync_t< reg_data_t, readable, writable >.
|
inline |
Update specified field in the soft-copy with the arg value. Performs a read-modify-write operation so all other field are preserved. NOTE: This does not write the value to hardware.
|
inline |
Shortcut for a set and a flush.
|
static |