gem5  v20.0.0.2
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
bop.hh
Go to the documentation of this file.
1 
36 #ifndef __MEM_CACHE_PREFETCH_BOP_HH__
37 #define __MEM_CACHE_PREFETCH_BOP_HH__
38 
39 #include <queue>
40 
42 #include "mem/packet.hh"
43 
44 struct BOPPrefetcherParams;
45 
46 namespace Prefetcher {
47 
48 class BOP : public Queued
49 {
50  private:
51 
52  enum RRWay {
55  };
56 
58  const unsigned int scoreMax;
59  const unsigned int roundMax;
60  const unsigned int badScore;
62  const unsigned int rrEntries;
63  const unsigned int tagMask;
65  const bool delayQueueEnabled;
66  const unsigned int delayQueueSize;
67  const unsigned int delayTicks;
68 
71 
75 
83  {
86 
87  DelayQueueEntry(Addr x, Tick t) : baseAddr(x), processTick(t)
88  {}
89  };
90 
92 
96 
106  unsigned int bestScore;
108  unsigned int round;
109 
114  unsigned int hash(Addr addr, unsigned int way) const;
115 
120  void insertIntoRR(Addr addr, unsigned int way);
121 
127 
129  void resetScores();
130 
135  Addr tag(Addr addr) const;
136 
139  bool testRR(Addr) const;
140 
143  void bestOffsetLearning(Addr);
144 
146  void notifyFill(const PacketPtr& pkt) override;
147 
148  public:
149 
150  BOP(const BOPPrefetcherParams *p);
151  ~BOP() = default;
152 
153  void calculatePrefetch(const PrefetchInfo &pfi,
154  std::vector<AddrPriority> &addresses) override;
155 };
156 
157 } // namespace Prefetcher
158 
159 #endif /* __MEM_CACHE_PREFETCH_BOP_HH__ */
void resetScores()
Reset all the scores from the offset list.
Definition: bop.cc:152
STL pair class.
Definition: stl.hh:58
const unsigned int delayTicks
Definition: bop.hh:67
ip6_addr_t addr
Definition: inet.hh:330
const unsigned int roundMax
Definition: bop.hh:59
void calculatePrefetch(const PrefetchInfo &pfi, std::vector< AddrPriority > &addresses) override
Definition: bop.cc:225
void delayQueueEventWrapper()
Event to handle the delay queue processing.
Definition: bop.cc:96
Addr tag(Addr addr) const
Generate the tag for the specified address based on the tag bits and the block size.
Definition: bop.cc:160
std::vector< OffsetListEntry > offsetsList
Definition: bop.hh:74
~BOP()=default
Addr bestOffset
Current best offset to issue prefetches.
Definition: bop.hh:100
const unsigned int tagMask
Definition: bop.hh:63
Class containing the information needed by the prefetch to train and generate new prefetch requests...
Definition: base.hh:91
bool testRR(Addr) const
Test if -O is hitting in the RR table to update the offset score.
Definition: bop.cc:166
unsigned int hash(Addr addr, unsigned int way) const
Generate a hash for the specified address to index the RR table.
Definition: bop.cc:113
Bitfield< 3 > x
Definition: pagetable.hh:69
In a first implementation of the BO prefetcher, both banks of the RR were written simultaneously when...
Definition: bop.hh:82
bool issuePrefetchRequests
Hardware prefetcher enabled.
Definition: bop.hh:98
std::vector< Addr > rrRight
Definition: bop.hh:70
void insertIntoRR(Addr addr, unsigned int way)
Insert the specified address into the RR table.
Definition: bop.cc:121
uint64_t Tick
Tick count type.
Definition: types.hh:61
const unsigned int scoreMax
Learning phase parameters.
Definition: bop.hh:58
std::pair< int16_t, uint8_t > OffsetListEntry
Structure to save the offset and the score.
Definition: bop.hh:73
unsigned int bestScore
Max score found so far.
Definition: bop.hh:106
std::vector< OffsetListEntry >::iterator offsetsListIterator
Current test offset index.
Definition: bop.hh:104
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:140
const unsigned int badScore
Definition: bop.hh:60
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
Definition: packet.hh:249
unsigned int round
Current round.
Definition: bop.hh:108
DelayQueueEntry(Addr x, Tick t)
Definition: bop.hh:87
STL deque class.
Definition: stl.hh:44
void notifyFill(const PacketPtr &pkt) override
Update the RR right table after a prefetch fill.
Definition: bop.cc:251
const bool delayQueueEnabled
Delay queue parameters.
Definition: bop.hh:65
Addr phaseBestOffset
Current best offset found in the learning phase.
Definition: bop.hh:102
void bestOffsetLearning(Addr)
Learning phase of the BOP.
Definition: bop.cc:184
Declaration of the Packet class.
BOP(const BOPPrefetcherParams *p)
Definition: bop.cc:36
std::deque< DelayQueueEntry > delayQueue
Definition: bop.hh:91
const unsigned int rrEntries
Recent requests table parameteres.
Definition: bop.hh:62
Bitfield< 5 > t
void insertIntoDelayQueue(Addr addr)
Insert the specified address into the delay queue.
Definition: bop.cc:134
Copyright (c) 2018 Metempsy Technology Consulting All rights reserved.
Definition: base.hh:78
Bitfield< 0 > p
EventFunctionWrapper delayQueueEvent
Definition: bop.hh:95
const unsigned int delayQueueSize
Definition: bop.hh:66
std::vector< Addr > rrLeft
Definition: bop.hh:69

Generated on Mon Jun 8 2020 15:45:11 for gem5 by doxygen 1.8.13