31#include "debug/HWPrefetch.hh"
32#include "params/SBOOEPrefetcher.hh"
42 sequentialPrefetchers(
p.sequential_prefetchers),
43 scoreThreshold((
p.sandbox_entries*
p.score_threshold_pct)/100),
44 latencyBuffer(
p.latency_buffer_size),
45 averageAccessLatency(0), latencyBufferSum(0),
61 if (entry.valid && entry.line ==
addr) {
63 if (entry.expectedArrivalTick >
curTick()) {
134 const bool evaluationFinished =
access(pfi_line);
Information provided to probes on a cache event.
PacketPtr pkt
Packet that triggered the cache access.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Class containing the information needed by the prefetch to train and generate new prefetch requests.
Addr getAddr() const
Obtains the address value of this Prefetcher address.
unsigned lBlkSize
log_2(block size of the parent cache).
std::pair< Addr, int32_t > AddrPriority
unsigned int sandboxScore
Accesses during the eval period that were present in the sandbox.
const int stride
Sequential stride for this prefetcher.
CircularQueue< SandboxEntry > entries
FIFO queue containing the sandbox entries.
void access(Addr line, Tick tick)
Update score and insert the line address being accessed into the FIFO queue of the sandbox.
unsigned int score() const
Calculate the useful score.
unsigned int lateScore
Hits in the sandbox that wouldn't have been filled on time.
bool access(Addr line)
Process an access to the specified line address and update the sandbox counters counters.
const int sequentialPrefetchers
Prefetcher parameters.
unsigned int accesses
Number of accesses notified to the prefetcher.
std::vector< Sandbox > sandboxes
CircularQueue< Tick > latencyBuffer
The latency buffer holds the elapsed ticks between the demand and the fill in the cache for the lates...
std::unordered_map< Addr, Tick > demandAddresses
Holds the current demand addresses and tick.
Tick latencyBufferSum
Holds the current sum of the latency buffer latency.
SBOOE(const SBOOEPrefetcherParams &p)
Tick averageAccessLatency
Holds the current average access latency.
const Sandbox * bestSandbox
Current best sandbox.
void notifyFill(const CacheAccessProbeArg &arg) override
Update the latency buffer after a prefetch fill.
const unsigned int scoreThreshold
Threshold used to issue prefetchers.
void calculatePrefetch(const PrefetchInfo &pfi, std::vector< AddrPriority > &addresses, const CacheAccessor &cache) override
void push_back(typename std::vector< T >::value_type val)
Pushes an element at the end of the queue.
bool full() const
Is the queue full? A queue is full if the head is the 0^{th} element and the tail is the (size-1)^{th...
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Tick curTick()
The universal simulation clock.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
uint64_t Tick
Tick count type.
Provides generic cache lookup functions.
Tick expectedArrivalTick
Tick when the simulated prefetch is expected to be filled.
Addr line
Cache line predicted by the candidate prefetcher.
bool valid
To indicate if it was initialized.