gem5 v24.0.0.0
Loading...
Searching...
No Matches
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
44namespace gem5
45{
46
47struct BOPPrefetcherParams;
48
49namespace prefetch
50{
51
52class BOP : public Queued
53{
54 private:
55
56 enum RRWay
57 {
59 Right
60 };
61
63 const unsigned int scoreMax;
64 const unsigned int roundMax;
65 const unsigned int badScore;
67 const unsigned int rrEntries;
68 const unsigned int tagMask;
71 const unsigned int delayQueueSize;
72 const unsigned int delayTicks;
73
76
80
95
97
101
111 unsigned int bestScore;
113 unsigned int round;
114
119 unsigned int hash(Addr addr, unsigned int way) const;
120
125 void insertIntoRR(Addr addr, unsigned int way);
126
132
134 void resetScores();
135
140 Addr tag(Addr addr) const;
141
144 bool testRR(Addr) const;
145
149
151 void notifyFill(const CacheAccessProbeArg &arg) override;
152
153 public:
154
155 BOP(const BOPPrefetcherParams &p);
156 ~BOP() = default;
157
158 void calculatePrefetch(const PrefetchInfo &pfi,
159 std::vector<AddrPriority> &addresses,
160 const CacheAccessor &cache) override;
161};
162
163} // namespace prefetch
164} // namespace gem5
165
166#endif /* __MEM_CACHE_PREFETCH_BOP_HH__ */
Information provided to probes on a cache event.
std::deque< DelayQueueEntry > delayQueue
Definition bop.hh:96
void calculatePrefetch(const PrefetchInfo &pfi, std::vector< AddrPriority > &addresses, const CacheAccessor &cache) override
Definition bop.cc:229
unsigned int round
Current round.
Definition bop.hh:113
std::vector< Addr > rrLeft
Definition bop.hh:74
unsigned int bestScore
Max score found so far.
Definition bop.hh:111
const unsigned int delayQueueSize
Definition bop.hh:71
void insertIntoDelayQueue(Addr addr)
Insert the specified address into the delay queue.
Definition bop.cc:138
BOP(const BOPPrefetcherParams &p)
Definition bop.cc:40
unsigned int hash(Addr addr, unsigned int way) const
Generate a hash for the specified address to index the RR table.
Definition bop.cc:117
const unsigned int rrEntries
Recent requests table parameteres.
Definition bop.hh:67
const unsigned int tagMask
Definition bop.hh:68
std::vector< OffsetListEntry >::iterator offsetsListIterator
Current test offset index.
Definition bop.hh:109
const unsigned int badScore
Definition bop.hh:65
const bool delayQueueEnabled
Delay queue parameters.
Definition bop.hh:70
const unsigned int scoreMax
Learning phase parameters.
Definition bop.hh:63
std::pair< int16_t, uint8_t > OffsetListEntry
Structure to save the offset and the score.
Definition bop.hh:78
std::vector< Addr > rrRight
Definition bop.hh:75
bool issuePrefetchRequests
Hardware prefetcher enabled.
Definition bop.hh:103
Addr tag(Addr addr) const
Generate the tag for the specified address based on the tag bits and the block size.
Definition bop.cc:164
void delayQueueEventWrapper()
Event to handle the delay queue processing.
Definition bop.cc:100
void bestOffsetLearning(Addr)
Learning phase of the BOP.
Definition bop.cc:188
const unsigned int roundMax
Definition bop.hh:64
void insertIntoRR(Addr addr, unsigned int way)
Insert the specified address into the RR table.
Definition bop.cc:125
Addr phaseBestOffset
Current best offset found in the learning phase.
Definition bop.hh:107
EventFunctionWrapper delayQueueEvent
Definition bop.hh:100
void notifyFill(const CacheAccessProbeArg &arg) override
Update the RR right table after a prefetch fill.
Definition bop.cc:256
std::vector< OffsetListEntry > offsetsList
Definition bop.hh:79
bool testRR(Addr) const
Test if @X-O is hitting in the RR table to update the offset score.
Definition bop.cc:170
void resetScores()
Reset all the scores from the offset list.
Definition bop.cc:156
Addr bestOffset
Current best offset to issue prefetches.
Definition bop.hh:105
const unsigned int delayTicks
Definition bop.hh:72
Class containing the information needed by the prefetch to train and generate new prefetch requests.
Definition base.hh:111
STL deque class.
Definition stl.hh:44
STL pair class.
Definition stl.hh:58
STL vector class.
Definition stl.hh:37
Bitfield< 5 > t
Definition misc_types.hh:71
Bitfield< 0 > p
Bitfield< 3 > x
Definition pagetable.hh:73
Bitfield< 3 > addr
Definition types.hh:84
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Definition binary32.hh:36
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition types.hh:147
uint64_t Tick
Tick count type.
Definition types.hh:58
Declaration of the Packet class.
Provides generic cache lookup functions.
In a first implementation of the BO prefetcher, both banks of the RR were written simultaneously when...
Definition bop.hh:88
DelayQueueEntry(Addr x, Tick t)
Definition bop.hh:92

Generated on Tue Jun 18 2024 16:24:05 for gem5 by doxygen 1.11.0