gem5 [DEVELOP-FOR-25.0]
Loading...
Searching...
No Matches
bop.hh
Go to the documentation of this file.
1
41
48
49#ifndef __MEM_CACHE_PREFETCH_BOP_HH__
50#define __MEM_CACHE_PREFETCH_BOP_HH__
51
52#include <queue>
53
55#include "mem/packet.hh"
56
57namespace gem5
58{
59
60struct BOPPrefetcherParams;
61
62namespace prefetch
63{
64
65class BOP : public Queued
66{
67 private:
68
69 enum RRWay
70 {
73 };
74
76 const unsigned int scoreMax;
77 const unsigned int roundMax;
78 const unsigned int badScore;
80 const unsigned int rrEntries;
81 const unsigned int tagMask;
84 const unsigned int delayQueueSize;
85 const unsigned int delayTicks;
86
89
93
108
110
114
124 unsigned int bestScore;
126 unsigned int round;
127
132 unsigned int index(Addr addr, unsigned int way) const;
133
139 void insertIntoRR(Addr addr, Addr addr_tag, unsigned int way);
140
146
148 void resetScores();
149
154 Addr tag(Addr addr) const;
155
160 bool testRR(Addr addr_tag) const;
161
168
170 void notifyFill(const CacheAccessProbeArg &arg) override;
171
172 public:
174 unsigned int degree;
175
176 BOP(const BOPPrefetcherParams &p);
177 ~BOP() = default;
178
179 void calculatePrefetch(const PrefetchInfo &pfi,
180 std::vector<AddrPriority> &addresses,
181 const CacheAccessor &cache) override;
182};
183
184} // namespace prefetch
185} // namespace gem5
186
187#endif /* __MEM_CACHE_PREFETCH_BOP_HH__ */
Information provided to probes on a cache event.
std::deque< DelayQueueEntry > delayQueue
Definition bop.hh:109
void calculatePrefetch(const PrefetchInfo &pfi, std::vector< AddrPriority > &addresses, const CacheAccessor &cache) override
Definition bop.cc:296
unsigned int round
Current round.
Definition bop.hh:126
std::vector< Addr > rrLeft
Definition bop.hh:87
unsigned int bestScore
Max score found so far.
Definition bop.hh:124
const unsigned int delayQueueSize
Definition bop.hh:84
void insertIntoDelayQueue(Addr addr)
Insert the specified address into the delay queue.
Definition bop.cc:186
BOP(const BOPPrefetcherParams &p)
Definition bop.cc:52
const unsigned int rrEntries
Recent requests table parameteres.
Definition bop.hh:80
const unsigned int tagMask
Definition bop.hh:81
std::vector< OffsetListEntry >::iterator offsetsListIterator
Current test offset index.
Definition bop.hh:122
const unsigned int badScore
Definition bop.hh:78
const bool delayQueueEnabled
Delay queue parameters.
Definition bop.hh:83
const unsigned int scoreMax
Learning phase parameters.
Definition bop.hh:76
std::pair< int16_t, uint8_t > OffsetListEntry
Structure to save the offset and the score.
Definition bop.hh:91
std::vector< Addr > rrRight
Definition bop.hh:88
bool issuePrefetchRequests
Hardware prefetcher enabled.
Definition bop.hh:116
Addr tag(Addr addr) const
Generate the tag for the specified address based on the tag bits and the block size.
Definition bop.cc:214
void delayQueueEventWrapper()
Event to handle the delay queue processing.
Definition bop.cc:120
const unsigned int roundMax
Definition bop.hh:77
void bestOffsetLearning(Addr addr)
Learning phase of the BOP.
Definition bop.cc:238
Addr phaseBestOffset
Current best offset found in the learning phase.
Definition bop.hh:120
EventFunctionWrapper delayQueueEvent
Definition bop.hh:113
void notifyFill(const CacheAccessProbeArg &arg) override
Update the RR right table after a prefetch fill.
Definition bop.cc:325
unsigned int degree
The prefetch degree, i.e.
Definition bop.hh:174
std::vector< OffsetListEntry > offsetsList
Definition bop.hh:92
void insertIntoRR(Addr addr, Addr addr_tag, unsigned int way)
Insert the specified address into the RR table.
Definition bop.cc:173
void resetScores()
Reset all the scores from the offset list.
Definition bop.cc:206
Addr bestOffset
Current best offset to issue prefetches.
Definition bop.hh:118
const unsigned int delayTicks
Definition bop.hh:85
bool testRR(Addr addr_tag) const
Test if @X-O is hitting in the RR table to update the offset score.
Definition bop.cc:220
Class containing the information needed by the prefetch to train and generate new prefetch requests.
Definition base.hh:113
Queued(const QueuedPrefetcherParams &p)
Definition queued.cc:100
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< 30, 0 > index
Bitfield< 0 > p
Bitfield< 3 > x
Definition pagetable.hh:76
Bitfield< 3 > addr
Definition types.hh:84
Copyright (c) 2024 Arm Limited 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.
DelayQueueEntry(Addr x, Tick t)
Definition bop.hh:105

Generated on Mon May 26 2025 09:19:11 for gem5 by doxygen 1.13.2