gem5  v21.2.0.0
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 
51 namespace prefetch
52 {
53 
54 class SBOOE : public Queued
55 {
56  private:
57 
60 
62  const unsigned int scoreThreshold;
63 
69  std::unordered_map<Addr, Tick> demandAddresses;
70 
78 
81 
84 
85  struct SandboxEntry
86  {
92  bool valid;
93 
95  : valid(false)
96  {}
97  };
98 
99  class Sandbox
100  {
101  private:
104 
109  unsigned int sandboxScore;
110 
112  unsigned int lateScore;
113 
114  public:
116  const int stride;
117 
118  Sandbox(unsigned int max_entries, int _stride)
119  : entries(max_entries), sandboxScore(0), lateScore(0),
120  stride(_stride)
121  {
122  }
123 
131  void access(Addr line, Tick tick);
132 
137  unsigned int score() const { return (sandboxScore - lateScore); }
138  };
139 
141 
144 
146  unsigned int accesses;
147 
154  bool access(Addr line);
155 
157  void notifyFill(const PacketPtr& pkt) override;
158 
159  public:
160  SBOOE(const SBOOEPrefetcherParams &p);
161 
162  void calculatePrefetch(const PrefetchInfo &pfi,
163  std::vector<AddrPriority> &addresses) override;
164 };
165 
166 } // namespace prefetch
167 } // namespace gem5
168 
169 #endif // __MEM_CACHE_PREFETCH_SBOOE_HH__
gem5::prefetch::SBOOE::latencyBufferSum
Tick latencyBufferSum
Holds the current sum of the latency buffer latency.
Definition: sbooe.hh:83
gem5::prefetch::SBOOE::Sandbox::lateScore
unsigned int lateScore
Hits in the sandbox that wouldn't have been filled on time.
Definition: sbooe.hh:112
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:79
gem5::prefetch::SBOOE::SandboxEntry::SandboxEntry
SandboxEntry()
Definition: sbooe.hh:94
gem5::prefetch::SBOOE::bestSandbox
const Sandbox * bestSandbox
Current best sandbox.
Definition: sbooe.hh:143
gem5::prefetch::SBOOE::sequentialPrefetchers
const int sequentialPrefetchers
Prefetcher parameters.
Definition: sbooe.hh:59
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:58
gem5::prefetch::SBOOE::Sandbox::score
unsigned int score() const
Calculate the useful score.
Definition: sbooe.hh:137
gem5::prefetch::SBOOE::demandAddresses
std::unordered_map< Addr, Tick > demandAddresses
Holds the current demand addresses and tick.
Definition: sbooe.hh:69
std::vector
STL vector class.
Definition: stl.hh:37
gem5::prefetch::SBOOE::averageAccessLatency
Tick averageAccessLatency
Holds the current average access latency.
Definition: sbooe.hh:80
gem5::prefetch::SBOOE::Sandbox::Sandbox
Sandbox(unsigned int max_entries, int _stride)
Definition: sbooe.hh:118
queued.hh
packet.hh
gem5::prefetch::SBOOE::Sandbox
Definition: sbooe.hh:99
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:77
gem5::prefetch::SBOOE::Sandbox::entries
CircularQueue< SandboxEntry > entries
FIFO queue containing the sandbox entries.
Definition: sbooe.hh:103
gem5::prefetch::SBOOE::SBOOE
SBOOE(const SBOOEPrefetcherParams &p)
Definition: sbooe.cc:41
circular_queue.hh
gem5::Packet
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition: packet.hh:283
gem5::prefetch::SBOOE::Sandbox::sandboxScore
unsigned int sandboxScore
Accesses during the eval period that were present in the sandbox.
Definition: sbooe.hh:109
gem5::MipsISA::p
Bitfield< 0 > p
Definition: pra_constants.hh:326
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:146
gem5::prefetch::SBOOE::SandboxEntry::expectedArrivalTick
Tick expectedArrivalTick
Tick when the simulated prefetch is expected to be filled.
Definition: sbooe.hh:90
gem5::prefetch::SBOOE::sandboxes
std::vector< Sandbox > sandboxes
Definition: sbooe.hh:140
gem5::Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:147
gem5::GEM5_DEPRECATED_NAMESPACE
GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi)
gem5::prefetch::Queued
Definition: queued.hh:60
gem5::prefetch::SBOOE::scoreThreshold
const unsigned int scoreThreshold
Threshold used to issue prefetchers.
Definition: sbooe.hh:62
gem5::prefetch::SBOOE::SandboxEntry::valid
bool valid
To indicate if it was initialized.
Definition: sbooe.hh:92
gem5::prefetch::SBOOE::calculatePrefetch
void calculatePrefetch(const PrefetchInfo &pfi, std::vector< AddrPriority > &addresses) override
Definition: sbooe.cc:120
gem5::prefetch::SBOOE::notifyFill
void notifyFill(const PacketPtr &pkt) override
Update the latency buffer after a prefetch fill.
Definition: sbooe.cc:95
gem5::Clocked::tick
Tick tick
Definition: clocked_object.hh:68
gem5::prefetch::SBOOE
Definition: sbooe.hh:54
gem5::context_switch_task_id::Prefetcher
@ Prefetcher
Definition: request.hh:83
gem5::prefetch::SBOOE::Sandbox::stride
const int stride
Sequential stride for this prefetcher.
Definition: sbooe.hh:116
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition: tlb.cc:60
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:97
gem5::prefetch::SBOOE::SandboxEntry::line
Addr line
Cache line predicted by the candidate prefetcher.
Definition: sbooe.hh:88
gem5::prefetch::SBOOE::SandboxEntry
Definition: sbooe.hh:85

Generated on Tue Dec 21 2021 11:34:31 for gem5 by doxygen 1.8.17