41 #ifndef __MEM_RUBY_SYSTEM_SEQUENCER_HH__ 42 #define __MEM_RUBY_SYSTEM_SEQUENCER_HH__ 46 #include <unordered_map> 49 #include "mem/ruby/protocol/MachineType.hh" 50 #include "mem/ruby/protocol/RubyRequestType.hh" 51 #include "mem/ruby/protocol/SequencerRequestType.hh" 54 #include "params/RubySequencer.hh" 63 RubyRequestType _m_second_type,
Cycles _issue_time)
64 : pkt(_pkt), m_type(_m_type), m_second_type(_m_second_type),
65 issue_time(_issue_time)
91 void writeCallbackScFail(
Addr address,
96 void resetStats()
override;
98 void regStats()
override;
100 void writeCallback(
Addr address,
102 const bool externalHit =
false,
103 const MachineType mach = MachineType_NUM,
108 void readCallback(
Addr address,
110 const bool externalHit =
false,
111 const MachineType mach = MachineType_NUM,
121 {
return deadlockCheckEvent.scheduled(); }
124 { deschedule(deadlockCheckEvent); }
126 void print(std::ostream& out)
const;
127 void checkCoherence(
Addr address);
130 void evictionCallback(
Addr address);
135 void recordRequestType(SequencerRequestType requestType);
140 {
return *m_typeLatencyHist[
t]; }
144 {
return *m_hitTypeLatencyHist[
t]; }
147 {
return *m_hitMachLatencyHist[
t]; }
150 {
return *m_hitTypeMachLatencyHist[
r][
t]; }
153 {
return m_missLatencyHist; }
155 {
return *m_missTypeLatencyHist[
t]; }
158 {
return *m_missMachLatencyHist[
t]; }
162 {
return *m_missTypeMachLatencyHist[
r][
t]; }
165 {
return *m_IssueToInitialDelayHist[
t]; }
169 {
return *m_InitialToForwardDelayHist[
t]; }
173 {
return *m_ForwardToFirstResponseDelayHist[
t]; }
177 {
return *m_FirstResponseToCompletionDelayHist[
t]; }
180 {
return m_IncompleteTimes[
t]; }
187 const MachineType mach,
const bool externalHit,
188 const Cycles initialRequestTime,
189 const Cycles forwardRequestTime,
190 const Cycles firstResponseTime);
193 const MachineType respondingMach,
194 bool isExternalHit,
Cycles initialRequestTime,
195 Cycles forwardRequestTime,
196 Cycles firstResponseTime);
198 RequestStatus insertRequest(
PacketPtr pkt, RubyRequestType primary_type,
199 RubyRequestType secondary_type);
272 void llscLoadLinked(
const Addr);
278 void llscClearMonitor(
const Addr);
288 bool llscStoreConditional(
const Addr);
297 bool llscCheckMonitor(
const Addr);
308 #endif // __MEM_RUBY_SYSTEM_SEQUENCER_HH__
Stats::Histogram & getMissLatencyHist()
Stats::Histogram & getHitTypeLatencyHist(uint32_t t)
int m_max_outstanding_requests
std::unordered_map< Addr, std::list< SequencerRequest > > m_RequestTable
Cycles is a wrapper class for representing cycle counts, i.e.
std::vector< Stats::Histogram * > m_missTypeLatencyHist
SequencerRequest(PacketPtr _pkt, RubyRequestType _m_type, RubyRequestType _m_second_type, Cycles _issue_time)
Stats::Histogram & getTypeLatencyHist(uint32_t t)
void print(std::ostream &out) const
Stats::Histogram & getMissMachLatencyHist(uint32_t t) const
void descheduleDeadlockEvent() override
Stats::Histogram & getMissTypeMachLatencyHist(uint32_t r, uint32_t t) const
EventFunctionWrapper deadlockCheckEvent
std::vector< Stats::Histogram * > m_FirstResponseToCompletionDelayHist
Stats::Histogram m_missLatencyHist
Histogram for holding latency profile of all requests that miss in the controller connected to this s...
Stats::Histogram m_latencyHist
Histogram for holding latency profile of all requests.
Stats::Histogram & getHitTypeMachLatencyHist(uint32_t r, uint32_t t)
CacheMemory * m_dataCache_ptr
Cycles m_inst_cache_hit_latency
std::vector< Stats::Histogram * > m_typeLatencyHist
Stats::Histogram m_outstandReqHist
Histogram for number of outstanding requests per cycle.
std::vector< Stats::Histogram * > m_ForwardToFirstResponseDelayHist
CacheMemory * m_instCache_ptr
double Counter
All counters are of 64-bit values.
Stats::Histogram & getInitialToForwardDelayHist(const MachineType t) const
std::vector< Stats::Histogram * > m_InitialToForwardDelayHist
bool m_deadlock_check_scheduled
bool trySatisfyFunctional(PacketPtr other)
Check a functional request against a memory value stored in another packet (i.e.
std::vector< Stats::Histogram * > m_hitTypeLatencyHist
Stats::Histogram & getForwardRequestToFirstResponseHist(const MachineType t) const
std::vector< Stats::Histogram * > m_IssueToInitialDelayHist
Histograms for recording the breakdown of miss latency.
Stats::Histogram & getOutstandReqHist()
Stats::Histogram & getHitLatencyHist()
Stats::Histogram & getLatencyHist()
Stats::Histogram & getHitMachLatencyHist(uint32_t t)
RubyRequestType m_second_type
std::vector< Stats::Histogram * > m_missMachLatencyHist
Histograms for profiling the latencies for requests that required external messages.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
Stats::Histogram & getFirstResponseToCompletionDelayHist(const MachineType t) const
Stats::Counter getIncompleteTimes(const MachineType t) const
std::vector< std::vector< Stats::Histogram * > > m_missTypeMachLatencyHist
std::vector< Stats::Counter > m_IncompleteTimes
bool isDeadlockEventScheduled() const override
Cycles m_data_cache_hit_latency
bool m_runningGarnetStandalone
std::ostream & operator<<(std::ostream &out, const SequencerRequest &obj)
std::vector< Stats::Histogram * > m_hitMachLatencyHist
Histograms for profiling the latencies for requests that did not required external messages...
Stats::Histogram & getMissTypeLatencyHist(uint32_t t)
Cycles m_deadlock_threshold
bool functionalWrite(Packet *func_pkt) const
RubySequencerParams Params
int outstandingCount() const override
Stats::Histogram m_hitLatencyHist
Histogram for holding latency profile of all requests that hit in the controller connected to this se...
std::vector< std::vector< Stats::Histogram * > > m_hitTypeMachLatencyHist
Stats::Histogram & getIssueToInitialDelayHist(uint32_t t) const