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"
69 RubyRequestType _m_second_type,
Cycles _issue_time)
107 const bool externalHit =
false,
108 const MachineType mach = MachineType_NUM,
112 const bool noCoales =
false);
123 const bool externalHit =
false,
124 const MachineType mach = MachineType_NUM,
131 const bool externalHit =
false,
132 const MachineType mach = MachineType_NUM,
138 RubyRequestType requestType,
139 const MachineType mach = MachineType_NUM,
149 virtual bool empty()
const;
158 virtual void print(std::ostream& out)
const;
218 const MachineType mach,
const bool externalHit,
219 const Cycles initialRequestTime,
220 const Cycles forwardRequestTime,
221 const Cycles firstResponseTime,
222 const bool was_coalesced);
225 const MachineType respondingMach,
226 bool isExternalHit,
Cycles initialRequestTime,
227 Cycles forwardRequestTime,
228 Cycles firstResponseTime);
244 RubyRequestType primary_type,
245 RubyRequestType secondary_type);
Cycles is a wrapper class for representing cycle counts, i.e.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
bool trySatisfyFunctional(PacketPtr other)
Check a functional request against a memory value stored in another packet (i.e.
statistics::Histogram m_outstandReqHist
Histogram for number of outstanding requests per cycle.
void resetStats() override
Callback to reset stats.
statistics::Histogram & getLatencyHist()
Cycles m_deadlock_threshold
Sequencer(const Sequencer &obj)
std::unordered_map< Addr, std::list< SequencerRequest > > m_RequestTable
int outstandingCount() const override
virtual bool empty() const
void writeCallback(Addr address, DataBlock &data, const bool externalHit=false, const MachineType mach=MachineType_NUM, const Cycles initialRequestTime=Cycles(0), const Cycles forwardRequestTime=Cycles(0), const Cycles firstResponseTime=Cycles(0), const bool noCoales=false)
statistics::Histogram & getMissTypeLatencyHist(uint32_t t)
std::vector< statistics::Counter > m_IncompleteTimes
bool llscCheckMonitor(const Addr)
Searches for cache line address in the global monitor tagged with this Sequencer object's version id.
virtual int functionalWrite(Packet *func_pkt) override
std::vector< statistics::Histogram * > m_InitialToForwardDelayHist
statistics::Histogram & getMissMachLatencyHist(uint32_t t) const
std::vector< statistics::Histogram * > m_hitMachLatencyHist
Histograms for profiling the latencies for requests that did not required external messages.
void recordMissLatency(SequencerRequest *srequest, bool llscSuccess, const MachineType respondingMach, bool isExternalHit, Cycles initialRequestTime, Cycles forwardRequestTime, Cycles firstResponseTime)
void completeHitCallback(std::vector< PacketPtr > &list)
std::vector< statistics::Histogram * > m_typeLatencyHist
PacketPtr m_cache_inv_pkt
void atomicCallback(Addr address, DataBlock &data, const bool externalHit=false, const MachineType mach=MachineType_NUM, const Cycles initialRequestTime=Cycles(0), const Cycles forwardRequestTime=Cycles(0), const Cycles firstResponseTime=Cycles(0))
bool isDeadlockEventScheduled() const override
void writeCallbackScFail(Addr address, DataBlock &data)
Proxy function to writeCallback that first invalidates the line address in the local monitor.
statistics::Histogram & getHitTypeMachLatencyHist(uint32_t r, uint32_t t)
CacheMemory * m_dataCache_ptr
std::vector< statistics::Histogram * > m_FirstResponseToCompletionDelayHist
void incrementUnaddressedTransactionCnt()
Increment the unaddressed transaction counter.
statistics::Histogram & getTypeLatencyHist(uint32_t t)
void hitCallback(SequencerRequest *srequest, DataBlock &data, bool llscSuccess, const MachineType mach, const bool externalHit, const Cycles initialRequestTime, const Cycles forwardRequestTime, const Cycles firstResponseTime, const bool was_coalesced)
statistics::Counter getIncompleteTimes(const MachineType t) const
void llscLoadLinked(const Addr)
Places the cache line address into the global monitor tagged with this Sequencer object's version id.
uint64_t getCurrentUnaddressedTransactionID() const
Generate the current unaddressed transaction ID based on the counter and the Sequencer object's versi...
Sequencer(const Params &)
statistics::Histogram m_latencyHist
Histogram for holding latency profile of all requests.
statistics::Histogram & getHitMachLatencyHist(uint32_t t)
void issueRequest(PacketPtr pkt, RubyRequestType type)
bool llscStoreConditional(const Addr)
Searches for cache line address in the global monitor tagged with this Sequencer object's version id.
statistics::Histogram & getIssueToInitialDelayHist(uint32_t t) const
statistics::Histogram & getInitialToForwardDelayHist(const MachineType t) const
void unaddressedCallback(Addr unaddressedReqId, RubyRequestType requestType, const MachineType mach=MachineType_NUM, const Cycles initialRequestTime=Cycles(0), const Cycles forwardRequestTime=Cycles(0), const Cycles firstResponseTime=Cycles(0))
virtual RequestStatus insertRequest(PacketPtr pkt, RubyRequestType primary_type, RubyRequestType secondary_type)
Sequencer & operator=(const Sequencer &obj)
EventFunctionWrapper deadlockCheckEvent
std::unordered_map< uint64_t, SequencerRequest > m_UnaddressedRequestTable
uint64_t m_unaddressedTransactionCnt
std::vector< statistics::Histogram * > m_hitTypeLatencyHist
bool m_runningGarnetStandalone
bool m_deadlock_check_scheduled
statistics::Histogram m_hitLatencyHist
Histogram for holding latency profile of all requests that hit in the controller connected to this se...
RequestStatus makeRequest(PacketPtr pkt) override
statistics::Histogram & getMissTypeMachLatencyHist(uint32_t r, uint32_t t) const
void descheduleDeadlockEvent() override
Cycles m_data_cache_hit_latency
statistics::Histogram & getFirstResponseToCompletionDelayHist(const MachineType t) const
int m_max_outstanding_requests
void llscClearLocalMonitor()
Removes all addresses from the local monitor.
void recordRequestType(SequencerRequestType requestType)
std::vector< statistics::Histogram * > m_IssueToInitialDelayHist
Histograms for recording the breakdown of miss latency.
virtual void print(std::ostream &out) const
statistics::Histogram & getOutstandReqHist()
statistics::Histogram & getHitLatencyHist()
statistics::Histogram & getHitTypeLatencyHist(uint32_t t)
RubySequencerParams Params
std::vector< std::vector< statistics::Histogram * > > m_hitTypeMachLatencyHist
statistics::Histogram & getMissLatencyHist()
void llscClearMonitor(const Addr)
Removes the cache line address from the global monitor.
void writeUniqueCallback(Addr address, DataBlock &data)
Cycles m_inst_cache_hit_latency
void evictionCallback(Addr address)
std::vector< statistics::Histogram * > m_ForwardToFirstResponseDelayHist
statistics::Histogram & getForwardRequestToFirstResponseHist(const MachineType t) const
void readCallback(Addr address, DataBlock &data, const bool externalHit=false, const MachineType mach=MachineType_NUM, const Cycles initialRequestTime=Cycles(0), const Cycles forwardRequestTime=Cycles(0), const Cycles firstResponseTime=Cycles(0))
std::vector< statistics::Histogram * > m_missMachLatencyHist
Histograms for profiling the latencies for requests that required external messages.
std::vector< statistics::Histogram * > m_missTypeLatencyHist
statistics::Histogram m_missLatencyHist
Histogram for holding latency profile of all requests that miss in the controller connected to this s...
std::vector< std::vector< statistics::Histogram * > > m_missTypeMachLatencyHist
void deschedule(Event &event)
bool scheduled() const
Determine if the current event is scheduled.
std::ostream & operator<<(std::ostream &os, const BoolVec &myvector)
double Counter
All counters are of 64-bit values.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
SequencerRequest(PacketPtr _pkt, RubyRequestType _m_type, RubyRequestType _m_second_type, Cycles _issue_time)
RubyRequestType m_second_type
bool functionalWrite(Packet *func_pkt) const