gem5  [DEVELOP-FOR-23.0]
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
pif.hh
Go to the documentation of this file.
1 
37 #ifndef __MEM_CACHE_PREFETCH_PIF_HH__
38 #define __MEM_CACHE_PREFETCH_PIF_HH__
39 
40 #include <deque>
41 #include <vector>
42 
43 #include "base/circular_queue.hh"
46 
47 namespace gem5
48 {
49 
50 struct PIFPrefetcherParams;
51 
52 namespace prefetch
53 {
54 
55 class PIF : public Queued
56 {
57  private:
59  const unsigned int precSize;
60  const unsigned int succSize;
62  const unsigned int maxCompactorEntries;
63 
79  {
84  CompactorEntry(Addr, unsigned int, unsigned int);
85 
95  bool inSameSpatialRegion(Addr addr, unsigned int log_blk_size,
96  bool update);
104  bool hasAddress(Addr target, unsigned int log_blk_size) const;
105 
113  void getPredictedAddresses(unsigned int log_blk_size,
114  std::vector<AddrPriority> &addresses) const;
115  private:
124  unsigned int log_blk_size) const;
125  };
126 
129 
136 
137  struct IndexEntry : public TaggedEntry
138  {
139  HistoryBuffer::iterator historyIt;
140  };
146 
154 
159  void notifyRetiredInst(const Addr pc);
160 
165  {
166  public:
168  const std::string &name)
169  : ProbeListenerArgBase(pm, name),
170  parent(_parent) {}
171  void notify(const Addr& pc) override;
172  protected:
174  };
175 
178 
179 
180  public:
181  PIF(const PIFPrefetcherParams &p);
182  ~PIF() = default;
183 
184  void calculatePrefetch(const PrefetchInfo &pfi,
185  std::vector<AddrPriority> &addresses);
186 
192  void addEventProbeRetiredInsts(SimObject *obj, const char *name);
193 };
194 
195 } // namespace prefetch
196 } // namespace gem5
197 
198 #endif // __MEM_CACHE_PREFETCH_PIF_HH__
gem5::prefetch::PIF::CompactorEntry::trigger
Addr trigger
Definition: pif.hh:80
gem5::prefetch::PIF::PrefetchListenerPC
Probe Listener to handle probe events from the CPU.
Definition: pif.hh:164
gem5::prefetch::PIF::PrefetchListenerPC::notify
void notify(const Addr &pc) override
Definition: pif.cc:238
gem5::prefetch::PIF::IndexEntry::historyIt
HistoryBuffer::iterator historyIt
Definition: pif.hh:139
std::vector< bool >
gem5::prefetch::PIF::maxCompactorEntries
const unsigned int maxCompactorEntries
Number of entries used for the temporal compactor.
Definition: pif.hh:62
gem5::prefetch::PIF::spatialCompactor
CompactorEntry spatialCompactor
Definition: pif.hh:127
gem5::Clocked::update
void update() const
Align cycle and tick to the next clock edge if not already done.
Definition: clocked_object.hh:79
gem5::prefetch::PIF::notifyRetiredInst
void notifyRetiredInst(const Addr pc)
Updates the prefetcher structures upon an instruction retired.
Definition: pif.cc:136
queued.hh
gem5::prefetch::PIF::PrefetchListenerPC::PrefetchListenerPC
PrefetchListenerPC(PIF &_parent, ProbeManager *pm, const std::string &name)
Definition: pif.hh:167
gem5::prefetch::PIF
Definition: pif.hh:55
gem5::prefetch::PIF::CompactorEntry::hasAddress
bool hasAddress(Addr target, unsigned int log_blk_size) const
Checks if the provided address is contained in this spatial region and if its corresponding bit vecto...
Definition: pif.cc:94
gem5::prefetch::PIF::CompactorEntry::succ
std::vector< bool > succ
Definition: pif.hh:82
gem5::TaggedEntry
A tagged entry is an entry containing a tag.
Definition: tagged_entry.hh:46
gem5::Named::name
virtual std::string name() const
Definition: named.hh:47
circular_queue.hh
gem5::VegaISA::p
Bitfield< 54 > p
Definition: pagetable.hh:70
gem5::AssociativeSet
Associative container based on the previosuly defined Entry type Each element is indexed by a key of ...
Definition: associative_set.hh:45
gem5::prefetch::PIF::CompactorEntry::distanceFromTrigger
Addr distanceFromTrigger(Addr addr, unsigned int log_blk_size) const
Computes the distance, in cache blocks, from an address to the trigger of the entry.
Definition: pif.cc:65
gem5::prefetch::PIF::succSize
const unsigned int succSize
Definition: pif.hh:60
gem5::prefetch::PIF::CompactorEntry::CompactorEntry
CompactorEntry()
Definition: pif.hh:83
gem5::SimObject
Abstract superclass for simulation objects.
Definition: sim_object.hh:146
gem5::Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:147
gem5::ProbeManager
ProbeManager is a conduit class that lives on each SimObject, and is used to match up probe listeners...
Definition: probe.hh:162
gem5::prefetch::Queued
Definition: queued.hh:59
gem5::prefetch::PIF::historyBuffer
HistoryBuffer historyBuffer
Definition: pif.hh:135
gem5::prefetch::PIF::precSize
const unsigned int precSize
Number of preceding and subsequent spatial addresses to compact.
Definition: pif.hh:59
gem5::prefetch::PIF::calculatePrefetch
void calculatePrefetch(const PrefetchInfo &pfi, std::vector< AddrPriority > &addresses)
Definition: pif.cc:200
gem5::ProbeListenerArgBase
ProbeListenerArgBase is used to define the base interface to a ProbeListenerArg (i....
Definition: probe.hh:210
gem5::prefetch::PIF::addEventProbeRetiredInsts
void addEventProbeRetiredInsts(SimObject *obj, const char *name)
Add a SimObject and a probe name to monitor the retired instructions.
Definition: pif.cc:244
std::deque
STL deque class.
Definition: stl.hh:44
gem5::MipsISA::pc
Bitfield< 4 > pc
Definition: pra_constants.hh:243
gem5::prefetch::PIF::CompactorEntry::getPredictedAddresses
void getPredictedAddresses(unsigned int log_blk_size, std::vector< AddrPriority > &addresses) const
Fills the provided vector with the predicted addresses using the recorded bit vectors of the entry.
Definition: pif.cc:110
gem5::prefetch::PIF::CompactorEntry::prec
std::vector< bool > prec
Definition: pif.hh:81
gem5::prefetch::PIF::PrefetchListenerPC::parent
PIF & parent
Definition: pif.hh:173
gem5::prefetch::PIF::temporalCompactor
std::deque< CompactorEntry > temporalCompactor
Definition: pif.hh:128
gem5::prefetch::PIF::CompactorEntry
The compactor tracks retired instructions addresses, leveraging the spatial and temporal locality amo...
Definition: pif.hh:78
gem5::ProbeListener::name
const std::string name
Definition: probe.hh:137
gem5::prefetch::PIF::streamAddressBuffer
CircularQueue< HistoryBuffer::iterator > streamAddressBuffer
A Stream Address Buffer (SAB) tracks a window of consecutive spatial regions.
Definition: pif.hh:153
associative_set.hh
gem5::prefetch::PIF::PIF
PIF(const PIFPrefetcherParams &p)
Definition: pif.cc:43
gem5::prefetch::PIF::~PIF
~PIF()=default
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition: gpu_translation_state.hh:37
gem5::prefetch::PIF::index
AssociativeSet< IndexEntry > index
The index table is a small cache-like structure that facilitates fast search of the history buffer.
Definition: pif.hh:145
gem5::CircularQueue< CompactorEntry >
gem5::prefetch::PIF::CompactorEntry::inSameSpatialRegion
bool inSameSpatialRegion(Addr addr, unsigned int log_blk_size, bool update)
Checks if a given address is in the same defined spatial region as the compactor entry.
Definition: pif.cc:76
gem5::prefetch::Base::PrefetchInfo
Class containing the information needed by the prefetch to train and generate new prefetch requests.
Definition: base.hh:96
gem5::prefetch::PIF::listenersPC
std::vector< PrefetchListenerPC * > listenersPC
Array of probe listeners.
Definition: pif.hh:177
gem5::prefetch::PIF::IndexEntry
Definition: pif.hh:137
gem5::X86ISA::addr
Bitfield< 3 > addr
Definition: types.hh:84

Generated on Sun Jul 30 2023 01:56:57 for gem5 by doxygen 1.8.17