gem5  [DEVELOP-FOR-23.0]
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 
41 #include "base/circular_queue.hh"
43 #include "mem/packet.hh"
44 
45 namespace gem5
46 {
47 
48 struct SBOOEPrefetcherParams;
49 
50 namespace prefetch
51 {
52 
53 class 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 
84  struct SandboxEntry
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 PacketPtr& pkt) override;
157 
158  public:
159  SBOOE(const SBOOEPrefetcherParams &p);
160 
161  void calculatePrefetch(const PrefetchInfo &pfi,
162  std::vector<AddrPriority> &addresses) override;
163 };
164 
165 } // namespace prefetch
166 } // namespace gem5
167 
168 #endif // __MEM_CACHE_PREFETCH_SBOOE_HH__
gem5::prefetch::SBOOE::latencyBufferSum
Tick latencyBufferSum
Holds the current sum of the latency buffer latency.
Definition: sbooe.hh:82
gem5::prefetch::SBOOE::Sandbox::lateScore
unsigned int lateScore
Hits in the sandbox that wouldn't have been filled on time.
Definition: sbooe.hh:111
gem5::prefetch::SBOOE::access
bool access(Addr line)
Process an access to the specified line address and update the sandbox counters counters.
Definition: sbooe.cc:78
gem5::prefetch::SBOOE::SandboxEntry::SandboxEntry
SandboxEntry()
Definition: sbooe.hh:93
gem5::prefetch::SBOOE::bestSandbox
const Sandbox * bestSandbox
Current best sandbox.
Definition: sbooe.hh:142
gem5::prefetch::SBOOE::sequentialPrefetchers
const int sequentialPrefetchers
Prefetcher parameters.
Definition: sbooe.hh:58
gem5::prefetch::SBOOE::Sandbox::access
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
gem5::prefetch::SBOOE::Sandbox::score
unsigned int score() const
Calculate the useful score.
Definition: sbooe.hh:136
gem5::prefetch::SBOOE::demandAddresses
std::unordered_map< Addr, Tick > demandAddresses
Holds the current demand addresses and tick.
Definition: sbooe.hh:68
std::vector
STL vector class.
Definition: stl.hh:37
gem5::prefetch::SBOOE::averageAccessLatency
Tick averageAccessLatency
Holds the current average access latency.
Definition: sbooe.hh:79
gem5::prefetch::SBOOE::Sandbox::Sandbox
Sandbox(unsigned int max_entries, int _stride)
Definition: sbooe.hh:117
queued.hh
packet.hh
gem5::prefetch::SBOOE::Sandbox
Definition: sbooe.hh:98
gem5::prefetch::SBOOE::latencyBuffer
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
gem5::prefetch::SBOOE::Sandbox::entries
CircularQueue< SandboxEntry > entries
FIFO queue containing the sandbox entries.
Definition: sbooe.hh:102
gem5::prefetch::SBOOE::SBOOE
SBOOE(const SBOOEPrefetcherParams &p)
Definition: sbooe.cc:40
circular_queue.hh
gem5::VegaISA::p
Bitfield< 54 > p
Definition: pagetable.hh:70
gem5::Packet
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition: packet.hh:294
gem5::prefetch::SBOOE::Sandbox::sandboxScore
unsigned int sandboxScore
Accesses during the eval period that were present in the sandbox.
Definition: sbooe.hh:108
gem5::Tick
uint64_t Tick
Tick count type.
Definition: types.hh:58
gem5::prefetch::SBOOE::accesses
unsigned int accesses
Number of accesses notified to the prefetcher.
Definition: sbooe.hh:145
gem5::prefetch::SBOOE::SandboxEntry::expectedArrivalTick
Tick expectedArrivalTick
Tick when the simulated prefetch is expected to be filled.
Definition: sbooe.hh:89
gem5::prefetch::SBOOE::sandboxes
std::vector< Sandbox > sandboxes
Definition: sbooe.hh:139
gem5::Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:147
gem5::prefetch::Queued
Definition: queued.hh:59
gem5::prefetch::SBOOE::scoreThreshold
const unsigned int scoreThreshold
Threshold used to issue prefetchers.
Definition: sbooe.hh:61
gem5::prefetch::SBOOE::SandboxEntry::valid
bool valid
To indicate if it was initialized.
Definition: sbooe.hh:91
gem5::prefetch::SBOOE::calculatePrefetch
void calculatePrefetch(const PrefetchInfo &pfi, std::vector< AddrPriority > &addresses) override
Definition: sbooe.cc:119
gem5::prefetch::SBOOE::notifyFill
void notifyFill(const PacketPtr &pkt) override
Update the latency buffer after a prefetch fill.
Definition: sbooe.cc:94
gem5::Clocked::tick
Tick tick
Definition: clocked_object.hh:68
gem5::prefetch::SBOOE
Definition: sbooe.hh:53
gem5::prefetch::SBOOE::Sandbox::stride
const int stride
Sequential stride for this prefetcher.
Definition: sbooe.hh:115
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition: gpu_translation_state.hh:37
gem5::CircularQueue< Tick >
gem5::prefetch::Base::PrefetchInfo
Class containing the information needed by the prefetch to train and generate new prefetch requests.
Definition: base.hh:96
gem5::prefetch::SBOOE::SandboxEntry::line
Addr line
Cache line predicted by the candidate prefetcher.
Definition: sbooe.hh:87
gem5::prefetch::SBOOE::SandboxEntry
Definition: sbooe.hh:84

Generated on Sun Jul 30 2023 01:56:57 for gem5 by doxygen 1.8.17