FpgaManager
Software API Documentation
RegisterBank Class Reference

Provides a MmAccess interface with an offset More...

#include <FpgaManager_Utilities.h>

Inheritance diagram for RegisterBank:
IMmAccess

Public Member Functions

 RegisterBank (IMmAccess &mm, uint32_t baseAddress)
 Constructs a Register Bank More...
 
virtual uint32_t ReadRegister (uint32_t address) override
 Reads from a single register More...
 
virtual void WriteRegister (uint32_t address, uint32_t value) override
 Writes to a single register More...
 
virtual void ReadContiguous (uint32_t address, uint8_t *buffer_p, std::size_t bufSize) override
 Reads consecutive bytes from mapped memory/registers More...
 
virtual void WriteContiguous (uint32_t address, const uint8_t *buffer_p, std::size_t bufSize) override
 Writes consecutive bytes to mapped memory/registers More...
 
virtual void ReadMailbox (uint32_t address, uint8_t *buffer_p, std::size_t bufSize) override
 Reads multiple words from a single address location More...
 
virtual void WriteMailbox (uint32_t address, const uint8_t *buffer_p, std::size_t bufSize) override
 Writes multiple words to a single address location More...
 
virtual void ReadMailbox (uint32_t address, uint32_t *buffer_p, std::size_t count) override
 Reads multiple words from a single address location More...
 
virtual void WriteMailbox (uint32_t address, const uint32_t *buffer_p, std::size_t count) override
 Writes multiple words to a single address location More...
 
virtual void WriteMailbox (uint32_t address, const uint8_t *buffer_p, std::size_t bufSize)=0
 Writes multiple words to a single address location More...
 
template<std::size_t N>
void WriteMailbox (uint32_t address, const uint8_t(&buffer)[N])
 Writes multiple words to a single address location More...
 
template<std::size_t N>
void WriteMailbox (uint32_t address, const std::array< uint8_t, N > &array)
 Writes multiple words to a single address location More...
 
virtual void WriteMailbox (uint32_t address, const uint32_t *buffer_p, std::size_t count)=0
 Writes multiple words to a single address location More...
 
template<std::size_t N>
void WriteMailbox (uint32_t address, const uint32_t(&buffer)[N])
 Writes multiple words to a single address location More...
 
template<std::size_t N>
void WriteMailbox (uint32_t address, const std::array< uint32_t, N > &array)
 Writes multiple words to a single address location More...
 
- Public Member Functions inherited from IMmAccess
virtual ~IMmAccess ()=default
 Destructor More...
 
template<std::size_t N>
void ReadContiguous (uint32_t address, uint8_t(&buffer)[N])
 Reads consecutive bytes from mapped memory/registers More...
 
template<std::size_t N>
void ReadContiguous (uint32_t address, std::array< uint8_t, N > &array)
 Reads consecutive bytes from mapped memory/registers More...
 
template<std::size_t N>
void WriteContiguous (uint32_t address, const uint8_t(&buffer)[N])
 Writes consecutive bytes to mapped memory/registers More...
 
template<std::size_t N>
void WriteContiguous (uint32_t address, const std::array< uint8_t, N > &array)
 Writes consecutive bytes to mapped memory/registers More...
 
template<std::size_t N>
void ReadMailbox (uint32_t address, uint8_t(&buffer)[N])
 Reads multiple words from a single address location More...
 
template<std::size_t N>
void ReadMailbox (uint32_t address, std::array< uint8_t, N > &array)
 Reads multiple words from a single address location More...
 
template<std::size_t N>
void WriteMailbox (uint32_t address, const uint8_t(&buffer)[N])
 Writes multiple words to a single address location More...
 
template<std::size_t N>
void WriteMailbox (uint32_t address, const std::array< uint8_t, N > &array)
 Writes multiple words to a single address location More...
 
template<std::size_t N>
void ReadMailbox (uint32_t address, uint32_t(&buffer)[N])
 Reads multiple words from a single address location More...
 
template<std::size_t N>
void ReadMailbox (uint32_t address, std::array< uint32_t, N > &array)
 Reads multiple words from a single address location More...
 
template<std::size_t N>
void WriteMailbox (uint32_t address, const uint32_t(&buffer)[N])
 Writes multiple words to a single address location More...
 
template<std::size_t N>
void WriteMailbox (uint32_t address, const std::array< uint32_t, N > &array)
 Writes multiple words to a single address location More...
 

Detailed Description

Provides a MmAccess interface with an offset

Constructor & Destructor Documentation

◆ RegisterBank()

RegisterBank ( IMmAccess mm,
uint32_t  baseAddress 
)

Constructs a Register Bank

Parameters
baseAddressOffset of the register bank in memory space
mmmemory mapped interface for register access

Member Function Documentation

◆ ReadContiguous()

virtual void ReadContiguous ( uint32_t  address,
uint8_t *  buffer_p,
std::size_t  bufSize 
)
overridevirtual

Reads consecutive bytes from mapped memory/registers

Parameters
addressStart address of transfer
buffer_pBuffer where the data is copied to
bufSizeLength of transfer in bytes

Implements IMmAccess.

◆ ReadMailbox() [1/2]

virtual void ReadMailbox ( uint32_t  address,
uint8_t *  buffer_p,
std::size_t  bufSize 
)
overridevirtual

Reads multiple words from a single address location

Parameters
addressAddress of transfer
buffer_pBuffer where the data is copied to
bufSizeLength of transfer in bytes

Implements IMmAccess.

◆ ReadMailbox() [2/2]

virtual void ReadMailbox ( uint32_t  address,
uint32_t *  buffer_p,
std::size_t  count 
)
overridevirtual

Reads multiple words from a single address location

Parameters
addressAddress of transfer
buffer_pBuffer where the data is copied to
countNumber of words to transfer

Implements IMmAccess.

◆ ReadRegister()

virtual uint32_t ReadRegister ( uint32_t  address)
overridevirtual

Reads from a single register

Parameters
addressRegister address
Returns
Read value of the addressed register

Implements IMmAccess.

◆ WriteContiguous()

virtual void WriteContiguous ( uint32_t  address,
const uint8_t *  buffer_p,
std::size_t  bufSize 
)
overridevirtual

Writes consecutive bytes to mapped memory/registers

Parameters
addressStart address of transfer
buffer_pBuffer where the data is copied from
bufSizeLength of transfer in bytes

Implements IMmAccess.

◆ WriteMailbox() [1/8]

void WriteMailbox ( std::size_t  N)
inline

Writes multiple words to a single address location

Template Parameters
NLength of transfer in bytes (can be deduced)
Parameters
addressAddress of transfer
bufferBuffer where the data is copied from

◆ WriteMailbox() [2/8]

void WriteMailbox ( std::size_t  N)
inline

Writes multiple words to a single address location

Template Parameters
NLength of transfer in bytes (can be deduced)
Parameters
addressAddress of transfer
arrayArray where the data is copied from

◆ WriteMailbox() [3/8]

virtual void WriteMailbox

Writes multiple words to a single address location

Parameters
addressAddress of transfer
buffer_pBuffer where the data is copied from
bufSizeLength of transfer in bytes

◆ WriteMailbox() [4/8]

void WriteMailbox ( std::size_t  N)
inline

Writes multiple words to a single address location

Template Parameters
NLength of transfer in words (can be deduced)
Parameters
addressAddress of transfer
bufferBuffer where the data is copied from

◆ WriteMailbox() [5/8]

void WriteMailbox ( std::size_t  N)
inline

Writes multiple words to a single address location

Template Parameters
NLength of transfer in words (can be deduced)
Parameters
addressAddress of transfer
arrayArray where the data is copied from

◆ WriteMailbox() [6/8]

virtual void WriteMailbox

Writes multiple words to a single address location

Parameters
addressAddress of transfer
buffer_pBuffer where the data is copied from
countNumber of words to transfer

◆ WriteMailbox() [7/8]

virtual void WriteMailbox ( uint32_t  address,
const uint8_t *  buffer_p,
std::size_t  bufSize 
)
overridevirtual

Writes multiple words to a single address location

Parameters
addressAddress of transfer
buffer_pBuffer where the data is copied from
bufSizeLength of transfer in bytes

Implements IMmAccess.

◆ WriteMailbox() [8/8]

virtual void WriteMailbox ( uint32_t  address,
const uint32_t *  buffer_p,
std::size_t  count 
)
overridevirtual

Writes multiple words to a single address location

Parameters
addressAddress of transfer
buffer_pBuffer where the data is copied from
countNumber of words to transfer

Implements IMmAccess.

◆ WriteRegister()

virtual void WriteRegister ( uint32_t  address,
uint32_t  value 
)
overridevirtual

Writes to a single register

Parameters
addressRegister address
valueValue to write

Implements IMmAccess.


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