USRP Hardware Driver and USRP Manual  Version: 003.009.007-0-g50839059
UHD and USRP Manual
soft_register.hpp File Reference
#include <boost/cstdint.hpp>
#include <boost/noncopyable.hpp>
#include <uhd/types/wb_iface.hpp>
#include <uhd/exception.hpp>
#include <uhd/utils/dirty_tracked.hpp>
#include <boost/thread/mutex.hpp>
#include <boost/thread/locks.hpp>
#include <boost/unordered_map.hpp>
#include <boost/tokenizer.hpp>
#include <boost/foreach.hpp>
#include <boost/lexical_cast.hpp>
#include <list>

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

 uhd
 
 uhd::soft_reg_field
 

Macros

#define UHD_DEFINE_SOFT_REG_FIELD(name, width, shift)   static const uhd::soft_reg_field_t name = (((shift & 0xFF) << 8) | (width & 0xFF))
 

Typedefs

typedef boost::uint32_t uhd::soft_reg_field_t
 
typedef soft_register_t< boost::uint16_t, false, true > uhd::soft_reg16_wo_t
 
typedef soft_register_t< boost::uint16_t, true, false > uhd::soft_reg16_ro_t
 
typedef soft_register_t< boost::uint16_t, true, true > uhd::soft_reg16_rw_t
 
typedef soft_register_sync_t< boost::uint16_t, false, true > uhd::soft_reg16_wo_sync_t
 
typedef soft_register_sync_t< boost::uint16_t, true, false > uhd::soft_reg16_ro_sync_t
 
typedef soft_register_sync_t< boost::uint16_t, true, true > uhd::soft_reg16_rw_sync_t
 
typedef soft_register_t< boost::uint32_t, false, true > uhd::soft_reg32_wo_t
 
typedef soft_register_t< boost::uint32_t, true, false > uhd::soft_reg32_ro_t
 
typedef soft_register_t< boost::uint32_t, true, true > uhd::soft_reg32_rw_t
 
typedef soft_register_sync_t< boost::uint32_t, false, true > uhd::soft_reg32_wo_sync_t
 
typedef soft_register_sync_t< boost::uint32_t, true, false > uhd::soft_reg32_ro_sync_t
 
typedef soft_register_sync_t< boost::uint32_t, true, true > uhd::soft_reg32_rw_sync_t
 
typedef soft_register_t< boost::uint64_t, false, true > uhd::soft_reg64_wo_t
 
typedef soft_register_t< boost::uint64_t, true, false > uhd::soft_reg64_ro_t
 
typedef soft_register_t< boost::uint64_t, true, true > uhd::soft_reg64_rw_t
 
typedef soft_register_sync_t< boost::uint64_t, false, true > uhd::soft_reg64_wo_sync_t
 
typedef soft_register_sync_t< boost::uint64_t, true, false > uhd::soft_reg64_ro_sync_t
 
typedef soft_register_sync_t< boost::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

bool uhd::likely (bool expr)
 hint for the branch prediction More...
 
bool uhd::unlikely (bool expr)
 hint for the branch prediction More...
 
size_t uhd::soft_reg_field::width (const soft_reg_field_t field)
 
size_t uhd::soft_reg_field::shift (const soft_reg_field_t field)
 
template<typename data_t >
size_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 
)    static const uhd::soft_reg_field_t name = (((shift & 0xFF) << 8) | (width & 0xFF))