40 #ifndef __MEM_CACHE_PREFETCH_QUEUED_HH__ 41 #define __MEM_CACHE_PREFETCH_QUEUED_HH__ 52 struct QueuedPrefetcherParams;
82 int32_t prio) : owner(o), pfInfo(pfi), tick(t), pkt(nullptr),
83 priority(prio), translationRequest(), tc(nullptr),
84 ongoingTranslation(false) {
97 return !(*
this > that);
110 bool tag_prefetch,
Tick t);
119 translationRequest = req;
193 return pfq.empty() ?
MaxTick : pfq.front().tick;
250 #endif //__MEM_CACHE_PREFETCH_QUEUED_HH__ RequestPtr translationRequest
Request used when a translation is needed.
const Cycles latency
Cycles after generation when a prefetch can first be issued.
Cycles is a wrapper class for representing cycle counts, i.e.
PrefetchInfo pfInfo
Prefetch info corresponding to this packet.
const unsigned queueSize
Maximum size of the prefetch queue.
void addToQueue(std::list< DeferredPacket > &queue, DeferredPacket &dpp)
Adds a DeferredPacket to the specified queue.
void translationComplete(DeferredPacket *dp, bool failed)
Indicates that the translation of the address of the provided deferred packet has been successfully c...
std::shared_ptr< Request > RequestPtr
void regStats() override
Register local statistics.
std::list< DeferredPacket >::const_iterator const_iterator
BaseTLB * tlb
Registered tlb for address translations.
ThreadContext is the external interface to all thread state for anything outside of the CPU...
Declaration of Statistics objects.
This is a simple scalar statistic, like a counter.
std::list< DeferredPacket >::iterator iterator
bool operator<=(const DeferredPacket &that) const
std::list< DeferredPacket > pfqMissingTranslation
Class containing the information needed by the prefetch to train and generate new prefetch requests...
void finish(const Fault &fault, const RequestPtr &req, ThreadContext *tc, BaseTLB::Mode mode) override
bool operator>(const DeferredPacket &that) const
void markDelayed() override
Signal that the translation has been delayed due to a hw page table walk.
uint64_t Tick
Tick count type.
Stats::Scalar pfRemovedFull
QueuedPrefetcher * owner
Owner of the packet.
bool operator<(const DeferredPacket &that) const
Tick nextPrefetchReadyTime() const override
void processMissingTranslations(unsigned max)
Starts the translations of the queued prefetches with a missing translation.
PacketPtr pkt
The memory packet generated by this prefetch.
void setTranslationRequest(const RequestPtr &req)
Sets the translation request needed to obtain the physical address of this request.
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,16,32,64}_t.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
void notify(const PacketPtr &pkt, const PrefetchInfo &pfi) override
Notify prefetcher of cache access (may be any access or just misses, depending on cache parameters...
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
const bool cacheSnoop
Snoop the cache before generating prefetch (cheating basically)
const FlagsType total
Print the total.
QueuedPrefetcher(const QueuedPrefetcherParams *p)
const bool tagPrefetch
Tag prefetch with PC of generating access?
const bool queueFilter
Filter prefetches if already queued.
bool alreadyInQueue(std::list< DeferredPacket > &queue, const PrefetchInfo &pfi, int32_t priority)
Checks whether the specified prefetch request is already in the specified queue.
const bool queueSquash
Squash queued prefetch if demand access observed.
Declaration of the Packet class.
DeferredPacket(QueuedPrefetcher *o, PrefetchInfo const &pfi, Tick t, int32_t prio)
Constructor.
PacketPtr getPacket() override
const unsigned int throttleControlPct
Percentage of requests that can be throttled.
size_t getMaxPermittedPrefetches(size_t total) const
Returns the maxmimum number of prefetch requests that are allowed to be created from the number of pr...
virtual void calculatePrefetch(const PrefetchInfo &pfi, std::vector< AddrPriority > &addresses)=0
int32_t priority
The priority of this prefetch.
virtual ~QueuedPrefetcher()
RequestPtr createPrefetchRequest(Addr addr, PrefetchInfo const &pfi, PacketPtr pkt)
void createPkt(Addr paddr, unsigned blk_size, MasterID mid, bool tag_prefetch, Tick t)
Create the associated memory packet.
Miss and writeback queue declarations.
void startTranslation(BaseTLB *tlb)
Issues the translation request to the provided TLB.
std::shared_ptr< FaultBase > Fault
void insert(const PacketPtr &pkt, PrefetchInfo &new_pfi, int32_t priority)
Tick tick
Time when this prefetch becomes ready.
Stats::Scalar pfIdentified
Stats::Scalar pfBufferHit
const unsigned missingTranslationQueueSize
Maximum size of the queue holding prefetch requests with missing address translations.
std::list< DeferredPacket > pfq