gem5 v24.0.0.0
Loading...
Searching...
No Matches
gem5::SimpleExecContext Class Reference

#include <exec_context.hh>

Inheritance diagram for gem5::SimpleExecContext:
gem5::ExecContext

Classes

struct  ExecContextStats
 

Public Member Functions

 SimpleExecContext (BaseSimpleCPU *_cpu, SimpleThread *_thread)
 Constructor.
 
RegVal getRegOperand (const StaticInst *si, int idx) override
 
void getRegOperand (const StaticInst *si, int idx, void *val) override
 
void * getWritableRegOperand (const StaticInst *si, int idx) override
 
void setRegOperand (const StaticInst *si, int idx, RegVal val) override
 
void setRegOperand (const StaticInst *si, int idx, const void *val) override
 
RegVal readMiscRegOperand (const StaticInst *si, int idx) override
 
void setMiscRegOperand (const StaticInst *si, int idx, RegVal val) override
 
RegVal readMiscReg (int misc_reg) override
 Reads a miscellaneous register, handling any architectural side effects due to reading that register.
 
void setMiscReg (int misc_reg, RegVal val) override
 Sets a miscellaneous register, handling any architectural side effects due to writing that register.
 
const PCStateBasepcState () const override
 
void pcState (const PCStateBase &val) override
 
Fault readMem (Addr addr, uint8_t *data, unsigned int size, Request::Flags flags, const std::vector< bool > &byte_enable) override
 Perform an atomic memory read operation.
 
Fault initiateMemRead (Addr addr, unsigned int size, Request::Flags flags, const std::vector< bool > &byte_enable) override
 Initiate a timing memory read operation.
 
Fault writeMem (uint8_t *data, unsigned int size, Addr addr, Request::Flags flags, uint64_t *res, const std::vector< bool > &byte_enable) override
 For atomic-mode contexts, perform an atomic memory write operation.
 
Fault amoMem (Addr addr, uint8_t *data, unsigned int size, Request::Flags flags, AtomicOpFunctorPtr amo_op) override
 For atomic-mode contexts, perform an atomic AMO (a.k.a., Atomic Read-Modify-Write Memory Operation)
 
Fault initiateMemAMO (Addr addr, unsigned int size, Request::Flags flags, AtomicOpFunctorPtr amo_op) override
 For timing-mode contexts, initiate an atomic AMO (atomic read-modify-write memory operation)
 
Fault initiateMemMgmtCmd (Request::Flags flags) override
 Initiate a memory management command with no valid address.
 
void setStCondFailures (unsigned int sc_failures) override
 Sets the number of consecutive store conditional failures.
 
unsigned int readStCondFailures () const override
 Returns the number of consecutive store conditional failures.
 
ThreadContexttcBase () const override
 Returns a pointer to the ThreadContext.
 
bool readPredicate () const override
 
void setPredicate (bool val) override
 
bool readMemAccPredicate () const override
 
void setMemAccPredicate (bool val) override
 
uint64_t getHtmTransactionUid () const override
 
uint64_t newHtmTransactionUid () const override
 
bool inHtmTransactionalState () const override
 
uint64_t getHtmTransactionalDepth () const override
 
void demapPage (Addr vaddr, uint64_t asn) override
 Invalidate a page in the DTLB and ITLB.
 
void armMonitor (Addr address) override
 
bool mwait (PacketPtr pkt) override
 
void mwaitAtomic (ThreadContext *tc) override
 
AddressMonitorgetAddrMonitor () override
 
Misc Register Interfaces
PC Control
Memory Interface
ARM-Specific Interfaces
X86-Specific Interfaces

Public Attributes

BaseSimpleCPUcpu
 
SimpleThreadthread
 
Addr fetchOffset
 
bool stayAtPC
 
std::unique_ptr< PCStateBasepredPC
 
Counter numInst
 PER-THREAD STATS.
 
Counter numOp
 
Counter numLoad
 
Counter lastIcacheStall
 
Counter lastDcacheStall
 
gem5::SimpleExecContext::ExecContextStats execContextStats
 

Detailed Description

Definition at line 58 of file exec_context.hh.

Constructor & Destructor Documentation

◆ SimpleExecContext()

gem5::SimpleExecContext::SimpleExecContext ( BaseSimpleCPU * _cpu,
SimpleThread * _thread )
inline

Constructor.

Definition at line 175 of file exec_context.hh.

Member Function Documentation

◆ amoMem()

Fault gem5::SimpleExecContext::amoMem ( Addr addr,
uint8_t * data,
unsigned int size,
Request::Flags flags,
AtomicOpFunctorPtr amo_op )
inlineoverridevirtual

For atomic-mode contexts, perform an atomic AMO (a.k.a., Atomic Read-Modify-Write Memory Operation)

Reimplemented from gem5::ExecContext.

Definition at line 309 of file exec_context.hh.

References gem5::X86ISA::addr, gem5::BaseSimpleCPU::amoMem(), cpu, data, and flags.

◆ armMonitor()

void gem5::SimpleExecContext::armMonitor ( Addr address)
inlineoverridevirtual

◆ demapPage()

void gem5::SimpleExecContext::demapPage ( Addr vaddr,
uint64_t asn )
inlineoverridevirtual

Invalidate a page in the DTLB and ITLB.

Implements gem5::ExecContext.

Definition at line 407 of file exec_context.hh.

References gem5::SimpleThread::demapPage(), thread, and gem5::MipsISA::vaddr.

◆ getAddrMonitor()

AddressMonitor * gem5::SimpleExecContext::getAddrMonitor ( )
inlineoverridevirtual

◆ getHtmTransactionalDepth()

uint64_t gem5::SimpleExecContext::getHtmTransactionalDepth ( ) const
inlineoverridevirtual

◆ getHtmTransactionUid()

◆ getRegOperand() [1/2]

RegVal gem5::SimpleExecContext::getRegOperand ( const StaticInst * si,
int idx )
inlineoverridevirtual

◆ getRegOperand() [2/2]

void gem5::SimpleExecContext::getRegOperand ( const StaticInst * si,
int idx,
void * val )
inlineoverridevirtual

◆ getWritableRegOperand()

void * gem5::SimpleExecContext::getWritableRegOperand ( const StaticInst * si,
int idx )
inlineoverridevirtual

◆ inHtmTransactionalState()

◆ initiateMemAMO()

Fault gem5::SimpleExecContext::initiateMemAMO ( Addr addr,
unsigned int size,
Request::Flags flags,
AtomicOpFunctorPtr amo_op )
inlineoverridevirtual

For timing-mode contexts, initiate an atomic AMO (atomic read-modify-write memory operation)

Reimplemented from gem5::ExecContext.

Definition at line 316 of file exec_context.hh.

References gem5::X86ISA::addr, cpu, flags, and gem5::BaseSimpleCPU::initiateMemAMO().

◆ initiateMemMgmtCmd()

Fault gem5::SimpleExecContext::initiateMemMgmtCmd ( Request::Flags flags)
inlineoverridevirtual

Initiate a memory management command with no valid address.

Currently, these instructions need to bypass squashing in the O3 model Examples include HTM commands and TLBI commands. e.g. tell Ruby we're starting/stopping a HTM transaction, or tell Ruby to issue a TLBI operation

Implements gem5::ExecContext.

Definition at line 324 of file exec_context.hh.

References cpu, flags, and gem5::BaseSimpleCPU::initiateMemMgmtCmd().

◆ initiateMemRead()

Fault gem5::SimpleExecContext::initiateMemRead ( Addr addr,
unsigned int size,
Request::Flags flags,
const std::vector< bool > & byte_enable )
inlineoverridevirtual

Initiate a timing memory read operation.

Must be overridden for exec contexts that support timing memory mode. Not pure virtual since exec contexts that only support atomic memory mode need not override (though in that case this function should never be called).

Reimplemented from gem5::ExecContext.

Definition at line 288 of file exec_context.hh.

References gem5::X86ISA::addr, cpu, flags, and gem5::BaseSimpleCPU::initiateMemRead().

◆ mwait()

bool gem5::SimpleExecContext::mwait ( PacketPtr pkt)
inlineoverridevirtual

Implements gem5::ExecContext.

Definition at line 419 of file exec_context.hh.

References cpu, gem5::BaseCPU::mwait(), thread, and gem5::SimpleThread::threadId().

◆ mwaitAtomic()

void gem5::SimpleExecContext::mwaitAtomic ( ThreadContext * tc)
inlineoverridevirtual

◆ newHtmTransactionUid()

uint64_t gem5::SimpleExecContext::newHtmTransactionUid ( ) const
inlineoverridevirtual

◆ pcState() [1/2]

const PCStateBase & gem5::SimpleExecContext::pcState ( ) const
inlineoverridevirtual

Implements gem5::ExecContext.

Definition at line 266 of file exec_context.hh.

References gem5::SimpleThread::pcState(), and thread.

◆ pcState() [2/2]

void gem5::SimpleExecContext::pcState ( const PCStateBase & val)
inlineoverridevirtual

Implements gem5::ExecContext.

Definition at line 272 of file exec_context.hh.

References gem5::SimpleThread::pcState(), thread, and gem5::X86ISA::val.

◆ readMem()

Fault gem5::SimpleExecContext::readMem ( Addr addr,
uint8_t * data,
unsigned int size,
Request::Flags flags,
const std::vector< bool > & byte_enable )
inlineoverridevirtual

Perform an atomic memory read operation.

Must be overridden for exec contexts that support atomic memory mode. Not pure virtual since exec contexts that only support timing memory mode need not override (though in that case this function should never be called).

Reimplemented from gem5::ExecContext.

Definition at line 278 of file exec_context.hh.

References gem5::X86ISA::addr, cpu, data, flags, and gem5::BaseSimpleCPU::readMem().

◆ readMemAccPredicate()

bool gem5::SimpleExecContext::readMemAccPredicate ( ) const
inlineoverridevirtual

Implements gem5::ExecContext.

Definition at line 367 of file exec_context.hh.

References gem5::SimpleThread::readMemAccPredicate(), and thread.

◆ readMiscReg()

RegVal gem5::SimpleExecContext::readMiscReg ( int misc_reg)
inlineoverridevirtual

Reads a miscellaneous register, handling any architectural side effects due to reading that register.

Implements gem5::ExecContext.

Definition at line 248 of file exec_context.hh.

References cpu, gem5::BaseCPU::executeStats, gem5::SimpleThread::readMiscReg(), thread, and gem5::SimpleThread::threadId().

◆ readMiscRegOperand()

RegVal gem5::SimpleExecContext::readMiscRegOperand ( const StaticInst * si,
int idx )
inlineoverridevirtual

◆ readPredicate()

bool gem5::SimpleExecContext::readPredicate ( ) const
inlineoverridevirtual

Implements gem5::ExecContext.

Definition at line 351 of file exec_context.hh.

References gem5::SimpleThread::readPredicate(), and thread.

◆ readStCondFailures()

unsigned int gem5::SimpleExecContext::readStCondFailures ( ) const
inlineoverridevirtual

Returns the number of consecutive store conditional failures.

Implements gem5::ExecContext.

Definition at line 342 of file exec_context.hh.

References gem5::SimpleThread::readStCondFailures(), and thread.

◆ setMemAccPredicate()

void gem5::SimpleExecContext::setMemAccPredicate ( bool val)
inlineoverridevirtual

◆ setMiscReg()

void gem5::SimpleExecContext::setMiscReg ( int misc_reg,
RegVal val )
inlineoverridevirtual

Sets a miscellaneous register, handling any architectural side effects due to writing that register.

Implements gem5::ExecContext.

Definition at line 259 of file exec_context.hh.

References cpu, gem5::BaseCPU::executeStats, gem5::SimpleThread::setMiscReg(), thread, gem5::SimpleThread::threadId(), and gem5::X86ISA::val.

◆ setMiscRegOperand()

void gem5::SimpleExecContext::setMiscRegOperand ( const StaticInst * si,
int idx,
RegVal val )
inlineoverridevirtual

◆ setPredicate()

void gem5::SimpleExecContext::setPredicate ( bool val)
inlineoverridevirtual

◆ setRegOperand() [1/2]

void gem5::SimpleExecContext::setRegOperand ( const StaticInst * si,
int idx,
const void * val )
inlineoverridevirtual

◆ setRegOperand() [2/2]

void gem5::SimpleExecContext::setRegOperand ( const StaticInst * si,
int idx,
RegVal val )
inlineoverridevirtual

◆ setStCondFailures()

void gem5::SimpleExecContext::setStCondFailures ( unsigned int sc_failures)
inlineoverridevirtual

Sets the number of consecutive store conditional failures.

Implements gem5::ExecContext.

Definition at line 333 of file exec_context.hh.

References gem5::SimpleThread::setStCondFailures(), and thread.

◆ tcBase()

ThreadContext * gem5::SimpleExecContext::tcBase ( ) const
inlineoverridevirtual

Returns a pointer to the ThreadContext.

Implements gem5::ExecContext.

Definition at line 348 of file exec_context.hh.

References gem5::SimpleThread::getTC(), and thread.

Referenced by getHtmTransactionUid(), and newHtmTransactionUid().

◆ writeMem()

Fault gem5::SimpleExecContext::writeMem ( uint8_t * data,
unsigned int size,
Addr addr,
Request::Flags flags,
uint64_t * res,
const std::vector< bool > & byte_enable )
inlineoverridevirtual

For atomic-mode contexts, perform an atomic memory write operation.

For timing-mode contexts, initiate a timing memory write operation.

Implements gem5::ExecContext.

Definition at line 298 of file exec_context.hh.

References gem5::X86ISA::addr, cpu, data, flags, and gem5::BaseSimpleCPU::writeMem().

Member Data Documentation

◆ cpu

◆ execContextStats

◆ fetchOffset

◆ lastDcacheStall

Counter gem5::SimpleExecContext::lastDcacheStall

Definition at line 81 of file exec_context.hh.

◆ lastIcacheStall

Counter gem5::SimpleExecContext::lastIcacheStall

Definition at line 79 of file exec_context.hh.

◆ numInst

◆ numLoad

Counter gem5::SimpleExecContext::numLoad

Definition at line 77 of file exec_context.hh.

Referenced by gem5::BaseSimpleCPU::postExecute().

◆ numOp

Counter gem5::SimpleExecContext::numOp

Definition at line 75 of file exec_context.hh.

Referenced by gem5::BaseSimpleCPU::countInst().

◆ predPC

std::unique_ptr<PCStateBase> gem5::SimpleExecContext::predPC

◆ stayAtPC

◆ thread

SimpleThread* gem5::SimpleExecContext::thread

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

Generated on Tue Jun 18 2024 16:24:14 for gem5 by doxygen 1.11.0