41#ifndef __CPU_SIMPLE_TIMING_HH__
42#define __CPU_SIMPLE_TIMING_HH__
48#include "params/BaseTimingSimpleCPU.hh"
139 uint8_t *
data, uint64_t *res,
bool read);
142 uint8_t *
data,
bool read);
150 uint8_t *
data,
bool read);
209 const char *
description()
const {
return "Timing CPU icache tick"; }
249 const char *
description()
const {
return "Timing CPU dcache tick"; }
Addr cacheLineSize() const
Get the cache line size of the system.
std::vector< SimpleExecContext * > threadInfo
Cycles is a wrapper class for representing cycle counts, i.e.
MicroPC microPC() const
Returns the current micropc.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
SenderState * senderState
This packet's sender state.
Ports are used to interface objects to each other.
const std::string name() const
Return port name (for DPRINTF).
A RequestPort is a specialisation of a Port, which implements the default protocol for the three diff...
virtual void sendRetryResp()
Send a retry to the response port that previously attempted a sendTimingResp to this request port and...
The SimpleThread object provides a combination of the ThreadState object and the ThreadContext interf...
const PCStateBase & pcState() const override
ThreadContext is the external interface to all thread state for anything outside of the CPU.
virtual void recvReqRetry()
Called by the peer if sendTimingReq was called on this peer (causing recvTimingReq to be called on th...
virtual void recvTimingSnoopReq(PacketPtr pkt)
Snoop a coherence request, we need to check if this causes a wakeup event on a cpu that is monitoring...
virtual bool recvTimingResp(PacketPtr pkt)
Receive a timing response from the peer.
virtual void recvFunctionalSnoop(PacketPtr pkt)
Receive a functional snoop request packet from the peer.
DcachePort(TimingSimpleCPU *_cpu)
virtual bool isSnooping() const
Determine if this request port is snooping or not.
FetchTranslation(TimingSimpleCPU *_cpu)
void markDelayed()
Signal that the translation has been delayed due to a hw page table walk.
void finish(const Fault &fault, const RequestPtr &req, ThreadContext *tc, BaseMMU::Mode mode)
virtual void recvReqRetry()
Called by the peer if sendTimingReq was called on this peer (causing recvTimingReq to be called on th...
virtual bool recvTimingResp(PacketPtr pkt)
Receive a timing response from the peer.
IcachePort(TimingSimpleCPU *_cpu)
SplitFragmentSenderState(PacketPtr _bigPkt, int _index)
A TimingCPUPort overrides the default behaviour of the recvTiming and recvRetry and implements events...
TimingCPUPort(const std::string &_name, TimingSimpleCPU *_cpu)
EventFunctionWrapper retryRespEvent
bool tryCompleteDrain()
Try to complete a drain request.
Fault initiateMemMgmtCmd(Request::Flags flags) override
hardware transactional memory & TLBI operations
bool isCpuDrained() const
Check if a system is in a drained state.
void advanceInst(const Fault &fault)
void switchOut() override
Prepare for another CPU to take over execution.
EventFunctionWrapper fetchEvent
DrainState drain() override
Provide a default implementation of the drain interface for objects that don't need draining.
void suspendContext(ThreadID thread_num) override
Notify the CPU that the indicated context is now suspended.
void threadSnoop(PacketPtr pkt, ThreadID sender)
void drainResume() override
Resume execution after a successful drain.
Fault initiateMemRead(Addr addr, unsigned size, Request::Flags flags, const std::vector< bool > &byte_enable=std::vector< bool >()) override
void htmSendAbortSignal(ThreadID tid, uint64_t htm_uid, HtmFailureFaultCause) override
This function is used to instruct the memory subsystem that a transaction should be aborted and the s...
bool handleReadPacket(PacketPtr pkt)
Port & getDataPort() override
Return a reference to the data port.
PacketPtr buildPacket(const RequestPtr &req, bool read)
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
void sendSplitData(const RequestPtr &req1, const RequestPtr &req2, const RequestPtr &req, uint8_t *data, bool read)
void translationFault(const Fault &fault)
void sendData(const RequestPtr &req, uint8_t *data, uint64_t *res, bool read)
FetchTranslation fetchTranslation
void printAddr(Addr a)
Print state of address in memory system via PrintReq (for debugging).
void verifyMemoryMode() const override
Verify that the system is in a memory mode supported by the CPU.
void finishTranslation(WholeTranslationState *state)
Finish a DTB translation.
void activateContext(ThreadID thread_num) override
Notify the CPU that the indicated context is now active.
void completeIfetch(PacketPtr)
TimingSimpleCPU(const BaseTimingSimpleCPUParams ¶ms)
void completeDataAccess(PacketPtr pkt)
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
bool isSquashed() const
This function is used by the page table walker to determine if it could translate the a pending reque...
Port & getInstPort() override
Return a reference to the instruction port.
Fault initiateMemAMO(Addr addr, unsigned size, Request::Flags flags, AtomicOpFunctorPtr amo_op) override
void buildSplitPacket(PacketPtr &pkt1, PacketPtr &pkt2, const RequestPtr &req1, const RequestPtr &req2, const RequestPtr &req, uint8_t *data, bool read)
virtual ~TimingSimpleCPU()
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...
void sendFetch(const Fault &fault, const RequestPtr &req, ThreadContext *tc)
This class captures the state of an address translation.
std::unique_ptr< AtomicOpFunctor > AtomicOpFunctorPtr
DrainState
Object drain/handover states.
bool scheduled() const
Determine if the current event is scheduled.
const Params & params() const
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
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
uint64_t Tick
Tick count type.
A virtual base opaque structure used to hold state associated with the packet (e.g....
DTickEvent(TimingSimpleCPU *_cpu)
const char * description() const
Return a C string describing the event.
const char * description() const
Return a C string describing the event.
ITickEvent(TimingSimpleCPU *_cpu)
virtual const char * description() const
Return a C string describing the event.
IprEvent(Packet *_pkt, TimingSimpleCPU *_cpu, Tick t)
void schedule(PacketPtr _pkt, Tick t)
const char * description() const
Return a C string describing the event.
TickEvent(TimingSimpleCPU *_cpu)