48#ifndef __CPU_MINOR_EXEC_CONTEXT_HH__
49#define __CPU_MINOR_EXEC_CONTEXT_HH__
57#include "debug/MinorExecute.hh"
95 DPRINTF(MinorExecute,
"ExecContext setting PC: %s\n", *
inst->pc);
112 assert(byte_enable.size() == size);
113 return execute.getLSQ().pushRequest(
inst,
true ,
nullptr,
114 size,
addr, flags,
nullptr,
nullptr, byte_enable);
120 panic(
"ExecContext::initiateMemMgmtCmd() not implemented "
131 assert(byte_enable.size() == size);
133 size,
addr, flags, res,
nullptr, byte_enable);
141 return execute.getLSQ().pushRequest(
inst,
false ,
nullptr,
142 size,
addr, flags,
nullptr, std::move(amo_op),
164 return thread.getWritableReg(
si->destRegIdx(idx));
185 return thread.readPredicate();
197 return thread.readMemAccPredicate();
210 panic(
"ExecContext::getHtmTransactionUid() not"
211 "implemented on MinorCPU\n");
218 panic(
"ExecContext::newHtmTransactionUid() not"
219 "implemented on MinorCPU\n");
234 panic(
"ExecContext::getHtmTransactionalDepth() not"
235 "implemented on MinorCPU\n");
void mwaitAtomic(ThreadID tid, ThreadContext *tc, BaseMMU *mmu)
AddressMonitor * getCpuAddrMonitor(ThreadID tid)
bool mwait(ThreadID tid, PacketPtr pkt)
void armMonitor(ThreadID tid, Addr address)
The ExecContext is an abstract base class the provides the interface used by the ISA to manipulate th...
MinorCPU is an in-order CPU model with four fixed pipeline stages:
Register ID: describe an architectural register with its class and index.
gem5::Flags< FlagsType > Flags
The SimpleThread object provides a combination of the ThreadState object and the ThreadContext interf...
Base, ISA-independent static instruction class.
ThreadContext is the external interface to all thread state for anything outside of the CPU.
ExecContext(MinorCPU &cpu_, SimpleThread &thread_, Execute &execute_, MinorDynInstPtr inst_)
ThreadContext * tcBase() const override
Returns a pointer to the ThreadContext.
uint64_t getHtmTransactionalDepth() const override
void armMonitor(Addr address) override
void setStCondFailures(unsigned int st_cond_failures) override
Sets the number of consecutive store conditional failures.
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)
void setMiscReg(int misc_reg, RegVal val) override
Sets a miscellaneous register, handling any architectural side effects due to writing that register.
RegVal readMiscRegOperand(const StaticInst *si, int idx) override
RegVal readMiscReg(int misc_reg) override
Reads a miscellaneous register, handling any architectural side effects due to reading that register.
bool inHtmTransactionalState() const override
RegVal getRegOperand(const StaticInst *si, int idx) override
Fault initiateMemRead(Addr addr, unsigned int size, Request::Flags flags, const std::vector< bool > &byte_enable) override
Initiate a timing memory read operation.
void setRegOperand(const StaticInst *si, int idx, RegVal val) override
RegVal readMiscRegNoEffect(int misc_reg) const
const PCStateBase & pcState() const override
uint64_t getHtmTransactionUid() const override
bool mwait(PacketPtr pkt) override
bool readMemAccPredicate() const override
unsigned int readStCondFailures() const override
Returns the number of consecutive store conditional failures.
uint64_t newHtmTransactionUid() const override
Fault initiateMemMgmtCmd(Request::Flags flags) override
Initiate a memory management command with no valid address.
void getRegOperand(const StaticInst *si, int idx, void *val) override
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.
void pcState(const PCStateBase &val) override
void demapPage(Addr vaddr, uint64_t asn) override
Invalidate a page in the DTLB and ITLB.
void setMemAccPredicate(bool val) override
void setRegOperand(const StaticInst *si, int idx, const void *val) override
void setPredicate(bool val) override
MinorDynInstPtr inst
Instruction for the benefit of memory operations and for PC.
void * getWritableRegOperand(const StaticInst *si, int idx) override
void setMiscRegOperand(const StaticInst *si, int idx, RegVal val) override
void mwaitAtomic(ThreadContext *tc) override
SimpleThread & thread
ThreadState object, provides all the architectural state.
bool readPredicate() const override
Execute & execute
The execute stage so we can peek at its contents.
AddressMonitor * getAddrMonitor() override
All the fun of executing instructions from Decode and sending branch/new instruction stream info.
std::unique_ptr< AtomicOpFunctor > AtomicOpFunctorPtr
#define panic(...)
This implements a cprintf based panic() function.
RefCountingPtr< MinorDynInst > MinorDynInstPtr
MinorDynInsts are currently reference counted.
Copyright (c) 2024 Arm Limited All rights reserved.
std::shared_ptr< FaultBase > Fault
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
int ContextID
Globally unique thread context ID.
constexpr decltype(nullptr) NoFault
@ MiscRegClass
Control (misc) register.
The constructed pipeline.
Declaration of a request, the overall memory request consisting of the parts of the request that are ...