gem5 v24.0.0.0
|
#include <reg_bank.hh>
Public Types | |
using | ReadFunc = std::function<Data (This ®)> |
using | PartialReadFunc |
using | WriteFunc = std::function<void (This ®, const Data &value)> |
using | PartialWriteFunc |
using | ResetFunc = std::function<void (This ®)> |
Public Member Functions | |
constexpr | Register (const std::string &new_name) |
constexpr | Register (const std::string &new_name, const Data &new_data) |
constexpr | Register (const std::string &new_name, const Data &&new_data) |
constexpr This & | writeable (const Data &new_mask) |
constexpr This & | readonly () |
constexpr This & | reader (const ReadFunc &new_reader) |
template<class Parent , class... Args> | |
constexpr This & | reader (Parent *parent, Data(Parent::*nr)(Args... args)) |
constexpr This & | writer (const WriteFunc &new_writer) |
template<class Parent , class... Args> | |
constexpr This & | writer (Parent *parent, void(Parent::*nw)(Args... args)) |
constexpr This & | partialReader (const PartialReadFunc &new_reader) |
template<class Parent , class... Args> | |
constexpr This & | partialReader (Parent *parent, Data(Parent::*nr)(Args... args)) |
constexpr This & | partialWriter (const PartialWriteFunc &new_writer) |
template<class Parent , class... Args> | |
constexpr This & | partialWriter (Parent *parent, void(Parent::*nw)(Args... args)) |
constexpr This & | resetter (const ResetFunc &new_resetter) |
template<class Parent , class... Args> | |
constexpr This & | resetter (Parent *parent, void(Parent::*nr)(Args... args)) |
const Data & | initialValue () const |
void | resetInitialValue () |
const Data & | writeable () const |
const Data & | get () const |
Data & | get () |
void | update (const Data &new_data, const Data &bitmask) |
void | update (const Data &new_data) |
void | read (void *buf) override |
void | read (void *buf, off_t offset, size_t bytes) override |
void | write (const void *buf) override |
void | write (const void *buf, off_t offset, size_t bytes) override |
void | serialize (std::ostream &os) const override |
bool | unserialize (const std::string &s) override |
void | reset () 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 Types | |
using | This = Register<Data, RegByteOrder> |
Protected Member Functions | |
constexpr Data | htoreg (Data data) |
constexpr Data | regtoh (Data data) |
Static Protected Member Functions | |
static Data | defaultReader (This ®) |
static Data | defaultPartialReader (This ®, int first, int last) |
static void | defaultWriter (This ®, const Data &value) |
static void | defaultPartialWriter (This ®, const Data &value, int first, int last) |
static void | defaultResetter (This ®) |
Private Attributes | |
Data | _data = {} |
Data | _resetData = {} |
Data | _writeMask = mask(sizeof(Data) * 8) |
ReadFunc | _reader = defaultReader |
WriteFunc | _writer = defaultWriter |
PartialWriteFunc | _partialWriter = defaultPartialWriter |
PartialReadFunc | _partialReader = defaultPartialReader |
ResetFunc | _resetter = defaultResetter |
Additional Inherited Members | |
Protected Attributes inherited from gem5::RegisterBank< BankByteOrder >::RegisterBase | |
const std::string | _name |
size_t | _size = 0 |
Definition at line 575 of file reg_bank.hh.
using gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::PartialReadFunc |
Definition at line 582 of file reg_bank.hh.
using gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::PartialWriteFunc |
Definition at line 585 of file reg_bank.hh.
using gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::ReadFunc = std::function<Data (This ®)> |
Definition at line 581 of file reg_bank.hh.
using gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::ResetFunc = std::function<void (This ®)> |
Definition at line 587 of file reg_bank.hh.
|
protected |
Definition at line 578 of file reg_bank.hh.
using gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::WriteFunc = std::function<void (This ®, const Data &value)> |
Definition at line 584 of file reg_bank.hh.
|
inlineconstexpr |
Definition at line 661 of file reg_bank.hh.
|
inlineconstexpr |
Definition at line 666 of file reg_bank.hh.
|
inlineconstexpr |
Definition at line 670 of file reg_bank.hh.
|
inlinestaticprotected |
Definition at line 604 of file reg_bank.hh.
References gem5::mbits(), and gem5::X86ISA::reg.
|
inlinestaticprotected |
Definition at line 616 of file reg_bank.hh.
References gem5::ArmISA::mask, gem5::X86ISA::reg, and gem5::RegisterBank< BankByteOrder >::writeWithMask().
|
inlinestaticprotected |
Definition at line 601 of file reg_bank.hh.
References gem5::X86ISA::reg.
|
inlinestaticprotected |
Definition at line 623 of file reg_bank.hh.
References gem5::X86ISA::reg.
|
inlinestaticprotected |
Definition at line 610 of file reg_bank.hh.
References gem5::X86ISA::reg.
|
inline |
Definition at line 799 of file reg_bank.hh.
References gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::_data.
|
inline |
Definition at line 798 of file reg_bank.hh.
References gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::_data.
Referenced by gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::serialize(), and gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::unserialize().
|
inlineconstexprprotected |
Definition at line 629 of file reg_bank.hh.
References data, gem5::htobe(), gem5::htole(), and panic.
Referenced by gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::read(), and gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::read().
|
inline |
Definition at line 784 of file reg_bank.hh.
References gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::_resetData.
|
inlineconstexpr |
Definition at line 732 of file reg_bank.hh.
References gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::_partialReader.
Referenced by gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::partialReader().
|
inlineconstexpr |
Definition at line 739 of file reg_bank.hh.
References gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::partialReader().
|
inlineconstexpr |
Definition at line 747 of file reg_bank.hh.
References gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::_partialWriter.
Referenced by gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::partialWriter().
|
inlineconstexpr |
Definition at line 754 of file reg_bank.hh.
References gem5::X86ISA::nw, and gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::partialWriter().
|
inlineoverridevirtual |
Implements gem5::RegisterBank< BankByteOrder >::RegisterBase.
Definition at line 822 of file reg_bank.hh.
References gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::_reader, data, and gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::htoreg().
|
inlineoverridevirtual |
Implements gem5::RegisterBank< BankByteOrder >::RegisterBase.
Definition at line 829 of file reg_bank.hh.
References gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::_partialReader, data, gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::htoreg(), and gem5::ArmISA::offset.
|
inlineconstexpr |
Definition at line 691 of file reg_bank.hh.
References gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::_reader.
Referenced by gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::reader().
|
inlineconstexpr |
Definition at line 698 of file reg_bank.hh.
References gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::reader().
|
inlineconstexpr |
Definition at line 685 of file reg_bank.hh.
References gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::writeable().
|
inlineconstexprprotected |
Definition at line 642 of file reg_bank.hh.
References gem5::betoh(), data, gem5::letoh(), and panic.
Referenced by gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::write(), and gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::write().
|
inlineoverridevirtual |
Implements gem5::RegisterBank< BankByteOrder >::RegisterBase.
Definition at line 885 of file reg_bank.hh.
References gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::_resetter.
|
inline |
Definition at line 788 of file reg_bank.hh.
References gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::_data, and gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::_resetData.
|
inlineconstexpr |
Definition at line 767 of file reg_bank.hh.
References gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::_resetter.
Referenced by gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::resetter().
|
inlineconstexpr |
Definition at line 774 of file reg_bank.hh.
References gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::resetter().
|
inlineoverridevirtual |
Implements gem5::RegisterBank< BankByteOrder >::RegisterBase.
Definition at line 873 of file reg_bank.hh.
References gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::get(), gem5::X86ISA::os, and gem5::ShowParam< T, Enabled >::show().
|
inlineoverridevirtual |
Implements gem5::RegisterBank< BankByteOrder >::RegisterBase.
Definition at line 879 of file reg_bank.hh.
References gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::get(), and gem5::ArmISA::s.
|
inline |
|
inline |
Definition at line 803 of file reg_bank.hh.
References gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::_data, and gem5::RegisterBank< BankByteOrder >::writeWithMask().
|
inlineoverridevirtual |
Implements gem5::RegisterBank< BankByteOrder >::RegisterBase.
Definition at line 845 of file reg_bank.hh.
References gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::_writer, data, and gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::regtoh().
|
inlineoverridevirtual |
Implements gem5::RegisterBank< BankByteOrder >::RegisterBase.
Definition at line 854 of file reg_bank.hh.
References gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::_partialWriter, data, gem5::ArmISA::offset, and gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::regtoh().
|
inline |
Definition at line 795 of file reg_bank.hh.
References gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::_writeMask.
Referenced by gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::readonly().
|
inlineconstexpr |
Definition at line 678 of file reg_bank.hh.
References gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::_writeMask.
|
inlineconstexpr |
Definition at line 706 of file reg_bank.hh.
References gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::_writer.
Referenced by gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::writer().
|
inlineconstexpr |
Definition at line 713 of file reg_bank.hh.
References gem5::X86ISA::nw, and gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::writer().
|
private |
Definition at line 590 of file reg_bank.hh.
Referenced by gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::get(), gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::get(), gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::resetInitialValue(), gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::update(), and gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::update().
|
private |
Definition at line 597 of file reg_bank.hh.
Referenced by gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::partialReader(), and gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::read().
|
private |
Definition at line 596 of file reg_bank.hh.
Referenced by gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::partialWriter(), and gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::write().
|
private |
Definition at line 594 of file reg_bank.hh.
Referenced by gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::read(), and gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::reader().
|
private |
Definition at line 591 of file reg_bank.hh.
Referenced by gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::initialValue(), and gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::resetInitialValue().
|
private |
Definition at line 598 of file reg_bank.hh.
Referenced by gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::reset(), and gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::resetter().
|
private |
Definition at line 592 of file reg_bank.hh.
Referenced by gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::update(), gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::writeable(), and gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::writeable().
|
private |
Definition at line 595 of file reg_bank.hh.
Referenced by gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::write(), and gem5::RegisterBank< BankByteOrder >::Register< Data, RegByteOrder >::writer().