summaryrefslogtreecommitdiff
path: root/src/mem/cache/prefetch/queued.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem/cache/prefetch/queued.hh')
-rw-r--r--src/mem/cache/prefetch/queued.hh30
1 files changed, 23 insertions, 7 deletions
diff --git a/src/mem/cache/prefetch/queued.hh b/src/mem/cache/prefetch/queued.hh
index 774e6ede8..1c63977b4 100644
--- a/src/mem/cache/prefetch/queued.hh
+++ b/src/mem/cache/prefetch/queued.hh
@@ -55,11 +55,27 @@ class QueuedPrefetcher : public BasePrefetcher
{
protected:
struct DeferredPacket {
+ /** Prefetch info corresponding to this packet */
+ PrefetchInfo pfInfo;
+ /** Time when this prefetch becomes ready */
Tick tick;
+ /** The memory packet generated by this prefetch */
PacketPtr pkt;
+ /** The priority of this prefetch */
int32_t priority;
- DeferredPacket(Tick t, PacketPtr p, int32_t pr) : tick(t), pkt(p),
- priority(pr) {}
+
+ /**
+ * Constructor
+ * @param pfi PrefechInfo object associated to this packet
+ * @param t Time when this prefetch becomes ready
+ * @param p PacketPtr with the memory request of the prefetch
+ * @param prio This prefetch priority
+ */
+ DeferredPacket(PrefetchInfo const &pfi, Tick t, PacketPtr p,
+ int32_t prio) : pfInfo(pfi), tick(t), pkt(p),
+ priority(prio) {
+ }
+
bool operator>(const DeferredPacket& that) const
{
return priority > that.priority;
@@ -98,9 +114,9 @@ class QueuedPrefetcher : public BasePrefetcher
const bool tagPrefetch;
using const_iterator = std::list<DeferredPacket>::const_iterator;
- const_iterator inPrefetch(Addr address, bool is_secure) const;
+ const_iterator inPrefetch(const PrefetchInfo &pfi) const;
using iterator = std::list<DeferredPacket>::iterator;
- iterator inPrefetch(Addr address, bool is_secure);
+ iterator inPrefetch(const PrefetchInfo &pfi);
// STATS
Stats::Scalar pfIdentified;
@@ -113,11 +129,11 @@ class QueuedPrefetcher : public BasePrefetcher
QueuedPrefetcher(const QueuedPrefetcherParams *p);
virtual ~QueuedPrefetcher();
- void notify(const PacketPtr &pkt) override;
+ void notify(const PacketPtr &pkt, const PrefetchInfo &pfi) override;
- PacketPtr insert(AddrPriority& info, bool is_secure);
+ void insert(const PacketPtr &pkt, PrefetchInfo &new_pfi, int32_t priority);
- virtual void calculatePrefetch(const PacketPtr &pkt,
+ virtual void calculatePrefetch(const PrefetchInfo &pfi,
std::vector<AddrPriority> &addresses) = 0;
PacketPtr getPacket() override;