38#ifndef __MEM_CACHE_PREFETCH_QUEUED_HH__
39#define __MEM_CACHE_PREFETCH_QUEUED_HH__
54struct QueuedPrefetcherParams;
105 return !(*
this > that);
119 bool tag_prefetch,
Tick t);
194 Queued(
const QueuedPrefetcherParams &
p);
253 const PrefetchInfo &pfi, int32_t
priority);
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,...
Information provided to probes on a cache event.
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....
ThreadContext is the external interface to all thread state for anything outside of the CPU.
Class containing the information needed by the prefetch to train and generate new prefetch requests.
BaseMMU * mmu
Registered mmu for address translations.
void translationComplete(DeferredPacket *dp, bool failed, const CacheAccessor &cache)
Indicates that the translation of the address of the provided deferred packet has been successfully c...
const bool queueSquash
Squash queued prefetch if demand access observed.
gem5::prefetch::Queued::QueuedStats statsQueued
void insert(const PacketPtr &pkt, PrefetchInfo &new_pfi, int32_t priority, const CacheAccessor &cache)
std::list< DeferredPacket >::iterator iterator
void notify(const CacheAccessProbeArg &acc, const PrefetchInfo &pfi) override
Notify prefetcher of cache access (may be any access or just misses, depending on cache parameters....
Queued(const QueuedPrefetcherParams &p)
void printQueue(const std::list< DeferredPacket > &queue) const
const unsigned queueSize
Maximum size of the prefetch queue.
std::list< DeferredPacket > pfqMissingTranslation
void processMissingTranslations(unsigned max)
Starts the translations of the queued prefetches with a missing translation.
RequestPtr createPrefetchRequest(Addr addr, PrefetchInfo const &pfi, PacketPtr pkt)
const bool queueFilter
Filter prefetches if already queued.
std::list< DeferredPacket >::const_iterator const_iterator
virtual void calculatePrefetch(const PrefetchInfo &pfi, std::vector< AddrPriority > &addresses, const CacheAccessor &cache)=0
const bool tagPrefetch
Tag prefetch with PC of generating access?
const Cycles latency
Cycles after generation when a prefetch can first be issued.
const bool cacheSnoop
Snoop the cache before generating prefetch (cheating basically)
const unsigned int throttleControlPct
Percentage of requests that can be throttled.
PacketPtr getPacket() override
void addToQueue(std::list< DeferredPacket > &queue, DeferredPacket &dpp)
Adds a DeferredPacket to the specified queue.
bool alreadyInQueue(std::list< DeferredPacket > &queue, const PrefetchInfo &pfi, int32_t priority)
Checks whether the specified prefetch request is already in the specified queue.
Tick nextPrefetchReadyTime() const override
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...
const unsigned missingTranslationQueueSize
Maximum size of the queue holding prefetch requests with missing address translations.
std::list< DeferredPacket > pfq
This is a simple scalar statistic, like a counter.
Miss and writeback queue declarations.
Bitfield< 3, 0 > priority
const FlagsType total
Print the total.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
std::shared_ptr< FaultBase > Fault
std::shared_ptr< Request > RequestPtr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
uint64_t Tick
Tick count type.
Declaration of the Packet class.
Declaration of Statistics objects.
Provides generic cache lookup functions.
bool operator>(const DeferredPacket &that) const
int32_t priority
The priority of this prefetch.
Tick tick
Time when this prefetch becomes ready.
DeferredPacket(Queued *o, PrefetchInfo const &pfi, Tick t, int32_t prio, const CacheAccessor &_cache)
Constructor.
bool operator<=(const DeferredPacket &that) const
const CacheAccessor * cache
void startTranslation(BaseMMU *mmu)
Issues the translation request to the provided MMU.
void setTranslationRequest(const RequestPtr &req)
Sets the translation request needed to obtain the physical address of this request.
void createPkt(Addr paddr, unsigned blk_size, RequestorID requestor_id, bool tag_prefetch, Tick t)
Create the associated memory packet.
Queued * owner
Owner of the packet.
void finish(const Fault &fault, const RequestPtr &req, ThreadContext *tc, BaseMMU::Mode mode) override
RequestPtr translationRequest
Request used when a translation is needed.
PacketPtr pkt
The memory packet generated by this prefetch.
bool operator<(const DeferredPacket &that) const
void markDelayed() override
Signal that the translation has been delayed due to a hw page table walk.
PrefetchInfo pfInfo
Prefetch info corresponding to this packet.
statistics::Scalar pfUsefulSpanPage
statistics::Scalar pfBufferHit
statistics::Scalar pfIdentified
statistics::Scalar pfRemovedDemand
statistics::Scalar pfRemovedFull
statistics::Scalar pfSpanPage
statistics::Scalar pfInCache
QueuedStats(statistics::Group *parent)