USRP Hardware Driver and USRP Manual: soft_register.hpp File Reference

| USRP Hardware Driver and USRP Manual Version: 4.9.0.makepkg-0-g9ec1f582 UHD and USRP Manual |

Loading...
Searching...
No Matches
soft_register.hpp File Reference
`#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>`

Go to the source code of this file.

## Classes
class | uhd::soft_register_base
class | uhd::soft_register_t< reg_data_t, readable, writable >
class | uhd::soft_register_sync_t< reg_data_t, readable, writable >
class | uhd::soft_regmap_accessor_t
class | uhd::soft_regmap_t
class | uhd::soft_regmap_db_t

## Namespaces
namespace | uhd
namespace | uhd::soft_reg_field

## Macros
#define | UHD_DEFINE_SOFT_REG_FIELD(name, width, shift)

## Typedefs
typedef uint32_t | uhd::soft_reg_field_t
typedef soft_register_t< uint32_t, false, true > | uhd::soft_reg32_wo_t
typedef soft_register_t< uint32_t, true, false > | uhd::soft_reg32_ro_t
typedef soft_register_t< uint32_t, true, true > | uhd::soft_reg32_rw_t
typedef soft_register_sync_t< uint32_t, false, true > | uhd::soft_reg32_wo_sync_t
typedef soft_register_sync_t< uint32_t, true, false > | uhd::soft_reg32_ro_sync_t
typedef soft_register_sync_t< uint32_t, true, true > | uhd::soft_reg32_rw_sync_t
typedef soft_register_t< uint64_t, false, true > | uhd::soft_reg64_wo_t
typedef soft_register_t< uint64_t, true, false > | uhd::soft_reg64_ro_t
typedef soft_register_t< uint64_t, true, true > | uhd::soft_reg64_rw_t
typedef soft_register_sync_t< uint64_t, false, true > | uhd::soft_reg64_wo_sync_t
typedef soft_register_sync_t< uint64_t, true, false > | uhd::soft_reg64_ro_sync_t
typedef soft_register_sync_t< uint64_t, true, true > | uhd::soft_reg64_rw_sync_t

## Enumerations
enum | uhd::soft_reg_flush_mode_t { uhd::OPTIMIZED_FLUSH , uhd::ALWAYS_FLUSH }

## Functions
UHD_INLINE bool | uhd::likely (bool expr)
| hint for the branch prediction
UHD_INLINE bool | uhd::unlikely (bool expr)
| hint for the branch prediction
UHD_INLINE size_t | uhd::soft_reg_field::width (const soft_reg_field_t field)
UHD_INLINE size_t | uhd::soft_reg_field::shift (const soft_reg_field_t field)
template<typename data_t>
UHD_INLINE data_t | uhd::soft_reg_field::mask (const soft_reg_field_t field)

## Detailed Description

Utilities to access and index hardware registers.

This file contains three main utilities:

- A soft_register wrapper class that can manage a soft-copy, do dirty tracking and allow symbolic access to various field of a register.
- A register map class that can own multiple soft registers that share the same underlying control interface.
- A register map database that can be used to collect multiple register maps and other databases to create a hierarchy of registers that can be accessed using the UHD register API.

## Macro Definition Documentation

## ◆ UHD_DEFINE_SOFT_REG_FIELD

#define UHD_DEFINE_SOFT_REG_FIELD | ( |  | name,
|  |  | width,
|  |  | shift )

Value:
static const uhd::soft_reg_field_t name = (((shift & 0xFF) << 8) | (width & 0xFF))
uhd::soft_reg_field_t
uint32_t soft_reg_field_t
Definition soft_register.hpp:72