42#ifndef __CPU_SIMPLE_BASE_HH__
43#define __CPU_SIMPLE_BASE_HH__
76struct BaseSimpleCPUParams;
77namespace branch_prediction
81class SimpleExecContext;
152 panic(
"readMem() is not implemented");
159 panic(
"initiateMemRead() is not implemented\n");
167 panic(
"writeMem() is not implemented\n");
174 panic(
"amoMem() is not implemented\n");
181 panic(
"initiateMemAMO() is not implemented\n");
virtual Fault initiateMemRead(Addr addr, unsigned size, Request::Flags flags, const std::vector< bool > &byte_enable=std::vector< bool >())
virtual Fault readMem(Addr addr, uint8_t *data, unsigned size, Request::Flags flags, const std::vector< bool > &byte_enable=std::vector< bool >())
BaseSimpleCPU(const BaseSimpleCPUParams ¶ms)
void serializeThread(CheckpointOut &cp, ThreadID tid) const override
Serialize a single thread.
void resetStats() override
Callback to reset stats.
branch_prediction::BPredUnit * branchPred
void unserializeThread(CheckpointIn &cp, ThreadID tid) override
Unserialize one thread.
void wakeup(ThreadID tid) override
StaticInstPtr curMacroStaticInst
void checkForInterrupts()
void traceFault()
Handler used when encountering a fault; its purpose is to tear down the InstRecord.
void advancePC(const Fault &fault)
void setupFetchRequest(const RequestPtr &req)
std::unique_ptr< PCStateBase > preExecuteTempPC
virtual Fault initiateMemMgmtCmd(Request::Flags flags)=0
Memory management commands such as hardware transactional memory commands or TLB invalidation command...
virtual Fault writeMem(uint8_t *data, unsigned size, Addr addr, Request::Flags flags, uint64_t *res, const std::vector< bool > &byte_enable=std::vector< bool >())
std::list< ThreadID > activeThreads
std::vector< SimpleExecContext * > threadInfo
Counter totalOps() const override
StaticInstPtr curStaticInst
Current instruction.
virtual Fault amoMem(Addr addr, uint8_t *data, unsigned size, Request::Flags flags, AtomicOpFunctorPtr amo_op)
Counter totalInsts() const override
virtual Fault initiateMemAMO(Addr addr, unsigned size, Request::Flags flags, AtomicOpFunctorPtr amo_op)
void haltContext(ThreadID thread_num) override
Notify the CPU that the indicated context is now halted.
trace::InstRecord * traceData
void serviceInstCountEvents()
Basically a wrapper class to hold both the branch predictor and the BTB.
std::unique_ptr< AtomicOpFunctor > AtomicOpFunctorPtr
#define panic(...)
This implements a cprintf based panic() function.
const Params & params() const
double Counter
All counters are of 64-bit values.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
std::shared_ptr< FaultBase > Fault
int16_t ThreadID
Thread index/ID type.
std::shared_ptr< Request > RequestPtr
std::ostream CheckpointOut
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Declaration of the Packet class.
Declaration of a request, the overall memory request consisting of the parts of the request that are ...
Declaration of Statistics objects.