Go to the documentation of this file.
41 #ifndef __CPU_SIMPLE_ATOMIC_HH__
42 #define __CPU_SIMPLE_ATOMIC_HH__
47 #include "params/AtomicSimpleCPU.hh"
125 panic(
"Atomic CPU doesn't expect recvTimingResp!\n");
131 panic(
"Atomic CPU doesn't expect recvRetry!\n");
215 int& frag_size,
int& size_left)
const;
224 panic(
"initiateHtmCmd() is for timing accesses, and should "
225 "never be called on AtomicSimpleCPU.\n");
230 panic(
"htmSendAbortSignal() is for timing accesses, and should "
231 "never be called on AtomicSimpleCPU.\n");
251 #endif // __CPU_SIMPLE_ATOMIC_HH__
std::unique_ptr< AtomicOpFunctor > AtomicOpFunctorPtr
void activateContext(ThreadID thread_num) override
Notify the CPU that the indicated context is now active.
ProbePointArg< std::pair< SimpleThread *, const StaticInstPtr > > * ppCommit
Probe Points.
AtomicCPUPort(const std::string &_name, BaseSimpleCPU *_cpu)
int16_t ThreadID
Thread index/ID type.
virtual Tick sendPacket(RequestPort &port, const PacketPtr &pkt)
void recvReqRetry()
Called by the peer if sendTimingReq was called on this peer (causing recvTimingReq to be called on th...
void drainResume() override
AtomicCPUDPort(const std::string &_name, BaseSimpleCPU *_cpu)
unsigned int cacheLineSize() const
Get the cache line size of the system.
ProbePointArg generates a point for the class of Arg.
uint64_t Tick
Tick count type.
std::shared_ptr< Request > RequestPtr
EventFunctionWrapper tickEvent
void regProbePoints() override
std::vector< SimpleExecContext * > threadInfo
Fault readMem(Addr addr, uint8_t *data, unsigned size, Request::Flags flags, const std::vector< bool > &byte_enable=std::vector< bool >()) override
virtual void recvFunctionalSnoop(PacketPtr pkt)
Receive a functional snoop request packet from the peer.
AtomicSimpleCPU(AtomicSimpleCPUParams *params)
const bool simulate_inst_stalls
DrainState
Object drain/handover states.
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...
bool isCpuDrained() const
Check if a system is in a drained state.
void threadSnoop(PacketPtr pkt, ThreadID sender)
Perform snoop for other cpu-local thread contexts.
std::shared_ptr< FaultBase > Fault
Ports are used to interface objects to each other.
RequestPtr data_write_req
void suspendContext(ThreadID thread_num) override
Notify the CPU that the indicated context is now suspended.
Fault initiateHtmCmd(Request::Flags flags) override
Hardware transactional memory commands (HtmCmds), e.g.
void printAddr(Addr a)
Print state of address in memory system via PrintReq (for debugging).
Fault amoMem(Addr addr, uint8_t *data, unsigned size, Request::Flags flags, AtomicOpFunctorPtr amo_op) override
Port & getDataPort() override
Return a reference to the data port.
A RequestPort is a specialisation of a Port, which implements the default protocol for the three diff...
void switchOut() override
Prepare for another CPU to take over execution.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
const Params * params() const
MicroPC microPC() const override
virtual Tick recvAtomicSnoop(PacketPtr pkt)
Receive an atomic snoop request packet from our peer.
bool recvTimingResp(PacketPtr pkt)
Receive a timing response from the peer.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
An AtomicCPUPort overrides the default behaviour of the recvAtomicSnoop and ignores the packet instea...
bool isSnooping() const
Determine if this request port is snooping or not.
Port & getInstPort() override
Return a reference to the instruction port.
const bool simulate_data_stalls
bool tryCompleteDrain()
Try to complete a drain request.
bool genMemFragmentRequest(const RequestPtr &req, Addr frag_addr, int size, Request::Flags flags, const std::vector< bool > &byte_enable, int &frag_size, int &size_left) const
Helper function used to set up the request for a single fragment of a memory access.
void verifyMemoryMode() const override
Verify that the system is in a memory mode supported by the CPU.
void htmSendAbortSignal(HtmFailureFaultCause cause) override
This function is used to instruct the memory subsystem that a transaction should be aborted and the s...
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
virtual ~AtomicSimpleCPU()
#define panic(...)
This implements a cprintf based panic() function.
DrainState drain() override
AtomicCPUDPort dcachePort
Generated on Wed Sep 30 2020 14:02:09 for gem5 by doxygen 1.8.17