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);
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);
142 size,
addr,
flags,
nullptr, std::move(amo_op),
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)
void demapPage(Addr vaddr, uint64_t asn)
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:
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Register ID: describe an architectural register with its class and index.
The SimpleThread object provides a combination of the ThreadState object and the ThreadContext interf...
RegVal readMiscRegNoEffect(RegIndex misc_reg) const override
bool readPredicate() const
void setPredicate(bool val)
bool readMemAccPredicate()
const PCStateBase & pcState() const override
void setMiscReg(RegIndex misc_reg, RegVal val) override
void * getWritableReg(const RegId &arch_reg) override
ContextID contextId() const override
void setReg(const RegId &arch_reg, RegVal val) override
ThreadContext * getTC()
Returns the pointer to this SimpleThread's ThreadContext.
BaseMMU * getMMUPtr() override
RegVal readMiscReg(RegIndex misc_reg) override
void setMemAccPredicate(bool val)
RegVal getReg(const RegId &arch_reg) const override
Base, ISA-independent static instruction class.
ThreadContext is the external interface to all thread state for anything outside of the CPU.
ExecContext bears the exec_context interface for Minor.
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
LSQ & getLSQ()
To allow ExecContext to find the LSQ.
Fault pushRequest(MinorDynInstPtr inst, bool isLoad, uint8_t *data, unsigned int size, Addr addr, Request::Flags flags, uint64_t *res, AtomicOpFunctorPtr amo_op, const std::vector< bool > &byte_enable=std::vector< bool >())
Single interface for readMem/writeMem/amoMem to issue requests into the LSQ.
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.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria 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.
Minor contains all the definitions within the MinorCPU apart from the CPU class itself.
The constructed pipeline.
Declaration of a request, the overall memory request consisting of the parts of the request that are ...