gem5 v24.1.0.1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Protected Types | Protected Attributes | List of all members
gem5::RiscvISA::PCState Class Reference

#include <pcstate.hh>

Inheritance diagram for gem5::RiscvISA::PCState:
gem5::GenericISA::UPCState< 4 > gem5::GenericISA::SimplePCState< InstWidth > gem5::GenericISA::PCStateWithNext gem5::PCStateBase gem5::Serializable

Public Member Functions

 PCState (const PCState &other)
 
PCStateoperator= (const PCState &other)=default
 
 PCState ()=default
 
 PCState (Addr addr)
 
 PCState (Addr addr, RiscvType rvType)
 
PCStateBaseclone () const override
 
void update (const PCStateBase &other) override
 
void compressed (bool c)
 
bool compressed () const
 
void rvType (RiscvType rvType)
 
RiscvType rvType () const
 
void vtype (VTYPE v)
 
VTYPE vtype () const
 
void vl (uint32_t v)
 
uint32_t vl () const
 
uint64_t size () const
 
bool branching () const override
 
bool equals (const PCStateBase &other) const override
 
void serialize (CheckpointOut &cp) const override
 Serialize an object.
 
void unserialize (CheckpointIn &cp) override
 Unserialize an object.
 
- Public Member Functions inherited from gem5::GenericISA::UPCState< 4 >
void output (std::ostream &os) const override
 
PCStateBaseclone () const override
 
void set (Addr val) override
 Force this PC to reflect a particular value, resetting all its other fields around it.
 
 UPCState (const UPCState &other)
 
 UPCState ()
 
 UPCState (Addr val)
 
UPCStateoperator= (const UPCState &other)=default
 
bool branching () const override
 
void uAdvance ()
 
void uEnd ()
 
- Public Member Functions inherited from gem5::GenericISA::SimplePCState< InstWidth >
 SimplePCState (const SimplePCState &other)
 
SimplePCStateoperator= (const SimplePCState &other)=default
 
 SimplePCState ()
 
 SimplePCState (Addr val)
 
void advance () override
 
- Public Member Functions inherited from gem5::GenericISA::PCStateWithNext
Addr pc () const
 
void pc (Addr val)
 
Addr npc () const
 
void npc (Addr val)
 
MicroPC upc () const
 
void upc (MicroPC val)
 
MicroPC nupc () const
 
void nupc (MicroPC val)
 
void uReset () override
 
void setNPC (Addr val)
 
void update (const PCStateBase &other) override
 
bool equals (const PCStateBase &other) const override
 
void serialize (CheckpointOut &cp) const override
 Serialize an object.
 
void unserialize (CheckpointIn &cp) override
 Unserialize an object.
 
- Public Member Functions inherited from gem5::PCStateBase
virtual ~PCStateBase ()=default
 
template<class Target >
Target & as ()
 
template<class Target >
const Target & as () const
 
void update (const PCStateBase *ptr)
 
Addr instAddr () const
 Returns the memory address of the instruction this PC points to.
 
MicroPC microPC () const
 Returns the current micropc.
 
- Public Member Functions inherited from gem5::Serializable
 Serializable ()
 
virtual ~Serializable ()
 
void serializeSection (CheckpointOut &cp, const char *name) const
 Serialize an object into a new section.
 
void serializeSection (CheckpointOut &cp, const std::string &name) const
 
void unserializeSection (CheckpointIn &cp, const char *name)
 Unserialize an a child object.
 
void unserializeSection (CheckpointIn &cp, const std::string &name)
 

Protected Types

typedef GenericISA::UPCState< 4 > Base
 
- Protected Types inherited from gem5::GenericISA::UPCState< 4 >
typedef SimplePCState< InstWidth > Base
 
- Protected Types inherited from gem5::GenericISA::SimplePCState< InstWidth >
typedef PCStateWithNext Base
 

Protected Attributes

bool _compressed = false
 
RiscvType _rvType = RV64
 
VTYPE _vtype = (1ULL << 63)
 
uint32_t _vl = 0
 
- Protected Attributes inherited from gem5::GenericISA::PCStateWithNext
Addr _npc = 0
 
MicroPC _nupc = 1
 
- Protected Attributes inherited from gem5::PCStateBase
Addr _pc = 0
 
MicroPC _upc = 0
 

Additional Inherited Members

- Static Public Member Functions inherited from gem5::Serializable
static const std::string & currentSection ()
 Gets the fully-qualified name of the active section.
 
static void generateCheckpointOut (const std::string &cpt_dir, std::ofstream &outstream)
 Generate a checkpoint file so that the serialization can be routed to it.
 
- Protected Member Functions inherited from gem5::GenericISA::PCStateWithNext
 PCStateWithNext (const PCStateWithNext &other)
 
PCStateWithNextoperator= (const PCStateWithNext &other)=default
 
 PCStateWithNext ()
 
- Protected Member Functions inherited from gem5::PCStateBase
 PCStateBase (const PCStateBase &other)
 
PCStateBaseoperator= (const PCStateBase &other)=default
 
 PCStateBase ()
 

Detailed Description

Definition at line 61 of file pcstate.hh.

Member Typedef Documentation

◆ Base

Definition at line 64 of file pcstate.hh.

Constructor & Destructor Documentation

◆ PCState() [1/4]

gem5::RiscvISA::PCState::PCState ( const PCState other)
inline

Definition at line 72 of file pcstate.hh.

◆ PCState() [2/4]

gem5::RiscvISA::PCState::PCState ( )
default

Referenced by clone().

◆ PCState() [3/4]

gem5::RiscvISA::PCState::PCState ( Addr  addr)
inlineexplicit

Definition at line 77 of file pcstate.hh.

References gem5::X86ISA::addr, and gem5::ArmISA::set.

◆ PCState() [4/4]

gem5::RiscvISA::PCState::PCState ( Addr  addr,
RiscvType  rvType 
)
inlineexplicit

Definition at line 78 of file pcstate.hh.

References _rvType, gem5::X86ISA::addr, rvType(), and gem5::ArmISA::set.

Member Function Documentation

◆ branching()

bool gem5::RiscvISA::PCState::branching ( ) const
inlineoverridevirtual

◆ clone()

PCStateBase * gem5::RiscvISA::PCState::clone ( ) const
inlineoverridevirtual

Implements gem5::PCStateBase.

Definition at line 84 of file pcstate.hh.

References PCState().

◆ compressed() [1/2]

bool gem5::RiscvISA::PCState::compressed ( ) const
inline

Definition at line 98 of file pcstate.hh.

References _compressed.

◆ compressed() [2/2]

void gem5::RiscvISA::PCState::compressed ( bool  c)
inline

Definition at line 97 of file pcstate.hh.

References _compressed, and gem5::RiscvISA::c.

◆ equals()

bool gem5::RiscvISA::PCState::equals ( const PCStateBase other) const
inlineoverridevirtual

Reimplemented from gem5::PCStateBase.

Definition at line 118 of file pcstate.hh.

References _vl, _vtype, gem5::PCStateBase::as(), and gem5::PCStateBase::equals().

◆ operator=()

PCState & gem5::RiscvISA::PCState::operator= ( const PCState other)
default

◆ rvType() [1/2]

RiscvType gem5::RiscvISA::PCState::rvType ( ) const
inline

Definition at line 101 of file pcstate.hh.

References _rvType.

Referenced by PCState().

◆ rvType() [2/2]

void gem5::RiscvISA::PCState::rvType ( RiscvType  rvType)
inline

Definition at line 100 of file pcstate.hh.

References _rvType, and rvType().

Referenced by rvType().

◆ serialize()

void gem5::RiscvISA::PCState::serialize ( CheckpointOut cp) const
inlineoverridevirtual

Serialize an object.

Output an object's state into the current checkpoint section.

Parameters
cpCheckpoint state

Implements gem5::Serializable.

Definition at line 127 of file pcstate.hh.

References _compressed, _rvType, _vl, _vtype, gem5::PCStateBase::serialize(), and SERIALIZE_SCALAR.

◆ size()

uint64_t gem5::RiscvISA::PCState::size ( ) const
inline

Definition at line 109 of file pcstate.hh.

References _compressed.

Referenced by branching().

◆ unserialize()

void gem5::RiscvISA::PCState::unserialize ( CheckpointIn cp)
inlineoverridevirtual

Unserialize an object.

Read an object's state from the current checkpoint section.

Parameters
cpCheckpoint state

Implements gem5::Serializable.

Definition at line 137 of file pcstate.hh.

References _compressed, _rvType, _vl, _vtype, gem5::PCStateBase::unserialize(), and UNSERIALIZE_SCALAR.

◆ update()

void gem5::RiscvISA::PCState::update ( const PCStateBase other)
inlineoverridevirtual

Reimplemented from gem5::PCStateBase.

Definition at line 87 of file pcstate.hh.

References _compressed, _rvType, _vl, _vtype, gem5::PCStateBase::as(), and gem5::PCStateBase::update().

◆ vl() [1/2]

uint32_t gem5::RiscvISA::PCState::vl ( ) const
inline

Definition at line 107 of file pcstate.hh.

References _vl.

◆ vl() [2/2]

void gem5::RiscvISA::PCState::vl ( uint32_t  v)
inline

Definition at line 106 of file pcstate.hh.

References _vl, and gem5::RiscvISA::v.

Referenced by gem5::RiscvISA::ISA::readMiscReg().

◆ vtype() [1/2]

VTYPE gem5::RiscvISA::PCState::vtype ( ) const
inline

Definition at line 104 of file pcstate.hh.

References _vtype.

◆ vtype() [2/2]

void gem5::RiscvISA::PCState::vtype ( VTYPE  v)
inline

Definition at line 103 of file pcstate.hh.

References _vtype, and gem5::RiscvISA::v.

Referenced by gem5::RiscvISA::ISA::readMiscReg().

Member Data Documentation

◆ _compressed

bool gem5::RiscvISA::PCState::_compressed = false
protected

Definition at line 66 of file pcstate.hh.

Referenced by compressed(), compressed(), serialize(), size(), unserialize(), and update().

◆ _rvType

RiscvType gem5::RiscvISA::PCState::_rvType = RV64
protected

Definition at line 67 of file pcstate.hh.

Referenced by PCState(), rvType(), rvType(), serialize(), unserialize(), and update().

◆ _vl

uint32_t gem5::RiscvISA::PCState::_vl = 0
protected

Definition at line 69 of file pcstate.hh.

Referenced by equals(), serialize(), unserialize(), update(), vl(), and vl().

◆ _vtype

VTYPE gem5::RiscvISA::PCState::_vtype = (1ULL << 63)
protected

Definition at line 68 of file pcstate.hh.

Referenced by equals(), serialize(), unserialize(), update(), vtype(), and vtype().


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

Generated on Mon Jan 13 2025 04:29:11 for gem5 by doxygen 1.9.8