36 #ifndef __MEM_RUBY_SYSTEM_GPU_COALESCER_HH__ 37 #define __MEM_RUBY_SYSTEM_GPU_COALESCER_HH__ 40 #include <unordered_map> 46 #include "mem/ruby/protocol/HSAScope.hh" 47 #include "mem/ruby/protocol/HSASegment.hh" 48 #include "mem/ruby/protocol/PrefetchBit.hh" 49 #include "mem/ruby/protocol/RubyAccessMode.hh" 50 #include "mem/ruby/protocol/RubyRequestType.hh" 51 #include "mem/ruby/protocol/SequencerRequestType.hh" 59 class RubyGPUCoalescerParams;
72 : pkt(_pkt), m_type(_m_type), issue_time(_issue_time)
80 : pkt(pkt), primaryType(p_type), secondaryType(s_type)
85 secondaryType(RubyRequestType_NULL)
99 typedef RubyGPUCoalescerParams
Params;
106 void printProgress(std::ostream& out)
const;
113 void writeCallback(
Addr address,
117 void writeCallback(
Addr address,
120 Cycles initialRequestTime,
121 Cycles forwardRequestTime,
125 void writeCallback(
Addr address,
128 Cycles initialRequestTime,
129 Cycles forwardRequestTime,
130 Cycles firstResponseTime);
134 void readCallback(
Addr address,
138 void readCallback(
Addr address,
141 Cycles initialRequestTime,
142 Cycles forwardRequestTime,
143 Cycles firstResponseTime);
145 void readCallback(
Addr address,
148 Cycles initialRequestTime,
149 Cycles forwardRequestTime,
154 void atomicCallback(
Addr address,
169 return deadlockCheckEvent.scheduled();
175 deschedule(deadlockCheckEvent);
180 void print(std::ostream& out)
const;
181 void checkCoherence(
Addr address);
185 void evictionCallback(
Addr address);
186 void completeIssue();
190 void recordRequestType(SequencerRequestType requestType);
195 {
return *m_typeLatencyHist[
t]; }
198 {
return m_missLatencyHist; }
200 {
return *m_missTypeLatencyHist[
t]; }
203 {
return *m_missMachLatencyHist[
t]; }
207 {
return *m_missTypeMachLatencyHist[
r][
t]; }
210 {
return *m_IssueToInitialDelayHist[
t]; }
214 {
return *m_InitialToForwardDelayHist[
t]; }
218 {
return *m_ForwardToFirstResponseDelayHist[
t]; }
222 {
return *m_FirstResponseToCompletionDelayHist[
t]; }
227 Addr pc, RubyAccessMode access_mode,
230 virtual void issueRequest(
PacketPtr pkt, RubyRequestType type);
232 void kernelCallback(
int wavfront_id);
238 Cycles initialRequestTime,
239 Cycles forwardRequestTime,
244 Cycles initialRequestTime,
245 Cycles forwardRequestTime,
247 bool success,
bool isRegion);
252 RequestStatus getRequestStatus(
PacketPtr pkt,
253 RubyRequestType request_type);
254 bool insertRequest(
PacketPtr pkt, RubyRequestType request_type);
354 #endif // __MEM_RUBY_SYSTEM_GPU_COALESCER_HH__ Stats::Histogram & getLatencyHist()
Stats::Scalar CP_TCCStHits
EventFunctionWrapper issueEvent
RequestDesc(PacketPtr pkt, RubyRequestType p_type, RubyRequestType s_type)
Stats::Scalar GPU_TCPStHits
Cycles is a wrapper class for representing cycle counts, i.e.
Stats::Histogram m_missLatencyHist
Histogram for holding latency profile of all requests that miss in the controller connected to this s...
std::vector< Stats::Histogram * > m_ForwardToFirstResponseDelayHist
Stats::Histogram & getIssueToInitialDelayHist(uint32_t t) const
bool isDeadlockEventScheduled() const
Stats::Histogram & getFirstResponseToCompletionDelayHist(const MachineType t) const
CoalescingTable reqCoalescer
RequestTable m_readRequestTable
Declaration of a request, the overall memory request consisting of the parts of the request that are ...
HSASegment reqSegmentToHSASegment(const RequestPtr &req)
std::shared_ptr< Request > RequestPtr
Stats::Scalar GPU_TCPLdHits
Stats::Scalar GPU_TCCStHits
EventFunctionWrapper deadlockCheckEvent
Stats::Histogram & getMissTypeLatencyHist(uint32_t t)
Stats::Scalar GPU_TCPLdTransfers
Stats::Histogram & getForwardRequestToFirstResponseHist(const MachineType t) const
Stats::Scalar CP_TCPLdTransfers
std::vector< Stats::Histogram * > m_missMachLatencyHist
Histograms for profiling the latencies for requests that required external messages.
int m_max_outstanding_requests
Stats::Histogram & getMissTypeMachLatencyHist(uint32_t r, uint32_t t) const
Stats::Histogram m_latencyHist
Histogram for holding latency profile of all requests.
std::ostream & operator<<(std::ostream &out, const GPUCoalescerRequest &obj)
std::unordered_map< Addr, GPUCoalescerRequest * > RequestTable
Declaration of Statistics objects.
This is a simple scalar statistic, like a counter.
void descheduleDeadlockEvent()
Stats::Scalar CP_TCPStTransfers
RubyGPUCoalescerParams Params
std::unordered_map< Addr, std::vector< RequestDesc > > CoalescingTable
Stats::Histogram & getMissMachLatencyHist(uint32_t t) const
CacheMemory * m_dataCache_ptr
int outstandingCount() const
RubyRequestType primaryType
bool assumingRfOCoherence
std::vector< Addr > newRequests
Stats::Scalar GPU_TCCLdHits
int m_store_waiting_on_load_cycles
Stats::Histogram m_outstandReqHist
Histogram for number of outstanding requests per cycle.
std::vector< std::vector< Stats::Histogram * > > m_missTypeMachLatencyHist
std::vector< Stats::Histogram * > m_InitialToForwardDelayHist
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
int m_load_waiting_on_load_cycles
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
std::unordered_map< int, PacketPtr > kernelEndList
std::vector< Stats::Histogram * > m_IssueToInitialDelayHist
Histograms for recording the breakdown of miss latency.
Stats::Histogram & getOutstandReqHist()
Stats::Scalar CP_TCPLdHits
std::vector< Stats::Histogram * > m_typeLatencyHist
Stats::Histogram & getMissLatencyHist()
Stats::Histogram & getTypeLatencyHist(uint32_t t)
std::vector< int > newKernelEnds
GPUCoalescerRequest(PacketPtr _pkt, RubyRequestType _m_type, Cycles _issue_time)
HSAScope reqScopeToHSAScope(const RequestPtr &req)
RubyRequestType secondaryType
Stats::Scalar CP_TCPStHits
int m_load_waiting_on_store_cycles
RequestTable m_writeRequestTable
Stats::Histogram & getInitialToForwardDelayHist(const MachineType t) const
CacheMemory * m_instCache_ptr
void print(std::ostream &out) const
bool m_runningGarnetStandalone
std::vector< Stats::Histogram * > m_FirstResponseToCompletionDelayHist
std::vector< Stats::Histogram * > m_missTypeLatencyHist
int m_store_waiting_on_store_cycles
Stats::Scalar GPU_TCPStTransfers
bool m_deadlock_check_scheduled
Stats::Scalar CP_TCCLdHits