1/* 2 * Copyright (c) 2013-2014 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 --- 53 unchanged lines hidden (view full) --- 62struct BasePrefetcherParams; 63 64class BasePrefetcher : public ClockedObject 65{ 66 class PrefetchListener : public ProbeListenerArgBase<PacketPtr> 67 { 68 public: 69 PrefetchListener(BasePrefetcher &_parent, ProbeManager *pm, |
70 const std::string &name, bool _isFill = false) |
71 : ProbeListenerArgBase(pm, name), |
72 parent(_parent), isFill(_isFill) {} |
73 void notify(const PacketPtr &pkt) override; 74 protected: 75 BasePrefetcher &parent; |
76 bool isFill; |
77 }; 78 79 std::vector<PrefetchListener *> listeners; 80 81 public: 82 83 /** 84 * Class containing the information needed by the prefetch to train and --- 164 unchanged lines hidden (view full) --- 249 void setCache(BaseCache *_cache); 250 251 /** 252 * Notify prefetcher of cache access (may be any access or just 253 * misses, depending on cache parameters.) 254 */ 255 virtual void notify(const PacketPtr &pkt, const PrefetchInfo &pfi) = 0; 256 |
257 /** Notify prefetcher of cache fill */ 258 virtual void notifyFill(const PacketPtr &pkt) 259 {} 260 |
261 virtual PacketPtr getPacket() = 0; 262 263 virtual Tick nextPrefetchReadyTime() const = 0; 264 265 /** 266 * Register local statistics. 267 */ 268 void regStats() override; --- 20 unchanged lines hidden --- |