queued.hh (13416:d90887d0c889) | queued.hh (13422:4ec52da74cd5) |
---|---|
1/* 2 * Copyright (c) 2014-2015 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 84 unchanged lines hidden (view full) --- 93 94 /** Snoop the cache before generating prefetch (cheating basically) */ 95 const bool cacheSnoop; 96 97 /** Tag prefetch with PC of generating access? */ 98 const bool tagPrefetch; 99 100 using const_iterator = std::list<DeferredPacket>::const_iterator; | 1/* 2 * Copyright (c) 2014-2015 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 84 unchanged lines hidden (view full) --- 93 94 /** Snoop the cache before generating prefetch (cheating basically) */ 95 const bool cacheSnoop; 96 97 /** Tag prefetch with PC of generating access? */ 98 const bool tagPrefetch; 99 100 using const_iterator = std::list<DeferredPacket>::const_iterator; |
101 std::list<DeferredPacket>::const_iterator inPrefetch(Addr address, 102 bool is_secure) const; | 101 const_iterator inPrefetch(Addr address, bool is_secure) const; |
103 using iterator = std::list<DeferredPacket>::iterator; | 102 using iterator = std::list<DeferredPacket>::iterator; |
104 std::list<DeferredPacket>::iterator inPrefetch(Addr address, 105 bool is_secure); | 103 iterator inPrefetch(Addr address, bool is_secure); |
106 107 // STATS 108 Stats::Scalar pfIdentified; 109 Stats::Scalar pfBufferHit; 110 Stats::Scalar pfInCache; 111 Stats::Scalar pfRemovedFull; 112 Stats::Scalar pfSpanPage; 113 114 public: 115 QueuedPrefetcher(const QueuedPrefetcherParams *p); 116 virtual ~QueuedPrefetcher(); 117 118 void notify(const PacketPtr &pkt) override; | 104 105 // STATS 106 Stats::Scalar pfIdentified; 107 Stats::Scalar pfBufferHit; 108 Stats::Scalar pfInCache; 109 Stats::Scalar pfRemovedFull; 110 Stats::Scalar pfSpanPage; 111 112 public: 113 QueuedPrefetcher(const QueuedPrefetcherParams *p); 114 virtual ~QueuedPrefetcher(); 115 116 void notify(const PacketPtr &pkt) override; |
117 |
|
119 PacketPtr insert(AddrPriority& info, bool is_secure); 120 | 118 PacketPtr insert(AddrPriority& info, bool is_secure); 119 |
121 // Note: This should really be pure virtual, but doesnt go well with params | |
122 virtual void calculatePrefetch(const PacketPtr &pkt, 123 std::vector<AddrPriority> &addresses) = 0; | 120 virtual void calculatePrefetch(const PacketPtr &pkt, 121 std::vector<AddrPriority> &addresses) = 0; |
124 PacketPtr getPacket(); | 122 PacketPtr getPacket() override; |
125 | 123 |
126 Tick nextPrefetchReadyTime() const | 124 Tick nextPrefetchReadyTime() const override |
127 { 128 return pfq.empty() ? MaxTick : pfq.front().tick; 129 } 130 | 125 { 126 return pfq.empty() ? MaxTick : pfq.front().tick; 127 } 128 |
131 void regStats(); | 129 void regStats() override; |
132}; 133 134#endif //__MEM_CACHE_PREFETCH_QUEUED_HH__ 135 | 130}; 131 132#endif //__MEM_CACHE_PREFETCH_QUEUED_HH__ 133 |