gem5  [DEVELOP-FOR-23.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/compiler.hh"
55 #include "base/statistics.hh"
56 #include "base/trace.hh"
57 #include "base/types.hh"
58 #include "debug/Cache.hh"
59 #include "debug/CachePort.hh"
60 #include "enums/Clusivity.hh"
61 #include "mem/cache/cache_blk.hh"
63 #include "mem/cache/mshr_queue.hh"
64 #include "mem/cache/tags/base.hh"
65 #include "mem/cache/write_queue.hh"
67 #include "mem/packet.hh"
68 #include "mem/packet_queue.hh"
69 #include "mem/qport.hh"
70 #include "mem/request.hh"
71 #include "params/WriteAllocator.hh"
72 #include "sim/clocked_object.hh"
73 #include "sim/eventq.hh"
74 #include "sim/probe/probe.hh"
75 #include "sim/serialize.hh"
76 #include "sim/sim_exit.hh"
77 #include "sim/system.hh"
78 
79 namespace gem5
80 {
81 
82 namespace prefetch
83 {
84  class Base;
85 }
86 class MSHR;
87 class RequestPort;
88 class QueueEntry;
89 struct BaseCacheParams;
90 
94 class BaseCache : public ClockedObject
95 {
96  protected:
101  {
104  };
105 
106  public:
111  {
116  };
117 
123  struct DataUpdate
124  {
128  bool isSecure;
133 
134  DataUpdate(Addr _addr, bool is_secure)
135  : addr(_addr), isSecure(is_secure), oldData(), newData()
136  {
137  }
138  };
139 
140  protected:
141 
152  {
153 
154  public:
155 
160  void schedSendEvent(Tick time)
161  {
162  DPRINTF(CachePort, "Scheduling send event at %llu\n", time);
163  reqQueue.schedSendEvent(time);
164  }
165 
166  protected:
167 
168  CacheRequestPort(const std::string &_name,
169  ReqPacketQueue &_reqQueue,
170  SnoopRespPacketQueue &_snoopRespQueue) :
171  QueuedRequestPort(_name, _reqQueue, _snoopRespQueue)
172  { }
173 
179  virtual bool isSnooping() const { return true; }
180  };
181 
189  {
190 
191  protected:
192 
195 
196  public:
197 
199  SnoopRespPacketQueue &snoop_resp_queue,
200  const std::string &label) :
202  snoopRespQueue(snoop_resp_queue) { }
203 
209  virtual void sendDeferredPacket();
210 
220  {
222  DPRINTF(CachePort, "Waiting for snoop response to be "
223  "sent\n");
225  schedSendEvent(when);
226  return true;
227  }
228  return false;
229  }
230  };
231 
232 
238  {
239  private:
240 
243 
245 
246  // a pointer to our specific cache implementation
248 
249  protected:
250 
251  virtual void recvTimingSnoopReq(PacketPtr pkt);
252 
253  virtual bool recvTimingResp(PacketPtr pkt);
254 
255  virtual Tick recvAtomicSnoop(PacketPtr pkt);
256 
257  virtual void recvFunctionalSnoop(PacketPtr pkt);
258 
259  public:
260 
261  MemSidePort(const std::string &_name, BaseCache *_cache,
262  const std::string &_label);
263  };
264 
274  {
275 
276  public:
277 
279  void setBlocked();
280 
282  void clearBlocked();
283 
284  bool isBlocked() const { return blocked; }
285 
286  protected:
287 
288  CacheResponsePort(const std::string &_name, BaseCache& _cache,
289  const std::string &_label);
290 
292 
295 
296  bool blocked;
297 
299 
300  private:
301 
302  void processSendRetry();
303 
305 
306  };
307 
313  {
314  protected:
315  virtual bool recvTimingSnoopResp(PacketPtr pkt) override;
316 
317  virtual bool tryTiming(PacketPtr pkt) override;
318 
319  virtual bool recvTimingReq(PacketPtr pkt) override;
320 
321  virtual Tick recvAtomic(PacketPtr pkt) override;
322 
323  virtual void recvFunctional(PacketPtr pkt) override;
324 
325  virtual AddrRangeList getAddrRanges() const override;
326 
327  public:
328 
329  CpuSidePort(const std::string &_name, BaseCache& _cache,
330  const std::string &_label);
331 
332  };
333 
336 
337  protected:
338 
341 
344 
347 
350 
353 
356 
359 
362 
369 
385 
393 
398  std::unique_ptr<Packet> pendingDelete;
399 
404  void markInService(MSHR *mshr, bool pending_modified_resp)
405  {
406  bool wasFull = mshrQueue.isFull();
407  mshrQueue.markInService(mshr, pending_modified_resp);
408 
409  if (wasFull && !mshrQueue.isFull()) {
411  }
412  }
413 
415  {
416  bool wasFull = writeBuffer.isFull();
417  writeBuffer.markInService(entry);
418 
419  if (wasFull && !writeBuffer.isFull()) {
421  }
422  }
423 
437  inline bool allocOnFill(MemCmd cmd) const
438  {
439  return clusivity == enums::mostly_incl ||
440  cmd == MemCmd::WriteLineReq ||
441  cmd == MemCmd::ReadReq ||
442  cmd == MemCmd::WriteReq ||
443  cmd.isPrefetch() ||
444  cmd.isLLSC();
445  }
446 
456 
465  Cycles calculateTagOnlyLatency(const uint32_t delay,
466  const Cycles lookup_lat) const;
476  Cycles calculateAccessLatency(const CacheBlk* blk, const uint32_t delay,
477  const Cycles lookup_lat) const;
478 
487  virtual bool access(PacketPtr pkt, CacheBlk *&blk, Cycles &lat,
488  PacketList &writebacks);
489 
490  /*
491  * Handle a timing request that hit in the cache
492  *
493  * @param ptk The request packet
494  * @param blk The referenced block
495  * @param request_time The tick at which the block lookup is compete
496  */
497  virtual void handleTimingReqHit(PacketPtr pkt, CacheBlk *blk,
498  Tick request_time);
499 
500  /*
501  * Handle a timing request that missed in the cache
502  *
503  * Implementation specific handling for different cache
504  * implementations
505  *
506  * @param ptk The request packet
507  * @param blk The referenced block
508  * @param forward_time The tick at which we can process dependent requests
509  * @param request_time The tick at which the block lookup is compete
510  */
511  virtual void handleTimingReqMiss(PacketPtr pkt, CacheBlk *blk,
512  Tick forward_time,
513  Tick request_time) = 0;
514 
515  /*
516  * Handle a timing request that missed in the cache
517  *
518  * Common functionality across different cache implementations
519  *
520  * @param ptk The request packet
521  * @param blk The referenced block
522  * @param mshr Any existing mshr for the referenced cache block
523  * @param forward_time The tick at which we can process dependent requests
524  * @param request_time The tick at which the block lookup is compete
525  */
526  void handleTimingReqMiss(PacketPtr pkt, MSHR *mshr, CacheBlk *blk,
527  Tick forward_time, Tick request_time);
528 
533  virtual void recvTimingReq(PacketPtr pkt);
534 
540 
551  virtual void serviceMSHRTargets(MSHR *mshr, const PacketPtr pkt,
552  CacheBlk *blk) = 0;
553 
558  virtual void recvTimingResp(PacketPtr pkt);
559 
564  virtual void recvTimingSnoopReq(PacketPtr pkt) = 0;
565 
570  virtual void recvTimingSnoopResp(PacketPtr pkt) = 0;
571 
584  virtual Cycles handleAtomicReqMiss(PacketPtr pkt, CacheBlk *&blk,
585  PacketList &writebacks) = 0;
586 
592  virtual Tick recvAtomic(PacketPtr pkt);
593 
600  virtual Tick recvAtomicSnoop(PacketPtr pkt) = 0;
601 
608  virtual void functionalAccess(PacketPtr pkt, bool from_cpu_side);
609 
619  void updateBlockData(CacheBlk *blk, const PacketPtr cpkt,
620  bool has_old_data);
621 
625  void cmpAndSwap(CacheBlk *blk, PacketPtr pkt);
626 
634 
638  virtual void doWritebacks(PacketList& writebacks, Tick forward_time) = 0;
639 
643  virtual void doWritebacksAtomic(PacketList& writebacks) = 0;
644 
660  virtual PacketPtr createMissPacket(PacketPtr cpu_pkt, CacheBlk *blk,
661  bool needs_writable,
662  bool is_whole_line_write) const = 0;
663 
671  const bool writebackClean;
672 
681 
688  assert(tempBlockWriteback != nullptr);
689  PacketList writebacks{tempBlockWriteback};
690  doWritebacksAtomic(writebacks);
691  tempBlockWriteback = nullptr;
692  }
693 
700 
725  bool updateCompressionData(CacheBlk *&blk, const uint64_t* data,
726  PacketList &writebacks);
727 
738  virtual void satisfyRequest(PacketPtr pkt, CacheBlk *blk,
739  bool deferred_response = false,
740  bool pending_downgrade = false);
741 
751  void maintainClusivity(bool from_cache, CacheBlk *blk);
752 
762  bool handleEvictions(std::vector<CacheBlk*> &evict_blks,
763  PacketList &writebacks);
764 
784  PacketList &writebacks, bool allocate);
785 
798  CacheBlk *allocateBlock(const PacketPtr pkt, PacketList &writebacks);
807  [[nodiscard]] virtual PacketPtr evictBlock(CacheBlk *blk) = 0;
808 
817  void evictBlock(CacheBlk *blk, PacketList &writebacks);
818 
824  void invalidateBlock(CacheBlk *blk);
825 
833 
846 
850  virtual void memWriteback() override;
851 
859  virtual void memInvalidate() override;
860 
866  bool isDirty() const;
867 
876  bool inRange(Addr addr) const;
877 
881  Tick nextQueueReadyTime() const;
882 
884  const unsigned blkSize;
885 
891 
897 
904 
907 
914 
918  const bool sequentialAccess;
919 
921  const int numTarget;
922 
925 
931  const enums::Clusivity clusivity;
932 
939  const bool isReadOnly;
940 
947  const bool replaceExpansions;
948 
955  const bool moveContractions;
956 
961  uint8_t blocked;
962 
964  uint64_t order;
965 
968 
971 
974 
979 
980  public:
983 
985  {
986  CacheCmdStats(BaseCache &c, const std::string &name);
987 
994  void regStatsFromParent();
995 
996  const BaseCache &cache;
997 
1036  };
1037 
1039  {
1041 
1042  void regStats() override;
1043 
1045  return *cmd[p->cmdToIndex()];
1046  }
1047 
1049 
1058 
1063 
1068 
1073 
1078 
1083 
1088 
1091 
1094 
1099 
1104 
1107 
1112 
1115 
1120 
1125 
1128 
1131 
1134 
1140 
1143  } stats;
1144 
1146  void regProbePoints() override;
1147 
1148  public:
1149  BaseCache(const BaseCacheParams &p, unsigned blk_size);
1150  ~BaseCache();
1151 
1152  void init() override;
1153 
1154  Port &getPort(const std::string &if_name,
1155  PortID idx=InvalidPortID) override;
1156 
1161  unsigned
1163  {
1164  return blkSize;
1165  }
1166 
1167  const AddrRangeList &getAddrRanges() const { return addrRanges; }
1168 
1169  MSHR *allocateMissBuffer(PacketPtr pkt, Tick time, bool sched_send = true)
1170  {
1172  pkt, time, order++,
1173  allocOnFill(pkt->cmd));
1174 
1175  if (mshrQueue.isFull()) {
1177  }
1178 
1179  if (sched_send) {
1180  // schedule the send
1181  schedMemSideSendEvent(time);
1182  }
1183 
1184  return mshr;
1185  }
1186 
1188  {
1189  // should only see writes or clean evicts here
1190  assert(pkt->isWrite() || pkt->cmd == MemCmd::CleanEvict);
1191 
1192  Addr blk_addr = pkt->getBlockAddr(blkSize);
1193 
1194  // If using compression, on evictions the block is decompressed and
1195  // the operation's latency is added to the payload delay. Consume
1196  // that payload delay here, meaning that the data is always stored
1197  // uncompressed in the writebuffer
1198  if (compressor) {
1199  time += pkt->payloadDelay;
1200  pkt->payloadDelay = 0;
1201  }
1202 
1203  WriteQueueEntry *wq_entry =
1204  writeBuffer.findMatch(blk_addr, pkt->isSecure());
1205  if (wq_entry && !wq_entry->inService) {
1206  DPRINTF(Cache, "Potential to merge writeback %s", pkt->print());
1207  }
1208 
1209  writeBuffer.allocate(blk_addr, blkSize, pkt, time, order++);
1210 
1211  if (writeBuffer.isFull()) {
1213  }
1214 
1215  // schedule the send
1216  schedMemSideSendEvent(time);
1217  }
1218 
1222  bool isBlocked() const
1223  {
1224  return blocked != 0;
1225  }
1226 
1233  {
1234  uint8_t flag = 1 << cause;
1235  if (blocked == 0) {
1236  stats.blockedCauses[cause]++;
1237  blockedCycle = curCycle();
1239  }
1240  blocked |= flag;
1241  DPRINTF(Cache,"Blocking for cause %d, mask=%d\n", cause, blocked);
1242  }
1243 
1252  {
1253  uint8_t flag = 1 << cause;
1254  blocked &= ~flag;
1255  DPRINTF(Cache,"Unblocking for cause %d, mask=%d\n", cause, blocked);
1256  if (blocked == 0) {
1257  stats.blockedCycles[cause] += curCycle() - blockedCycle;
1259  }
1260  }
1261 
1271  {
1273  }
1274 
1275  bool inCache(Addr addr, bool is_secure) const {
1276  return tags->findBlock(addr, is_secure);
1277  }
1278 
1279  bool hasBeenPrefetched(Addr addr, bool is_secure) const {
1280  CacheBlk *block = tags->findBlock(addr, is_secure);
1281  if (block) {
1282  return block->wasPrefetched();
1283  } else {
1284  return false;
1285  }
1286  }
1287 
1288  bool inMissQueue(Addr addr, bool is_secure) const {
1289  return mshrQueue.findMatch(addr, is_secure);
1290  }
1291 
1293  {
1294  assert(pkt->req->requestorId() < system->maxRequestors());
1295  stats.cmdStats(pkt).misses[pkt->req->requestorId()]++;
1296  pkt->req->incAccessDepth();
1297  if (missCount) {
1298  --missCount;
1299  if (missCount == 0)
1300  exitSimLoop("A cache reached the maximum miss count");
1301  }
1302  }
1304  {
1305  assert(pkt->req->requestorId() < system->maxRequestors());
1306  stats.cmdStats(pkt).hits[pkt->req->requestorId()]++;
1307  }
1308 
1314  bool coalesce() const;
1315 
1316 
1321  void writebackVisitor(CacheBlk &blk);
1322 
1328  void invalidateVisitor(CacheBlk &blk);
1329 
1338  virtual bool sendMSHRQueuePacket(MSHR* mshr);
1339 
1348  bool sendWriteQueuePacket(WriteQueueEntry* wq_entry);
1349 
1355  void serialize(CheckpointOut &cp) const override;
1356  void unserialize(CheckpointIn &cp) override;
1357 };
1358 
1375 {
1376  public:
1377  WriteAllocator(const WriteAllocatorParams &p) :
1378  SimObject(p),
1379  coalesceLimit(p.coalesce_limit * p.block_size),
1380  noAllocateLimit(p.no_allocate_limit * p.block_size),
1381  delayThreshold(p.delay_threshold)
1382  {
1383  reset();
1384  }
1385 
1392  bool coalesce() const {
1393  return mode != WriteMode::ALLOCATE;
1394  }
1395 
1401  bool allocate() const {
1402  return mode != WriteMode::NO_ALLOCATE;
1403  }
1404 
1411  void reset() {
1413  byteCount = 0;
1414  nextAddr = 0;
1415  }
1416 
1423  bool delay(Addr blk_addr) {
1424  if (delayCtr[blk_addr] > 0) {
1425  --delayCtr[blk_addr];
1426  return true;
1427  } else {
1428  return false;
1429  }
1430  }
1431 
1437  void resetDelay(Addr blk_addr) {
1438  delayCtr.erase(blk_addr);
1439  }
1440 
1451  void updateMode(Addr write_addr, unsigned write_size, Addr blk_addr);
1452 
1453  private:
1459  enum class WriteMode : char
1460  {
1461  ALLOCATE,
1462  COALESCE,
1463  NO_ALLOCATE,
1464  };
1466 
1469 
1474  uint32_t byteCount;
1475 
1479  const uint32_t coalesceLimit;
1480  const uint32_t noAllocateLimit;
1484  const uint32_t delayThreshold;
1485 
1490  std::unordered_map<Addr, Counter> delayCtr;
1491 };
1492 
1493 } // namespace gem5
1494 
1495 #endif //__MEM_CACHE_BASE_HH__
gem5::statistics::Scalar
This is a simple scalar statistic, like a counter.
Definition: statistics.hh:1929
gem5::Packet::getBlockAddr
Addr getBlockAddr(unsigned int blk_size) const
Definition: packet.hh:831
gem5::BaseCache::memWriteback
virtual void memWriteback() override
Write back dirty blocks in the cache using functional accesses.
Definition: base.cc:1789
gem5::PortID
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
Definition: types.hh:245
gem5::MSHR
Miss Status and handling Register.
Definition: mshr.hh:74
gem5::PacketQueue::deferredPacketReadyTime
Tick deferredPacketReadyTime() const
Get the next packet ready time.
Definition: packet_queue.hh:172
gem5::BaseCache::CacheResponsePort::queue
RespPacketQueue queue
A normal packet queue used to store responses.
Definition: base.hh:294
gem5::BaseCache::MemSidePort::MemSidePort
MemSidePort(const std::string &_name, BaseCache *_cache, const std::string &_label)
Definition: base.cc:2688
gem5::BaseCache::CacheCmdStats::accesses
statistics::Formula accesses
The number of accesses per command and thread.
Definition: base.hh:1015
gem5::BaseCache::incMissCount
void incMissCount(PacketPtr pkt)
Definition: base.hh:1292
gem5::BaseCache::cpuSidePort
CpuSidePort cpuSidePort
Definition: base.hh:334
gem5::BaseCache::CacheCmdStats::hitLatency
statistics::Vector hitLatency
Total number of ticks per thread/command spent waiting for a hit.
Definition: base.hh:1008
gem5::BaseCache::CacheStats::overallMshrUncacheable
statistics::Formula overallMshrUncacheable
Total number of misses that miss in the MSHRs.
Definition: base.hh:1106
gem5::BaseCache::CacheCmdStats::hits
statistics::Vector hits
Number of hits per thread for each type of command.
Definition: base.hh:1000
gem5::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:1490
gem5::BaseCache::handleTimingReqMiss
virtual void handleTimingReqMiss(PacketPtr pkt, CacheBlk *blk, Tick forward_time, Tick request_time)=0
gem5::BaseCache::CacheCmdStats::regStatsFromParent
void regStatsFromParent()
Callback to register stats from parent CacheStats::regStats().
Definition: base.cc:2066
gem5::WriteAllocator::reset
void reset()
Reset the write allocator state, meaning that it allocates for writes and has not recorded any inform...
Definition: base.hh:1411
gem5::BaseCache::~BaseCache
~BaseCache()
Definition: base.cc:140
gem5::BaseCache::MemSidePort::_reqQueue
CacheReqPacketQueue _reqQueue
The cache-specific queue.
Definition: base.hh:242
gem5::BaseCache::invalidateBlock
void invalidateBlock(CacheBlk *blk)
Invalidate a cache block.
Definition: base.cc:1664
system.hh
gem5::BaseCache::DataUpdate::oldData
std::vector< uint64_t > oldData
The stale data contents.
Definition: base.hh:130
gem5::BaseCache::DataUpdate::DataUpdate
DataUpdate(Addr _addr, bool is_secure)
Definition: base.hh:134
gem5::MemCmd::CleanEvict
@ CleanEvict
Definition: packet.hh:96
gem5::BaseCache::CacheStats::replacements
statistics::Scalar replacements
Number of replacements of valid blocks.
Definition: base.hh:1130
gem5::BaseCache::MSHRQueue_MSHRs
@ MSHRQueue_MSHRs
Definition: base.hh:102
gem5::BaseCache::cmpAndSwap
void cmpAndSwap(CacheBlk *blk, PacketPtr pkt)
Handle doing the Compare and Swap function for SPARC.
Definition: base.cc:797
gem5::RespPacketQueue
Definition: packet_queue.hh:300
gem5::BaseCache::NUM_BLOCKED_CAUSES
@ NUM_BLOCKED_CAUSES
Definition: base.hh:115
data
const char data[]
Definition: circlebuf.test.cc:48
gem5::BaseCache::MemSidePort
The memory-side port extends the base cache request port with access functions for functional,...
Definition: base.hh:237
gem5::Clocked::curCycle
Cycles curCycle() const
Determine the current cycle, corresponding to a tick aligned to a clock edge.
Definition: clocked_object.hh:195
gem5::BaseCache::ppDataUpdate
ProbePointArg< DataUpdate > * ppDataUpdate
To probe when the contents of a block are updated.
Definition: base.hh:368
serialize.hh
gem5::WriteAllocator::WriteMode::ALLOCATE
@ ALLOCATE
gem5::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:151
gem5::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:1230
gem5::BaseCache::forwardSnoops
bool forwardSnoops
Do we forward snoops from mem side port through to cpu side port?
Definition: base.hh:924
gem5::BaseCache::CacheCmdStats::mshrHits
statistics::Vector mshrHits
Number of misses that hit in the MSHRs per command and thread.
Definition: base.hh:1021
gem5::BaseCache::CacheResponsePort::processSendRetry
void processSendRetry()
Definition: base.cc:173
gem5::BaseCache::writeBuffer
WriteQueue writeBuffer
Write/writeback buffer.
Definition: base.hh:343
gem5::BaseCache::CacheCmdStats::avgMshrMissLatency
statistics::Formula avgMshrMissLatency
The average latency of an MSHR miss, per command and thread.
Definition: base.hh:1033
gem5::BaseCache::missCount
Counter missCount
The number of misses to trigger an exit event.
Definition: base.hh:973
gem5::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:955
gem5::BaseCache::CacheStats::overallMshrHits
statistics::Formula overallMshrHits
Total number of misses that hit in the MSHRs.
Definition: base.hh:1098
gem5::QueuedRequestPort
The QueuedRequestPort combines two queues, a request queue and a snoop response queue,...
Definition: qport.hh:110
gem5::BaseCache::recvTimingResp
virtual void recvTimingResp(PacketPtr pkt)
Handles a response (cache line fill/write ack) from the bus.
Definition: base.cc:489
gem5::Packet::req
RequestPtr req
A pointer to the original request.
Definition: packet.hh:377
gem5::WriteQueue::markInService
void markInService(WriteQueueEntry *entry)
Mark the given entry as in service.
Definition: write_queue.cc:78
gem5::BaseCache::MemSidePort::recvFunctionalSnoop
virtual void recvFunctionalSnoop(PacketPtr pkt)
Receive a functional snoop request packet from the peer.
Definition: base.cc:2641
gem5::BaseCache::coalesce
bool coalesce() const
Checks if the cache is coalescing writes.
Definition: base.cc:1808
base.hh
gem5::CheckpointIn
Definition: serialize.hh:68
gem5::BaseCache::CacheReqPacketQueue::snoopRespQueue
SnoopRespPacketQueue & snoopRespQueue
Definition: base.hh:194
gem5::BaseCache::CacheCmdStats::mshrUncacheable
statistics::Vector mshrUncacheable
Number of misses that miss in the MSHRs, per command and thread.
Definition: base.hh:1025
gem5::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:202
gem5::BaseCache::CacheStats::overallAccesses
statistics::Formula overallAccesses
The number of overall accesses.
Definition: base.hh:1072
gem5::BaseCache::MemSidePort::cache
BaseCache * cache
Definition: base.hh:247
gem5::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:404
gem5::WriteAllocator::WriteMode::COALESCE
@ COALESCE
gem5::BaseCache::CacheStats::overallHitLatency
statistics::Formula overallHitLatency
Total number of ticks spent waiting for all hits.
Definition: base.hh:1057
gem5::TempCacheBlk
Special instance of CacheBlk for use with tempBlk that deals with its block address regeneration.
Definition: cache_blk.hh:500
gem5::Packet::isWrite
bool isWrite() const
Definition: packet.hh:594
gem5::Packet::isSecure
bool isSecure() const
Definition: packet.hh:836
gem5::BaseCache::clearBlocked
void clearBlocked(BlockedCause cause)
Marks the cache as unblocked for the given cause.
Definition: base.hh:1251
gem5::BaseCache::CacheCmdStats::missRate
statistics::Formula missRate
The miss rate per command and thread.
Definition: base.hh:1017
gem5::BaseCache::dataLatency
const Cycles dataLatency
The latency of data access of a cache.
Definition: base.hh:896
gem5::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:978
gem5::BaseCache::CacheCmdStats::mshrMisses
statistics::Vector mshrMisses
Number of misses that miss in the MSHRs, per command and thread.
Definition: base.hh:1023
gem5::statistics::Vector
A vector of scalar stats.
Definition: statistics.hh:2005
gem5::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:947
gem5::BaseCache::blocked
uint8_t blocked
Bit vector of the blocking reasons for the access path.
Definition: base.hh:961
gem5::statistics::Formula
A formula for statistics that is calculated when printed.
Definition: statistics.hh:2538
std::vector< uint64_t >
gem5::BaseCache::CacheStats::demandAccesses
statistics::Formula demandAccesses
The number of demand accesses.
Definition: base.hh:1070
gem5::BaseCache::CacheStats::overallAvgMshrMissLatency
statistics::Formula overallAvgMshrMissLatency
The average overall latency of an MSHR miss.
Definition: base.hh:1124
gem5::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:2698
gem5::BaseCache::sequentialAccess
const bool sequentialAccess
Whether tags and data are accessed sequentially.
Definition: base.hh:918
gem5::BaseCache::BaseCache
BaseCache(const BaseCacheParams &p, unsigned blk_size)
Definition: base.cc:80
gem5::BaseCache::updateBlockData
void updateBlockData(CacheBlk *blk, const PacketPtr cpkt, bool has_old_data)
Update the data contents of a block.
Definition: base.cc:771
gem5::MSHRQueue::markInService
void markInService(MSHR *mshr, bool pending_modified_resp)
Mark the given MSHR as in service.
Definition: mshr_queue.cc:115
gem5::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:398
gem5::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:273
gem5::BaseCache::recvAtomicSnoop
virtual Tick recvAtomicSnoop(PacketPtr pkt)=0
Snoop for the provided request in the cache and return the estimated time taken.
gem5::InvalidPortID
const PortID InvalidPortID
Definition: types.hh:246
sim_exit.hh
gem5::BaseCache::CacheRequestPort::CacheRequestPort
CacheRequestPort(const std::string &_name, ReqPacketQueue &_reqQueue, SnoopRespPacketQueue &_snoopRespQueue)
Definition: base.hh:168
gem5::BaseCache::blockedCycle
Cycles blockedCycle
Stores time the cache blocked for statistics.
Definition: base.hh:967
request.hh
gem5::BaseCache::CacheStats::overallAvgMissLatency
statistics::Formula overallAvgMissLatency
The average miss latency for all misses.
Definition: base.hh:1082
gem5::BaseCache::CacheStats::overallMshrMissRate
statistics::Formula overallMshrMissRate
The overall miss rate in the MSHRs.
Definition: base.hh:1119
gem5::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:88
gem5::WriteAllocator::WriteMode
WriteMode
The current mode for write coalescing and allocation, either normal operation (ALLOCATE),...
Definition: base.hh:1459
gem5::BaseCache::MSHRQueueIndex
MSHRQueueIndex
Indexes to enumerate the MSHR queues.
Definition: base.hh:100
gem5::BaseCache::CacheStats::cache
const BaseCache & cache
Definition: base.hh:1048
gem5::CacheBlk
A Basic Cache block.
Definition: cache_blk.hh:70
gem5::BaseCache::tempBlock
TempCacheBlk * tempBlock
Temporary cache block for occasional transitory use.
Definition: base.hh:392
gem5::BaseCache::CacheStats::blockedCycles
statistics::Vector blockedCycles
The total number of cycles blocked for each blocked cause.
Definition: base.hh:1085
gem5::BaseCache::MSHRQueue_WriteBuffer
@ MSHRQueue_WriteBuffer
Definition: base.hh:103
gem5::BaseCache::handleAtomicReqMiss
virtual Cycles handleAtomicReqMiss(PacketPtr pkt, CacheBlk *&blk, PacketList &writebacks)=0
Handle a request in atomic mode that missed in this cache.
packet.hh
gem5::BaseCache::sendWriteQueuePacket
bool sendWriteQueuePacket(WriteQueueEntry *wq_entry)
Similar to sendMSHR, but for a write-queue entry instead.
Definition: base.cc:1970
gem5::BaseCache::CacheCmdStats::mshrMissLatency
statistics::Vector mshrMissLatency
Total tick latency of each MSHR miss, per command and thread.
Definition: base.hh:1027
gem5::RequestPort
A RequestPort is a specialisation of a Port, which implements the default protocol for the three diff...
Definition: port.hh:118
gem5::BaseCache::CpuSidePort::recvTimingReq
virtual bool recvTimingReq(PacketPtr pkt) override
Receive a timing request from the peer.
Definition: base.cc:2552
gem5::BaseCache::CacheStats::demandHitLatency
statistics::Formula demandHitLatency
Total number of ticks spent waiting for demand hits.
Definition: base.hh:1055
gem5::BaseCache::CacheResponsePort::setBlocked
void setBlocked()
Do not accept any new requests.
Definition: base.cc:146
gem5::BaseCache::isBlocked
bool isBlocked() const
Returns true if the cache is blocked for accesses.
Definition: base.hh:1222
gem5::Cycles
Cycles is a wrapper class for representing cycle counts, i.e.
Definition: types.hh:78
gem5::BaseCache::writeAllocator
WriteAllocator *const writeAllocator
The writeAllocator drive optimizations for streaming writes.
Definition: base.hh:384
gem5::WriteAllocator::WriteAllocator
WriteAllocator(const WriteAllocatorParams &p)
Definition: base.hh:1377
gem5::BaseCache::inRange
bool inRange(Addr addr) const
Determine if an address is in the ranges covered by this cache.
Definition: base.cc:214
gem5::MemCmd
Definition: packet.hh:76
gem5::BaseCache::DataUpdate::newData
std::vector< uint64_t > newData
The new data contents.
Definition: base.hh:132
gem5::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:61
gem5::BaseCache::CacheCmdStats::misses
statistics::Vector misses
Number of misses per thread for each type of command.
Definition: base.hh:1003
gem5::WriteAllocator::coalesceLimit
const uint32_t coalesceLimit
Limits for when to switch between the different write modes.
Definition: base.hh:1479
gem5::BaseCache::writebackTempBlockAtomicEvent
EventFunctionWrapper writebackTempBlockAtomicEvent
An event to writeback the tempBlock after recvAtomic finishes.
Definition: base.hh:699
gem5::BaseCache::CacheStats::demandMshrHits
statistics::Formula demandMshrHits
Demand misses that hit in the MSHRs.
Definition: base.hh:1096
gem5::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:449
gem5::BaseCache::Blocked_NoTargets
@ Blocked_NoTargets
Definition: base.hh:114
gem5::BaseCache::CpuSidePort::CpuSidePort
CpuSidePort(const std::string &_name, BaseCache &_cache, const std::string &_label)
Definition: base.cc:2602
gem5::BaseCache::DataUpdate
A data contents update is composed of the updated block's address, the old contents,...
Definition: base.hh:123
gem5::BaseCache::CacheStats::overallMshrMisses
statistics::Formula overallMshrMisses
Total number of misses that miss in the MSHRs.
Definition: base.hh:1103
gem5::VegaISA::c
Bitfield< 2 > c
Definition: pagetable.hh:63
gem5::BaseCache::order
uint64_t order
Increasing order number assigned to each incoming request.
Definition: base.hh:964
gem5::BaseCache::CacheCmdStats::avgMshrUncacheableLatency
statistics::Formula avgMshrUncacheableLatency
The average latency of an MSHR miss, per command and thread.
Definition: base.hh:1035
gem5::BaseCache::CacheStats::overallMissLatency
statistics::Formula overallMissLatency
Total number of ticks spent waiting for all misses.
Definition: base.hh:1067
gem5::Flags< FlagsType >
gem5::BaseCache::CacheResponsePort::isBlocked
bool isBlocked() const
Definition: base.hh:284
gem5::BaseCache::serialize
void serialize(CheckpointOut &cp) const override
Serialize the state of the caches.
Definition: base.cc:1994
gem5::BaseCache::ppMiss
ProbePointArg< PacketPtr > * ppMiss
To probe when a cache miss occurs.
Definition: base.hh:358
gem5::System::maxRequestors
RequestorID maxRequestors()
Get the number of requestors registered in the system.
Definition: system.hh:495
gem5::BaseCache::prefetcher
prefetch::Base * prefetcher
Prefetcher.
Definition: base.hh:352
gem5::System
Definition: system.hh:74
gem5::BaseCache::tags
BaseTags * tags
Tag and data Storage.
Definition: base.hh:346
gem5::WriteAllocator::allocate
bool allocate() const
Should writes allocate?
Definition: base.hh:1401
gem5::Queue::isFull
bool isFull() const
Definition: queue.hh:150
gem5::BaseCache::CacheStats::regStats
void regStats() override
Callback to set stat parameters.
Definition: base.cc:2283
gem5::BaseCache::ppFill
ProbePointArg< PacketPtr > * ppFill
To probe when a cache fill occurs.
Definition: base.hh:361
gem5::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:75
gem5::BaseCache::CacheStats::cmd
std::vector< std::unique_ptr< CacheCmdStats > > cmd
Per-command statistics.
Definition: base.hh:1142
gem5::BaseCache::allocateWriteBuffer
void allocateWriteBuffer(PacketPtr pkt, Tick time)
Definition: base.hh:1187
gem5::Named::name
virtual std::string name() const
Definition: named.hh:47
gem5::VegaISA::p
Bitfield< 54 > p
Definition: pagetable.hh:70
gem5::BaseCache::MemSidePort::recvTimingResp
virtual bool recvTimingResp(PacketPtr pkt)
Receive a timing response from the peer.
Definition: base.cc:2614
gem5::BaseCache::CacheReqPacketQueue::cache
BaseCache & cache
Definition: base.hh:193
gem5::Packet::print
void print(std::ostream &o, int verbosity=0, const std::string &prefix="") const
Definition: packet.cc:368
gem5::BaseCache::stats
gem5::BaseCache::CacheStats stats
gem5::WriteAllocator::mode
WriteMode mode
Definition: base.hh:1465
gem5::BaseCache::CacheResponsePort::CacheResponsePort
CacheResponsePort(const std::string &_name, BaseCache &_cache, const std::string &_label)
Definition: base.cc:69
gem5::BaseCache
A basic cache interface.
Definition: base.hh:94
gem5::QueuedResponsePort
A queued port is a port that has an infinite queue for outgoing packets and thus decouples the module...
Definition: qport.hh:61
DPRINTF
#define DPRINTF(x,...)
Definition: trace.hh:210
gem5::WriteAllocator::nextAddr
Addr nextAddr
Address to match writes against to detect streams.
Definition: base.hh:1468
gem5::PacketId
uint64_t PacketId
Definition: packet.hh:74
gem5::Packet
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition: packet.hh:294
gem5::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:1187
gem5::BaseCache::hasBeenPrefetched
bool hasBeenPrefetched(Addr addr, bool is_secure) const
Definition: base.hh:1279
gem5::BaseCache::sendMSHRQueuePacket
virtual bool sendMSHRQueuePacket(MSHR *mshr)
Take an MSHR, turn it into a suitable downstream packet, and send it out.
Definition: base.cc:1867
gem5::WriteAllocator::byteCount
uint32_t byteCount
Bytes written contiguously.
Definition: base.hh:1474
gem5::BaseCache::writecleanBlk
PacketPtr writecleanBlk(CacheBlk *blk, Request::Flags dest, PacketId id)
Create a writeclean request for the given block.
Definition: base.cc:1743
gem5::BaseCache::CacheStats::overallHits
statistics::Formula overallHits
Number of hit for all accesses.
Definition: base.hh:1053
gem5::BaseCache::CacheResponsePort::cache
BaseCache & cache
Definition: base.hh:291
gem5::QueuedRequestPort::reqQueue
ReqPacketQueue & reqQueue
Packet queue used to store outgoing requests.
Definition: qport.hh:116
statistics.hh
gem5::BaseCache::blkSize
const unsigned blkSize
Block size of this cache.
Definition: base.hh:884
gem5::Tick
uint64_t Tick
Tick count type.
Definition: types.hh:58
gem5::BaseCache::CpuSidePort
The CPU-side port extends the base cache response port with access functions for functional,...
Definition: base.hh:312
gem5::BaseCache::regenerateBlkAddr
Addr regenerateBlkAddr(CacheBlk *blk)
Regenerate block address using tags.
Definition: base.cc:183
gem5::BaseCache::DataUpdate::isSecure
bool isSecure
Whether the block belongs to the secure address space.
Definition: base.hh:128
gem5::BaseCache::ppHit
ProbePointArg< PacketPtr > * ppHit
To probe when a cache hit occurs.
Definition: base.hh:355
gem5::BaseCache::CacheResponsePort::clearBlocked
void clearBlocked()
Return to normal operation and accept new requests.
Definition: base.cc:161
gem5::PacketQueue::schedSendEvent
void schedSendEvent(Tick when)
Schedule a send event if we are not already waiting for a retry.
Definition: packet_queue.cc:155
gem5::BaseCache::recvAtomic
virtual Tick recvAtomic(PacketPtr pkt)
Performs the access specified by the request.
Definition: base.cc:635
gem5::BaseCache::CpuSidePort::recvTimingSnoopResp
virtual bool recvTimingSnoopResp(PacketPtr pkt) override
Receive a timing snoop response from the peer.
Definition: base.cc:2523
gem5::MemCmd::ReadReq
@ ReadReq
Definition: packet.hh:87
gem5::compression::Base
Base cache compressor interface.
Definition: base.hh:64
gem5::BaseCache::CacheCmdStats::mshrMissRate
statistics::Formula mshrMissRate
The miss rate in the MSHRs pre command and thread.
Definition: base.hh:1031
packet_queue.hh
gem5::BaseCache::CacheStats::blockedCauses
statistics::Vector blockedCauses
The number of times this cache blocked for each blocked cause.
Definition: base.hh:1087
gem5::BaseCache::CacheStats::writebacks
statistics::Vector writebacks
Number of blocks written back per thread.
Definition: base.hh:1093
gem5::BaseCache::init
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
Definition: base.cc:193
gem5::WriteAllocator::WriteMode::NO_ALLOCATE
@ NO_ALLOCATE
gem5::BaseCache::CacheRequestPort::schedSendEvent
void schedSendEvent(Tick time)
Schedule a send of a request packet (from the MSHR).
Definition: base.hh:160
gem5::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:63
gem5::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:168
gem5::BaseCache::CacheStats::overallMisses
statistics::Formula overallMisses
Number of misses for all accesses.
Definition: base.hh:1062
gem5::BaseCache::CacheCmdStats::missLatency
statistics::Vector missLatency
Total number of ticks per thread/command spent waiting for a miss.
Definition: base.hh:1013
base.hh
gem5::BaseCache::CacheRequestPort::isSnooping
virtual bool isSnooping() const
Memory-side port always snoops.
Definition: base.hh:179
gem5::BaseCache::CacheStats::dataExpansions
statistics::Scalar dataExpansions
Number of data expansions.
Definition: base.hh:1133
gem5::BaseCache::CacheResponsePort::mustSendRetry
bool mustSendRetry
Definition: base.hh:298
compiler.hh
gem5::BaseCache::CacheStats::demandMissRate
statistics::Formula demandMissRate
The miss rate of all demand accesses.
Definition: base.hh:1075
gem5::BaseCache::unserialize
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Definition: base.cc:2014
gem5::BaseCache::allocOnFill
bool allocOnFill(MemCmd cmd) const
Determine whether we should allocate on a fill or not.
Definition: base.hh:437
gem5::BaseCache::incHitCount
void incHitCount(PacketPtr pkt)
Definition: base.hh:1303
gem5::SimObject
Abstract superclass for simulation objects.
Definition: sim_object.hh:146
gem5::BaseCache::Blocked_NoWBBuffers
@ Blocked_NoWBBuffers
Definition: base.hh:113
gem5::Packet::cmd
MemCmd cmd
The command field of the packet.
Definition: packet.hh:372
gem5::BaseCache::recvTimingSnoopResp
virtual void recvTimingSnoopResp(PacketPtr pkt)=0
Handle a snoop response.
gem5::BaseCache::Blocked_NoMSHRs
@ Blocked_NoMSHRs
Definition: base.hh:112
gem5::BaseCache::CpuSidePort::recvFunctional
virtual void recvFunctional(PacketPtr pkt) override
Receive a functional request packet from the peer.
Definition: base.cc:2581
gem5::Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:147
gem5::BaseCache::doWritebacksAtomic
virtual void doWritebacksAtomic(PacketList &writebacks)=0
Send writebacks down the memory hierarchy in atomic mode.
gem5::BaseCache::getBlockSize
unsigned getBlockSize() const
Query block size of a cache.
Definition: base.hh:1162
gem5::BaseCache::inMissQueue
bool inMissQueue(Addr addr, bool is_secure) const
Definition: base.hh:1288
gem5::BaseCache::tempBlockWriteback
PacketPtr tempBlockWriteback
Writebacks from the tempBlock, resulting on the response path in atomic mode, must happen after the c...
Definition: base.hh:680
gem5::ClockedObject
The ClockedObject class extends the SimObject with a clock and accessor functions to relate ticks to ...
Definition: clocked_object.hh:234
gem5::BaseCache::recvTimingReq
virtual void recvTimingReq(PacketPtr pkt)
Performs the access specified by the request.
Definition: base.cc:404
gem5::BaseCache::MemSidePort::recvTimingSnoopReq
virtual void recvTimingSnoopReq(PacketPtr pkt)
Receive a timing snoop request from the peer.
Definition: base.cc:2622
addr_range.hh
gem5::Cache
A coherent cache that can be arranged in flexible topologies.
Definition: cache.hh:67
gem5::BaseCache::MemSidePort::recvAtomicSnoop
virtual Tick recvAtomicSnoop(PacketPtr pkt)
Receive an atomic snoop request packet from our peer.
Definition: base.cc:2632
gem5::BaseCache::CacheStats::overallMissRate
statistics::Formula overallMissRate
The miss rate for all accesses.
Definition: base.hh:1077
gem5::WriteQueueEntry
Write queue entry.
Definition: write_queue_entry.hh:67
gem5::BaseCache::schedMemSideSendEvent
void schedMemSideSendEvent(Tick time)
Schedule a send event for the memory-side port.
Definition: base.hh:1270
gem5::WriteAllocator::noAllocateLimit
const uint32_t noAllocateLimit
Definition: base.hh:1480
gem5::ProbePointArg
ProbePointArg generates a point for the class of Arg.
Definition: thermal_domain.hh:54
gem5::EventFunctionWrapper
Definition: eventq.hh:1136
gem5::BaseCache::maintainClusivity
void maintainClusivity(bool from_cache, CacheBlk *blk)
Maintain the clusivity of this cache by potentially invalidating a block.
Definition: base.cc:1499
gem5::BaseCache::isReadOnly
const bool isReadOnly
Is this cache read only, for example the instruction cache, or table-walker cache.
Definition: base.hh:939
gem5::BaseCache::CacheReqPacketQueue::sendDeferredPacket
virtual void sendDeferredPacket()
Override the normal sendDeferredPacket and do not only consider the transmit list (used for responses...
Definition: base.cc:2653
gem5::BaseCache::noTargetMSHR
MSHR * noTargetMSHR
Pointer to the MSHR that has no targets.
Definition: base.hh:970
gem5::BaseCache::CacheStats::demandAvgMissLatency
statistics::Formula demandAvgMissLatency
The average miss latency for demand misses.
Definition: base.hh:1080
gem5::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:931
gem5::WriteQueue
A write queue for all eviction packets, i.e.
Definition: write_queue.hh:60
write_queue.hh
gem5::BaseCache::memInvalidate
virtual void memInvalidate() override
Invalidates all blocks in the cache.
Definition: base.cc:1795
gem5::BaseCache::CacheCmdStats::CacheCmdStats
CacheCmdStats(BaseCache &c, const std::string &name)
Definition: base.cc:2026
gem5::BaseCache::regProbePoints
void regProbePoints() override
Registers probes.
Definition: base.cc:2508
gem5::BaseCache::CacheStats::overallMshrMissLatency
statistics::Formula overallMshrMissLatency
Total tick latency of overall MSHR misses.
Definition: base.hh:1111
gem5::BaseCache::CacheStats::demandMshrMisses
statistics::Formula demandMshrMisses
Demand misses that miss in the MSHRs.
Definition: base.hh:1101
cache_blk.hh
gem5::BaseCache::DataUpdate::addr
Addr addr
The updated block's address.
Definition: base.hh:126
gem5::Port
Ports are used to interface objects to each other.
Definition: port.hh:61
gem5::BaseCache::isDirty
bool isDirty() const
Determine if there are any dirty blocks in the cache.
Definition: base.cc:1801
gem5::BaseCache::CacheStats::cmdStats
CacheCmdStats & cmdStats(const PacketPtr p)
Definition: base.hh:1044
gem5::BaseCache::allocateBlock
CacheBlk * allocateBlock(const PacketPtr pkt, PacketList &writebacks)
Allocate a new block and perform any necessary writebacks.
Definition: base.cc:1607
types.hh
gem5::BaseCache::CacheStats::dataContractions
statistics::Scalar dataContractions
Number of data contractions (blocks that had their compression factor improved).
Definition: base.hh:1139
qport.hh
gem5::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:219
gem5::BaseCache::recvTimingSnoopReq
virtual void recvTimingSnoopReq(PacketPtr pkt)=0
Snoops bus transactions to maintain coherence.
gem5::BaseCache::fillLatency
const Cycles fillLatency
The latency to fill a cache block.
Definition: base.hh:906
clocked_object.hh
gem5::BaseCache::handleTimingReqHit
virtual void handleTimingReqHit(PacketPtr pkt, CacheBlk *blk, Tick request_time)
Definition: base.cc:225
gem5::BaseCache::evictBlock
virtual PacketPtr evictBlock(CacheBlk *blk)=0
Evict a cache block.
gem5::BaseCache::addrRanges
const AddrRangeList addrRanges
The address range to which the cache responds on the CPU side.
Definition: base.hh:978
gem5::BaseCache::CacheStats::avgBlocked
statistics::Formula avgBlocked
The average number of cycles blocked for each blocked cause.
Definition: base.hh:1090
gem5::BaseCache::system
System * system
System we are currently operating in.
Definition: base.hh:982
gem5::WriteAllocator::delay
bool delay(Addr blk_addr)
Access whether we need to delay the current write.
Definition: base.hh:1423
gem5::BaseCache::mshrQueue
MSHRQueue mshrQueue
Miss status registers.
Definition: base.hh:340
gem5::BaseCache::memSidePort
MemSidePort memSidePort
Definition: base.hh:335
gem5::CacheBlk::wasPrefetched
bool wasPrefetched() const
Check if this block was the result of a hardware prefetch, yet to be touched.
Definition: cache_blk.hh:249
gem5::BaseCache::handleUncacheableWriteResp
void handleUncacheableWriteResp(PacketPtr pkt)
Handling the special case of uncacheable write responses to make recvTimingResp less cluttered.
Definition: base.cc:477
gem5::BaseCache::getAddrRanges
const AddrRangeList & getAddrRanges() const
Definition: base.hh:1167
gem5::statistics::Counter
double Counter
All counters are of 64-bit values.
Definition: types.hh:46
gem5::BaseCache::writebackClean
const bool writebackClean
Determine if clean lines should be written back or not.
Definition: base.hh:671
gem5::MemCmd::WriteReq
@ WriteReq
Definition: packet.hh:90
gem5::BaseCache::CacheCmdStats::mshrUncacheableLatency
statistics::Vector mshrUncacheableLatency
Total tick latency of each MSHR miss, per command and thread.
Definition: base.hh:1029
gem5::BaseCache::CacheStats::demandHits
statistics::Formula demandHits
Number of hits for demand accesses.
Definition: base.hh:1051
gem5::QueueEntry
A queue entry base class, to be used by both the MSHRs and write-queue entries.
Definition: queue_entry.hh:62
gem5::statistics::Group
Statistics container.
Definition: group.hh:92
gem5::MSHRQueue
A Class for maintaining a list of pending and allocated memory requests.
Definition: mshr_queue.hh:61
gem5::BaseCache::CacheResponsePort::blocked
bool blocked
Definition: base.hh:296
gem5::BaseCache::CacheStats::demandMshrMissRate
statistics::Formula demandMshrMissRate
The demand miss rate in the MSHRs.
Definition: base.hh:1117
gem5::BaseCache::invalidateVisitor
void invalidateVisitor(CacheBlk &blk)
Cache block visitor that invalidates all blocks in the cache.
Definition: base.cc:1837
gem5::BaseCache::writebackTempBlockAtomic
void writebackTempBlockAtomic()
Send the outstanding tempBlock writeback.
Definition: base.hh:687
gem5::BaseCache::getNextQueueEntry
QueueEntry * getNextQueueEntry()
Return the next queue entry to service, either a pending miss from the MSHR queue,...
Definition: base.cc:850
gem5::ReqPacketQueue
Definition: packet_queue.hh:226
gem5::BaseCache::inCache
bool inCache(Addr addr, bool is_secure) const
Definition: base.hh:1275
gem5::BaseCache::serviceMSHRTargets
virtual void serviceMSHRTargets(MSHR *mshr, const PacketPtr pkt, CacheBlk *blk)=0
Service non-deferred MSHR targets using the received response.
gem5::BaseCache::lookupLatency
const Cycles lookupLatency
The latency of tag lookup of a cache.
Definition: base.hh:890
gem5::CheckpointOut
std::ostream CheckpointOut
Definition: serialize.hh:66
gem5::BaseCache::allocateMissBuffer
MSHR * allocateMissBuffer(PacketPtr pkt, Tick time, bool sched_send=true)
Definition: base.hh:1169
gem5::WriteAllocator::coalesce
bool coalesce() const
Should writes be coalesced? This is true if the mode is set to NO_ALLOCATE.
Definition: base.hh:1392
gem5::BaseTags::findBlock
virtual CacheBlk * findBlock(Addr addr, bool is_secure) const
Finds the block in the cache without touching it.
Definition: base.cc:80
gem5::BaseCache::CacheStats::demandMshrMissLatency
statistics::Formula demandMshrMissLatency
Total tick latency of demand MSHR misses.
Definition: base.hh:1109
trace.hh
gem5::BaseCache::doWritebacks
virtual void doWritebacks(PacketList &writebacks, Tick forward_time)=0
Insert writebacks into the write buffer.
gem5::MemCmd::isLLSC
bool isLLSC() const
Definition: packet.hh:251
gem5::BaseCache::setBlocked
void setBlocked(BlockedCause cause)
Marks the access path of the cache as blocked for the given cause.
Definition: base.hh:1232
mshr_queue.hh
gem5::BaseCache::CacheStats::demandAvgMshrMissLatency
statistics::Formula demandAvgMshrMissLatency
The average latency of a demand MSHR miss.
Definition: base.hh:1122
gem5::PacketQueue::label
const std::string label
Label to use for print request packets label stack.
Definition: packet_queue.hh:110
gem5::WriteAllocator::delayThreshold
const uint32_t delayThreshold
The number of times the allocator will delay an WriteReq MSHR.
Definition: base.hh:1484
std::list< AddrRange >
gem5::BaseCache::CacheStats
Definition: base.hh:1038
gem5::BaseCache::writebackVisitor
void writebackVisitor(CacheBlk &blk)
Cache block visitor that writes back dirty cache blocks using functional writes.
Definition: base.cc:1814
gem5::BaseCache::CacheCmdStats
Definition: base.hh:984
gem5::BaseCache::numTarget
const int numTarget
The number of targets for each MSHR.
Definition: base.hh:921
gem5::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.
gem5::BaseCache::CacheStats::demandMisses
statistics::Formula demandMisses
Number of misses for demand accesses.
Definition: base.hh:1060
gem5::SnoopRespPacketQueue
Definition: packet_queue.hh:262
probe.hh
gem5::BaseCache::functionalAccess
virtual void functionalAccess(PacketPtr pkt, bool from_cpu_side)
Performs the access specified by the request.
Definition: base.cc:715
gem5::BaseCache::CacheResponsePort::sendRetryEvent
EventFunctionWrapper sendRetryEvent
Definition: base.hh:304
gem5::BaseCache::handleEvictions
bool handleEvictions(std::vector< CacheBlk * > &evict_blks, PacketList &writebacks)
Try to evict the given blocks.
Definition: base.cc:941
gem5::BaseTags
A common base class of Cache tagstore objects.
Definition: base.hh:73
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition: gpu_translation_state.hh:37
gem5::BaseCache::CacheStats::demandMissLatency
statistics::Formula demandMissLatency
Total number of ticks spent waiting for demand misses.
Definition: base.hh:1065
gem5::BaseCache::CacheCmdStats::cache
const BaseCache & cache
Definition: base.hh:996
gem5::MemCmd::isPrefetch
bool isPrefetch() const
Definition: packet.hh:255
gem5::BaseCache::CacheReqPacketQueue::CacheReqPacketQueue
CacheReqPacketQueue(BaseCache &cache, RequestPort &port, SnoopRespPacketQueue &snoop_resp_queue, const std::string &label)
Definition: base.hh:198
gem5::BaseCache::MemSidePort::_snoopRespQueue
SnoopRespPacketQueue _snoopRespQueue
Definition: base.hh:244
gem5::BaseCache::forwardLatency
const Cycles forwardLatency
This is the forward latency of the cache.
Definition: base.hh:903
gem5::BaseCache::nextQueueReadyTime
Tick nextQueueReadyTime() const
Find next request ready time from among possible sources.
Definition: base.cc:1850
gem5::BaseCache::CacheCmdStats::avgMissLatency
statistics::Formula avgMissLatency
The average miss latency per command and thread.
Definition: base.hh:1019
gem5::QueueEntry::inService
bool inService
True if the entry has been sent downstream.
Definition: queue_entry.hh:110
gem5::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:2595
gem5::BaseCache::CacheStats::overallAvgMshrUncacheableLatency
statistics::Formula overallAvgMshrUncacheableLatency
The average overall latency of an MSHR miss.
Definition: base.hh:1127
gem5::prefetch::Base
Definition: base.hh:71
gem5::BaseCache::CpuSidePort::recvAtomic
virtual Tick recvAtomic(PacketPtr pkt) override
Receive an atomic request packet from the peer.
Definition: base.cc:2570
gem5::BaseCache::BlockedCause
BlockedCause
Reasons for caches to be blocked.
Definition: base.hh:110
write_queue_entry.hh
gem5::WriteAllocator
The write allocator inspects write packets and detects streaming patterns.
Definition: base.hh:1374
gem5::MemCmd::WriteLineReq
@ WriteLineReq
Definition: packet.hh:102
gem5::BaseCache::CacheReqPacketQueue
Override the default behaviour of sendDeferredPacket to enable the memory-side cache port to also sen...
Definition: base.hh:188
gem5::BaseCache::handleFill
CacheBlk * handleFill(PacketPtr pkt, CacheBlk *blk, PacketList &writebacks, bool allocate)
Handle a fill operation caused by a received packet.
Definition: base.cc:1511
gem5::Named::_name
const std::string _name
Definition: named.hh:41
gem5::BaseCache::CacheStats::CacheStats
CacheStats(BaseCache &c)
Definition: base.cc:2199
gem5::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:1196
gem5::BaseCache::writebackBlk
PacketPtr writebackBlk(CacheBlk *blk)
Create a writeback request for the given block.
Definition: base.cc:1693
gem5::BaseCache::CpuSidePort::tryTiming
virtual bool tryTiming(PacketPtr pkt) override
Availability request from the peer.
Definition: base.cc:2537
gem5::BaseCache::markInService
void markInService(WriteQueueEntry *entry)
Definition: base.hh:414
gem5::WriteAllocator::resetDelay
void resetDelay(Addr blk_addr)
Clear delay counter for the input block.
Definition: base.hh:1437
gem5::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:1089
gem5::X86ISA::addr
Bitfield< 3 > addr
Definition: types.hh:84
gem5::BaseCache::CacheStats::overallMshrUncacheableLatency
statistics::Formula overallMshrUncacheableLatency
Total tick latency of overall MSHR misses.
Definition: base.hh:1114
eventq.hh
gem5::BaseCache::responseLatency
const Cycles responseLatency
The latency of sending reponse to its upper level cache/core on a linefill.
Definition: base.hh:913
gem5::BaseCache::compressor
compression::Base * compressor
Compression method being used.
Definition: base.hh:349

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