base.hh (13667:e3ae3619b9ab) | base.hh (13717:11e81e2a98bd) |
---|---|
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, | 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) | 70 const std::string &name, bool _isFill = false) |
71 : ProbeListenerArgBase(pm, name), | 71 : ProbeListenerArgBase(pm, name), |
72 parent(_parent) {} | 72 parent(_parent), isFill(_isFill) {} |
73 void notify(const PacketPtr &pkt) override; 74 protected: 75 BasePrefetcher &parent; | 73 void notify(const PacketPtr &pkt) override; 74 protected: 75 BasePrefetcher &parent; |
76 bool isFill; |
|
76 }; 77 78 std::vector<PrefetchListener *> listeners; 79 80 public: 81 82 /** 83 * Class containing the information needed by the prefetch to train and --- 164 unchanged lines hidden (view full) --- 248 void setCache(BaseCache *_cache); 249 250 /** 251 * Notify prefetcher of cache access (may be any access or just 252 * misses, depending on cache parameters.) 253 */ 254 virtual void notify(const PacketPtr &pkt, const PrefetchInfo &pfi) = 0; 255 | 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 |
|
256 virtual PacketPtr getPacket() = 0; 257 258 virtual Tick nextPrefetchReadyTime() const = 0; 259 260 /** 261 * Register local statistics. 262 */ 263 void regStats() override; --- 20 unchanged lines hidden --- | 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 --- |