gem5  v19.0.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
bop.hh
Go to the documentation of this file.
1 
38 #ifndef __MEM_CACHE_PREFETCH_BOP_HH__
39 #define __MEM_CACHE_PREFETCH_BOP_HH__
40 
41 #include <queue>
42 
44 #include "mem/packet.hh"
45 
46 struct BOPPrefetcherParams;
47 
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  BOPPrefetcher(const BOPPrefetcherParams *p);
152 
153  void calculatePrefetch(const PrefetchInfo &pfi,
154  std::vector<AddrPriority> &addresses) override;
155 };
156 
157 #endif /* __MEM_CACHE_PREFETCH_BOP_HH__ */
const unsigned int tagMask
Definition: bop.hh:63
bool testRR(Addr) const
Test if -O is hitting in the RR table to update the offset score.
Definition: bop.cc:166
std::vector< Addr > rrLeft
Definition: bop.hh:69
STL pair class.
Definition: stl.hh:61
std::deque< DelayQueueEntry > delayQueue
Definition: bop.hh:91
std::vector< OffsetListEntry > offsetsList
Definition: bop.hh:74
ip6_addr_t addr
Definition: inet.hh:335
void calculatePrefetch(const PrefetchInfo &pfi, std::vector< AddrPriority > &addresses) override
Definition: bop.cc:225
void notifyFill(const PacketPtr &pkt) override
Update the RR right table after a prefetch fill.
Definition: bop.cc:251
unsigned int bestScore
Max score found so far.
Definition: bop.hh:106
bool issuePrefetchRequests
Hardware prefetcher enabled.
Definition: bop.hh:98
void delayQueueEventWrapper()
Event to handle the delay queue processing.
Definition: bop.cc:96
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
void bestOffsetLearning(Addr)
Learning phase of the BOP.
Definition: bop.cc:184
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
Class containing the information needed by the prefetch to train and generate new prefetch requests...
Definition: base.hh:92
const bool delayQueueEnabled
Delay queue parameters.
Definition: bop.hh:65
uint64_t Tick
Tick count type.
Definition: types.hh:63
const unsigned int scoreMax
Learning phase parameters.
Definition: bop.hh:58
const unsigned int rrEntries
Recent requests table parameteres.
Definition: bop.hh:62
void resetScores()
Reset all the scores from the offset list.
Definition: bop.cc:152
Addr bestOffset
Current best offset to issue prefetches.
Definition: bop.hh:100
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:142
const unsigned int delayQueueSize
Definition: bop.hh:66
DelayQueueEntry(Addr x, Tick t)
Definition: bop.hh:87
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
Definition: packet.hh:255
const unsigned int badScore
Definition: bop.hh:60
std::pair< int16_t, uint8_t > OffsetListEntry
Structure to save the offset and the score.
Definition: bop.hh:73
STL deque class.
Definition: stl.hh:47
const unsigned int delayTicks
Definition: bop.hh:67
void insertIntoDelayQueue(Addr addr)
Insert the specified address into the delay queue.
Definition: bop.cc:134
Declaration of the Packet class.
std::vector< Addr > rrRight
Definition: bop.hh:70
BOPPrefetcher(const BOPPrefetcherParams *p)
Copyright (c) 2018 Metempsy Technology Consulting All rights reserved.
Definition: bop.cc:36
~BOPPrefetcher()
Definition: bop.hh:151
unsigned int round
Current round.
Definition: bop.hh:108
const unsigned int roundMax
Definition: bop.hh:59
std::vector< OffsetListEntry >::iterator offsetsListIterator
Current test offset index.
Definition: bop.hh:104
Bitfield< 5 > t
Addr phaseBestOffset
Current best offset found in the learning phase.
Definition: bop.hh:102
In a first implementation of the BO prefetcher, both banks of the RR were written simultaneously when...
Definition: bop.hh:82
Bitfield< 0 > p
Bitfield< 1 > x
Definition: types.hh:105
EventFunctionWrapper delayQueueEvent
Definition: bop.hh:95
void insertIntoRR(Addr addr, unsigned int way)
Insert the specified address into the RR table.
Definition: bop.cc:121

Generated on Fri Feb 28 2020 16:27:01 for gem5 by doxygen 1.8.13