Template Class RegisterDeviceInterface

Class Documentation

template<class DEV>
class RegisterDeviceInterface

Felix-register interface to a PCIe endpoint.

Public Functions

inline RegisterDeviceInterface(RegmapManager &regmap, std::shared_ptr<DEV> main, std::shared_ptr<DEV> primary)

RegisterDeviceManager class constructor.

Parameters:
  • regmap -- the owner of the the yaml register map.

  • main -- the PCIe endpoint for this RegisterDeviceManager.

  • primary -- the primary PCIe endpoint correspoding to "main".

uint64_t get_register(const std::string &reg_name)

read a register.

Parameters:

reg_name -- register name.

Returns:

the register value

void set_register(const std::string &reg_name, uint64_t value)

set a register.

Parameters:
  • reg_name -- register name.

  • values -- the value to be set.

inline bool can_read(const std::string &reg_name)
Returns:

whether the register is readable

inline bool can_write(const std::string &reg_name)
Returns:

whether the register is writable