ChimeraTK-DeviceAccess  03.18.00
ChimeraTK::NumericAddressedRegisterInfo Class Reference

#include <NumericAddressedRegisterCatalogue.h>

+ Inheritance diagram for ChimeraTK::NumericAddressedRegisterInfo:
+ Collaboration diagram for ChimeraTK::NumericAddressedRegisterInfo:

Classes

struct  ChannelInfo
 Per-channel information. More...
 

Public Types

enum  Access { Access::READ_ONLY, Access::WRITE_ONLY, Access::READ_WRITE, Access::INTERRUPT }
 Enum describing the access mode of the register: More...
 
enum  Type { Type::VOID = 0, Type::FIXED_POINT = 1, Type::IEEE754 = 2, Type::ASCII = 3 }
 Enum descibing the data interpretation: More...
 

Public Member Functions

 NumericAddressedRegisterInfo (RegisterPath const &pathName_={}, uint32_t nElements_=0, uint64_t address_=0, uint32_t nBytes_=0, uint64_t bar_=0, uint32_t width_=32, int32_t nFractionalBits_=0, bool signedFlag_=true, Access dataAccess_=Access::READ_WRITE, Type dataType_=Type::FIXED_POINT, std::vector< size_t > interruptId_={})
 Constructor to set all data members for scalar/1D registers. More...
 
 NumericAddressedRegisterInfo (RegisterPath const &pathName_, uint64_t bar_, uint64_t address_, uint32_t nElements_, uint32_t elementPitchBits_, std::vector< ChannelInfo > channelInfo_, Access dataAccess_, std::vector< size_t > interruptId_)
 Constructor to set all data members for 2D registers. More...
 
 NumericAddressedRegisterInfo (const NumericAddressedRegisterInfo &)=default
 
NumericAddressedRegisterInfooperator= (const NumericAddressedRegisterInfo &other)=default
 
bool operator== (const ChimeraTK::NumericAddressedRegisterInfo &rhs) const
 
bool operator!= (const ChimeraTK::NumericAddressedRegisterInfo &rhs) const
 
RegisterPath getRegisterName () const override
 Return full path name of the register (including modules) More...
 
unsigned int getNumberOfElements () const override
 Return number of elements per channel. More...
 
unsigned int getNumberOfChannels () const override
 Return number of channels in register. More...
 
const DataDescriptorgetDataDescriptor () const override
 Return desciption of the actual payload data for this register. More...
 
bool isReadable () const override
 Return whether the register is readable. More...
 
bool isWriteable () const override
 Return whether the register is writeable. More...
 
AccessModeFlags getSupportedAccessModes () const override
 Return all supported AccessModes for this register. More...
 
std::unique_ptr< BackendRegisterInfoBaseclone () const override
 Create copy of the object. More...
 
std::vector< size_t > getQualifiedAsyncId () const override
 Return the fully qualified async::SubDomain ID. More...
 
- Public Member Functions inherited from ChimeraTK::BackendRegisterInfoBase
virtual ~BackendRegisterInfoBase ()=default
 Virtual destructor. More...
 
unsigned int getNumberOfDimensions () const
 Return number of dimensions of this register. More...
 

Public Attributes

RegisterPath pathName
 
uint32_t nElements
 Number of elements in register. More...
 
uint32_t elementPitchBits
 Distance in bits (!) between two elements (of the same channel) More...
 
uint64_t bar
 Upper part of the address (name originally from PCIe, meaning now generalised) More...
 
uint64_t address
 Lower part of the address relative to BAR, in bytes. More...
 
Access registerAccess
 Data access direction: Read, write, read and write or interrupt. More...
 
std::vector< size_t > interruptId
 
std::vector< ChannelInfochannels
 Define per-channel information (bit interpretation etc.), 1D/scalars have exactly one entry. More...
 
DataDescriptor dataDescriptor
 

Detailed Description

Definition at line 15 of file NumericAddressedRegisterCatalogue.h.

Member Enumeration Documentation

◆ Access

Enum describing the access mode of the register:

  • read-only
  • write-only
  • read-write
  • interrupt (implies read-only)
Enumerator
READ_ONLY 
WRITE_ONLY 
READ_WRITE 
INTERRUPT 

Definition at line 24 of file NumericAddressedRegisterCatalogue.h.

◆ Type

Enum descibing the data interpretation:

  • Fixed point (includes integer = 0 fractional bits)
  • IEEE754 floating point
  • ASCII ascii characters
  • VOID no data content, just trigger events (push type) FIXME: Currently implicit by 0 bits width

Note: The values need to be in "ascending" order of the information the type can hold. In 2D registers with different types in the channels, the type with the biggest value here will "win".

Enumerator
VOID 
FIXED_POINT 
IEEE754 
ASCII 

Definition at line 36 of file NumericAddressedRegisterCatalogue.h.

Constructor & Destructor Documentation

◆ NumericAddressedRegisterInfo() [1/3]

ChimeraTK::NumericAddressedRegisterInfo::NumericAddressedRegisterInfo ( RegisterPath const &  pathName_ = {},
uint32_t  nElements_ = 0,
uint64_t  address_ = 0,
uint32_t  nBytes_ = 0,
uint64_t  bar_ = 0,
uint32_t  width_ = 32,
int32_t  nFractionalBits_ = 0,
bool  signedFlag_ = true,
Access  dataAccess_ = Access::READ_WRITE,
Type  dataType_ = Type::FIXED_POINT,
std::vector< size_t >  interruptId_ = {} 
)
explicit

Constructor to set all data members for scalar/1D registers.

They all have default values, so this also acts as default constructor.

Definition at line 18 of file NumericAddressedRegisterCatalogue.cc.

+ Here is the caller graph for this function:

◆ NumericAddressedRegisterInfo() [2/3]

ChimeraTK::NumericAddressedRegisterInfo::NumericAddressedRegisterInfo ( RegisterPath const &  pathName_,
uint64_t  bar_,
uint64_t  address_,
uint32_t  nElements_,
uint32_t  elementPitchBits_,
std::vector< ChannelInfo channelInfo_,
Access  dataAccess_,
std::vector< size_t >  interruptId_ 
)

Constructor to set all data members for 2D registers.

Definition at line 43 of file NumericAddressedRegisterCatalogue.cc.

+ Here is the call graph for this function:

◆ NumericAddressedRegisterInfo() [3/3]

ChimeraTK::NumericAddressedRegisterInfo::NumericAddressedRegisterInfo ( const NumericAddressedRegisterInfo )
default

Member Function Documentation

◆ clone()

std::unique_ptr<BackendRegisterInfoBase> ChimeraTK::NumericAddressedRegisterInfo::clone ( ) const
inlineoverridevirtual

Create copy of the object.

Implements ChimeraTK::BackendRegisterInfoBase.

Definition at line 124 of file NumericAddressedRegisterCatalogue.h.

+ Here is the call graph for this function:

◆ getDataDescriptor()

const DataDescriptor& ChimeraTK::NumericAddressedRegisterInfo::getDataDescriptor ( ) const
inlineoverridevirtual

Return desciption of the actual payload data for this register.

See the description of DataDescriptor for more information.

Implements ChimeraTK::BackendRegisterInfoBase.

Definition at line 83 of file NumericAddressedRegisterCatalogue.h.

+ Here is the caller graph for this function:

◆ getNumberOfChannels()

unsigned int ChimeraTK::NumericAddressedRegisterInfo::getNumberOfChannels ( ) const
inlineoverridevirtual

Return number of channels in register.

Implements ChimeraTK::BackendRegisterInfoBase.

Definition at line 81 of file NumericAddressedRegisterCatalogue.h.

◆ getNumberOfElements()

unsigned int ChimeraTK::NumericAddressedRegisterInfo::getNumberOfElements ( ) const
inlineoverridevirtual

Return number of elements per channel.

Implements ChimeraTK::BackendRegisterInfoBase.

Definition at line 79 of file NumericAddressedRegisterCatalogue.h.

+ Here is the caller graph for this function:

◆ getQualifiedAsyncId()

std::vector< size_t > ChimeraTK::NumericAddressedRegisterInfo::getQualifiedAsyncId ( ) const
overridevirtual

Return the fully qualified async::SubDomain ID.

The default implementation returns an empty vector.

Reimplemented from ChimeraTK::BackendRegisterInfoBase.

Definition at line 181 of file NumericAddressedRegisterCatalogue.cc.

◆ getRegisterName()

RegisterPath ChimeraTK::NumericAddressedRegisterInfo::getRegisterName ( ) const
inlineoverridevirtual

Return full path name of the register (including modules)

Implements ChimeraTK::BackendRegisterInfoBase.

Definition at line 77 of file NumericAddressedRegisterCatalogue.h.

+ Here is the caller graph for this function:

◆ getSupportedAccessModes()

AccessModeFlags ChimeraTK::NumericAddressedRegisterInfo::getSupportedAccessModes ( ) const
inlineoverridevirtual

Return all supported AccessModes for this register.

Implements ChimeraTK::BackendRegisterInfoBase.

Definition at line 94 of file NumericAddressedRegisterCatalogue.h.

+ Here is the call graph for this function:

◆ isReadable()

bool ChimeraTK::NumericAddressedRegisterInfo::isReadable ( ) const
inlineoverridevirtual

Return whether the register is readable.

Implements ChimeraTK::BackendRegisterInfoBase.

Definition at line 85 of file NumericAddressedRegisterCatalogue.h.

+ Here is the caller graph for this function:

◆ isWriteable()

bool ChimeraTK::NumericAddressedRegisterInfo::isWriteable ( ) const
inlineoverridevirtual

Return whether the register is writeable.

Implements ChimeraTK::BackendRegisterInfoBase.

Definition at line 90 of file NumericAddressedRegisterCatalogue.h.

+ Here is the caller graph for this function:

◆ operator!=()

bool ChimeraTK::NumericAddressedRegisterInfo::operator!= ( const ChimeraTK::NumericAddressedRegisterInfo rhs) const

Definition at line 175 of file NumericAddressedRegisterCatalogue.cc.

+ Here is the call graph for this function:

◆ operator=()

NumericAddressedRegisterInfo& ChimeraTK::NumericAddressedRegisterInfo::operator= ( const NumericAddressedRegisterInfo other)
default

◆ operator==()

bool ChimeraTK::NumericAddressedRegisterInfo::operator== ( const ChimeraTK::NumericAddressedRegisterInfo rhs) const

Definition at line 166 of file NumericAddressedRegisterCatalogue.cc.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ address

uint64_t ChimeraTK::NumericAddressedRegisterInfo::address

Lower part of the address relative to BAR, in bytes.

Definition at line 114 of file NumericAddressedRegisterCatalogue.h.

◆ bar

uint64_t ChimeraTK::NumericAddressedRegisterInfo::bar

Upper part of the address (name originally from PCIe, meaning now generalised)

Definition at line 113 of file NumericAddressedRegisterCatalogue.h.

◆ channels

std::vector<ChannelInfo> ChimeraTK::NumericAddressedRegisterInfo::channels

Define per-channel information (bit interpretation etc.), 1D/scalars have exactly one entry.

Definition at line 120 of file NumericAddressedRegisterCatalogue.h.

◆ dataDescriptor

DataDescriptor ChimeraTK::NumericAddressedRegisterInfo::dataDescriptor

Definition at line 122 of file NumericAddressedRegisterCatalogue.h.

◆ elementPitchBits

uint32_t ChimeraTK::NumericAddressedRegisterInfo::elementPitchBits

Distance in bits (!) between two elements (of the same channel)

Definition at line 111 of file NumericAddressedRegisterCatalogue.h.

◆ interruptId

std::vector<size_t> ChimeraTK::NumericAddressedRegisterInfo::interruptId

Definition at line 117 of file NumericAddressedRegisterCatalogue.h.

◆ nElements

uint32_t ChimeraTK::NumericAddressedRegisterInfo::nElements

Number of elements in register.

Definition at line 110 of file NumericAddressedRegisterCatalogue.h.

◆ pathName

RegisterPath ChimeraTK::NumericAddressedRegisterInfo::pathName

Definition at line 108 of file NumericAddressedRegisterCatalogue.h.

◆ registerAccess

Access ChimeraTK::NumericAddressedRegisterInfo::registerAccess

Data access direction: Read, write, read and write or interrupt.

Definition at line 116 of file NumericAddressedRegisterCatalogue.h.


The documentation for this class was generated from the following files: