41#ifndef __CPU_SIMPLE_ATOMIC_HH__
42#define __CPU_SIMPLE_ATOMIC_HH__
47#include "params/BaseAtomicSimpleCPU.hh"
129 panic(
"Atomic CPU doesn't expect recvTimingResp!\n");
135 panic(
"Atomic CPU doesn't expect recvRetry!\n");
219 int &frag_size,
int &size_left)
const;
229 panic(
"initiateMemMgmtCmd() is for timing accesses, and "
230 "should never be called on AtomicSimpleCPU.\n");
237 panic(
"htmSendAbortSignal() is for timing accesses, and should "
238 "never be called on AtomicSimpleCPU.");
bool isSnooping() const
Determine if this request port is snooping or not.
virtual void recvFunctionalSnoop(PacketPtr pkt)
Receive a functional snoop request packet from the peer.
virtual Tick recvAtomicSnoop(PacketPtr pkt)
Receive an atomic snoop request packet from our peer.
AtomicCPUDPort(const std::string &_name, BaseSimpleCPU *_cpu)
An AtomicCPUPort overrides the default behaviour of the recvAtomicSnoop and ignores the packet instea...
AtomicCPUPort(const std::string &_name)
bool recvTimingResp(PacketPtr pkt)
Receive a timing response from the peer.
void recvReqRetry()
Called by the peer if sendTimingReq was called on this peer (causing recvTimingReq to be called on th...
void suspendContext(ThreadID thread_num) override
Notify the CPU that the indicated context is now suspended.
void takeOverFrom(BaseCPU *old_cpu) override
Load the state of a CPU from the previous CPU object, invoked on all new CPUs that are about to be sw...
Port & getInstPort() override
Return a reference to the instruction port.
const bool simulate_data_stalls
void drainResume() override
Resume execution after a successful drain.
void switchOut() override
Prepare for another CPU to take over execution.
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.
bool isCpuDrained() const
Check if a system is in a drained state.
void regProbePoints() override
Register probe points for this object.
void printAddr(Addr a)
Print state of address in memory system via PrintReq (for debugging).
virtual Tick fetchInstMem()
void verifyMemoryMode() const override
Verify that the system is in a memory mode supported by the CPU.
AtomicCPUDPort dcachePort
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
ProbePointArg< std::pair< SimpleThread *, const StaticInstPtr > > * ppCommit
Probe Points.
AtomicSimpleCPU(const BaseAtomicSimpleCPUParams ¶ms)
Fault readMem(Addr addr, uint8_t *data, unsigned size, Request::Flags flags, const std::vector< bool > &byte_enable=std::vector< bool >()) override
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.
Fault initiateMemMgmtCmd(Request::Flags flags) override
Memory management commands such as hardware transactional memory commands or TLB invalidation command...
const bool simulate_inst_stalls
DrainState drain() override
Draining is the process of clearing out the states of SimObjects.These are the SimObjects that are pa...
void threadSnoop(PacketPtr pkt, ThreadID sender)
Perform snoop for other cpu-local thread contexts.
bool tryCompleteDrain()
Try to complete a drain request.
virtual Tick sendPacket(RequestPort &port, const PacketPtr &pkt)
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
RequestPtr data_write_req
void activateContext(ThreadID thread_num) override
Notify the CPU that the indicated context is now active.
void htmSendAbortSignal(ThreadID tid, uint64_t htm_uid, HtmFailureFaultCause cause) override
This function is used to instruct the memory subsystem that a transaction should be aborted and the s...
virtual ~AtomicSimpleCPU()
EventFunctionWrapper tickEvent
Addr cacheLineSize() const
Get the cache line size of the system.
std::vector< SimpleExecContext * > threadInfo
MicroPC microPC() const
Returns the current micropc.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Ports are used to interface objects to each other.
ProbePointArg generates a point for the class of Arg.
A RequestPort is a specialisation of a Port, which implements the default protocol for the three diff...
const PCStateBase & pcState() const override
std::unique_ptr< AtomicOpFunctor > AtomicOpFunctorPtr
DrainState
Object drain/handover states.
#define panic(...)
This implements a cprintf based panic() function.
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.
Declaration of a request, the overall memory request consisting of the parts of the request that are ...