gem5  v21.1.0.2
Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
gem5::RegisterBank< BankByteOrder > Class Template Reference

#include <reg_bank.hh>

Inheritance diagram for gem5::RegisterBank< BankByteOrder >:
gem5::RegisterBankBase

Classes

class  Register
 
class  RegisterBase
 
class  RegisterBuf
 
class  RegisterLBuf
 
class  RegisterRao
 
class  RegisterRaz
 
class  RegisterRoFill
 

Public Types

using Register8 = Register< uint8_t >
 
using Register8LE = Register< uint8_t, ByteOrder::little >
 
using Register8BE = Register< uint8_t, ByteOrder::big >
 
using Register16 = Register< uint16_t >
 
using Register16LE = Register< uint16_t, ByteOrder::little >
 
using Register16BE = Register< uint16_t, ByteOrder::big >
 
using Register32 = Register< uint32_t >
 
using Register32LE = Register< uint32_t, ByteOrder::little >
 
using Register32BE = Register< uint32_t, ByteOrder::big >
 
using Register64 = Register< uint64_t >
 
using Register64LE = Register< uint64_t, ByteOrder::little >
 
using Register64BE = Register< uint64_t, ByteOrder::big >
 

Public Member Functions

constexpr RegisterBank (const std::string &new_name, Addr new_base)
 
virtual ~RegisterBank ()
 
void addRegisters (std::initializer_list< std::reference_wrapper< RegisterBase >> regs)
 
void addRegister (RegisterBase &reg)
 
Addr base () const
 
Addr size () const
 
const std::string & name () const
 
virtual void read (Addr addr, void *buf, Addr bytes)
 
virtual void write (Addr addr, const void *buf, Addr bytes)
 

Static Public Member Functions

template<typename Data >
static constexpr Data readWithMask (const Data &value, const Data &bitmask)
 
template<typename Data >
static constexpr Data writeWithMask (const Data &old, const Data &value, const Data &bitmask)
 

Private Attributes

std::map< Addr, std::reference_wrapper< RegisterBase > > _offsetMap
 
Addr _base = 0
 
Addr _size = 0
 
const std::string _name
 

Detailed Description

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

Definition at line 300 of file reg_bank.hh.

Member Typedef Documentation

◆ Register16

template<ByteOrder BankByteOrder>
using gem5::RegisterBank< BankByteOrder >::Register16 = Register<uint16_t>

Definition at line 791 of file reg_bank.hh.

◆ Register16BE

template<ByteOrder BankByteOrder>
using gem5::RegisterBank< BankByteOrder >::Register16BE = Register<uint16_t, ByteOrder::big>

Definition at line 793 of file reg_bank.hh.

◆ Register16LE

template<ByteOrder BankByteOrder>
using gem5::RegisterBank< BankByteOrder >::Register16LE = Register<uint16_t, ByteOrder::little>

Definition at line 792 of file reg_bank.hh.

◆ Register32

template<ByteOrder BankByteOrder>
using gem5::RegisterBank< BankByteOrder >::Register32 = Register<uint32_t>

Definition at line 794 of file reg_bank.hh.

◆ Register32BE

template<ByteOrder BankByteOrder>
using gem5::RegisterBank< BankByteOrder >::Register32BE = Register<uint32_t, ByteOrder::big>

Definition at line 796 of file reg_bank.hh.

◆ Register32LE

template<ByteOrder BankByteOrder>
using gem5::RegisterBank< BankByteOrder >::Register32LE = Register<uint32_t, ByteOrder::little>

Definition at line 795 of file reg_bank.hh.

◆ Register64

template<ByteOrder BankByteOrder>
using gem5::RegisterBank< BankByteOrder >::Register64 = Register<uint64_t>

Definition at line 797 of file reg_bank.hh.

◆ Register64BE

template<ByteOrder BankByteOrder>
using gem5::RegisterBank< BankByteOrder >::Register64BE = Register<uint64_t, ByteOrder::big>

Definition at line 799 of file reg_bank.hh.

◆ Register64LE

template<ByteOrder BankByteOrder>
using gem5::RegisterBank< BankByteOrder >::Register64LE = Register<uint64_t, ByteOrder::little>

Definition at line 798 of file reg_bank.hh.

◆ Register8

template<ByteOrder BankByteOrder>
using gem5::RegisterBank< BankByteOrder >::Register8 = Register<uint8_t>

Definition at line 788 of file reg_bank.hh.

◆ Register8BE

template<ByteOrder BankByteOrder>
using gem5::RegisterBank< BankByteOrder >::Register8BE = Register<uint8_t, ByteOrder::big>

Definition at line 790 of file reg_bank.hh.

◆ Register8LE

template<ByteOrder BankByteOrder>
using gem5::RegisterBank< BankByteOrder >::Register8LE = Register<uint8_t, ByteOrder::little>

Definition at line 789 of file reg_bank.hh.

Constructor & Destructor Documentation

◆ RegisterBank()

template<ByteOrder BankByteOrder>
constexpr gem5::RegisterBank< BankByteOrder >::RegisterBank ( const std::string &  new_name,
Addr  new_base 
)
inlineconstexpr

Definition at line 802 of file reg_bank.hh.

◆ ~RegisterBank()

template<ByteOrder BankByteOrder>
virtual gem5::RegisterBank< BankByteOrder >::~RegisterBank ( )
inlinevirtual

Definition at line 806 of file reg_bank.hh.

Member Function Documentation

◆ addRegister()

template<ByteOrder BankByteOrder>
void gem5::RegisterBank< BankByteOrder >::addRegister ( RegisterBase reg)
inline

Definition at line 820 of file reg_bank.hh.

Referenced by TEST_F().

◆ addRegisters()

template<ByteOrder BankByteOrder>
void gem5::RegisterBank< BankByteOrder >::addRegisters ( std::initializer_list< std::reference_wrapper< RegisterBase >>  regs)
inline

Definition at line 809 of file reg_bank.hh.

Referenced by gem5::RegisterBank< ByteOrder::little >::addRegister(), and TEST_F().

◆ base()

template<ByteOrder BankByteOrder>
Addr gem5::RegisterBank< BankByteOrder >::base ( ) const
inline

◆ name()

template<ByteOrder BankByteOrder>
const std::string& gem5::RegisterBank< BankByteOrder >::name ( ) const
inline

◆ read()

template<ByteOrder BankByteOrder>
virtual void gem5::RegisterBank< BankByteOrder >::read ( Addr  addr,
void *  buf,
Addr  bytes 
)
inlinevirtual

◆ readWithMask()

template<ByteOrder BankByteOrder>
template<typename Data >
static constexpr Data gem5::RegisterBank< BankByteOrder >::readWithMask ( const Data &  value,
const Data &  bitmask 
)
inlinestaticconstexpr

Definition at line 306 of file reg_bank.hh.

Referenced by gem5::RegisterBank< ByteOrder::little >::writeWithMask().

◆ size()

template<ByteOrder BankByteOrder>
Addr gem5::RegisterBank< BankByteOrder >::size ( ) const
inline

◆ write()

template<ByteOrder BankByteOrder>
virtual void gem5::RegisterBank< BankByteOrder >::write ( Addr  addr,
const void *  buf,
Addr  bytes 
)
inlinevirtual

◆ writeWithMask()

template<ByteOrder BankByteOrder>
template<typename Data >
static constexpr Data gem5::RegisterBank< BankByteOrder >::writeWithMask ( const Data &  old,
const Data &  value,
const Data &  bitmask 
)
inlinestaticconstexpr

Member Data Documentation

◆ _base

template<ByteOrder BankByteOrder>
Addr gem5::RegisterBank< BankByteOrder >::_base = 0
private

◆ _name

template<ByteOrder BankByteOrder>
const std::string gem5::RegisterBank< BankByteOrder >::_name
private

Definition at line 784 of file reg_bank.hh.

Referenced by gem5::RegisterBank< ByteOrder::little >::name().

◆ _offsetMap

template<ByteOrder BankByteOrder>
std::map<Addr, std::reference_wrapper<RegisterBase> > gem5::RegisterBank< BankByteOrder >::_offsetMap
private

◆ _size

template<ByteOrder BankByteOrder>
Addr gem5::RegisterBank< BankByteOrder >::_size = 0
private

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

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