gem5  v21.1.0.2
queued.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2015 ARM Limited
3  * All rights reserved
4  *
5  * The license below extends only to copyright in the software and shall
6  * not be construed as granting a license to any other intellectual
7  * property including but not limited to intellectual property relating
8  * to a hardware implementation of the functionality of the software
9  * licensed hereunder. You may use the software subject to the license
10  * terms below provided that you ensure that this notice is replicated
11  * unmodified and in its entirety in all distributions of the software,
12  * modified or unmodified, in source code or in binary form.
13  *
14  * Redistribution and use in source and binary forms, with or without
15  * modification, are permitted provided that the following conditions are
16  * met: redistributions of source code must retain the above copyright
17  * notice, this list of conditions and the following disclaimer;
18  * redistributions in binary form must reproduce the above copyright
19  * notice, this list of conditions and the following disclaimer in the
20  * documentation and/or other materials provided with the distribution;
21  * neither the name of the copyright holders nor the names of its
22  * contributors may be used to endorse or promote products derived from
23  * this software without specific prior written permission.
24  *
25  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
28  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
29  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
31  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36  */
37 
39 
40 #include <cassert>
41 
42 #include "arch/generic/tlb.hh"
43 #include "base/logging.hh"
44 #include "base/trace.hh"
45 #include "debug/HWPrefetch.hh"
46 #include "debug/HWPrefetchQueue.hh"
47 #include "mem/cache/base.hh"
48 #include "mem/request.hh"
49 #include "params/QueuedPrefetcher.hh"
50 
51 namespace gem5
52 {
53 
55 namespace prefetch
56 {
57 
58 void
59 Queued::DeferredPacket::createPkt(Addr paddr, unsigned blk_size,
60  RequestorID requestor_id,
61  bool tag_prefetch,
62  Tick t) {
63  /* Create a prefetch memory request */
64  RequestPtr req = std::make_shared<Request>(paddr, blk_size,
65  0, requestor_id);
66 
67  if (pfInfo.isSecure()) {
68  req->setFlags(Request::SECURE);
69  }
71  pkt = new Packet(req, MemCmd::HardPFReq);
72  pkt->allocate();
73  if (tag_prefetch && pfInfo.hasPC()) {
74  // Tag prefetch packet with accessing pc
75  pkt->req->setPC(pfInfo.getPC());
76  }
77  tick = t;
78 }
79 
80 void
82 {
83  assert(translationRequest != nullptr);
84  if (!ongoingTranslation) {
85  ongoingTranslation = true;
86  // Prefetchers only operate in Timing mode
87  tlb->translateTiming(translationRequest, tc, this, BaseMMU::Read);
88  }
89 }
90 
91 void
93  const RequestPtr &req, ThreadContext *tc, BaseMMU::Mode mode)
94 {
95  assert(ongoingTranslation);
96  ongoingTranslation = false;
97  bool failed = (fault != NoFault);
98  owner->translationComplete(this, failed);
99 }
100 
101 Queued::Queued(const QueuedPrefetcherParams &p)
102  : Base(p), queueSize(p.queue_size),
104  p.max_prefetch_requests_with_pending_translation),
105  latency(p.latency), queueSquash(p.queue_squash),
106  queueFilter(p.queue_filter), cacheSnoop(p.cache_snoop),
107  tagPrefetch(p.tag_prefetch),
108  throttleControlPct(p.throttle_control_percentage), statsQueued(this)
109 {
110 }
111 
113 {
114  // Delete the queued prefetch packets
115  for (DeferredPacket &p : pfq) {
116  delete p.pkt;
117  }
118 }
119 
120 void
122 {
123  int pos = 0;
124  std::string queue_name = "";
125  if (&queue == &pfq) {
126  queue_name = "PFQ";
127  } else {
128  assert(&queue == &pfqMissingTranslation);
129  queue_name = "PFTransQ";
130  }
131 
132  for (const_iterator it = queue.cbegin(); it != queue.cend();
133  it++, pos++) {
134  DPRINTF(HWPrefetchQueue, "%s[%d]: Prefetch Req Addr: %#x prio: %3d\n",
135  queue_name, pos, it->pkt->getAddr(), it->priority);
136  }
137 }
138 
139 size_t
141 {
158  size_t max_pfs = total;
159  if (total > 0 && issuedPrefetches > 0) {
160  size_t throttle_pfs = (total * throttleControlPct) / 100;
161  size_t min_pfs = (total - throttle_pfs) == 0 ?
162  1 : (total - throttle_pfs);
163  max_pfs = min_pfs + (total - min_pfs) *
165  }
166  return max_pfs;
167 }
168 
169 void
170 Queued::notify(const PacketPtr &pkt, const PrefetchInfo &pfi)
171 {
172  Addr blk_addr = blockAddress(pfi.getAddr());
173  bool is_secure = pfi.isSecure();
174 
175  // Squash queued prefetches if demand miss to same line
176  if (queueSquash) {
177  auto itr = pfq.begin();
178  while (itr != pfq.end()) {
179  if (itr->pfInfo.getAddr() == blk_addr &&
180  itr->pfInfo.isSecure() == is_secure) {
181  DPRINTF(HWPrefetch, "Removing pf candidate addr: %#x "
182  "(cl: %#x), demand request going to the same addr\n",
183  itr->pfInfo.getAddr(),
184  blockAddress(itr->pfInfo.getAddr()));
185  delete itr->pkt;
186  itr = pfq.erase(itr);
188  } else {
189  ++itr;
190  }
191  }
192  }
193 
194  // Calculate prefetches given this access
195  std::vector<AddrPriority> addresses;
196  calculatePrefetch(pfi, addresses);
197 
198  // Get the maximu number of prefetches that we are allowed to generate
199  size_t max_pfs = getMaxPermittedPrefetches(addresses.size());
200 
201  // Queue up generated prefetches
202  size_t num_pfs = 0;
203  for (AddrPriority& addr_prio : addresses) {
204 
205  // Block align prefetch address
206  addr_prio.first = blockAddress(addr_prio.first);
207 
208  if (!samePage(addr_prio.first, pfi.getAddr())) {
209  statsQueued.pfSpanPage += 1;
210  }
211 
212  bool can_cross_page = (tlb != nullptr);
213  if (can_cross_page || samePage(addr_prio.first, pfi.getAddr())) {
214  PrefetchInfo new_pfi(pfi,addr_prio.first);
216  DPRINTF(HWPrefetch, "Found a pf candidate addr: %#x, "
217  "inserting into prefetch queue.\n", new_pfi.getAddr());
218  // Create and insert the request
219  insert(pkt, new_pfi, addr_prio.second);
220  num_pfs += 1;
221  if (num_pfs == max_pfs) {
222  break;
223  }
224  } else {
225  DPRINTF(HWPrefetch, "Ignoring page crossing prefetch.\n");
226  }
227  }
228 }
229 
230 PacketPtr
232 {
233  DPRINTF(HWPrefetch, "Requesting a prefetch to issue.\n");
234 
235  if (pfq.empty()) {
236  // If the queue is empty, attempt first to fill it with requests
237  // from the queue of missing translations
239  }
240 
241  if (pfq.empty()) {
242  DPRINTF(HWPrefetch, "No hardware prefetches available.\n");
243  return nullptr;
244  }
245 
246  PacketPtr pkt = pfq.front().pkt;
247  pfq.pop_front();
248 
250  issuedPrefetches += 1;
251  assert(pkt != nullptr);
252  DPRINTF(HWPrefetch, "Generating prefetch for %#x.\n", pkt->getAddr());
253 
255  return pkt;
256 }
257 
259  : statistics::Group(parent),
260  ADD_STAT(pfIdentified, statistics::units::Count::get(),
261  "number of prefetch candidates identified"),
262  ADD_STAT(pfBufferHit, statistics::units::Count::get(),
263  "number of redundant prefetches already in prefetch queue"),
264  ADD_STAT(pfInCache, statistics::units::Count::get(),
265  "number of redundant prefetches already in cache/mshr dropped"),
266  ADD_STAT(pfRemovedDemand, statistics::units::Count::get(),
267  "number of prefetches dropped due to a demand for the same "
268  "address"),
269  ADD_STAT(pfRemovedFull, statistics::units::Count::get(),
270  "number of prefetches dropped due to prefetch queue size"),
271  ADD_STAT(pfSpanPage, statistics::units::Count::get(),
272  "number of prefetches that crossed the page")
273 {
274 }
275 
276 
277 void
279 {
280  unsigned count = 0;
281  iterator it = pfqMissingTranslation.begin();
282  while (it != pfqMissingTranslation.end() && count < max) {
283  DeferredPacket &dp = *it;
284  // Increase the iterator first because dp.startTranslation can end up
285  // calling finishTranslation, which will erase "it"
286  it++;
287  dp.startTranslation(tlb);
288  count += 1;
289  }
290 }
291 
292 void
294 {
295  auto it = pfqMissingTranslation.begin();
296  while (it != pfqMissingTranslation.end()) {
297  if (&(*it) == dp) {
298  break;
299  }
300  it++;
301  }
302  assert(it != pfqMissingTranslation.end());
303  if (!failed) {
304  DPRINTF(HWPrefetch, "%s Translation of vaddr %#x succeeded: "
305  "paddr %#x \n", tlb->name(),
306  it->translationRequest->getVaddr(),
307  it->translationRequest->getPaddr());
308  Addr target_paddr = it->translationRequest->getPaddr();
309  // check if this prefetch is already redundant
310  if (cacheSnoop && (inCache(target_paddr, it->pfInfo.isSecure()) ||
311  inMissQueue(target_paddr, it->pfInfo.isSecure()))) {
313  DPRINTF(HWPrefetch, "Dropping redundant in "
314  "cache/MSHR prefetch addr:%#x\n", target_paddr);
315  } else {
316  Tick pf_time = curTick() + clockPeriod() * latency;
317  it->createPkt(it->translationRequest->getPaddr(), blkSize,
318  requestorId, tagPrefetch, pf_time);
319  addToQueue(pfq, *it);
320  }
321  } else {
322  DPRINTF(HWPrefetch, "%s Translation of vaddr %#x failed, dropping "
323  "prefetch request %#x \n", tlb->name(),
324  it->translationRequest->getVaddr());
325  }
326  pfqMissingTranslation.erase(it);
327 }
328 
329 bool
331  const PrefetchInfo &pfi, int32_t priority)
332 {
333  bool found = false;
334  iterator it;
335  for (it = queue.begin(); it != queue.end() && !found; it++) {
336  found = it->pfInfo.sameAddr(pfi);
337  }
338 
339  /* If the address is already in the queue, update priority and leave */
340  if (it != queue.end()) {
342  if (it->priority < priority) {
343  /* Update priority value and position in the queue */
344  it->priority = priority;
345  iterator prev = it;
346  while (prev != queue.begin()) {
347  prev--;
348  /* If the packet has higher priority, swap */
349  if (*it > *prev) {
350  std::swap(*it, *prev);
351  it = prev;
352  }
353  }
354  DPRINTF(HWPrefetch, "Prefetch addr already in "
355  "prefetch queue, priority updated\n");
356  } else {
357  DPRINTF(HWPrefetch, "Prefetch addr already in "
358  "prefetch queue\n");
359  }
360  }
361  return found;
362 }
363 
366  PacketPtr pkt)
367 {
368  RequestPtr translation_req = std::make_shared<Request>(
369  addr, blkSize, pkt->req->getFlags(), requestorId, pfi.getPC(),
370  pkt->req->contextId());
371  translation_req->setFlags(Request::PREFETCH);
372  return translation_req;
373 }
374 
375 void
376 Queued::insert(const PacketPtr &pkt, PrefetchInfo &new_pfi,
377  int32_t priority)
378 {
379  if (queueFilter) {
380  if (alreadyInQueue(pfq, new_pfi, priority)) {
381  return;
382  }
383  if (alreadyInQueue(pfqMissingTranslation, new_pfi, priority)) {
384  return;
385  }
386  }
387 
388  /*
389  * Physical address computation
390  * if the prefetch is within the same page
391  * using VA: add the computed stride to the original PA
392  * using PA: no actions needed
393  * if we are page crossing
394  * using VA: Create a translaion request and enqueue the corresponding
395  * deferred packet to the queue of pending translations
396  * using PA: use the provided VA to obtain the target VA, then attempt to
397  * translate the resulting address
398  */
399 
400  Addr orig_addr = useVirtualAddresses ?
401  pkt->req->getVaddr() : pkt->req->getPaddr();
402  bool positive_stride = new_pfi.getAddr() >= orig_addr;
403  Addr stride = positive_stride ?
404  (new_pfi.getAddr() - orig_addr) : (orig_addr - new_pfi.getAddr());
405 
406  Addr target_paddr;
407  bool has_target_pa = false;
408  RequestPtr translation_req = nullptr;
409  if (samePage(orig_addr, new_pfi.getAddr())) {
410  if (useVirtualAddresses) {
411  // if we trained with virtual addresses,
412  // compute the target PA using the original PA and adding the
413  // prefetch stride (difference between target VA and original VA)
414  target_paddr = positive_stride ? (pkt->req->getPaddr() + stride) :
415  (pkt->req->getPaddr() - stride);
416  } else {
417  target_paddr = new_pfi.getAddr();
418  }
419  has_target_pa = true;
420  } else {
421  // Page crossing reference
422 
423  // ContextID is needed for translation
424  if (!pkt->req->hasContextId()) {
425  return;
426  }
427  if (useVirtualAddresses) {
428  has_target_pa = false;
429  translation_req = createPrefetchRequest(new_pfi.getAddr(), new_pfi,
430  pkt);
431  } else if (pkt->req->hasVaddr()) {
432  has_target_pa = false;
433  // Compute the target VA using req->getVaddr + stride
434  Addr target_vaddr = positive_stride ?
435  (pkt->req->getVaddr() + stride) :
436  (pkt->req->getVaddr() - stride);
437  translation_req = createPrefetchRequest(target_vaddr, new_pfi,
438  pkt);
439  } else {
440  // Using PA for training but the request does not have a VA,
441  // unable to process this page crossing prefetch.
442  return;
443  }
444  }
445  if (has_target_pa && cacheSnoop &&
446  (inCache(target_paddr, new_pfi.isSecure()) ||
447  inMissQueue(target_paddr, new_pfi.isSecure()))) {
449  DPRINTF(HWPrefetch, "Dropping redundant in "
450  "cache/MSHR prefetch addr:%#x\n", target_paddr);
451  return;
452  }
453 
454  /* Create the packet and find the spot to insert it */
455  DeferredPacket dpp(this, new_pfi, 0, priority);
456  if (has_target_pa) {
457  Tick pf_time = curTick() + clockPeriod() * latency;
458  dpp.createPkt(target_paddr, blkSize, requestorId, tagPrefetch,
459  pf_time);
460  DPRINTF(HWPrefetch, "Prefetch queued. "
461  "addr:%#x priority: %3d tick:%lld.\n",
462  new_pfi.getAddr(), priority, pf_time);
463  addToQueue(pfq, dpp);
464  } else {
465  // Add the translation request and try to resolve it later
466  dpp.setTranslationRequest(translation_req);
467  dpp.tc = cache->system->threads[translation_req->contextId()];
468  DPRINTF(HWPrefetch, "Prefetch queued with no translation. "
469  "addr:%#x priority: %3d\n", new_pfi.getAddr(), priority);
471  }
472 }
473 
474 void
476  DeferredPacket &dpp)
477 {
478  /* Verify prefetch buffer space for request */
479  if (queue.size() == queueSize) {
481  /* Lowest priority packet */
482  iterator it = queue.end();
483  panic_if (it == queue.begin(),
484  "Prefetch queue is both full and empty!");
485  --it;
486  /* Look for oldest in that level of priority */
487  panic_if (it == queue.begin(),
488  "Prefetch queue is full with 1 element!");
489  iterator prev = it;
490  bool cont = true;
491  /* While not at the head of the queue */
492  while (cont && prev != queue.begin()) {
493  prev--;
494  /* While at the same level of priority */
495  cont = prev->priority == it->priority;
496  if (cont)
497  /* update pointer */
498  it = prev;
499  }
500  DPRINTF(HWPrefetch, "Prefetch queue full, removing lowest priority "
501  "oldest packet, addr: %#x\n",it->pfInfo.getAddr());
502  delete it->pkt;
503  queue.erase(it);
504  }
505 
506  if ((queue.size() == 0) || (dpp <= queue.back())) {
507  queue.emplace_back(dpp);
508  } else {
509  iterator it = queue.end();
510  do {
511  --it;
512  } while (it != queue.begin() && dpp > *it);
513  /* If we reach the head, we have to see if the new element is new head
514  * or not */
515  if (it == queue.begin() && dpp <= *it)
516  it++;
517  queue.insert(it, dpp);
518  }
519 
520  if (Debug::HWPrefetchQueue)
521  printQueue(queue);
522 }
523 
524 } // namespace prefetch
525 } // namespace gem5
gem5::prefetch::Base::PrefetchInfo::getAddr
Addr getAddr() const
Obtains the address value of this Prefetcher address.
Definition: base.hh:125
gem5::prefetch::Queued::DeferredPacket::finish
void finish(const Fault &fault, const RequestPtr &req, ThreadContext *tc, BaseMMU::Mode mode) override
Definition: queued.cc:92
gem5::curTick
Tick curTick()
The universal simulation clock.
Definition: cur_tick.hh:46
gem5::prefetch::Base::useVirtualAddresses
const bool useVirtualAddresses
Use Virtual Addresses for prefetching.
Definition: base.hh:302
gem5::prefetch::Queued::~Queued
virtual ~Queued()
Definition: queued.cc:112
gem5::prefetch::Queued::cacheSnoop
const bool cacheSnoop
Snoop the cache before generating prefetch (cheating basically)
Definition: queued.hh:170
gem5::BaseMMU::Read
@ Read
Definition: mmu.hh:53
gem5::NoFault
constexpr decltype(nullptr) NoFault
Definition: types.hh:260
gem5::prefetch::Queued::notify
void notify(const PacketPtr &pkt, const PrefetchInfo &pfi) override
Notify prefetcher of cache access (may be any access or just misses, depending on cache parameters....
Definition: queued.cc:170
gem5::prefetch::Queued::iterator
std::list< DeferredPacket >::iterator iterator
Definition: queued.hh:147
gem5::prefetch::Queued::addToQueue
void addToQueue(std::list< DeferredPacket > &queue, DeferredPacket &dpp)
Adds a DeferredPacket to the specified queue.
Definition: queued.cc:475
base.hh
gem5::prefetch::Queued::QueuedStats::pfRemovedDemand
statistics::Scalar pfRemovedDemand
Definition: queued.hh:185
gem5::prefetch::Queued::DeferredPacket::tick
Tick tick
Time when this prefetch becomes ready.
Definition: queued.hh:70
gem5::prefetch::Queued::getMaxPermittedPrefetches
size_t getMaxPermittedPrefetches(size_t total) const
Returns the maxmimum number of prefetch requests that are allowed to be created from the number of pr...
Definition: queued.cc:140
gem5::prefetch::Queued::DeferredPacket::setTranslationRequest
void setTranslationRequest(const RequestPtr &req)
Sets the translation request needed to obtain the physical address of this request.
Definition: queued.hh:125
gem5::prefetch::Queued::QueuedStats::pfInCache
statistics::Scalar pfInCache
Definition: queued.hh:184
gem5::prefetch::Base::PrefetchInfo::isSecure
bool isSecure() const
Returns true if the address targets the secure memory space.
Definition: base.hh:134
gem5::prefetch::Queued::QueuedStats::pfSpanPage
statistics::Scalar pfSpanPage
Definition: queued.hh:187
gem5::BaseMMU::Mode
Mode
Definition: mmu.hh:53
gem5::prefetch::Base::StatGroup::pfIssued
statistics::Scalar pfIssued
Definition: base.hh:335
gem5::Packet::req
RequestPtr req
A pointer to the original request.
Definition: packet.hh:366
gem5::prefetch::Queued::missingTranslationQueueSize
const unsigned missingTranslationQueueSize
Maximum size of the queue holding prefetch requests with missing address translations.
Definition: queued.hh:158
tlb.hh
gem5::prefetch::Base::inMissQueue
bool inMissQueue(Addr addr, bool is_secure) const
Determine if address is in cache miss queue.
Definition: base.cc:195
std::vector
STL vector class.
Definition: stl.hh:37
gem5::prefetch::Queued::printQueue
void printQueue(const std::list< DeferredPacket > &queue) const
Definition: queued.cc:121
gem5::prefetch::Base::blockAddress
Addr blockAddress(Addr a) const
Determine the address of the block in which a lays.
Definition: base.cc:213
gem5::prefetch::Queued::QueuedStats::pfIdentified
statistics::Scalar pfIdentified
Definition: queued.hh:182
gem5::prefetch::Queued::tagPrefetch
const bool tagPrefetch
Tag prefetch with PC of generating access?
Definition: queued.hh:173
gem5::MemCmd::HardPFReq
@ HardPFReq
Definition: packet.hh:98
gem5::prefetch::Base::requestorId
const RequestorID requestorId
Request id for prefetches.
Definition: base.hh:291
gem5::prefetch::Queued::insert
void insert(const PacketPtr &pkt, PrefetchInfo &new_pfi, int32_t priority)
Definition: queued.cc:376
gem5::prefetch::Queued::calculatePrefetch
virtual void calculatePrefetch(const PrefetchInfo &pfi, std::vector< AddrPriority > &addresses)=0
request.hh
queued.hh
gem5::prefetch::Base::PrefetchInfo::getPC
Addr getPC() const
Returns the program counter that generated this request.
Definition: base.hh:143
gem5::prefetch::Queued::latency
const Cycles latency
Cycles after generation when a prefetch can first be issued.
Definition: queued.hh:161
gem5::prefetch::Base::samePage
bool samePage(Addr a, Addr b) const
Determine if addresses are on the same page.
Definition: base.cc:207
gem5::ThreadContext
ThreadContext is the external interface to all thread state for anything outside of the CPU.
Definition: thread_context.hh:93
gem5::Request::SECURE
@ SECURE
The request targets the secure memory space.
Definition: request.hh:184
gem5::Named::name
virtual std::string name() const
Definition: named.hh:47
gem5::Fault
std::shared_ptr< FaultBase > Fault
Definition: types.hh:255
DPRINTF
#define DPRINTF(x,...)
Definition: trace.hh:186
ADD_STAT
#define ADD_STAT(n,...)
Convenience macro to add a stat to a statistics group.
Definition: group.hh:75
gem5::X86ISA::count
count
Definition: misc.hh:709
gem5::Packet
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition: packet.hh:283
gem5::prefetch::Queued::alreadyInQueue
bool alreadyInQueue(std::list< DeferredPacket > &queue, const PrefetchInfo &pfi, int32_t priority)
Checks whether the specified prefetch request is already in the specified queue.
Definition: queued.cc:330
gem5::prefetch::Base::usefulPrefetches
uint64_t usefulPrefetches
Total prefetches that has been useful.
Definition: base.hh:365
gem5::prefetch::Queued::DeferredPacket::startTranslation
void startTranslation(BaseTLB *tlb)
Issues the translation request to the provided TLB.
Definition: queued.cc:81
gem5::probing::Packet
ProbePointArg< PacketInfo > Packet
Packet probe point.
Definition: mem.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::RequestPtr
std::shared_ptr< Request > RequestPtr
Definition: request.hh:92
gem5::BaseTLB
Definition: tlb.hh:54
gem5::prefetch::Queued::QueuedStats::pfBufferHit
statistics::Scalar pfBufferHit
Definition: queued.hh:183
gem5::prefetch::Queued::DeferredPacket::createPkt
void createPkt(Addr paddr, unsigned blk_size, RequestorID requestor_id, bool tag_prefetch, Tick t)
Create the associated memory packet.
Definition: queued.cc:59
gem5::prefetch::Queued::throttleControlPct
const unsigned int throttleControlPct
Percentage of requests that can be throttled.
Definition: queued.hh:176
gem5::BaseTLB::translateTiming
virtual void translateTiming(const RequestPtr &req, ThreadContext *tc, BaseMMU::Translation *translation, BaseMMU::Mode mode)=0
gem5::ArmISA::t
Bitfield< 5 > t
Definition: misc_types.hh:70
std::pair
STL pair class.
Definition: stl.hh:58
gem5::prefetch::Queued::getPacket
PacketPtr getPacket() override
Definition: queued.cc:231
gem5::prefetch::Queued::pfq
std::list< DeferredPacket > pfq
Definition: queued.hh:143
gem5::prefetch::Queued::QueuedStats::QueuedStats
QueuedStats(statistics::Group *parent)
Definition: queued.cc:258
gem5::prefetch::Queued::queueFilter
const bool queueFilter
Filter prefetches if already queued.
Definition: queued.hh:167
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::translationComplete
void translationComplete(DeferredPacket *dp, bool failed)
Indicates that the translation of the address of the provided deferred packet has been successfully c...
Definition: queued.cc:293
gem5::prefetch::Queued::DeferredPacket::tc
ThreadContext * tc
Definition: queued.hh:77
gem5::prefetch::Queued::queueSize
const unsigned queueSize
Maximum size of the prefetch queue.
Definition: queued.hh:152
gem5::prefetch::Base::prefetchStats
gem5::prefetch::Base::StatGroup prefetchStats
panic_if
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
Definition: logging.hh:203
gem5::prefetch::Queued::DeferredPacket::pfInfo
PrefetchInfo pfInfo
Prefetch info corresponding to this packet.
Definition: queued.hh:68
gem5::prefetch::Base::issuedPrefetches
uint64_t issuedPrefetches
Total prefetches issued.
Definition: base.hh:363
gem5::prefetch::Queued::processMissingTranslations
void processMissingTranslations(unsigned max)
Starts the translations of the queued prefetches with a missing translation.
Definition: queued.cc:278
gem5::Packet::allocate
void allocate()
Allocate memory for the packet.
Definition: packet.hh:1326
gem5::System::threads
Threads threads
Definition: system.hh:316
gem5::prefetch::Queued::DeferredPacket::pkt
PacketPtr pkt
The memory packet generated by this prefetch.
Definition: queued.hh:72
gem5::prefetch::Queued::Queued
Queued(const QueuedPrefetcherParams &p)
Definition: queued.cc:101
gem5::BaseCache::system
System * system
System we are currently operating in.
Definition: base.hh:986
logging.hh
gem5::statistics::Group
Statistics container.
Definition: group.hh:93
gem5::prefetch::Base::cache
BaseCache * cache
Pointr to the parent cache.
Definition: base.hh:267
gem5::prefetch::Base::blkSize
unsigned blkSize
The block size of the parent cache.
Definition: base.hh:270
gem5::RequestorID
uint16_t RequestorID
Definition: request.hh:95
gem5::prefetch::Base::tlb
BaseTLB * tlb
Registered tlb for address translations.
Definition: base.hh:368
trace.hh
gem5::Request::PREFETCH
@ PREFETCH
The request is a prefetch.
Definition: request.hh:162
gem5::context_switch_task_id::Prefetcher
@ Prefetcher
Definition: request.hh:83
gem5::prefetch::Base::inCache
bool inCache(Addr addr, bool is_secure) const
Determine if address is in cache.
Definition: base.cc:189
gem5::prefetch::Queued::createPrefetchRequest
RequestPtr createPrefetchRequest(Addr addr, PrefetchInfo const &pfi, PacketPtr pkt)
Definition: queued.cc:365
std::list< DeferredPacket >
gem5::Packet::getAddr
Addr getAddr() const
Definition: packet.hh:781
gem5::prefetch::Queued::const_iterator
std::list< DeferredPacket >::const_iterator const_iterator
Definition: queued.hh:146
gem5::prefetch::Queued::DeferredPacket
Definition: queued.hh:63
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition: decoder.cc:40
gem5::statistics::total
const FlagsType total
Print the total.
Definition: info.hh:60
gem5::ArmISA::stride
Bitfield< 21, 20 > stride
Definition: misc_types.hh:446
gem5::prefetch::Base
Definition: base.hh:72
gem5::prefetch::Base::PrefetchInfo
Class containing the information needed by the prefetch to train and generate new prefetch requests.
Definition: base.hh:97
gem5::ArmISA::dp
Bitfield< 47, 44 > dp
Definition: misc_types.hh:94
gem5::prefetch::Queued::QueuedStats::pfRemovedFull
statistics::Scalar pfRemovedFull
Definition: queued.hh:186
gem5::Clocked::clockPeriod
Tick clockPeriod() const
Definition: clocked_object.hh:217
gem5::ArmISA::mode
Bitfield< 4, 0 > mode
Definition: misc_types.hh:73
gem5::X86ISA::addr
Bitfield< 3 > addr
Definition: types.hh:84
gem5::prefetch::Queued::pfqMissingTranslation
std::list< DeferredPacket > pfqMissingTranslation
Definition: queued.hh:144
gem5::prefetch::Base::PrefetchInfo::hasPC
bool hasPC() const
Returns true if the associated program counter is valid.
Definition: base.hh:153
gem5::prefetch::Queued::queueSquash
const bool queueSquash
Squash queued prefetch if demand access observed.
Definition: queued.hh:164
gem5::prefetch::Queued::statsQueued
gem5::prefetch::Queued::QueuedStats statsQueued

Generated on Tue Sep 21 2021 12:25:29 for gem5 by doxygen 1.8.17