34 #ifndef __MEM_RUBY_SYSTEM_GPU_COALESCER_HH__ 35 #define __MEM_RUBY_SYSTEM_GPU_COALESCER_HH__ 38 #include <unordered_map> 44 #include "mem/ruby/protocol/HSAScope.hh" 45 #include "mem/ruby/protocol/HSASegment.hh" 46 #include "mem/ruby/protocol/PrefetchBit.hh" 47 #include "mem/ruby/protocol/RubyAccessMode.hh" 48 #include "mem/ruby/protocol/RubyRequestType.hh" 49 #include "mem/ruby/protocol/SequencerRequestType.hh" 57 class RubyGPUCoalescerParams;
70 : pkt(_pkt), m_type(_m_type), issue_time(_issue_time)
78 : pkt(pkt), primaryType(p_type), secondaryType(s_type)
83 secondaryType(RubyRequestType_NULL)
97 typedef RubyGPUCoalescerParams
Params;
104 void printProgress(std::ostream& out)
const;
105 void resetStats()
override;
107 void regStats()
override;
111 void writeCallback(
Addr address,
115 void writeCallback(
Addr address,
118 Cycles initialRequestTime,
119 Cycles forwardRequestTime,
123 void writeCallback(
Addr address,
126 Cycles initialRequestTime,
127 Cycles forwardRequestTime,
128 Cycles firstResponseTime);
132 void readCallback(
Addr address,
136 void readCallback(
Addr address,
139 Cycles initialRequestTime,
140 Cycles forwardRequestTime,
141 Cycles firstResponseTime);
143 void readCallback(
Addr address,
146 Cycles initialRequestTime,
147 Cycles forwardRequestTime,
152 void atomicCallback(
Addr address,
160 virtual RequestStatus makeRequest(
PacketPtr pkt)
override;
167 return deadlockCheckEvent.scheduled();
173 deschedule(deadlockCheckEvent);
178 void print(std::ostream& out)
const;
179 void checkCoherence(
Addr address);
183 void evictionCallback(
Addr address);
184 void completeIssue();
188 void recordRequestType(SequencerRequestType requestType);
193 {
return *m_typeLatencyHist[
t]; }
196 {
return m_missLatencyHist; }
198 {
return *m_missTypeLatencyHist[
t]; }
201 {
return *m_missMachLatencyHist[
t]; }
205 {
return *m_missTypeMachLatencyHist[
r][
t]; }
208 {
return *m_IssueToInitialDelayHist[
t]; }
212 {
return *m_InitialToForwardDelayHist[
t]; }
216 {
return *m_ForwardToFirstResponseDelayHist[
t]; }
220 {
return *m_FirstResponseToCompletionDelayHist[
t]; }
225 Addr pc, RubyAccessMode access_mode,
228 virtual void issueRequest(
PacketPtr pkt, RubyRequestType type);
230 void kernelCallback(
int wavfront_id);
236 Cycles initialRequestTime,
237 Cycles forwardRequestTime,
242 Cycles initialRequestTime,
243 Cycles forwardRequestTime,
245 bool success,
bool isRegion);
250 RequestStatus getRequestStatus(
PacketPtr pkt,
251 RubyRequestType request_type);
252 bool insertRequest(
PacketPtr pkt, RubyRequestType request_type);
352 #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
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.
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
RubyRequestType primaryType
bool assumingRfOCoherence
std::vector< Addr > newRequests
Stats::Scalar GPU_TCCLdHits
void descheduleDeadlockEvent() override
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
bool isDeadlockEventScheduled() const override
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
int outstandingCount() const override
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