Go to the documentation of this file.
38 #include "config/the_isa.hh"
40 #include "debug/GPUCoalescer.hh"
41 #include "debug/MemoryAccess.hh"
42 #include "debug/ProtocolTrace.hh"
52 #include "params/VIPERCoalescer.hh"
57 VIPERCoalescerParams::create()
64 m_cache_inv_pkt(nullptr),
98 return RequestStatus_Aliased;
103 if (pkt->
req->isAcquire()) {
113 return RequestStatus_Issued;
122 if (pkt != NULL && pkt->
req->hasContextId()) {
123 proc_id = pkt->
req->contextId();
128 if (pkt->
req->hasPC()) {
129 pc = pkt->
req->getPC();
142 uint32_t tableSize = crequest->
getPackets().size();
143 for (
int i = 0;
i < tableSize;
i++) {
145 uint32_t tmpOffset = (tmpPkt->
getAddr()) - line_addr;
146 uint32_t tmpSize = tmpPkt->
getSize();
150 atomicOps.push_back(tmpAtomicOp);
151 }
else if (tmpPkt->
isWrite()) {
155 for (
int j = 0;
j < tmpSize;
j++) {
156 accessMask[tmpOffset +
j] =
true;
159 std::shared_ptr<RubyRequest> msg;
164 RubyAccessMode_Supervisor, pkt,
165 PrefetchBit_No, proc_id, 100,
166 blockSize, accessMask,
167 dataBlock, atomicOps, crequest->
getSeqNum());
172 RubyAccessMode_Supervisor, pkt,
173 PrefetchBit_No, proc_id, 100,
174 blockSize, accessMask,
182 DPRINTFR(ProtocolTrace,
"%15s %3s %10s%20s %6s>%-6s %s %s\n",
185 RubyRequestType_to_string(crequest->
getRubyType()));
188 "there should not be any I-Fetch requests in the GPU Coalescer");
218 for (
auto pkt : req_pkts) {
225 writeCompletePkt->
setAddr(pkt->getAddr());
237 auto key = instSeqNum;
244 safe_cast<RubyPort::SenderState *>
245 (writeCompletePkt->senderState);
247 assert(port != NULL);
249 writeCompletePkt->senderState =
ss->predecessor;
283 "There are %d Invalidations outstanding before Cache Walk\n",
286 for (
int i = 0;
i < size;
i++) {
289 RubyRequestType request_type = RubyRequestType_REPLACEMENT;
290 std::shared_ptr<RubyRequest> msg = std::make_shared<RubyRequest>(
292 request_type, RubyAccessMode_Supervisor,
302 "There are %d Invalidatons outstanding after Cache Walk\n",
Cycles m_deadlock_threshold
bool scheduled() const
Determine if the current event is scheduled.
static uint32_t getBlockSizeBytes()
RubyRequestType getRubyType() const
Addr makeLineAddress(Addr addr)
RubyGPUCoalescerParams Params
uint64_t Tick
Tick count type.
void issueRequest(CoalescedRequest *crequest) override
RequestPtr req
A pointer to the original request.
void setData(const uint8_t *data, int offset, int len)
PacketPtr getFirstPkt() const
void enqueue(MsgPtr message, Tick curTime, Tick delta)
MessageBuffer * m_mandatory_q_ptr
EventFunctionWrapper deadlockCheckEvent
AbstractController * m_controller
void completeHitCallback(std::vector< PacketPtr > &mylist)
void schedule(Event &event, Tick when)
Tick cyclesToTicks(Cycles c) const
void writeCompleteCallback(Addr address, uint64_t instSeqNum)
std::unordered_map< uint64_t, std::vector< PacketPtr > > m_writeCompletePktMap
PacketPtr m_cache_inv_pkt
Tick clockEdge(Cycles cycles=Cycles(0)) const
Determine the tick when a cycle begins, by default the current one, but the argument also enables the...
AtomicOpFunctor * getAtomicOp() const
Accessor function to atomic op.
void makeWriteCompletePkts(CoalescedRequest *crequest)
ProbePointArg< PacketInfo > Packet
Packet probe point.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
void setAddr(Addr _addr)
Update the address of this packet mid-transaction.
RequestStatus makeRequest(PacketPtr pkt) override
MemCmd cmd
The command field of the packet.
void invTCPCallback(Addr address)
Overload hash function for BasicBlockRange type.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
uint64_t getSeqNum() const
VIPERCoalescer(const Params *)
void hitCallback(PacketPtr pkt)
Addr getAddressAtIdx(int idx) const
T * getPtr()
get a pointer to the data ptr.
std::vector< PacketPtr > & getPackets()
SenderState * senderState
This packet's sender state.
void invTCP()
Invalidate TCP (Acquire)
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
virtual Cycles mandatoryQueueLatency(const RubyRequestType ¶m_type)
RequestStatus makeRequest(PacketPtr pkt) override
std::string printAddress(Addr addr)
CacheMemory * m_dataCache_ptr
Tick curTick()
The current simulated tick.
Generated on Wed Sep 30 2020 14:02:14 for gem5 by doxygen 1.8.17