gem5  v21.1.0.2
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
gem5::RegisterBank< BankByteOrder >::RegisterBuf Class Reference

#include <reg_bank.hh>

Inheritance diagram for gem5::RegisterBank< BankByteOrder >::RegisterBuf:
gem5::RegisterBank< BankByteOrder >::RegisterBase gem5::RegisterBankBase::RegisterBaseBase gem5::RegisterBank< BankByteOrder >::RegisterLBuf< BufBytes > gem5::RegisterBank< BankByteOrder >::RegisterLBuf< 12 >

Public Member Functions

 RegisterBuf (const std::string &new_name, void *ptr, size_t bytes)
 
void write (const void *buf) override
 
void write (const void *buf, off_t offset, size_t bytes) override
 
void read (void *buf) override
 
void read (void *buf, off_t offset, size_t bytes) override
 
void serialize (std::ostream &os) const override
 
bool unserialize (const std::string &s) override
 
- Public Member Functions inherited from gem5::RegisterBank< BankByteOrder >::RegisterBase
constexpr RegisterBase (const std::string &new_name, size_t new_size)
 
virtual ~RegisterBase ()
 
virtual const std::string & name () const
 
size_t size () const
 

Protected Member Functions

void setBuffer (void *buf)
 This method exists so that derived classes that need to initialize their buffers before they can be set can do so. More...
 

Private Attributes

void * _ptr = nullptr
 

Additional Inherited Members

- Protected Attributes inherited from gem5::RegisterBank< BankByteOrder >::RegisterBase
const std::string _name
 
size_t _size = 0
 

Detailed Description

template<ByteOrder BankByteOrder>
class gem5::RegisterBank< BankByteOrder >::RegisterBuf

Definition at line 411 of file reg_bank.hh.

Constructor & Destructor Documentation

◆ RegisterBuf()

template<ByteOrder BankByteOrder>
gem5::RegisterBank< BankByteOrder >::RegisterBuf::RegisterBuf ( const std::string &  new_name,
void *  ptr,
size_t  bytes 
)
inline

Definition at line 417 of file reg_bank.hh.

Member Function Documentation

◆ read() [1/2]

template<ByteOrder BankByteOrder>
void gem5::RegisterBank< BankByteOrder >::RegisterBuf::read ( void *  buf)
inlineoverridevirtual

◆ read() [2/2]

template<ByteOrder BankByteOrder>
void gem5::RegisterBank< BankByteOrder >::RegisterBuf::read ( void *  buf,
off_t  offset,
size_t  bytes 
)
inlineoverridevirtual

◆ serialize()

template<ByteOrder BankByteOrder>
void gem5::RegisterBank< BankByteOrder >::RegisterBuf::serialize ( std::ostream &  os) const
inlineoverridevirtual

◆ setBuffer()

template<ByteOrder BankByteOrder>
void gem5::RegisterBank< BankByteOrder >::RegisterBuf::setBuffer ( void *  buf)
inlineprotected

This method exists so that derived classes that need to initialize their buffers before they can be set can do so.

Parameters
bufThe pointer to the backing buffer.

Definition at line 449 of file reg_bank.hh.

References gem5::RegisterBank< BankByteOrder >::RegisterBuf::_ptr.

Referenced by gem5::RegisterBank< BankByteOrder >::RegisterLBuf< 12 >::RegisterLBuf().

◆ unserialize()

template<ByteOrder BankByteOrder>
bool gem5::RegisterBank< BankByteOrder >::RegisterBuf::unserialize ( const std::string &  s)
inlineoverridevirtual

◆ write() [1/2]

template<ByteOrder BankByteOrder>
void gem5::RegisterBank< BankByteOrder >::RegisterBuf::write ( const void *  buf)
inlineoverridevirtual

◆ write() [2/2]

template<ByteOrder BankByteOrder>
void gem5::RegisterBank< BankByteOrder >::RegisterBuf::write ( const void *  buf,
off_t  offset,
size_t  bytes 
)
inlineoverridevirtual

Member Data Documentation

◆ _ptr

template<ByteOrder BankByteOrder>
void* gem5::RegisterBank< BankByteOrder >::RegisterBuf::_ptr = nullptr
private

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

Generated on Tue Sep 21 2021 12:28:03 for gem5 by doxygen 1.8.17