gem5  v20.1.0.0
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 
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__ */
Prefetcher::BOP::delayQueueEventWrapper
void delayQueueEventWrapper()
Event to handle the delay queue processing.
Definition: bop.cc:96
Prefetcher::BOP::tag
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
Prefetcher::BOP::offsetsList
std::vector< OffsetListEntry > offsetsList
Definition: bop.hh:74
Prefetcher::BOP::~BOP
~BOP()=default
Prefetcher::BOP::bestOffset
Addr bestOffset
Current best offset to issue prefetches.
Definition: bop.hh:100
Prefetcher::BOP::roundMax
const unsigned int roundMax
Definition: bop.hh:59
Prefetcher::BOP::delayQueueEvent
EventFunctionWrapper delayQueueEvent
Definition: bop.hh:95
Prefetcher::BOP::delayQueueSize
const unsigned int delayQueueSize
Definition: bop.hh:66
Prefetcher::BOP::calculatePrefetch
void calculatePrefetch(const PrefetchInfo &pfi, std::vector< AddrPriority > &addresses) override
Definition: bop.cc:225
Prefetcher::BOP::hash
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
Tick
uint64_t Tick
Tick count type.
Definition: types.hh:63
Prefetcher::BOP::delayTicks
const unsigned int delayTicks
Definition: bop.hh:67
Prefetcher::BOP::issuePrefetchRequests
bool issuePrefetchRequests
Hardware prefetcher enabled.
Definition: bop.hh:98
Prefetcher::BOP::Right
@ Right
Definition: bop.hh:54
Prefetcher::BOP::DelayQueueEntry::baseAddr
Addr baseAddr
Definition: bop.hh:84
std::vector< Addr >
Prefetcher::BOP::Left
@ Left
Definition: bop.hh:53
Prefetcher::BOP::insertIntoRR
void insertIntoRR(Addr addr, unsigned int way)
Insert the specified address into the RR table.
Definition: bop.cc:121
queued.hh
packet.hh
EventFunctionWrapper
Definition: eventq.hh:1101
Prefetcher::BOP::tagMask
const unsigned int tagMask
Definition: bop.hh:63
Prefetcher::BOP::testRR
bool testRR(Addr) const
Test if @X-O is hitting in the RR table to update the offset score.
Definition: bop.cc:166
Prefetcher::BOP::OffsetListEntry
std::pair< int16_t, uint8_t > OffsetListEntry
Structure to save the offset and the score.
Definition: bop.hh:73
Prefetcher::BOP::rrRight
std::vector< Addr > rrRight
Definition: bop.hh:70
Prefetcher
Copyright (c) 2018 Metempsy Technology Consulting All rights reserved.
Definition: base.hh:78
Prefetcher::BOP::RRWay
RRWay
Definition: bop.hh:52
Prefetcher::BOP::DelayQueueEntry::processTick
Tick processTick
Definition: bop.hh:85
Prefetcher::BOP::round
unsigned int round
Current round.
Definition: bop.hh:108
Prefetcher::BOP::bestOffsetLearning
void bestOffsetLearning(Addr)
Learning phase of the BOP.
Definition: bop.cc:184
Prefetcher::BOP::scoreMax
const unsigned int scoreMax
Learning phase parameters.
Definition: bop.hh:58
RiscvISA::x
Bitfield< 3 > x
Definition: pagetable.hh:69
std::pair
STL pair class.
Definition: stl.hh:58
Prefetcher::BOP
Definition: bop.hh:48
Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:142
Prefetcher::BOP::DelayQueueEntry
In a first implementation of the BO prefetcher, both banks of the RR were written simultaneously when...
Definition: bop.hh:82
Prefetcher::Queued
Definition: queued.hh:54
Prefetcher::BOP::badScore
const unsigned int badScore
Definition: bop.hh:60
Prefetcher::BOP::notifyFill
void notifyFill(const PacketPtr &pkt) override
Update the RR right table after a prefetch fill.
Definition: bop.cc:251
Prefetcher::BOP::offsetsListIterator
std::vector< OffsetListEntry >::iterator offsetsListIterator
Current test offset index.
Definition: bop.hh:104
Prefetcher::BOP::bestScore
unsigned int bestScore
Max score found so far.
Definition: bop.hh:106
Prefetcher::BOP::rrEntries
const unsigned int rrEntries
Recent requests table parameteres.
Definition: bop.hh:62
ArmISA::t
Bitfield< 5 > t
Definition: miscregs_types.hh:67
Prefetcher::BOP::phaseBestOffset
Addr phaseBestOffset
Current best offset found in the learning phase.
Definition: bop.hh:102
Packet
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition: packet.hh:257
std::deque
STL deque class.
Definition: stl.hh:44
addr
ip6_addr_t addr
Definition: inet.hh:423
Prefetcher::Base::PrefetchInfo
Class containing the information needed by the prefetch to train and generate new prefetch requests.
Definition: base.hh:90
Prefetcher::BOP::delayQueue
std::deque< DelayQueueEntry > delayQueue
Definition: bop.hh:91
Prefetcher::BOP::delayQueueEnabled
const bool delayQueueEnabled
Delay queue parameters.
Definition: bop.hh:65
Prefetcher::BOP::DelayQueueEntry::DelayQueueEntry
DelayQueueEntry(Addr x, Tick t)
Definition: bop.hh:87
Prefetcher::BOP::resetScores
void resetScores()
Reset all the scores from the offset list.
Definition: bop.cc:152
MipsISA::p
Bitfield< 0 > p
Definition: pra_constants.hh:323
Prefetcher::BOP::BOP
BOP(const BOPPrefetcherParams *p)
Definition: bop.cc:36
Prefetcher::BOP::rrLeft
std::vector< Addr > rrLeft
Definition: bop.hh:69
Prefetcher::BOP::insertIntoDelayQueue
void insertIntoDelayQueue(Addr addr)
Insert the specified address into the delay queue.
Definition: bop.cc:134

Generated on Wed Sep 30 2020 14:02:12 for gem5 by doxygen 1.8.17