gem5  v21.0.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
base.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012-2013, 2015-2016, 2018-2019 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  * Copyright (c) 2003-2005 The Regents of The University of Michigan
15  * All rights reserved.
16  *
17  * Redistribution and use in source and binary forms, with or without
18  * modification, are permitted provided that the following conditions are
19  * met: redistributions of source code must retain the above copyright
20  * notice, this list of conditions and the following disclaimer;
21  * redistributions in binary form must reproduce the above copyright
22  * notice, this list of conditions and the following disclaimer in the
23  * documentation and/or other materials provided with the distribution;
24  * neither the name of the copyright holders nor the names of its
25  * contributors may be used to endorse or promote products derived from
26  * this software without specific prior written permission.
27  *
28  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
31  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
32  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
33  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
34  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
35  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
36  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
38  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39  */
40 
46 #ifndef __MEM_CACHE_BASE_HH__
47 #define __MEM_CACHE_BASE_HH__
48 
49 #include <cassert>
50 #include <cstdint>
51 #include <string>
52 
53 #include "base/addr_range.hh"
54 #include "base/statistics.hh"
55 #include "base/trace.hh"
56 #include "base/types.hh"
57 #include "debug/Cache.hh"
58 #include "debug/CachePort.hh"
59 #include "enums/Clusivity.hh"
60 #include "mem/cache/cache_blk.hh"
62 #include "mem/cache/mshr_queue.hh"
63 #include "mem/cache/tags/base.hh"
64 #include "mem/cache/write_queue.hh"
66 #include "mem/packet.hh"
67 #include "mem/packet_queue.hh"
68 #include "mem/qport.hh"
69 #include "mem/request.hh"
70 #include "params/WriteAllocator.hh"
71 #include "sim/clocked_object.hh"
72 #include "sim/eventq.hh"
73 #include "sim/probe/probe.hh"
74 #include "sim/serialize.hh"
75 #include "sim/sim_exit.hh"
76 #include "sim/system.hh"
77 
78 namespace Prefetcher {
79  class Base;
80 }
81 class MSHR;
82 class RequestPort;
83 class QueueEntry;
84 struct BaseCacheParams;
85 
89 class BaseCache : public ClockedObject
90 {
91  protected:
98  };
99 
100  public:
109  };
110 
116  struct DataUpdate
117  {
121  bool isSecure;
126 
127  DataUpdate(Addr _addr, bool is_secure)
128  : addr(_addr), isSecure(is_secure), oldData(), newData()
129  {
130  }
131  };
132 
133  protected:
134 
145  {
146 
147  public:
148 
153  void schedSendEvent(Tick time)
154  {
155  DPRINTF(CachePort, "Scheduling send event at %llu\n", time);
156  reqQueue.schedSendEvent(time);
157  }
158 
159  protected:
160 
161  CacheRequestPort(const std::string &_name, BaseCache *_cache,
162  ReqPacketQueue &_reqQueue,
163  SnoopRespPacketQueue &_snoopRespQueue) :
164  QueuedRequestPort(_name, _cache, _reqQueue, _snoopRespQueue)
165  { }
166 
172  virtual bool isSnooping() const { return true; }
173  };
174 
182  {
183 
184  protected:
185 
188 
189  public:
190 
192  SnoopRespPacketQueue &snoop_resp_queue,
193  const std::string &label) :
195  snoopRespQueue(snoop_resp_queue) { }
196 
202  virtual void sendDeferredPacket();
203 
213  {
215  DPRINTF(CachePort, "Waiting for snoop response to be "
216  "sent\n");
218  schedSendEvent(when);
219  return true;
220  }
221  return false;
222  }
223  };
224 
225 
231  {
232  private:
233 
236 
238 
239  // a pointer to our specific cache implementation
241 
242  protected:
243 
244  virtual void recvTimingSnoopReq(PacketPtr pkt);
245 
246  virtual bool recvTimingResp(PacketPtr pkt);
247 
248  virtual Tick recvAtomicSnoop(PacketPtr pkt);
249 
250  virtual void recvFunctionalSnoop(PacketPtr pkt);
251 
252  public:
253 
254  MemSidePort(const std::string &_name, BaseCache *_cache,
255  const std::string &_label);
256  };
257 
267  {
268 
269  public:
270 
272  void setBlocked();
273 
275  void clearBlocked();
276 
277  bool isBlocked() const { return blocked; }
278 
279  protected:
280 
281  CacheResponsePort(const std::string &_name, BaseCache *_cache,
282  const std::string &_label);
283 
286 
287  bool blocked;
288 
290 
291  private:
292 
293  void processSendRetry();
294 
296 
297  };
298 
304  {
305  private:
306 
307  // a pointer to our specific cache implementation
309 
310  protected:
311  virtual bool recvTimingSnoopResp(PacketPtr pkt) override;
312 
313  virtual bool tryTiming(PacketPtr pkt) override;
314 
315  virtual bool recvTimingReq(PacketPtr pkt) override;
316 
317  virtual Tick recvAtomic(PacketPtr pkt) override;
318 
319  virtual void recvFunctional(PacketPtr pkt) override;
320 
321  virtual AddrRangeList getAddrRanges() const override;
322 
323  public:
324 
325  CpuSidePort(const std::string &_name, BaseCache *_cache,
326  const std::string &_label);
327 
328  };
329 
332 
333  protected:
334 
337 
340 
343 
346 
349 
352 
355 
358 
365 
381 
389 
394  std::unique_ptr<Packet> pendingDelete;
395 
400  void markInService(MSHR *mshr, bool pending_modified_resp)
401  {
402  bool wasFull = mshrQueue.isFull();
403  mshrQueue.markInService(mshr, pending_modified_resp);
404 
405  if (wasFull && !mshrQueue.isFull()) {
407  }
408  }
409 
411  {
412  bool wasFull = writeBuffer.isFull();
413  writeBuffer.markInService(entry);
414 
415  if (wasFull && !writeBuffer.isFull()) {
417  }
418  }
419 
433  inline bool allocOnFill(MemCmd cmd) const
434  {
435  return clusivity == Enums::mostly_incl ||
436  cmd == MemCmd::WriteLineReq ||
437  cmd == MemCmd::ReadReq ||
438  cmd == MemCmd::WriteReq ||
439  cmd.isPrefetch() ||
440  cmd.isLLSC();
441  }
442 
452 
461  Cycles calculateTagOnlyLatency(const uint32_t delay,
462  const Cycles lookup_lat) const;
472  Cycles calculateAccessLatency(const CacheBlk* blk, const uint32_t delay,
473  const Cycles lookup_lat) const;
474 
483  virtual bool access(PacketPtr pkt, CacheBlk *&blk, Cycles &lat,
484  PacketList &writebacks);
485 
486  /*
487  * Handle a timing request that hit in the cache
488  *
489  * @param ptk The request packet
490  * @param blk The referenced block
491  * @param request_time The tick at which the block lookup is compete
492  */
493  virtual void handleTimingReqHit(PacketPtr pkt, CacheBlk *blk,
494  Tick request_time);
495 
496  /*
497  * Handle a timing request that missed in the cache
498  *
499  * Implementation specific handling for different cache
500  * implementations
501  *
502  * @param ptk The request packet
503  * @param blk The referenced block
504  * @param forward_time The tick at which we can process dependent requests
505  * @param request_time The tick at which the block lookup is compete
506  */
507  virtual void handleTimingReqMiss(PacketPtr pkt, CacheBlk *blk,
508  Tick forward_time,
509  Tick request_time) = 0;
510 
511  /*
512  * Handle a timing request that missed in the cache
513  *
514  * Common functionality across different cache implementations
515  *
516  * @param ptk The request packet
517  * @param blk The referenced block
518  * @param mshr Any existing mshr for the referenced cache block
519  * @param forward_time The tick at which we can process dependent requests
520  * @param request_time The tick at which the block lookup is compete
521  */
522  void handleTimingReqMiss(PacketPtr pkt, MSHR *mshr, CacheBlk *blk,
523  Tick forward_time, Tick request_time);
524 
529  virtual void recvTimingReq(PacketPtr pkt);
530 
536 
547  virtual void serviceMSHRTargets(MSHR *mshr, const PacketPtr pkt,
548  CacheBlk *blk) = 0;
549 
554  virtual void recvTimingResp(PacketPtr pkt);
555 
560  virtual void recvTimingSnoopReq(PacketPtr pkt) = 0;
561 
566  virtual void recvTimingSnoopResp(PacketPtr pkt) = 0;
567 
580  virtual Cycles handleAtomicReqMiss(PacketPtr pkt, CacheBlk *&blk,
581  PacketList &writebacks) = 0;
582 
588  virtual Tick recvAtomic(PacketPtr pkt);
589 
596  virtual Tick recvAtomicSnoop(PacketPtr pkt) = 0;
597 
604  virtual void functionalAccess(PacketPtr pkt, bool from_cpu_side);
605 
615  void updateBlockData(CacheBlk *blk, const PacketPtr cpkt,
616  bool has_old_data);
617 
621  void cmpAndSwap(CacheBlk *blk, PacketPtr pkt);
622 
630 
634  virtual void doWritebacks(PacketList& writebacks, Tick forward_time) = 0;
635 
639  virtual void doWritebacksAtomic(PacketList& writebacks) = 0;
640 
656  virtual PacketPtr createMissPacket(PacketPtr cpu_pkt, CacheBlk *blk,
657  bool needs_writable,
658  bool is_whole_line_write) const = 0;
659 
667  const bool writebackClean;
668 
677 
684  assert(tempBlockWriteback != nullptr);
685  PacketList writebacks{tempBlockWriteback};
686  doWritebacksAtomic(writebacks);
687  tempBlockWriteback = nullptr;
688  }
689 
696 
721  bool updateCompressionData(CacheBlk *&blk, const uint64_t* data,
722  PacketList &writebacks);
723 
734  virtual void satisfyRequest(PacketPtr pkt, CacheBlk *blk,
735  bool deferred_response = false,
736  bool pending_downgrade = false);
737 
747  void maintainClusivity(bool from_cache, CacheBlk *blk);
748 
758  bool handleEvictions(std::vector<CacheBlk*> &evict_blks,
759  PacketList &writebacks);
760 
780  PacketList &writebacks, bool allocate);
781 
794  CacheBlk *allocateBlock(const PacketPtr pkt, PacketList &writebacks);
803  M5_NODISCARD virtual PacketPtr evictBlock(CacheBlk *blk) = 0;
804 
813  void evictBlock(CacheBlk *blk, PacketList &writebacks);
814 
820  void invalidateBlock(CacheBlk *blk);
821 
829 
842 
846  virtual void memWriteback() override;
847 
855  virtual void memInvalidate() override;
856 
862  bool isDirty() const;
863 
872  bool inRange(Addr addr) const;
873 
877  Tick nextQueueReadyTime() const;
878 
880  const unsigned blkSize;
881 
887 
893 
900 
903 
910 
914  const bool sequentialAccess;
915 
917  const int numTarget;
918 
921 
927  const Enums::Clusivity clusivity;
928 
935  const bool isReadOnly;
936 
943  const bool replaceExpansions;
944 
951  const bool moveContractions;
952 
957  uint8_t blocked;
958 
960  uint64_t order;
961 
964 
967 
970 
975 
976  public:
979 
980  struct CacheCmdStats : public Stats::Group
981  {
982  CacheCmdStats(BaseCache &c, const std::string &name);
983 
990  void regStatsFromParent();
991 
992  const BaseCache &cache;
993 
1027  };
1028 
1029  struct CacheStats : public Stats::Group
1030  {
1032 
1033  void regStats() override;
1034 
1036  return *cmd[p->cmdToIndex()];
1037  }
1038 
1040 
1045 
1050 
1055 
1060 
1065 
1070 
1075 
1078 
1082 
1085 
1090 
1095 
1098 
1103 
1106 
1111 
1116 
1119 
1122 
1125 
1131 
1134  } stats;
1135 
1137  void regProbePoints() override;
1138 
1139  public:
1140  BaseCache(const BaseCacheParams &p, unsigned blk_size);
1141  ~BaseCache();
1142 
1143  void init() override;
1144 
1145  Port &getPort(const std::string &if_name,
1146  PortID idx=InvalidPortID) override;
1147 
1152  unsigned
1154  {
1155  return blkSize;
1156  }
1157 
1158  const AddrRangeList &getAddrRanges() const { return addrRanges; }
1159 
1160  MSHR *allocateMissBuffer(PacketPtr pkt, Tick time, bool sched_send = true)
1161  {
1163  pkt, time, order++,
1164  allocOnFill(pkt->cmd));
1165 
1166  if (mshrQueue.isFull()) {
1168  }
1169 
1170  if (sched_send) {
1171  // schedule the send
1172  schedMemSideSendEvent(time);
1173  }
1174 
1175  return mshr;
1176  }
1177 
1179  {
1180  // should only see writes or clean evicts here
1181  assert(pkt->isWrite() || pkt->cmd == MemCmd::CleanEvict);
1182 
1183  Addr blk_addr = pkt->getBlockAddr(blkSize);
1184 
1185  // If using compression, on evictions the block is decompressed and
1186  // the operation's latency is added to the payload delay. Consume
1187  // that payload delay here, meaning that the data is always stored
1188  // uncompressed in the writebuffer
1189  if (compressor) {
1190  time += pkt->payloadDelay;
1191  pkt->payloadDelay = 0;
1192  }
1193 
1194  WriteQueueEntry *wq_entry =
1195  writeBuffer.findMatch(blk_addr, pkt->isSecure());
1196  if (wq_entry && !wq_entry->inService) {
1197  DPRINTF(Cache, "Potential to merge writeback %s", pkt->print());
1198  }
1199 
1200  writeBuffer.allocate(blk_addr, blkSize, pkt, time, order++);
1201 
1202  if (writeBuffer.isFull()) {
1204  }
1205 
1206  // schedule the send
1207  schedMemSideSendEvent(time);
1208  }
1209 
1213  bool isBlocked() const
1214  {
1215  return blocked != 0;
1216  }
1217 
1224  {
1225  uint8_t flag = 1 << cause;
1226  if (blocked == 0) {
1227  stats.blockedCauses[cause]++;
1228  blockedCycle = curCycle();
1230  }
1231  blocked |= flag;
1232  DPRINTF(Cache,"Blocking for cause %d, mask=%d\n", cause, blocked);
1233  }
1234 
1243  {
1244  uint8_t flag = 1 << cause;
1245  blocked &= ~flag;
1246  DPRINTF(Cache,"Unblocking for cause %d, mask=%d\n", cause, blocked);
1247  if (blocked == 0) {
1248  stats.blockedCycles[cause] += curCycle() - blockedCycle;
1250  }
1251  }
1252 
1262  {
1264  }
1265 
1266  bool inCache(Addr addr, bool is_secure) const {
1267  return tags->findBlock(addr, is_secure);
1268  }
1269 
1270  bool hasBeenPrefetched(Addr addr, bool is_secure) const {
1271  CacheBlk *block = tags->findBlock(addr, is_secure);
1272  if (block) {
1273  return block->wasPrefetched();
1274  } else {
1275  return false;
1276  }
1277  }
1278 
1279  bool inMissQueue(Addr addr, bool is_secure) const {
1280  return mshrQueue.findMatch(addr, is_secure);
1281  }
1282 
1284  {
1285  assert(pkt->req->requestorId() < system->maxRequestors());
1286  stats.cmdStats(pkt).misses[pkt->req->requestorId()]++;
1287  pkt->req->incAccessDepth();
1288  if (missCount) {
1289  --missCount;
1290  if (missCount == 0)
1291  exitSimLoop("A cache reached the maximum miss count");
1292  }
1293  }
1295  {
1296  assert(pkt->req->requestorId() < system->maxRequestors());
1297  stats.cmdStats(pkt).hits[pkt->req->requestorId()]++;
1298  }
1299 
1305  bool coalesce() const;
1306 
1307 
1312  void writebackVisitor(CacheBlk &blk);
1313 
1319  void invalidateVisitor(CacheBlk &blk);
1320 
1329  virtual bool sendMSHRQueuePacket(MSHR* mshr);
1330 
1339  bool sendWriteQueuePacket(WriteQueueEntry* wq_entry);
1340 
1346  void serialize(CheckpointOut &cp) const override;
1347  void unserialize(CheckpointIn &cp) override;
1348 };
1349 
1365 class WriteAllocator : public SimObject {
1366  public:
1367  WriteAllocator(const WriteAllocatorParams &p) :
1368  SimObject(p),
1369  coalesceLimit(p.coalesce_limit * p.block_size),
1370  noAllocateLimit(p.no_allocate_limit * p.block_size),
1371  delayThreshold(p.delay_threshold)
1372  {
1373  reset();
1374  }
1375 
1382  bool coalesce() const {
1383  return mode != WriteMode::ALLOCATE;
1384  }
1385 
1391  bool allocate() const {
1392  return mode != WriteMode::NO_ALLOCATE;
1393  }
1394 
1401  void reset() {
1403  byteCount = 0;
1404  nextAddr = 0;
1405  }
1406 
1413  bool delay(Addr blk_addr) {
1414  if (delayCtr[blk_addr] > 0) {
1415  --delayCtr[blk_addr];
1416  return true;
1417  } else {
1418  return false;
1419  }
1420  }
1421 
1427  void resetDelay(Addr blk_addr) {
1428  delayCtr.erase(blk_addr);
1429  }
1430 
1441  void updateMode(Addr write_addr, unsigned write_size, Addr blk_addr);
1442 
1443  private:
1449  enum class WriteMode : char {
1450  ALLOCATE,
1451  COALESCE,
1452  NO_ALLOCATE,
1453  };
1455 
1458 
1463  uint32_t byteCount;
1464 
1468  const uint32_t coalesceLimit;
1469  const uint32_t noAllocateLimit;
1473  const uint32_t delayThreshold;
1474 
1479  std::unordered_map<Addr, Counter> delayCtr;
1480 };
1481 
1482 #endif //__MEM_CACHE_BASE_HH__
BaseCache::CacheStats::demandMissLatency
Stats::Formula demandMissLatency
Total number of cycles spent waiting for demand misses.
Definition: base.hh:1052
BaseCache::setBlocked
void setBlocked(BlockedCause cause)
Marks the access path of the cache as blocked for the given cause.
Definition: base.hh:1223
BaseCache::Blocked_NoTargets
@ Blocked_NoTargets
Definition: base.hh:107
BaseCache::updateCompressionData
bool updateCompressionData(CacheBlk *&blk, const uint64_t *data, PacketList &writebacks)
When a block is overwriten, its compression information must be updated, and it may need to be recomp...
Definition: base.cc:881
SnoopRespPacketQueue
Definition: packet_queue.hh:258
BaseCache::ppFill
ProbePointArg< PacketPtr > * ppFill
To probe when a cache fill occurs.
Definition: base.hh:357
BaseCache::DataUpdate::oldData
std::vector< uint64_t > oldData
The stale data contents.
Definition: base.hh:123
BaseCache::tempBlock
TempCacheBlk * tempBlock
Temporary cache block for occasional transitory use.
Definition: base.hh:388
BaseCache::CacheResponsePort::queue
RespPacketQueue queue
A normal packet queue used to store responses.
Definition: base.hh:285
BaseCache::MSHRQueue_WriteBuffer
@ MSHRQueue_WriteBuffer
Definition: base.hh:97
BaseCache::clearBlocked
void clearBlocked(BlockedCause cause)
Marks the cache as unblocked for the given cause.
Definition: base.hh:1242
BaseCache::writeBuffer
WriteQueue writeBuffer
Write/writeback buffer.
Definition: base.hh:339
BaseCache::maintainClusivity
void maintainClusivity(bool from_cache, CacheBlk *blk)
Maintain the clusivity of this cache by potentially invalidating a block.
Definition: base.cc:1401
BaseCache::MemSidePort::_snoopRespQueue
SnoopRespPacketQueue _snoopRespQueue
Definition: base.hh:237
WriteAllocator::coalesceLimit
const uint32_t coalesceLimit
Limits for when to switch between the different write modes.
Definition: base.hh:1468
BaseCache::calculateAccessLatency
Cycles calculateAccessLatency(const CacheBlk *blk, const uint32_t delay, const Cycles lookup_lat) const
Calculate access latency in ticks given a tag lookup latency, and whether access was a hit or miss.
Definition: base.cc:1098
BaseCache::replaceExpansions
const bool replaceExpansions
when a data expansion of a compressed block happens it will not be able to co-allocate where it is at...
Definition: base.hh:943
BaseCache::markInService
void markInService(MSHR *mshr, bool pending_modified_resp)
Mark a request as in service (sent downstream in the memory system), effectively making this MSHR the...
Definition: base.hh:400
BaseCache::CacheReqPacketQueue::sendDeferredPacket
virtual void sendDeferredPacket()
Override the normal sendDeferredPacket and do not only consider the transmit list (used for responses...
Definition: base.cc:2517
BaseCache::CacheResponsePort::sendRetryEvent
EventFunctionWrapper sendRetryEvent
Definition: base.hh:295
system.hh
BaseCache::functionalAccess
virtual void functionalAccess(PacketPtr pkt, bool from_cpu_side)
Performs the access specified by the request.
Definition: base.cc:631
BaseCache::CacheCmdStats::avgMissLatency
Stats::Formula avgMissLatency
The average miss latency per command and thread.
Definition: base.hh:1010
BaseCache::CacheStats::demandMshrMissLatency
Stats::Formula demandMshrMissLatency
Total cycle latency of demand MSHR misses.
Definition: base.hh:1100
data
const char data[]
Definition: circlebuf.test.cc:47
BaseCache::CacheStats::overallMshrUncacheableLatency
Stats::Formula overallMshrUncacheableLatency
Total cycle latency of overall MSHR misses.
Definition: base.hh:1105
BaseCache::sequentialAccess
const bool sequentialAccess
Whether tags and data are accessed sequentially.
Definition: base.hh:914
serialize.hh
BaseCache::CacheStats::overallAvgMissLatency
Stats::Formula overallAvgMissLatency
The average miss latency for all misses.
Definition: base.hh:1069
BaseCache::handleFill
CacheBlk * handleFill(PacketPtr pkt, CacheBlk *blk, PacketList &writebacks, bool allocate)
Handle a fill operation caused by a received packet.
Definition: base.cc:1413
BaseCache::schedMemSideSendEvent
void schedMemSideSendEvent(Tick time)
Schedule a send event for the memory-side port.
Definition: base.hh:1261
BaseCache::CpuSidePort::recvAtomic
virtual Tick recvAtomic(PacketPtr pkt) override
Receive an atomic request packet from the peer.
Definition: base.cc:2434
BaseCache::cmpAndSwap
void cmpAndSwap(CacheBlk *blk, PacketPtr pkt)
Handle doing the Compare and Swap function for SPARC.
Definition: base.cc:713
BaseCache::CacheResponsePort::clearBlocked
void clearBlocked()
Return to normal operation and accept new requests.
Definition: base.cc:156
WriteAllocator::WriteMode::NO_ALLOCATE
@ NO_ALLOCATE
BaseCache::writebackBlk
PacketPtr writebackBlk(CacheBlk *blk)
Create a writeback request for the given block.
Definition: base.cc:1597
BaseCache::CacheRequestPort
A cache request port is used for the memory-side port of the cache, and in addition to the basic timi...
Definition: base.hh:144
BaseCache::CacheCmdStats::mshrMisses
Stats::Vector mshrMisses
Number of misses that miss in the MSHRs, per command and thread.
Definition: base.hh:1014
Packet::payloadDelay
uint32_t payloadDelay
The extra pipelining delay from seeing the packet until the end of payload is transmitted by the comp...
Definition: packet.hh:413
BaseCache::CacheStats::overallMissLatency
Stats::Formula overallMissLatency
Total number of cycles spent waiting for all misses.
Definition: base.hh:1054
InvalidPortID
const PortID InvalidPortID
Definition: types.hh:244
BaseCache::system
System * system
System we are currently operating in.
Definition: base.hh:978
BaseCache::serviceMSHRTargets
virtual void serviceMSHRTargets(MSHR *mshr, const PacketPtr pkt, CacheBlk *blk)=0
Service non-deferred MSHR targets using the received response.
Flags< FlagsType >
WriteAllocator::delayThreshold
const uint32_t delayThreshold
The number of times the allocator will delay an WriteReq MSHR.
Definition: base.hh:1473
BaseCache::recvTimingSnoopResp
virtual void recvTimingSnoopResp(PacketPtr pkt)=0
Handle a snoop response.
BaseCache::CpuSidePort::recvTimingReq
virtual bool recvTimingReq(PacketPtr pkt) override
Receive a timing request from the peer.
Definition: base.cc:2416
BaseCache::nextQueueReadyTime
Tick nextQueueReadyTime() const
Find next request ready time from among possible sources.
Definition: base.cc:1754
base.hh
BaseCache::MSHRQueueIndex
MSHRQueueIndex
Indexes to enumerate the MSHR queues.
Definition: base.hh:95
BaseCache::blkSize
const unsigned blkSize
Block size of this cache.
Definition: base.hh:880
BaseCache::ppDataUpdate
ProbePointArg< DataUpdate > * ppDataUpdate
To probe when the contents of a block are updated.
Definition: base.hh:364
BaseCache::CacheResponsePort::blocked
bool blocked
Definition: base.hh:287
MemCmd::CleanEvict
@ CleanEvict
Definition: packet.hh:92
ProbePointArg
ProbePointArg generates a point for the class of Arg.
Definition: thermal_domain.hh:51
BaseCache::CacheCmdStats::mshrUncacheableLatency
Stats::Vector mshrUncacheableLatency
Total cycle latency of each MSHR miss, per command and thread.
Definition: base.hh:1020
BaseCache::noTargetMSHR
MSHR * noTargetMSHR
Pointer to the MSHR that has no targets.
Definition: base.hh:966
MemCmd::ReadReq
@ ReadReq
Definition: packet.hh:83
BaseCache::CacheCmdStats::missLatency
Stats::Vector missLatency
Total number of cycles per thread/command spent waiting for a miss.
Definition: base.hh:1004
BaseCache::hasBeenPrefetched
bool hasBeenPrefetched(Addr addr, bool is_secure) const
Definition: base.hh:1270
Tick
uint64_t Tick
Tick count type.
Definition: types.hh:59
BaseCache::memSidePort
MemSidePort memSidePort
Definition: base.hh:331
BaseCache::CacheStats::overallMshrMisses
Stats::Formula overallMshrMisses
Total number of misses that miss in the MSHRs.
Definition: base.hh:1094
PortID
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
Definition: types.hh:243
BaseCache::getNextQueueEntry
QueueEntry * getNextQueueEntry()
Return the next queue entry to service, either a pending miss from the MSHR queue,...
Definition: base.cc:766
BaseCache::missCount
Counter missCount
The number of misses to trigger an exit event.
Definition: base.hh:969
BaseCache::CacheReqPacketQueue
Override the default behaviour of sendDeferredPacket to enable the memory-side cache port to also sen...
Definition: base.hh:181
PacketQueue::schedSendEvent
void schedSendEvent(Tick when)
Schedule a send event if we are not already waiting for a retry.
Definition: packet_queue.cc:152
Packet::req
RequestPtr req
A pointer to the original request.
Definition: packet.hh:341
BaseCache::writebackTempBlockAtomicEvent
EventFunctionWrapper writebackTempBlockAtomicEvent
An event to writeback the tempBlock after recvAtomic finishes.
Definition: base.hh:695
BaseCache::CacheReqPacketQueue::snoopRespQueue
SnoopRespPacketQueue & snoopRespQueue
Definition: base.hh:187
std::vector< uint64_t >
BaseCache::handleTimingReqHit
virtual void handleTimingReqHit(PacketPtr pkt, CacheBlk *blk, Tick request_time)
Definition: base.cc:220
BaseCache::MemSidePort::recvFunctionalSnoop
virtual void recvFunctionalSnoop(PacketPtr pkt)
Receive a functional snoop request packet from the peer.
Definition: base.cc:2505
WriteAllocator::nextAddr
Addr nextAddr
Address to match writes against to detect streams.
Definition: base.hh:1457
BaseCache::CacheStats::overallMshrUncacheable
Stats::Formula overallMshrUncacheable
Total number of misses that miss in the MSHRs.
Definition: base.hh:1097
BaseCache::blockedCycle
Cycles blockedCycle
Stores time the cache blocked for statistics.
Definition: base.hh:963
BaseCache::CacheReqPacketQueue::cache
BaseCache & cache
Definition: base.hh:186
M5_NODISCARD
#define M5_NODISCARD
Definition: compiler.hh:68
Compressor::Base
Base cache compressor interface.
Definition: base.hh:59
BaseCache::allocateBlock
CacheBlk * allocateBlock(const PacketPtr pkt, PacketList &writebacks)
Allocate a new block and perform any necessary writebacks.
Definition: base.cc:1511
BaseCache::addrRanges
const AddrRangeList addrRanges
The address range to which the cache responds on the CPU side.
Definition: base.hh:974
BaseCache::DataUpdate::newData
std::vector< uint64_t > newData
The new data contents.
Definition: base.hh:125
BaseCache::clusivity
const Enums::Clusivity clusivity
Clusivity with respect to the upstream cache, determining if we fill into both this cache and the cac...
Definition: base.hh:927
Stats::Vector
A vector of scalar stats.
Definition: statistics.hh:2007
WriteQueue::allocate
WriteQueueEntry * allocate(Addr blk_addr, unsigned blk_size, PacketPtr pkt, Tick when_ready, Counter order)
Allocates a new WriteQueueEntry for the request and size.
Definition: write_queue.cc:57
sim_exit.hh
BaseCache::CacheCmdStats::regStatsFromParent
void regStatsFromParent()
Callback to register stats from parent CacheStats::regStats().
Definition: base.cc:1966
BaseCache::CacheCmdStats::mshrHits
Stats::Vector mshrHits
Number of misses that hit in the MSHRs per command and thread.
Definition: base.hh:1012
BaseCache::numTarget
const int numTarget
The number of targets for each MSHR.
Definition: base.hh:917
BaseCache::MemSidePort::MemSidePort
MemSidePort(const std::string &_name, BaseCache *_cache, const std::string &_label)
Definition: base.cc:2552
request.hh
BaseCache::invalidateVisitor
void invalidateVisitor(CacheBlk &blk)
Cache block visitor that invalidates all blocks in the cache.
Definition: base.cc:1741
BaseCache::forwardLatency
const Cycles forwardLatency
This is the forward latency of the cache.
Definition: base.hh:899
BaseCache::coalesce
bool coalesce() const
Checks if the cache is coalescing writes.
Definition: base.cc:1712
Packet::print
void print(std::ostream &o, int verbosity=0, const std::string &prefix="") const
Definition: packet.cc:389
BaseCache::CacheStats::avgBlocked
Stats::Formula avgBlocked
The average number of cycles blocked for each blocked cause.
Definition: base.hh:1077
BaseCache::ppMiss
ProbePointArg< PacketPtr > * ppMiss
To probe when a cache miss occurs.
Definition: base.hh:354
Packet::isSecure
bool isSecure() const
Definition: packet.hh:784
ClockedObject
The ClockedObject class extends the SimObject with a clock and accessor functions to relate ticks to ...
Definition: clocked_object.hh:231
BaseCache::CacheStats::unusedPrefetches
Stats::Scalar unusedPrefetches
The number of times a HW-prefetched block is evicted w/o reference.
Definition: base.hh:1081
BaseCache::CacheStats::replacements
Stats::Scalar replacements
Number of replacements of valid blocks.
Definition: base.hh:1121
Prefetcher::Base
Definition: base.hh:65
BaseCache::DataUpdate::DataUpdate
DataUpdate(Addr _addr, bool is_secure)
Definition: base.hh:127
packet.hh
WriteAllocator::coalesce
bool coalesce() const
Should writes be coalesced? This is true if the mode is set to NO_ALLOCATE.
Definition: base.hh:1382
EventFunctionWrapper
Definition: eventq.hh:1112
BaseCache::CacheRequestPort::CacheRequestPort
CacheRequestPort(const std::string &_name, BaseCache *_cache, ReqPacketQueue &_reqQueue, SnoopRespPacketQueue &_snoopRespQueue)
Definition: base.hh:161
MemCmd::WriteReq
@ WriteReq
Definition: packet.hh:86
WriteAllocator::mode
WriteMode mode
Definition: base.hh:1454
BaseCache::CacheResponsePort::setBlocked
void setBlocked()
Do not accept any new requests.
Definition: base.cc:141
Stats::Scalar
This is a simple scalar statistic, like a counter.
Definition: statistics.hh:1933
BaseCache::CacheStats::demandHits
Stats::Formula demandHits
Number of hits for demand accesses.
Definition: base.hh:1042
BaseCache::Blocked_NoMSHRs
@ Blocked_NoMSHRs
Definition: base.hh:105
Counter
int64_t Counter
Statistics counter type.
Definition: types.hh:54
BaseCache::prefetcher
Prefetcher::Base * prefetcher
Prefetcher.
Definition: base.hh:348
BaseCache::CacheStats::writebacks
Stats::Vector writebacks
Number of blocks written back per thread.
Definition: base.hh:1084
BaseCache::CacheStats::overallMshrHits
Stats::Formula overallMshrHits
Total number of misses that hit in the MSHRs.
Definition: base.hh:1089
BaseCache::CacheCmdStats
Definition: base.hh:980
cp
Definition: cprintf.cc:37
BaseCache::CacheStats::cache
const BaseCache & cache
Definition: base.hh:1039
BaseCache::incMissCount
void incMissCount(PacketPtr pkt)
Definition: base.hh:1283
MemCmd::WriteLineReq
@ WriteLineReq
Definition: packet.hh:98
BaseCache::updateBlockData
void updateBlockData(CacheBlk *blk, const PacketPtr cpkt, bool has_old_data)
Update the data contents of a block.
Definition: base.cc:687
BaseCache::init
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
Definition: base.cc:188
BaseCache::allocateWriteBuffer
void allocateWriteBuffer(PacketPtr pkt, Tick time)
Definition: base.hh:1178
BaseCache::mshrQueue
MSHRQueue mshrQueue
Miss status registers.
Definition: base.hh:336
MemCmd::isLLSC
bool isLLSC() const
Definition: packet.hh:224
BaseCache::CacheResponsePort::CacheResponsePort
CacheResponsePort(const std::string &_name, BaseCache *_cache, const std::string &_label)
Definition: base.cc:65
BaseCache::regenerateBlkAddr
Addr regenerateBlkAddr(CacheBlk *blk)
Regenerate block address using tags.
Definition: base.cc:178
BaseCache::cpuSidePort
CpuSidePort cpuSidePort
Definition: base.hh:330
BaseCache::CacheStats::overallAvgMshrMissLatency
Stats::Formula overallAvgMshrMissLatency
The average overall latency of an MSHR miss.
Definition: base.hh:1115
QueuedRequestPort
The QueuedRequestPort combines two queues, a request queue and a snoop response queue,...
Definition: qport.hh:106
System
Definition: system.hh:73
DPRINTF
#define DPRINTF(x,...)
Definition: trace.hh:237
WriteAllocator::delay
bool delay(Addr blk_addr)
Access whether we need to delay the current write.
Definition: base.hh:1413
BaseCache::allocOnFill
bool allocOnFill(MemCmd cmd) const
Determine whether we should allocate on a fill or not.
Definition: base.hh:433
BaseCache::CacheStats::overallHits
Stats::Formula overallHits
Number of hit for all accesses.
Definition: base.hh:1044
BaseCache::stats
BaseCache::CacheStats stats
MemCmd
Definition: packet.hh:72
BaseCache::pendingDelete
std::unique_ptr< Packet > pendingDelete
Upstream caches need this packet until true is returned, so hold it for deletion until a subsequent c...
Definition: base.hh:394
BaseTags
A common base class of Cache tagstore objects.
Definition: base.hh:70
WriteAllocator::WriteAllocator
WriteAllocator(const WriteAllocatorParams &p)
Definition: base.hh:1367
Packet::getBlockAddr
Addr getBlockAddr(unsigned int blk_size) const
Definition: packet.hh:779
WriteAllocator::byteCount
uint32_t byteCount
Bytes written contiguously.
Definition: base.hh:1463
BaseCache::blocked
uint8_t blocked
Bit vector of the blocking reasons for the access path.
Definition: base.hh:957
BaseCache::CacheStats::overallAccesses
Stats::Formula overallAccesses
The number of overall accesses.
Definition: base.hh:1059
BaseCache::invalidateBlock
void invalidateBlock(CacheBlk *blk)
Invalidate a cache block.
Definition: base.cc:1568
WriteAllocator::delayCtr
std::unordered_map< Addr, Counter > delayCtr
Keep track of the number of times the allocator has delayed an WriteReq MSHR.
Definition: base.hh:1479
BaseCache::serialize
void serialize(CheckpointOut &cp) const override
Serialize the state of the caches.
Definition: base.cc:1898
statistics.hh
BaseCache::getPort
Port & getPort(const std::string &if_name, PortID idx=InvalidPortID) override
Get a port with a given name and index.
Definition: base.cc:197
BaseCache::handleUncacheableWriteResp
void handleUncacheableWriteResp(PacketPtr pkt)
Handling the special case of uncacheable write responses to make recvTimingResp less cluttered.
Definition: base.cc:400
Port
Ports are used to interface objects to each other.
Definition: port.hh:56
BaseCache::recvTimingReq
virtual void recvTimingReq(PacketPtr pkt)
Performs the access specified by the request.
Definition: base.cc:344
BaseCache::CacheCmdStats::misses
Stats::Vector misses
Number of misses per thread for each type of command.
Definition: base.hh:999
BaseCache::CacheCmdStats::CacheCmdStats
CacheCmdStats(BaseCache &c, const std::string &name)
Definition: base.cc:1930
Clocked::curCycle
Cycles curCycle() const
Determine the current cycle, corresponding to a tick aligned to a clock edge.
Definition: clocked_object.hh:192
BaseCache::handleAtomicReqMiss
virtual Cycles handleAtomicReqMiss(PacketPtr pkt, CacheBlk *&blk, PacketList &writebacks)=0
Handle a request in atomic mode that missed in this cache.
packet_queue.hh
BaseCache::inMissQueue
bool inMissQueue(Addr addr, bool is_secure) const
Definition: base.hh:1279
WriteAllocator::WriteMode::COALESCE
@ COALESCE
BaseCache::fillLatency
const Cycles fillLatency
The latency to fill a cache block.
Definition: base.hh:902
BaseCache::forwardSnoops
bool forwardSnoops
Do we forward snoops from mem side port through to cpu side port?
Definition: base.hh:920
BaseCache::regProbePoints
void regProbePoints() override
Registers probes.
Definition: base.cc:2372
WriteAllocator::WriteMode::ALLOCATE
@ ALLOCATE
Prefetcher
Copyright (c) 2018 Metempsy Technology Consulting All rights reserved.
Definition: base.hh:78
exitSimLoop
void exitSimLoop(const std::string &message, int exit_code, Tick when, Tick repeat, bool serialize)
Schedule an event to exit the simulation loop (returning to Python) at the end of the current cycle (...
Definition: sim_events.cc:85
BaseCache::MemSidePort::recvAtomicSnoop
virtual Tick recvAtomicSnoop(PacketPtr pkt)
Receive an atomic snoop request packet from our peer.
Definition: base.cc:2496
base.hh
BaseCache::CacheStats::dataContractions
Stats::Scalar dataContractions
Number of data contractions (blocks that had their compression factor improved).
Definition: base.hh:1130
BaseCache::writecleanBlk
PacketPtr writecleanBlk(CacheBlk *blk, Request::Flags dest, PacketId id)
Create a writeclean request for the given block.
Definition: base.cc:1647
BaseCache::access
virtual bool access(PacketPtr pkt, CacheBlk *&blk, Cycles &lat, PacketList &writebacks)
Does all the processing necessary to perform the provided request.
Definition: base.cc:1132
BaseCache::NUM_BLOCKED_CAUSES
@ NUM_BLOCKED_CAUSES
Definition: base.hh:108
BaseCache::isReadOnly
const bool isReadOnly
Is this cache read only, for example the instruction cache, or table-walker cache.
Definition: base.hh:935
QueuedResponsePort
A queued port is a port that has an infinite queue for outgoing packets and thus decouples the module...
Definition: qport.hh:58
BaseCache::sendMSHRQueuePacket
virtual bool sendMSHRQueuePacket(MSHR *mshr)
Take an MSHR, turn it into a suitable downstream packet, and send it out.
Definition: base.cc:1771
BaseCache::isBlocked
bool isBlocked() const
Returns true if the cache is blocked for accesses.
Definition: base.hh:1213
BaseCache::getBlockSize
unsigned getBlockSize() const
Query block size of a cache.
Definition: base.hh:1153
BaseCache::doWritebacksAtomic
virtual void doWritebacksAtomic(PacketList &writebacks)=0
Send writebacks down the memory hierarchy in atomic mode.
Queue::findMatch
Entry * findMatch(Addr blk_addr, bool is_secure, bool ignore_uncacheable=true) const
Find the first entry that matches the provided address.
Definition: queue.hh:162
BaseCache::CacheStats::overallMissRate
Stats::Formula overallMissRate
The miss rate for all accesses.
Definition: base.hh:1064
BaseCache::MSHRQueue_MSHRs
@ MSHRQueue_MSHRs
Definition: base.hh:96
BaseCache::writebackVisitor
void writebackVisitor(CacheBlk &blk)
Cache block visitor that writes back dirty cache blocks using functional writes.
Definition: base.cc:1718
BaseCache::CpuSidePort::getAddrRanges
virtual AddrRangeList getAddrRanges() const override
Get a list of the non-overlapping address ranges the owner is responsible for.
Definition: base.cc:2459
BaseCache::CacheStats
Definition: base.hh:1029
BaseCache::lookupLatency
const Cycles lookupLatency
The latency of tag lookup of a cache.
Definition: base.hh:886
RequestPort
A RequestPort is a specialisation of a Port, which implements the default protocol for the three diff...
Definition: port.hh:74
BaseCache
A basic cache interface.
Definition: base.hh:89
BaseCache::allocateMissBuffer
MSHR * allocateMissBuffer(PacketPtr pkt, Tick time, bool sched_send=true)
Definition: base.hh:1160
BaseCache::CacheCmdStats::missRate
Stats::Formula missRate
The miss rate per command and thread.
Definition: base.hh:1008
BaseCache::calculateTagOnlyLatency
Cycles calculateTagOnlyLatency(const uint32_t delay, const Cycles lookup_lat) const
Calculate latency of accesses that only touch the tag array.
Definition: base.cc:1089
BaseCache::CacheStats::overallMshrMissRate
Stats::Formula overallMshrMissRate
The overall miss rate in the MSHRs.
Definition: base.hh:1110
BaseCache::CacheCmdStats::avgMshrMissLatency
Stats::Formula avgMshrMissLatency
The average latency of an MSHR miss, per command and thread.
Definition: base.hh:1024
BaseCache::CacheReqPacketQueue::checkConflictingSnoop
bool checkConflictingSnoop(const PacketPtr pkt)
Check if there is a conflicting snoop response about to be send out, and if so simply stall any reque...
Definition: base.hh:212
BaseCache::markInService
void markInService(WriteQueueEntry *entry)
Definition: base.hh:410
Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:148
BaseCache::createMissPacket
virtual PacketPtr createMissPacket(PacketPtr cpu_pkt, CacheBlk *blk, bool needs_writable, bool is_whole_line_write) const =0
Create an appropriate downstream bus request packet.
BaseCache::satisfyRequest
virtual void satisfyRequest(PacketPtr pkt, CacheBlk *blk, bool deferred_response=false, bool pending_downgrade=false)
Perform any necessary updates to the block and perform any data exchange between the packet and the b...
Definition: base.cc:991
BaseCache::getAddrRanges
const AddrRangeList & getAddrRanges() const
Definition: base.hh:1158
CacheBlk::wasPrefetched
bool wasPrefetched() const
Check if this block was the result of a hardware prefetch, yet to be touched.
Definition: cache_blk.hh:245
RespPacketQueue
Definition: packet_queue.hh:296
MSHRQueue::allocate
MSHR * allocate(Addr blk_addr, unsigned blk_size, PacketPtr pkt, Tick when_ready, Counter order, bool alloc_on_fill)
Allocates a new MSHR for the request and size.
Definition: mshr_queue.cc:58
BaseCache::CacheReqPacketQueue::CacheReqPacketQueue
CacheReqPacketQueue(BaseCache &cache, RequestPort &port, SnoopRespPacketQueue &snoop_resp_queue, const std::string &label)
Definition: base.hh:191
addr_range.hh
BaseCache::compressor
Compressor::Base * compressor
Compression method being used.
Definition: base.hh:345
BaseCache::doWritebacks
virtual void doWritebacks(PacketList &writebacks, Tick forward_time)=0
Insert writebacks into the write buffer.
BaseCache::CacheCmdStats::hits
Stats::Vector hits
Number of hits per thread for each type of command.
Definition: base.hh:996
BaseCache::CacheStats::blockedCycles
Stats::Vector blockedCycles
The total number of cycles blocked for each blocked cause.
Definition: base.hh:1072
WriteQueue
A write queue for all eviction packets, i.e.
Definition: write_queue.hh:57
BaseCache::writebackClean
const bool writebackClean
Determine if clean lines should be written back or not.
Definition: base.hh:667
X86ISA::addr
Bitfield< 3 > addr
Definition: types.hh:80
SimObject::name
virtual const std::string name() const
Definition: sim_object.hh:182
BaseCache::CpuSidePort::cache
BaseCache * cache
Definition: base.hh:308
Packet::cmd
MemCmd cmd
The command field of the packet.
Definition: packet.hh:336
BaseCache::MemSidePort::recvTimingResp
virtual bool recvTimingResp(PacketPtr pkt)
Receive a timing response from the peer.
Definition: base.cc:2478
BaseCache::tags
BaseTags * tags
Tag and data Storage.
Definition: base.hh:342
BaseCache::CacheCmdStats::mshrMissLatency
Stats::Vector mshrMissLatency
Total cycle latency of each MSHR miss, per command and thread.
Definition: base.hh:1018
QueueEntry::inService
bool inService
True if the entry has been sent downstream.
Definition: queue_entry.hh:105
write_queue.hh
BaseCache::evictBlock
virtual M5_NODISCARD PacketPtr evictBlock(CacheBlk *blk)=0
Evict a cache block.
BaseCache::DataUpdate
A data contents update is composed of the updated block's address, the old contents,...
Definition: base.hh:116
BaseCache::CacheStats::demandAvgMissLatency
Stats::Formula demandAvgMissLatency
The average miss latency for demand misses.
Definition: base.hh:1067
BaseCache::CacheStats::demandMshrHits
Stats::Formula demandMshrHits
Demand misses that hit in the MSHRs.
Definition: base.hh:1087
cache_blk.hh
BaseCache::sendWriteQueuePacket
bool sendWriteQueuePacket(WriteQueueEntry *wq_entry)
Similar to sendMSHR, but for a write-queue entry instead.
Definition: base.cc:1874
WriteAllocator::resetDelay
void resetDelay(Addr blk_addr)
Clear delay counter for the input block.
Definition: base.hh:1427
CacheBlk
A Basic Cache block.
Definition: cache_blk.hh:67
BaseCache::CacheStats::demandMshrMisses
Stats::Formula demandMshrMisses
Demand misses that miss in the MSHRs.
Definition: base.hh:1092
System::maxRequestors
RequestorID maxRequestors()
Get the number of requestors registered in the system.
Definition: system.hh:498
MemCmd::isPrefetch
bool isPrefetch() const
Definition: packet.hh:227
WriteQueueEntry
Write queue entry.
Definition: write_queue_entry.hh:65
BaseCache::MemSidePort::cache
BaseCache * cache
Definition: base.hh:240
types.hh
qport.hh
BaseCache::CacheStats::demandMissRate
Stats::Formula demandMissRate
The miss rate of all demand accesses.
Definition: base.hh:1062
BaseCache::CacheStats::dataExpansions
Stats::Scalar dataExpansions
Number of data expansions.
Definition: base.hh:1124
BaseCache::CacheResponsePort::processSendRetry
void processSendRetry()
Definition: base.cc:168
BaseCache::handleTimingReqMiss
virtual void handleTimingReqMiss(PacketPtr pkt, CacheBlk *blk, Tick forward_time, Tick request_time)=0
BaseCache::CpuSidePort::recvTimingSnoopResp
virtual bool recvTimingSnoopResp(PacketPtr pkt) override
Receive a timing snoop response from the peer.
Definition: base.cc:2387
clocked_object.hh
Stats::Formula
A formula for statistics that is calculated when printed.
Definition: statistics.hh:2538
Packet
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition: packet.hh:258
Stats::Group
Statistics container.
Definition: group.hh:87
BaseCache::writeAllocator
WriteAllocator *const writeAllocator
The writeAllocator drive optimizations for streaming writes.
Definition: base.hh:380
BaseCache::CacheStats::overallMisses
Stats::Formula overallMisses
Number of misses for all accesses.
Definition: base.hh:1049
WriteAllocator::reset
void reset()
Reset the write allocator state, meaning that it allocates for writes and has not recorded any inform...
Definition: base.hh:1401
BaseCache::CacheResponsePort::isBlocked
bool isBlocked() const
Definition: base.hh:277
BaseCache::CacheCmdStats::avgMshrUncacheableLatency
Stats::Formula avgMshrUncacheableLatency
The average latency of an MSHR miss, per command and thread.
Definition: base.hh:1026
Queue::isFull
bool isFull() const
Definition: queue.hh:144
BaseCache::CacheStats::demandMisses
Stats::Formula demandMisses
Number of misses for demand accesses.
Definition: base.hh:1047
WriteAllocator::allocate
bool allocate() const
Should writes allocate?
Definition: base.hh:1391
BaseTags::findBlock
virtual CacheBlk * findBlock(Addr addr, bool is_secure) const
Finds the block in the cache without touching it.
Definition: base.cc:77
BaseCache::CacheStats::overallMshrMissLatency
Stats::Formula overallMshrMissLatency
Total cycle latency of overall MSHR misses.
Definition: base.hh:1102
BaseCache::unserialize
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Definition: base.cc:1918
BaseCache::dataLatency
const Cycles dataLatency
The latency of data access of a cache.
Definition: base.hh:892
Cycles
Cycles is a wrapper class for representing cycle counts, i.e.
Definition: types.hh:79
BaseCache::CacheCmdStats::cache
const BaseCache & cache
Definition: base.hh:992
Packet::isWrite
bool isWrite() const
Definition: packet.hh:558
BaseCache::CacheRequestPort::isSnooping
virtual bool isSnooping() const
Memory-side port always snoops.
Definition: base.hh:172
BaseCache::handleEvictions
bool handleEvictions(std::vector< CacheBlk * > &evict_blks, PacketList &writebacks)
Try to evict the given blocks.
Definition: base.cc:844
BaseCache::CacheCmdStats::mshrMissRate
Stats::Formula mshrMissRate
The miss rate in the MSHRs pre command and thread.
Definition: base.hh:1022
BaseCache::CacheResponsePort::mustSendRetry
bool mustSendRetry
Definition: base.hh:289
WriteQueue::markInService
void markInService(WriteQueueEntry *entry)
Mark the given entry as in service.
Definition: write_queue.cc:74
BaseCache::isDirty
bool isDirty() const
Determine if there are any dirty blocks in the cache.
Definition: base.cc:1705
CheckpointOut
std::ostream CheckpointOut
Definition: serialize.hh:64
QueuedRequestPort::reqQueue
ReqPacketQueue & reqQueue
Packet queue used to store outgoing requests.
Definition: qport.hh:112
BaseCache::CacheStats::cmd
std::vector< std::unique_ptr< CacheCmdStats > > cmd
Per-command statistics.
Definition: base.hh:1133
QueueEntry
A queue entry base class, to be used by both the MSHRs and write-queue entries.
Definition: queue_entry.hh:58
PacketQueue::label
const std::string label
Label to use for print request packets label stack.
Definition: packet_queue.hh:106
ArmISA::c
Bitfield< 29 > c
Definition: miscregs_types.hh:50
BaseCache::CacheCmdStats::mshrUncacheable
Stats::Vector mshrUncacheable
Number of misses that miss in the MSHRs, per command and thread.
Definition: base.hh:1016
PacketQueue::deferredPacketReadyTime
Tick deferredPacketReadyTime() const
Get the next packet ready time.
Definition: packet_queue.hh:168
BaseCache::writebackTempBlockAtomic
void writebackTempBlockAtomic()
Send the outstanding tempBlock writeback.
Definition: base.hh:683
BaseCache::Blocked_NoWBBuffers
@ Blocked_NoWBBuffers
Definition: base.hh:106
BaseCache::moveContractions
const bool moveContractions
Similar to data expansions, after a block improves its compression, it may need to be moved elsewhere...
Definition: base.hh:951
WriteAllocator::updateMode
void updateMode(Addr write_addr, unsigned write_size, Addr blk_addr)
Update the write mode based on the current write packet.
Definition: base.cc:2562
BaseCache::CacheStats::blockedCauses
Stats::Vector blockedCauses
The number of times this cache blocked for each blocked cause.
Definition: base.hh:1074
PacketQueue::checkConflict
bool checkConflict(const PacketPtr pkt, const int blk_size) const
Check if a packet corresponding to the same address exists in the queue.
Definition: packet_queue.cc:72
trace.hh
BaseCache::recvAtomicSnoop
virtual Tick recvAtomicSnoop(PacketPtr pkt)=0
Snoop for the provided request in the cache and return the estimated time taken.
BaseCache::responseLatency
const Cycles responseLatency
The latency of sending reponse to its upper level cache/core on a linefill.
Definition: base.hh:909
BaseCache::CpuSidePort
The CPU-side port extends the base cache response port with access functions for functional,...
Definition: base.hh:303
mshr_queue.hh
BaseCache::BlockedCause
BlockedCause
Reasons for caches to be blocked.
Definition: base.hh:104
BaseCache::BaseCache
BaseCache(const BaseCacheParams &p, unsigned blk_size)
Definition: base.cc:75
PacketId
uint64_t PacketId
Definition: packet.hh:70
BaseCache::memWriteback
virtual void memWriteback() override
Write back dirty blocks in the cache using functional accesses.
Definition: base.cc:1693
BaseCache::CacheRequestPort::schedSendEvent
void schedSendEvent(Tick time)
Schedule a send of a request packet (from the MSHR).
Definition: base.hh:153
BaseCache::incHitCount
void incHitCount(PacketPtr pkt)
Definition: base.hh:1294
BaseCache::recvTimingResp
virtual void recvTimingResp(PacketPtr pkt)
Handles a response (cache line fill/write ack) from the bus.
Definition: base.cc:412
MipsISA::p
Bitfield< 0 > p
Definition: pra_constants.hh:323
std::list< AddrRange >
TempCacheBlk
Special instance of CacheBlk for use with tempBlk that deals with its block address regeneration.
Definition: cache_blk.hh:495
BaseCache::~BaseCache
~BaseCache()
Definition: base.cc:135
WriteAllocator::WriteMode
WriteMode
The current mode for write coalescing and allocation, either normal operation (ALLOCATE),...
Definition: base.hh:1449
probe.hh
Cache
A coherent cache that can be arranged in flexible topologies.
Definition: cache.hh:63
BaseCache::CpuSidePort::tryTiming
virtual bool tryTiming(PacketPtr pkt) override
Availability request from the peer.
Definition: base.cc:2401
BaseCache::recvTimingSnoopReq
virtual void recvTimingSnoopReq(PacketPtr pkt)=0
Snoops bus transactions to maintain coherence.
BaseCache::DataUpdate::addr
Addr addr
The updated block's address.
Definition: base.hh:119
BaseCache::recvAtomic
virtual Tick recvAtomic(PacketPtr pkt)
Performs the access specified by the request.
Definition: base.cc:551
BaseCache::CacheCmdStats::accesses
Stats::Formula accesses
The number of accesses per command and thread.
Definition: base.hh:1006
BaseCache::inCache
bool inCache(Addr addr, bool is_secure) const
Definition: base.hh:1266
CheckpointIn
Definition: serialize.hh:68
WriteAllocator::noAllocateLimit
const uint32_t noAllocateLimit
Definition: base.hh:1469
BaseCache::CacheStats::regStats
void regStats() override
Callback to set stat parameters.
Definition: base.cc:2156
BaseCache::CacheStats::demandAccesses
Stats::Formula demandAccesses
The number of demand accesses.
Definition: base.hh:1057
BaseCache::CacheStats::CacheStats
CacheStats(BaseCache &c)
Definition: base.cc:2090
MSHRQueue
A Class for maintaining a list of pending and allocated memory requests.
Definition: mshr_queue.hh:58
BaseCache::tempBlockWriteback
PacketPtr tempBlockWriteback
Writebacks from the tempBlock, resulting on the response path in atomic mode, must happen after the c...
Definition: base.hh:676
BaseCache::CacheStats::overallAvgMshrUncacheableLatency
Stats::Formula overallAvgMshrUncacheableLatency
The average overall latency of an MSHR miss.
Definition: base.hh:1118
BaseCache::CacheStats::cmdStats
CacheCmdStats & cmdStats(const PacketPtr p)
Definition: base.hh:1035
BaseCache::memInvalidate
virtual void memInvalidate() override
Invalidates all blocks in the cache.
Definition: base.cc:1699
BaseCache::CpuSidePort::CpuSidePort
CpuSidePort(const std::string &_name, BaseCache *_cache, const std::string &_label)
Definition: base.cc:2466
BaseCache::inRange
bool inRange(Addr addr) const
Determine if an address is in the ranges covered by this cache.
Definition: base.cc:209
BaseCache::CpuSidePort::recvFunctional
virtual void recvFunctional(PacketPtr pkt) override
Receive a functional request packet from the peer.
Definition: base.cc:2445
ReqPacketQueue
Definition: packet_queue.hh:222
BaseCache::ppHit
ProbePointArg< PacketPtr > * ppHit
To probe when a cache hit occurs.
Definition: base.hh:351
BaseCache::DataUpdate::isSecure
bool isSecure
Whether the block belongs to the secure address space.
Definition: base.hh:121
MSHRQueue::markInService
void markInService(MSHR *mshr, bool pending_modified_resp)
Mark the given MSHR as in service.
Definition: mshr_queue.cc:96
write_queue_entry.hh
BaseCache::CacheStats::demandMshrMissRate
Stats::Formula demandMshrMissRate
The demand miss rate in the MSHRs.
Definition: base.hh:1108
BaseCache::MemSidePort::recvTimingSnoopReq
virtual void recvTimingSnoopReq(PacketPtr pkt)
Receive a timing snoop request from the peer.
Definition: base.cc:2486
BaseCache::MemSidePort::_reqQueue
CacheReqPacketQueue _reqQueue
The cache-specific queue.
Definition: base.hh:235
WriteAllocator
The write allocator inspects write packets and detects streaming patterns.
Definition: base.hh:1365
BaseCache::CacheResponsePort
A cache response port is used for the CPU-side port of the cache, and it is basically a simple timing...
Definition: base.hh:266
BaseCache::MemSidePort
The memory-side port extends the base cache request port with access functions for functional,...
Definition: base.hh:230
MSHR
Miss Status and handling Register.
Definition: mshr.hh:69
BaseCache::order
uint64_t order
Increasing order number assigned to each incoming request.
Definition: base.hh:960
BaseCache::CacheStats::demandAvgMshrMissLatency
Stats::Formula demandAvgMshrMissLatency
The average latency of a demand MSHR miss.
Definition: base.hh:1113
eventq.hh
SimObject
Abstract superclass for simulation objects.
Definition: sim_object.hh:141

Generated on Tue Mar 23 2021 19:41:24 for gem5 by doxygen 1.8.17