gem5 v24.0.0.0
Loading...
Searching...
No Matches
sbooe.hh
Go to the documentation of this file.
1
35#ifndef __MEM_CACHE_PREFETCH_SBOOE_HH__
36#define __MEM_CACHE_PREFETCH_SBOOE_HH__
37
38#include <unordered_map>
39#include <vector>
40
43#include "mem/packet.hh"
44
45namespace gem5
46{
47
48struct SBOOEPrefetcherParams;
49
50namespace prefetch
51{
52
53class SBOOE : public Queued
54{
55 private:
56
59
61 const unsigned int scoreThreshold;
62
68 std::unordered_map<Addr, Tick> demandAddresses;
69
77
80
83
85 {
91 bool valid;
92
94 : valid(false)
95 {}
96 };
97
98 class Sandbox
99 {
100 private:
103
108 unsigned int sandboxScore;
109
111 unsigned int lateScore;
112
113 public:
115 const int stride;
116
117 Sandbox(unsigned int max_entries, int _stride)
118 : entries(max_entries), sandboxScore(0), lateScore(0),
119 stride(_stride)
120 {
121 }
122
130 void access(Addr line, Tick tick);
131
136 unsigned int score() const { return (sandboxScore - lateScore); }
137 };
138
140
143
145 unsigned int accesses;
146
153 bool access(Addr line);
154
156 void notifyFill(const CacheAccessProbeArg &arg) override;
157
158 public:
159 SBOOE(const SBOOEPrefetcherParams &p);
160
161 void calculatePrefetch(const PrefetchInfo &pfi,
162 std::vector<AddrPriority> &addresses,
163 const CacheAccessor &cache) override;
164};
165
166} // namespace prefetch
167} // namespace gem5
168
169#endif // __MEM_CACHE_PREFETCH_SBOOE_HH__
Information provided to probes on a cache event.
Circular queue.
Class containing the information needed by the prefetch to train and generate new prefetch requests.
Definition base.hh:111
unsigned int sandboxScore
Accesses during the eval period that were present in the sandbox.
Definition sbooe.hh:108
const int stride
Sequential stride for this prefetcher.
Definition sbooe.hh:115
CircularQueue< SandboxEntry > entries
FIFO queue containing the sandbox entries.
Definition sbooe.hh:102
Sandbox(unsigned int max_entries, int _stride)
Definition sbooe.hh:117
void access(Addr line, Tick tick)
Update score and insert the line address being accessed into the FIFO queue of the sandbox.
Definition sbooe.cc:57
unsigned int score() const
Calculate the useful score.
Definition sbooe.hh:136
unsigned int lateScore
Hits in the sandbox that wouldn't have been filled on time.
Definition sbooe.hh:111
bool access(Addr line)
Process an access to the specified line address and update the sandbox counters counters.
Definition sbooe.cc:78
const int sequentialPrefetchers
Prefetcher parameters.
Definition sbooe.hh:58
unsigned int accesses
Number of accesses notified to the prefetcher.
Definition sbooe.hh:145
std::vector< Sandbox > sandboxes
Definition sbooe.hh:139
CircularQueue< Tick > latencyBuffer
The latency buffer holds the elapsed ticks between the demand and the fill in the cache for the lates...
Definition sbooe.hh:76
std::unordered_map< Addr, Tick > demandAddresses
Holds the current demand addresses and tick.
Definition sbooe.hh:68
Tick latencyBufferSum
Holds the current sum of the latency buffer latency.
Definition sbooe.hh:82
SBOOE(const SBOOEPrefetcherParams &p)
Definition sbooe.cc:40
Tick averageAccessLatency
Holds the current average access latency.
Definition sbooe.hh:79
const Sandbox * bestSandbox
Current best sandbox.
Definition sbooe.hh:142
void notifyFill(const CacheAccessProbeArg &arg) override
Update the latency buffer after a prefetch fill.
Definition sbooe.cc:94
const unsigned int scoreThreshold
Threshold used to issue prefetchers.
Definition sbooe.hh:61
void calculatePrefetch(const PrefetchInfo &pfi, std::vector< AddrPriority > &addresses, const CacheAccessor &cache) override
Definition sbooe.cc:121
STL vector class.
Definition stl.hh:37
Bitfield< 0 > p
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.
Tick expectedArrivalTick
Tick when the simulated prefetch is expected to be filled.
Definition sbooe.hh:89
Addr line
Cache line predicted by the candidate prefetcher.
Definition sbooe.hh:87
bool valid
To indicate if it was initialized.
Definition sbooe.hh:91

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