41 #ifndef __CPU_SIMPLE_TIMING_HH__ 42 #define __CPU_SIMPLE_TIMING_HH__ 47 #include "params/TimingSimpleCPU.hh" 81 }
else if (fragments[1]) {
93 bigPkt(_bigPkt),
index(_index)
135 uint8_t *
data, uint64_t *res,
bool read);
138 uint8_t *
data,
bool read);
146 uint8_t *
data,
bool read);
164 retryRespEvent([this]{ sendRetryResp(); },
name())
195 virtual bool recvTimingResp(
PacketPtr pkt);
197 virtual void recvReqRetry();
205 const char *
description()
const {
return "Timing CPU icache tick"; }
220 cacheBlockMask = ~(cpu->cacheLineSize() - 1);
229 virtual void recvTimingSnoopReq(
PacketPtr pkt);
230 virtual void recvFunctionalSnoop(
PacketPtr pkt);
232 virtual bool recvTimingResp(
PacketPtr pkt);
234 virtual void recvReqRetry();
245 const char *
description()
const {
return "Timing CPU dcache tick"; }
331 virtual void process();
332 virtual const char *description()
const;
367 #endif // __CPU_SIMPLE_TIMING_HH__ A MasterPort is a specialisation of a BaseMasterPort, which implements the default protocol for the t...
A TimingCPUPort overrides the default behaviour of the recvTiming and recvRetry and implements events...
Ports are used to interface objects to each other.
Cycles is a wrapper class for representing cycle counts, i.e.
void switchOut() override
Prepare for another CPU to take over execution.
bool isCpuDrained() const
Check if a system is in a drained state.
void sendData(const RequestPtr &req, uint8_t *data, uint64_t *res, bool read)
void finish(const Fault &fault, const RequestPtr &req, ThreadContext *tc, BaseTLB::Mode mode)
std::shared_ptr< Request > RequestPtr
void suspendContext(ThreadID thread_num) override
Notify the CPU that the indicated context is now suspended.
std::unique_ptr< AtomicOpFunctor > AtomicOpFunctorPtr
void verifyMemoryMode() const override
Verify that the system is in a memory mode supported by the CPU.
Fault initiateMemAMO(Addr addr, unsigned size, Request::Flags flags, AtomicOpFunctorPtr amo_op) override
The SimpleThread object provides a combination of the ThreadState object and the ThreadContext interf...
virtual bool isSnooping() const
Determine if this master port is snooping or not.
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
IcachePort(TimingSimpleCPU *_cpu)
This class captures the state of an address translation.
TimingCPUPort(const std::string &_name, TimingSimpleCPU *_cpu)
Port & getInstPort() override
Return a reference to the instruction port.
DcachePort(TimingSimpleCPU *_cpu)
ThreadContext is the external interface to all thread state for anything outside of the CPU...
DrainState
Object drain/handover states.
Fault initiateMemRead(Addr addr, unsigned size, Request::Flags flags, const std::vector< bool > &byte_enable=std::vector< bool >()) override
void completeIfetch(PacketPtr)
bool tryCompleteDrain()
Try to complete a drain request.
EventFunctionWrapper retryRespEvent
void buildSplitPacket(PacketPtr &pkt1, PacketPtr &pkt2, const RequestPtr &req1, const RequestPtr &req2, const RequestPtr &req, uint8_t *data, bool read)
PacketPtr buildPacket(const RequestPtr &req, bool read)
void markDelayed()
Signal that the translation has been delayed due to a hw page table walk.
void sendSplitData(const RequestPtr &req1, const RequestPtr &req2, const RequestPtr &req, uint8_t *data, bool read)
uint64_t Tick
Tick count type.
bool handleReadPacket(PacketPtr pkt)
FetchTranslation fetchTranslation
SplitFragmentSenderState(PacketPtr _bigPkt, int _index)
TickEvent(TimingSimpleCPU *_cpu)
void translationFault(const Fault &fault)
void takeOverFrom(BaseCPU *oldCPU) override
Load the state of a CPU from the previous CPU object, invoked on all new CPUs that are about to be sw...
Fault writeMem(uint8_t *data, unsigned size, Addr addr, Request::Flags flags, uint64_t *res, const std::vector< bool > &byte_enable=std::vector< bool >()) override
Port & getDataPort() override
Return a reference to the data port.
void schedule(Event &event, Tick when)
void sendFetch(const Fault &fault, const RequestPtr &req, ThreadContext *tc)
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
ITickEvent(TimingSimpleCPU *_cpu)
void threadSnoop(PacketPtr pkt, ThreadID sender)
EventFunctionWrapper fetchEvent
A virtual base opaque structure used to hold state associated with the packet (e.g., an MSHR), specific to a SimObject that sees the packet.
void activateContext(ThreadID thread_num) override
Notify the CPU that the indicated context is now active.
const char * description() const
Return a C string describing the event.
virtual ~TimingSimpleCPU()
bool scheduled() const
Determine if the current event is scheduled.
FetchTranslation(TimingSimpleCPU *_cpu)
int16_t ThreadID
Thread index/ID type.
virtual const std::string name() const
const char * description() const
Return a C string describing the event.
SenderState * senderState
This packet's sender state.
DTickEvent(TimingSimpleCPU *_cpu)
void advanceInst(const Fault &fault)
std::vector< SimpleExecContext * > threadInfo
MicroPC microPC() const override
void finishTranslation(WholeTranslationState *state)
Finish a DTB translation.
void completeDataAccess(PacketPtr pkt)
DrainState drain() override
Notify an object that it needs to drain its state.
TimingSimpleCPU(TimingSimpleCPUParams *params)
void printAddr(Addr a)
Print state of address in memory system via PrintReq (for debugging).
std::shared_ptr< FaultBase > Fault
const Params * params() const
void drainResume() override
Resume execution after a successful drain.
bool isSquashed() const
This function is used by the page table walker to determine if it could translate the a pending reque...
const char * description() const