gem5  v20.1.0.0
packet.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012-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) 2006 The Regents of The University of Michigan
15  * Copyright (c) 2010,2015 Advanced Micro Devices, Inc.
16  * All rights reserved.
17  *
18  * Redistribution and use in source and binary forms, with or without
19  * modification, are permitted provided that the following conditions are
20  * met: redistributions of source code must retain the above copyright
21  * notice, this list of conditions and the following disclaimer;
22  * redistributions in binary form must reproduce the above copyright
23  * notice, this list of conditions and the following disclaimer in the
24  * documentation and/or other materials provided with the distribution;
25  * neither the name of the copyright holders nor the names of its
26  * contributors may be used to endorse or promote products derived from
27  * this software without specific prior written permission.
28  *
29  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
30  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
31  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
32  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
33  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
34  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
35  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
36  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
37  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
38  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
39  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40  */
41 
47 #ifndef __MEM_PACKET_HH__
48 #define __MEM_PACKET_HH__
49 
50 #include <bitset>
51 #include <cassert>
52 #include <list>
53 
54 #include "base/addr_range.hh"
55 #include "base/cast.hh"
56 #include "base/compiler.hh"
57 #include "base/flags.hh"
58 #include "base/logging.hh"
59 #include "base/printable.hh"
60 #include "base/types.hh"
61 #include "mem/htm.hh"
62 #include "mem/request.hh"
63 #include "sim/core.hh"
64 
65 class Packet;
66 typedef Packet *PacketPtr;
67 typedef uint8_t* PacketDataPtr;
69 typedef uint64_t PacketId;
70 
71 class MemCmd
72 {
73  friend class Packet;
74 
75  public:
79  enum Command
80  {
90  WriteClean, // writes dirty data below without evicting
99  SCUpgradeReq, // Special "weak" upgrade for StoreCond
101  SCUpgradeFailReq, // Failed SCUpgradeReq in MSHR (never sent)
102  UpgradeFailResp, // Valid for SCUpgradeReq only
109  StoreCondFailReq, // Failed StoreCondReq in MSHR (never sent)
113  // MessageReq and MessageResp are deprecated.
115  MemSyncReq, // memory synchronization request (e.g., cache invalidate)
116  MemSyncResp, // memory synchronization response
122  // Error responses
123  // @TODO these should be classified as responses rather than
124  // requests; coding them as requests initially for backwards
125  // compatibility
126  InvalidDestError, // packet dest field invalid
127  BadAddressError, // memory address invalid
128  FunctionalReadError, // unable to fulfill functional read
129  FunctionalWriteError, // unable to fulfill functional write
130  // Fake simulator-only commands
131  PrintReq, // Print state matching address
132  FlushReq, //request for a cache flush
133  InvalidateReq, // request for address to be invalidated
135  // hardware transactional memory
140  };
141 
142  private:
147  {
167  };
168 
173  struct CommandInfo
174  {
176  const std::bitset<NUM_COMMAND_ATTRIBUTES> attributes;
181  const std::string str;
182  };
183 
185  static const CommandInfo commandInfo[];
186 
187  private:
188 
190 
191  bool
193  {
194  return commandInfo[cmd].attributes[attrib] != 0;
195  }
196 
197  public:
198 
199  bool isRead() const { return testCmdAttrib(IsRead); }
200  bool isWrite() const { return testCmdAttrib(IsWrite); }
201  bool isUpgrade() const { return testCmdAttrib(IsUpgrade); }
202  bool isRequest() const { return testCmdAttrib(IsRequest); }
203  bool isResponse() const { return testCmdAttrib(IsResponse); }
204  bool needsWritable() const { return testCmdAttrib(NeedsWritable); }
205  bool needsResponse() const { return testCmdAttrib(NeedsResponse); }
206  bool isInvalidate() const { return testCmdAttrib(IsInvalidate); }
207  bool isEviction() const { return testCmdAttrib(IsEviction); }
208  bool isClean() const { return testCmdAttrib(IsClean); }
209  bool fromCache() const { return testCmdAttrib(FromCache); }
210 
214  bool isWriteback() const { return testCmdAttrib(IsEviction) &&
216 
222  bool hasData() const { return testCmdAttrib(HasData); }
223  bool isLLSC() const { return testCmdAttrib(IsLlsc); }
224  bool isSWPrefetch() const { return testCmdAttrib(IsSWPrefetch); }
225  bool isHWPrefetch() const { return testCmdAttrib(IsHWPrefetch); }
226  bool isPrefetch() const { return testCmdAttrib(IsSWPrefetch) ||
228  bool isError() const { return testCmdAttrib(IsError); }
229  bool isPrint() const { return testCmdAttrib(IsPrint); }
230  bool isFlush() const { return testCmdAttrib(IsFlush); }
231 
232  Command
234  {
235  return commandInfo[cmd].response;
236  }
237 
239  const std::string &toString() const { return commandInfo[cmd].str; }
240  int toInt() const { return (int)cmd; }
241 
242  MemCmd(Command _cmd) : cmd(_cmd) { }
243  MemCmd(int _cmd) : cmd((Command)_cmd) { }
245 
246  bool operator==(MemCmd c2) const { return (cmd == c2.cmd); }
247  bool operator!=(MemCmd c2) const { return (cmd != c2.cmd); }
248 };
249 
257 class Packet : public Printable
258 {
259  public:
260  typedef uint32_t FlagsType;
261  typedef ::Flags<FlagsType> Flags;
262 
263  private:
264 
265  enum : FlagsType {
266  // Flags to transfer across when copying a packet
267  COPY_FLAGS = 0x000000FF,
268 
269  // Flags that are used to create reponse packets
270  RESPONDER_FLAGS = 0x00000009,
271 
272  // Does this packet have sharers (which means it should not be
273  // considered writable) or not. See setHasSharers below.
274  HAS_SHARERS = 0x00000001,
275 
276  // Special control flags
278  EXPRESS_SNOOP = 0x00000002,
279 
284 
285  // Snoop co-ordination flag to indicate that a cache is
286  // responding to a snoop. See setCacheResponding below.
287  CACHE_RESPONDING = 0x00000008,
288 
289  // The writeback/writeclean should be propagated further
290  // downstream by the receiver
291  WRITE_THROUGH = 0x00000010,
292 
293  // Response co-ordination flag for cache maintenance
294  // operations
295  SATISFIED = 0x00000020,
296 
297  // hardware transactional memory
298 
299  // Indicates that this packet/request has returned from the
300  // cache hierarchy in a failed transaction. The core is
301  // notified like this.
302  FAILS_TRANSACTION = 0x00000040,
303 
304  // Indicates that this packet/request originates in the CPU executing
305  // in transactional mode, i.e. in a transaction.
306  FROM_TRANSACTION = 0x00000080,
307 
309  VALID_ADDR = 0x00000100,
310  VALID_SIZE = 0x00000200,
311 
314  STATIC_DATA = 0x00001000,
318  DYNAMIC_DATA = 0x00002000,
319 
322  SUPPRESS_FUNC_ERROR = 0x00008000,
323 
324  // Signal block present to squash prefetch and cache evict packets
325  // through express snoop flag
326  BLOCK_CACHED = 0x00010000
327  };
328 
330 
331  public:
333 
336 
337  const PacketId id;
338 
341 
342  private:
351 
355 
357  bool _isSecure;
358 
360  unsigned size;
361 
366 
367  // Quality of Service priority value
368  uint8_t _qosValue;
369 
370  // hardware transactional memory
371 
378 
384 
385  public:
386 
394  uint32_t headerDelay;
395 
402  uint32_t snoopDelay;
403 
412  uint32_t payloadDelay;
413 
431  struct SenderState
432  {
435  virtual ~SenderState() {}
436  };
437 
442  class PrintReqState : public SenderState
443  {
444  private:
449  {
450  const std::string label;
451  std::string *prefix;
453  LabelStackEntry(const std::string &_label, std::string *_prefix);
454  };
455 
458 
459  std::string *curPrefixPtr;
460 
461  public:
462  std::ostream &os;
463  const int verbosity;
464 
465  PrintReqState(std::ostream &os, int verbosity = 0);
466  ~PrintReqState();
467 
471  const std::string &curPrefix() { return *curPrefixPtr; }
472 
478  void pushLabel(const std::string &lbl,
479  const std::string &prefix = " ");
480 
484  void popLabel();
485 
491  void printLabels();
492 
497  void printObj(Printable *obj);
498  };
499 
509 
518  void pushSenderState(SenderState *sender_state);
519 
529 
537  template <typename T>
539  {
540  T *t = NULL;
541  SenderState* sender_state = senderState;
542  while (t == NULL && sender_state != NULL) {
543  t = dynamic_cast<T*>(sender_state);
544  sender_state = sender_state->predecessor;
545  }
546  return t;
547  }
548 
551  const std::string &cmdString() const { return cmd.toString(); }
552 
554  inline int cmdToIndex() const { return cmd.toInt(); }
555 
556  bool isRead() const { return cmd.isRead(); }
557  bool isWrite() const { return cmd.isWrite(); }
558  bool isUpgrade() const { return cmd.isUpgrade(); }
559  bool isRequest() const { return cmd.isRequest(); }
560  bool isResponse() const { return cmd.isResponse(); }
561  bool needsWritable() const
562  {
563  // we should never check if a response needsWritable, the
564  // request has this flag, and for a response we should rather
565  // look at the hasSharers flag (if not set, the response is to
566  // be considered writable)
567  assert(isRequest());
568  return cmd.needsWritable();
569  }
570  bool needsResponse() const { return cmd.needsResponse(); }
571  bool isInvalidate() const { return cmd.isInvalidate(); }
572  bool isEviction() const { return cmd.isEviction(); }
573  bool isClean() const { return cmd.isClean(); }
574  bool fromCache() const { return cmd.fromCache(); }
575  bool isWriteback() const { return cmd.isWriteback(); }
576  bool hasData() const { return cmd.hasData(); }
577  bool hasRespData() const
578  {
579  MemCmd resp_cmd = cmd.responseCommand();
580  return resp_cmd.hasData();
581  }
582  bool isLLSC() const { return cmd.isLLSC(); }
583  bool isError() const { return cmd.isError(); }
584  bool isPrint() const { return cmd.isPrint(); }
585  bool isFlush() const { return cmd.isFlush(); }
586 
587  bool isWholeLineWrite(unsigned blk_size)
588  {
589  return (cmd == MemCmd::WriteReq || cmd == MemCmd::WriteLineReq) &&
590  getOffset(blk_size) == 0 && getSize() == blk_size;
591  }
592 
594 
614  {
615  assert(isRequest());
616  assert(!flags.isSet(CACHE_RESPONDING));
618  }
619  bool cacheResponding() const { return flags.isSet(CACHE_RESPONDING); }
646  bool hasSharers() const { return flags.isSet(HAS_SHARERS); }
648 
662  bool isExpressSnoop() const { return flags.isSet(EXPRESS_SNOOP); }
663 
674  {
675  assert(cacheResponding());
676  assert(!responderHadWritable());
678  }
679  bool responderHadWritable() const
680  { return flags.isSet(RESPONDER_HAD_WRITABLE); }
681 
689  void copyResponderFlags(const PacketPtr pkt);
690 
696  {
697  assert(cmd.isWrite() &&
700  }
702  bool writeThrough() const { return flags.isSet(WRITE_THROUGH); }
703 
710  {
711  assert(cmd.isClean());
712  assert(!flags.isSet(SATISFIED));
714  }
715  bool satisfied() const { return flags.isSet(SATISFIED); }
716 
720  bool isBlockCached() const { return flags.isSet(BLOCK_CACHED); }
722 
729  inline uint8_t qosValue() const { return _qosValue; }
730 
737  inline void qosValue(const uint8_t qos_value)
738  { _qosValue = qos_value; }
739 
740  inline RequestorID requestorId() const { return req->requestorId(); }
741 
742  // Network error conditions... encapsulate them as methods since
743  // their encoding keeps changing (from result field to command
744  // field, etc.)
745  void
747  {
748  assert(isResponse());
750  }
751 
752  void copyError(Packet *pkt) { assert(pkt->isError()); cmd = pkt->cmd; }
753 
754  Addr getAddr() const { assert(flags.isSet(VALID_ADDR)); return addr; }
762  void setAddr(Addr _addr) { assert(flags.isSet(VALID_ADDR)); addr = _addr; }
763 
764  unsigned getSize() const { assert(flags.isSet(VALID_SIZE)); return size; }
765 
771  AddrRange getAddrRange() const;
772 
773  Addr getOffset(unsigned int blk_size) const
774  {
775  return getAddr() & Addr(blk_size - 1);
776  }
777 
778  Addr getBlockAddr(unsigned int blk_size) const
779  {
780  return getAddr() & ~(Addr(blk_size - 1));
781  }
782 
783  bool isSecure() const
784  {
785  assert(flags.isSet(VALID_ADDR));
786  return _isSecure;
787  }
788 
792  AtomicOpFunctor *getAtomicOp() const { return req->getAtomicOpFunctor(); }
793  bool isAtomicOp() const { return req->isAtomic(); }
794 
799  void
801  {
802  assert(isLLSC());
803  assert(isWrite());
805  }
806 
811  void
813  {
814  assert(isLLSC());
815  assert(isRead());
817  }
818 
824  Packet(const RequestPtr &_req, MemCmd _cmd)
825  : cmd(_cmd), id((PacketId)_req.get()), req(_req),
826  data(nullptr), addr(0), _isSecure(false), size(0),
827  _qosValue(0),
830  headerDelay(0), snoopDelay(0),
831  payloadDelay(0), senderState(NULL)
832  {
833  flags.clear();
834  if (req->hasPaddr()) {
835  addr = req->getPaddr();
837  _isSecure = req->isSecure();
838  }
839 
850  if (req->isHTMCmd()) {
852  assert(addr == 0x0);
853  }
854  if (req->hasSize()) {
855  size = req->getSize();
857  }
858  }
859 
865  Packet(const RequestPtr &_req, MemCmd _cmd, int _blkSize, PacketId _id = 0)
866  : cmd(_cmd), id(_id ? _id : (PacketId)_req.get()), req(_req),
867  data(nullptr), addr(0), _isSecure(false),
868  _qosValue(0),
871  headerDelay(0),
872  snoopDelay(0), payloadDelay(0), senderState(NULL)
873  {
874  flags.clear();
875  if (req->hasPaddr()) {
876  addr = req->getPaddr() & ~(_blkSize - 1);
878  _isSecure = req->isSecure();
879  }
880  size = _blkSize;
882  }
883 
891  Packet(const PacketPtr pkt, bool clear_flags, bool alloc_data)
892  : cmd(pkt->cmd), id(pkt->id), req(pkt->req),
893  data(nullptr),
894  addr(pkt->addr), _isSecure(pkt->_isSecure), size(pkt->size),
895  bytesValid(pkt->bytesValid),
896  _qosValue(pkt->qosValue()),
899  headerDelay(pkt->headerDelay),
900  snoopDelay(0),
903  {
904  if (!clear_flags)
905  flags.set(pkt->flags & COPY_FLAGS);
906 
907  flags.set(pkt->flags & (VALID_ADDR|VALID_SIZE));
908 
909  if (pkt->isHtmTransactional())
911 
912  if (pkt->htmTransactionFailedInCache()) {
915  );
916  }
917 
918  // should we allocate space for data, or not, the express
919  // snoops do not need to carry any data as they only serve to
920  // co-ordinate state changes
921  if (alloc_data) {
922  // even if asked to allocate data, if the original packet
923  // holds static data, then the sender will not be doing
924  // any memcpy on receiving the response, thus we simply
925  // carry the pointer forward
926  if (pkt->flags.isSet(STATIC_DATA)) {
927  data = pkt->data;
929  } else {
930  allocate();
931  }
932  }
933  }
934 
938  static MemCmd
940  {
941  if (req->isHTMCmd()) {
942  if (req->isHTMAbort())
943  return MemCmd::HTMAbort;
944  else
945  return MemCmd::HTMReq;
946  } else if (req->isLLSC())
947  return MemCmd::LoadLockedReq;
948  else if (req->isPrefetchEx())
949  return MemCmd::SoftPFExReq;
950  else if (req->isPrefetch())
951  return MemCmd::SoftPFReq;
952  else
953  return MemCmd::ReadReq;
954  }
955 
959  static MemCmd
961  {
962  if (req->isLLSC())
963  return MemCmd::StoreCondReq;
964  else if (req->isSwap() || req->isAtomic())
965  return MemCmd::SwapReq;
966  else if (req->isCacheInvalidate()) {
967  return req->isCacheClean() ? MemCmd::CleanInvalidReq :
969  } else if (req->isCacheClean()) {
970  return MemCmd::CleanSharedReq;
971  } else
972  return MemCmd::WriteReq;
973  }
974 
979  static PacketPtr
981  {
982  return new Packet(req, makeReadCmd(req));
983  }
984 
985  static PacketPtr
987  {
988  return new Packet(req, makeWriteCmd(req));
989  }
990 
995  {
996  deleteData();
997  }
998 
1003  void
1005  {
1006  assert(needsResponse());
1007  assert(isRequest());
1008  cmd = cmd.responseCommand();
1009 
1010  // responses are never express, even if the snoop that
1011  // triggered them was
1013  }
1014 
1015  void
1017  {
1018  makeResponse();
1019  }
1020 
1021  void
1023  {
1024  makeResponse();
1025  }
1026 
1027  void
1029  {
1030  if (!success) {
1031  if (isWrite()) {
1033  } else {
1035  }
1036  }
1037  }
1038 
1039  void
1040  setSize(unsigned size)
1041  {
1042  assert(!flags.isSet(VALID_SIZE));
1043 
1044  this->size = size;
1045  flags.set(VALID_SIZE);
1046  }
1047 
1057  bool matchBlockAddr(const Addr addr, const bool is_secure,
1058  const int blk_size) const;
1059 
1068  bool matchBlockAddr(const PacketPtr pkt, const int blk_size) const;
1069 
1077  bool matchAddr(const Addr addr, const bool is_secure) const;
1078 
1086  bool matchAddr(const PacketPtr pkt) const;
1087 
1088  public:
1105  template <typename T>
1106  void
1108  {
1110  data = (PacketDataPtr)p;
1112  }
1113 
1122  template <typename T>
1123  void
1124  dataStaticConst(const T *p)
1125  {
1127  data = const_cast<PacketDataPtr>(p);
1129  }
1130 
1143  template <typename T>
1144  void
1146  {
1148  data = (PacketDataPtr)p;
1150  }
1151 
1155  template <typename T>
1156  T*
1158  {
1160  assert(!isMaskedWrite());
1161  return (T*)data;
1162  }
1163 
1164  template <typename T>
1165  const T*
1166  getConstPtr() const
1167  {
1169  return (const T*)data;
1170  }
1171 
1176  template <typename T>
1177  T getBE() const;
1178 
1183  template <typename T>
1184  T getLE() const;
1185 
1190  template <typename T>
1191  T get(ByteOrder endian) const;
1192 
1194  template <typename T>
1195  void setBE(T v);
1196 
1198  template <typename T>
1199  void setLE(T v);
1200 
1205  template <typename T>
1206  void set(T v, ByteOrder endian);
1207 
1212  uint64_t getUintX(ByteOrder endian) const;
1213 
1219  void setUintX(uint64_t w, ByteOrder endian);
1220 
1224  void
1225  setData(const uint8_t *p)
1226  {
1227  // we should never be copying data onto itself, which means we
1228  // must idenfity packets with static data, as they carry the
1229  // same pointer from source to destination and back
1230  assert(p != getPtr<uint8_t>() || flags.isSet(STATIC_DATA));
1231 
1232  if (p != getPtr<uint8_t>()) {
1233  // for packet with allocated dynamic data, we copy data from
1234  // one to the other, e.g. a forwarded response to a response
1235  std::memcpy(getPtr<uint8_t>(), p, getSize());
1236  }
1237  }
1238 
1243  void
1244  setDataFromBlock(const uint8_t *blk_data, int blkSize)
1245  {
1246  setData(blk_data + getOffset(blkSize));
1247  }
1248 
1253  void
1254  writeData(uint8_t *p) const
1255  {
1256  if (!isMaskedWrite()) {
1257  std::memcpy(p, getConstPtr<uint8_t>(), getSize());
1258  } else {
1259  assert(req->getByteEnable().size() == getSize());
1260  // Write only the enabled bytes
1261  const uint8_t *base = getConstPtr<uint8_t>();
1262  for (int i = 0; i < getSize(); i++) {
1263  if (req->getByteEnable()[i]) {
1264  p[i] = *(base + i);
1265  }
1266  // Disabled bytes stay untouched
1267  }
1268  }
1269  }
1270 
1277  void
1278  writeDataToBlock(uint8_t *blk_data, int blkSize) const
1279  {
1280  writeData(blk_data + getOffset(blkSize));
1281  }
1282 
1287  void
1289  {
1290  if (flags.isSet(DYNAMIC_DATA))
1291  delete [] data;
1292 
1294  data = NULL;
1295  }
1296 
1298  void
1300  {
1301  // if either this command or the response command has a data
1302  // payload, actually allocate space
1303  if (hasData() || hasRespData()) {
1306  data = new uint8_t[getSize()];
1307  }
1308  }
1309 
1313  template <typename T>
1314  T getRaw() const;
1315 
1317  template <typename T>
1318  void setRaw(T v);
1319 
1320  public:
1330  bool
1332  {
1333  if (other->isMaskedWrite()) {
1334  // Do not forward data if overlapping with a masked write
1335  if (_isSecure == other->isSecure() &&
1336  getAddr() <= (other->getAddr() + other->getSize() - 1) &&
1337  other->getAddr() <= (getAddr() + getSize() - 1)) {
1338  warn("Trying to check against a masked write, skipping."
1339  " (addr: 0x%x, other addr: 0x%x)", getAddr(),
1340  other->getAddr());
1341  }
1342  return false;
1343  }
1344  // all packets that are carrying a payload should have a valid
1345  // data pointer
1346  return trySatisfyFunctional(other, other->getAddr(), other->isSecure(),
1347  other->getSize(),
1348  other->hasData() ?
1349  other->getPtr<uint8_t>() : NULL);
1350  }
1351 
1356  bool
1358  {
1359  return cmd == MemCmd::HardPFReq || isEviction();
1360  }
1361 
1366  bool
1368  {
1370  }
1371 
1372  bool
1374  {
1375  return (cmd == MemCmd::WriteReq && req->isMasked());
1376  }
1377 
1385  bool
1386  trySatisfyFunctional(Printable *obj, Addr base, bool is_secure, int size,
1387  uint8_t *_data);
1388 
1392  void
1393  pushLabel(const std::string &lbl)
1394  {
1395  if (isPrint())
1396  safe_cast<PrintReqState*>(senderState)->pushLabel(lbl);
1397  }
1398 
1402  void
1404  {
1405  if (isPrint())
1406  safe_cast<PrintReqState*>(senderState)->popLabel();
1407  }
1408 
1409  void print(std::ostream &o, int verbosity = 0,
1410  const std::string &prefix = "") const;
1411 
1418  std::string print() const;
1419 
1420  // hardware transactional memory
1421 
1430  void makeHtmTransactionalReqResponse(const HtmCacheFailure ret_code);
1431 
1436  void setHtmTransactional(uint64_t val);
1437 
1442  bool isHtmTransactional() const;
1443 
1450  uint64_t getHtmTransactionUid() const;
1451 
1457  void setHtmTransactionFailedInCache(const HtmCacheFailure ret_code);
1458 
1464  bool htmTransactionFailedInCache() const;
1465 
1471 };
1472 
1473 #endif //__MEM_PACKET_HH
MemCmd::FunctionalReadError
@ FunctionalReadError
Definition: packet.hh:128
Packet::CACHE_RESPONDING
@ CACHE_RESPONDING
Definition: packet.hh:287
Packet::isError
bool isError() const
Definition: packet.hh:583
Packet::writeThrough
bool writeThrough() const
Definition: packet.hh:702
MemCmd::isClean
bool isClean() const
Definition: packet.hh:208
MemCmd::ReadExResp
@ ReadExResp
Definition: packet.hh:104
Packet::setSuppressFuncError
void setSuppressFuncError()
Definition: packet.hh:717
Packet::makeAtomicResponse
void makeAtomicResponse()
Definition: packet.hh:1016
Packet::getBE
T getBE() const
Get the data in the packet byte swapped from big endian to host endian.
Definition: packet_access.hh:68
MemCmd::SoftPFExReq
@ SoftPFExReq
Definition: packet.hh:93
Packet::PrintReqState::popLabel
void popLabel()
Pop a label off the label stack.
Definition: packet.cc:465
Packet::PrintReqState::LabelStackEntry::prefix
std::string * prefix
Definition: packet.hh:451
Packet::isResponse
bool isResponse() const
Definition: packet.hh:560
MemCmd::WritebackClean
@ WritebackClean
Definition: packet.hh:89
warn
#define warn(...)
Definition: logging.hh:239
MemCmd::isSWPrefetch
bool isSWPrefetch() const
Definition: packet.hh:224
Packet::getAddrRange
AddrRange getAddrRange() const
Get address range to which this packet belongs.
Definition: packet.cc:241
Packet::dataStaticConst
void dataStaticConst(const T *p)
Set the data pointer to the following value that should not be freed.
Definition: packet.hh:1124
MemCmd::CommandInfo::attributes
const std::bitset< NUM_COMMAND_ATTRIBUTES > attributes
Set of attribute flags.
Definition: packet.hh:176
Packet::makeTimingResponse
void makeTimingResponse()
Definition: packet.hh:1022
MemCmd::IsFlush
@ IsFlush
Flush the address from caches.
Definition: packet.hh:164
Flags::noneSet
bool noneSet() const
Definition: flags.hh:83
Packet::cacheResponding
bool cacheResponding() const
Definition: packet.hh:619
Packet::PrintReqState::LabelStackEntry
An entry in the label stack.
Definition: packet.hh:448
Packet::hasSharers
bool hasSharers() const
Definition: packet.hh:646
Packet::satisfied
bool satisfied() const
Definition: packet.hh:715
Packet::PrintReqState::LabelStack
std::list< LabelStackEntry > LabelStack
Definition: packet.hh:456
Packet::PrintReqState::verbosity
const int verbosity
Definition: packet.hh:463
Packet::copyResponderFlags
void copyResponderFlags(const PacketPtr pkt)
Copy the reponse flags from an input packet to this packet.
Definition: packet.cc:322
Packet::getAddr
Addr getAddr() const
Definition: packet.hh:754
Packet::set
void set(T v, ByteOrder endian)
Set the value in the data pointer to v using the specified endianness.
Definition: packet_access.hh:112
Packet::htmReturnReason
HtmCacheFailure htmReturnReason
Holds the return status of the transaction.
Definition: packet.hh:377
MemCmd::HardPFReq
@ HardPFReq
Definition: packet.hh:94
Packet::PrintReqState::~PrintReqState
~PrintReqState()
Definition: packet.cc:441
Packet::writeData
void writeData(uint8_t *p) const
Copy data from the packet to the memory at the provided pointer.
Definition: packet.hh:1254
Packet::setCacheResponding
void setCacheResponding()
Snoop flags.
Definition: packet.hh:613
Packet::isHtmTransactional
bool isHtmTransactional() const
Returns whether or not this packet/request originates in the CPU executing in transactional mode,...
Definition: packet.cc:544
Packet::isExpressSnoop
bool isExpressSnoop() const
Definition: packet.hh:662
Packet::addr
Addr addr
The address of the request.
Definition: packet.hh:354
Packet::responderHadWritable
bool responderHadWritable() const
Definition: packet.hh:679
Packet::convertLlToRead
void convertLlToRead()
When ruby is in use, Ruby will monitor the cache line and the phys memory should treat LL ops as norm...
Definition: packet.hh:812
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:412
ArmISA::i
Bitfield< 7 > i
Definition: miscregs_types.hh:63
MemCmd::IsWrite
@ IsWrite
Data flows from requester to responder.
Definition: packet.hh:149
MemCmd::CommandInfo
Structure that defines attributes and other data associated with a Command.
Definition: packet.hh:173
Flags< FlagsType >
MemCmd::isWriteback
bool isWriteback() const
A writeback is an eviction that carries data.
Definition: packet.hh:214
Packet::setResponderHadWritable
void setResponderHadWritable()
On responding to a snoop request (which only happens for Modified or Owned lines),...
Definition: packet.hh:673
Packet::hasRespData
bool hasRespData() const
Definition: packet.hh:577
Packet::SUPPRESS_FUNC_ERROR
@ SUPPRESS_FUNC_ERROR
suppress the error if this packet encounters a functional access failure.
Definition: packet.hh:322
Packet::setRaw
void setRaw(T v)
Set the value in the data pointer to v without byte swapping.
Definition: packet_access.hh:58
MemCmd::SoftPFResp
@ SoftPFResp
Definition: packet.hh:95
Packet::setHasSharers
void setHasSharers()
On fills, the hasSharers flag is used by the caches in combination with the cacheResponding flag,...
Definition: packet.hh:645
MemCmd::UpgradeReq
@ UpgradeReq
Definition: packet.hh:98
HtmCacheFailure::NO_FAIL
@ NO_FAIL
Packet::setSatisfied
void setSatisfied()
Set when a request hits in a cache and the cache is not going to respond.
Definition: packet.hh:709
Packet::isRead
bool isRead() const
Definition: packet.hh:556
Packet::fromCache
bool fromCache() const
Definition: packet.hh:574
Packet::Packet
Packet(const RequestPtr &_req, MemCmd _cmd)
Constructor.
Definition: packet.hh:824
htm.hh
MemCmd::CleanEvict
@ CleanEvict
Definition: packet.hh:91
MemCmd::ReadReq
@ ReadReq
Definition: packet.hh:82
Packet::SenderState::SenderState
SenderState()
Definition: packet.hh:434
MemCmd::FlushReq
@ FlushReq
Definition: packet.hh:132
PacketDataPtr
uint8_t * PacketDataPtr
Definition: packet.hh:67
Packet::makeReadCmd
static MemCmd makeReadCmd(const RequestPtr &req)
Generate the appropriate read MemCmd based on the Request flags.
Definition: packet.hh:939
Packet::isAtomicOp
bool isAtomicOp() const
Definition: packet.hh:793
Packet::pushLabel
void pushLabel(const std::string &lbl)
Push label for PrintReq (safe to call unconditionally).
Definition: packet.hh:1393
cast.hh
Packet::needsWritable
bool needsWritable() const
Definition: packet.hh:561
Packet::isInvalidate
bool isInvalidate() const
Definition: packet.hh:571
RequestPtr
std::shared_ptr< Request > RequestPtr
Definition: request.hh:82
MemCmd::MemCmd
MemCmd(Command _cmd)
Definition: packet.hh:242
X86ISA::base
Bitfield< 51, 12 > base
Definition: pagetable.hh:141
Packet::req
RequestPtr req
A pointer to the original request.
Definition: packet.hh:340
MemCmd::LoadLockedReq
@ LoadLockedReq
Definition: packet.hh:107
Packet::isEviction
bool isEviction() const
Definition: packet.hh:572
Packet::isLLSC
bool isLLSC() const
Definition: packet.hh:582
Packet::requestorId
RequestorID requestorId() const
Definition: packet.hh:740
Packet::dataDynamic
void dataDynamic(T *p)
Set the data pointer to a value that should have delete [] called on it.
Definition: packet.hh:1145
std::vector< bool >
Packet::print
std::string print() const
A no-args wrapper of print(std::ostream...) meant to be invoked from DPRINTFs avoiding string overhea...
Definition: packet.cc:403
Packet::setBlockCached
void setBlockCached()
Definition: packet.hh:719
Packet::htmTransactionUid
uint64_t htmTransactionUid
A global unique identifier of the transaction.
Definition: packet.hh:383
Packet::getSize
unsigned getSize() const
Definition: packet.hh:764
Packet::data
PacketDataPtr data
A pointer to the data being transferred.
Definition: packet.hh:350
MemCmd::IsEviction
@ IsEviction
Definition: packet.hh:157
MemCmd::HardPFResp
@ HardPFResp
Definition: packet.hh:96
Packet::isRequest
bool isRequest() const
Definition: packet.hh:559
MemCmd::IsSWPrefetch
@ IsSWPrefetch
Definition: packet.hh:158
MemCmd::CommandInfo::response
const Command response
Corresponding response for requests; InvalidCmd if no response is applicable.
Definition: packet.hh:179
MemCmd::MemFenceResp
@ MemFenceResp
Definition: packet.hh:117
Packet::flags
Flags flags
Definition: packet.hh:329
Packet::~Packet
~Packet()
clean up packet variables
Definition: packet.hh:994
PacketPtr
Packet * PacketPtr
Definition: packet.hh:65
Packet::matchBlockAddr
bool matchBlockAddr(const Addr addr, const bool is_secure, const int blk_size) const
Check if packet corresponds to a given block-aligned address and address space.
Definition: packet.cc:410
MemCmd::ReadRespWithInvalidate
@ ReadRespWithInvalidate
Definition: packet.hh:84
MemCmd::isEviction
bool isEviction() const
Definition: packet.hh:207
Packet::convertScToWrite
void convertScToWrite()
It has been determined that the SC packet should successfully update memory.
Definition: packet.hh:800
MemCmd::isFlush
bool isFlush() const
Definition: packet.hh:230
Packet::writeDataToBlock
void writeDataToBlock(uint8_t *blk_data, int blkSize) const
Copy data from the packet to the provided block pointer, which is aligned to the given block size.
Definition: packet.hh:1278
request.hh
Packet::headerDelay
uint32_t headerDelay
The extra delay from seeing the packet until the header is transmitted.
Definition: packet.hh:394
Packet::isSecure
bool isSecure() const
Definition: packet.hh:783
Packet::setData
void setData(const uint8_t *p)
Copy data into the packet from the provided pointer.
Definition: packet.hh:1225
printable.hh
MipsISA::c2
Bitfield< 6 > c2
Definition: pra_constants.hh:238
Packet::setBE
void setBE(T v)
Set the value in the data pointer to v as big endian.
Definition: packet_access.hh:98
Packet::copyError
void copyError(Packet *pkt)
Definition: packet.hh:752
AtomicOpFunctor
Definition: amo.hh:40
MemCmd::IsHWPrefetch
@ IsHWPrefetch
Definition: packet.hh:159
MemCmd::CommandInfo::str
const std::string str
String representation (for printing)
Definition: packet.hh:181
MemCmd::Command
Command
List of all commands associated with a packet.
Definition: packet.hh:79
Packet::PrintReqState::curPrefixPtr
std::string * curPrefixPtr
Definition: packet.hh:459
MemCmd::WriteReq
@ WriteReq
Definition: packet.hh:85
Packet::Packet
Packet(const RequestPtr &_req, MemCmd _cmd, int _blkSize, PacketId _id=0)
Alternate constructor if you are trying to create a packet with a request that is for a whole block,...
Definition: packet.hh:865
Packet::SenderState::~SenderState
virtual ~SenderState()
Definition: packet.hh:435
MemCmd::WriteCompleteResp
@ WriteCompleteResp
Definition: packet.hh:87
MemCmd::InvalidDestError
@ InvalidDestError
Definition: packet.hh:126
RequestorID
uint16_t RequestorID
Definition: request.hh:85
MemCmd::InvalidCmd
@ InvalidCmd
Definition: packet.hh:81
Packet::BLOCK_CACHED
@ BLOCK_CACHED
Definition: packet.hh:326
Packet::qosValue
uint8_t qosValue() const
QoS Value getter Returns 0 if QoS value was never set (constructor default).
Definition: packet.hh:729
MemCmd::SwapReq
@ SwapReq
Definition: packet.hh:111
MemCmd::SoftPFReq
@ SoftPFReq
Definition: packet.hh:92
MemCmd::IsResponse
@ IsResponse
Issue by responder.
Definition: packet.hh:155
MemCmd::WriteLineReq
@ WriteLineReq
Definition: packet.hh:97
MemCmd::isInvalidate
bool isInvalidate() const
Definition: packet.hh:206
MemCmd::isRead
bool isRead() const
Definition: packet.hh:199
Packet::isWholeLineWrite
bool isWholeLineWrite(unsigned blk_size)
Definition: packet.hh:587
MemCmd::IsError
@ IsError
Error response.
Definition: packet.hh:162
Packet::setWriteThrough
void setWriteThrough()
A writeback/writeclean cmd gets propagated further downstream by the receiver when the flag is set.
Definition: packet.hh:695
MemCmd::isLLSC
bool isLLSC() const
Definition: packet.hh:223
Packet::PrintReqState::pushLabel
void pushLabel(const std::string &lbl, const std::string &prefix=" ")
Push a label onto the label stack, and prepend the given prefix string onto the current prefix.
Definition: packet.cc:456
MemCmd::WritebackDirty
@ WritebackDirty
Definition: packet.hh:88
Packet::SenderState
A virtual base opaque structure used to hold state associated with the packet (e.g....
Definition: packet.hh:431
Packet::matchAddr
bool matchAddr(const Addr addr, const bool is_secure) const
Check if packet corresponds to a given address and address space.
Definition: packet.cc:424
MemCmd::HTMReqResp
@ HTMReqResp
Definition: packet.hh:137
Flags::clear
void clear()
Definition: flags.hh:85
MemCmd::CleanSharedResp
@ CleanSharedResp
Definition: packet.hh:119
AddrRange
The AddrRange class encapsulates an address range, and supports a number of tests to check if two ran...
Definition: addr_range.hh:68
MipsISA::w
Bitfield< 0 > w
Definition: pra_constants.hh:278
Packet::PrintReqState::LabelStackEntry::label
const std::string label
Definition: packet.hh:450
Packet::getUintX
uint64_t getUintX(ByteOrder endian) const
Get the data in the packet byte swapped from the specified endianness and zero-extended to 64 bits.
Definition: packet.cc:350
MemCmd::toString
const std::string & toString() const
Return the string to a cmd given by idx.
Definition: packet.hh:239
MemCmd::SCUpgradeFailReq
@ SCUpgradeFailReq
Definition: packet.hh:101
MemCmd::ReadCleanReq
@ ReadCleanReq
Definition: packet.hh:105
Packet::COPY_FLAGS
@ COPY_FLAGS
Definition: packet.hh:267
MemCmd
Definition: packet.hh:71
Packet::getBlockAddr
Addr getBlockAddr(unsigned int blk_size) const
Definition: packet.hh:778
Packet::cmdString
const std::string & cmdString() const
Return the string name of the cmd field (for debugging and tracing).
Definition: packet.hh:551
MemCmd::MemCmd
MemCmd()
Definition: packet.hh:244
Packet::VALID_SIZE
@ VALID_SIZE
Definition: packet.hh:310
Packet::_isSecure
bool _isSecure
True if the request targets the secure memory space.
Definition: packet.hh:357
MemCmd::FunctionalWriteError
@ FunctionalWriteError
Definition: packet.hh:129
Packet::PrintReqState::LabelStackEntry::LabelStackEntry
LabelStackEntry(const std::string &_label, std::string *_prefix)
Definition: packet.cc:449
Packet::createRead
static PacketPtr createRead(const RequestPtr &req)
Constructor-like methods that return Packets based on Request objects.
Definition: packet.hh:980
MemCmd::HTMReq
@ HTMReq
Definition: packet.hh:136
Packet::needsResponse
bool needsResponse() const
Definition: packet.hh:570
Packet::findNextSenderState
T * findNextSenderState() const
Go through the sender state stack and return the first instance that is of type T (as determined by a...
Definition: packet.hh:538
MemCmd::MemCmd
MemCmd(int _cmd)
Definition: packet.hh:243
MemCmd::IsPrint
@ IsPrint
Print state matching address (for debugging)
Definition: packet.hh:163
MemCmd::NUM_COMMAND_ATTRIBUTES
@ NUM_COMMAND_ATTRIBUTES
Definition: packet.hh:166
MemCmd::toInt
int toInt() const
Definition: packet.hh:240
Packet::PrintReqState::os
std::ostream & os
Definition: packet.hh:462
MemCmd::SwapResp
@ SwapResp
Definition: packet.hh:112
Packet::getAtomicOp
AtomicOpFunctor * getAtomicOp() const
Accessor function to atomic op.
Definition: packet.hh:792
Packet::setDataFromBlock
void setDataFromBlock(const uint8_t *blk_data, int blkSize)
Copy data into the packet from the provided block pointer, which is aligned to the given block size.
Definition: packet.hh:1244
MemCmd::testCmdAttrib
bool testCmdAttrib(MemCmd::Attribute attrib) const
Definition: packet.hh:192
Packet::PrintReqState::LabelStackEntry::labelPrinted
bool labelPrinted
Definition: packet.hh:452
MemCmd::IsLlsc
@ IsLlsc
Alpha/MIPS LL or SC access.
Definition: packet.hh:160
Packet::suppressFuncError
bool suppressFuncError() const
Definition: packet.hh:718
Packet::setHtmTransactionFailedInCache
void setHtmTransactionFailedInCache(const HtmCacheFailure ret_code)
Stipulates that this packet/request has returned from the cache hierarchy in a failed transaction.
Definition: packet.cc:514
MemCmd::isUpgrade
bool isUpgrade() const
Definition: packet.hh:201
Packet::PrintReqState::curPrefix
const std::string & curPrefix()
Returns the current line prefix.
Definition: packet.hh:471
Packet::mustCheckAbove
bool mustCheckAbove() const
Does the request need to check for cached copies of the same block in the memory hierarchy above.
Definition: packet.hh:1357
Packet::setUintX
void setUintX(uint64_t w, ByteOrder endian)
Set the value in the word w after truncating it to the length of the packet and then byteswapping it ...
Definition: packet.cc:367
Packet::setHtmTransactional
void setHtmTransactional(uint64_t val)
Stipulates that this packet/request originates in the CPU executing in transactional mode,...
Definition: packet.cc:537
MemCmd::isError
bool isError() const
Definition: packet.hh:228
Packet::bytesValid
std::vector< bool > bytesValid
Track the bytes found that satisfy a functional read.
Definition: packet.hh:365
Packet::PrintReqState::PrintReqState
PrintReqState(std::ostream &os, int verbosity=0)
Definition: packet.cc:435
Packet::getOffset
Addr getOffset(unsigned int blk_size) const
Definition: packet.hh:773
Flags::set
void set(Type flags)
Definition: flags.hh:87
Packet::snoopDelay
uint32_t snoopDelay
Keep track of the extra delay incurred by snooping upwards before sending a request down the memory s...
Definition: packet.hh:402
MemCmd::commandInfo
static const CommandInfo commandInfo[]
Array to map Command enum to associated info.
Definition: packet.hh:185
Packet::isUpgrade
bool isUpgrade() const
Definition: packet.hh:558
compiler.hh
MemCmd::Attribute
Attribute
List of command attributes.
Definition: packet.hh:146
Printable
Abstract base class for objects which support being printed to a stream for debugging.
Definition: printable.hh:44
MemCmd::isRequest
bool isRequest() const
Definition: packet.hh:202
MemCmd::HasData
@ HasData
There is an associated payload.
Definition: packet.hh:161
Packet::makeWriteCmd
static MemCmd makeWriteCmd(const RequestPtr &req)
Generate the appropriate write MemCmd based on the Request flags.
Definition: packet.hh:960
Packet::qosValue
void qosValue(const uint8_t qos_value)
QoS Value setter Interface for setting QoS priority value of the packet.
Definition: packet.hh:737
MemCmd::IsRequest
@ IsRequest
Issued by requester.
Definition: packet.hh:154
MemCmd::needsWritable
bool needsWritable() const
Definition: packet.hh:204
Packet::cmdToIndex
int cmdToIndex() const
Return the index of this command.
Definition: packet.hh:554
Packet::Flags
::Flags< FlagsType > Flags
Definition: packet.hh:261
Packet::PrintReqState
Object used to maintain state of a PrintReq.
Definition: packet.hh:442
X86ISA::val
Bitfield< 63 > val
Definition: misc.hh:769
Packet::id
const PacketId id
Definition: packet.hh:337
core.hh
Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:142
Packet::makeResponse
void makeResponse()
Take a request packet and modify it in place to be suitable for returning as a response to that reque...
Definition: packet.hh:1004
Packet::setAddr
void setAddr(Addr _addr)
Update the address of this packet mid-transaction.
Definition: packet.hh:762
HtmCacheFailure
HtmCacheFailure
Definition: htm.hh:56
Packet::htmTransactionFailedInCache
bool htmTransactionFailedInCache() const
Returns whether or not this packet/request has returned from the cache hierarchy in a failed transact...
Definition: packet.cc:524
MemCmd::IsRead
@ IsRead
Data flows from responder to requester.
Definition: packet.hh:148
MemCmd::MemSyncResp
@ MemSyncResp
Definition: packet.hh:116
flags.hh
MemCmd::needsResponse
bool needsResponse() const
Definition: packet.hh:205
MemCmd::MemFenceReq
@ MemFenceReq
Definition: packet.hh:114
MemCmd::cmd
Command cmd
Definition: packet.hh:189
MemCmd::SCUpgradeReq
@ SCUpgradeReq
Definition: packet.hh:99
addr_range.hh
Packet::hasData
bool hasData() const
Definition: packet.hh:576
Packet::isCleanEviction
bool isCleanEviction() const
Is this packet a clean eviction, including both actual clean evict packets, but also clean writebacks...
Definition: packet.hh:1367
Packet::getHtmTransactionUid
uint64_t getHtmTransactionUid() const
If a packet/request originates in a CPU executing in transactional mode, i.e.
Definition: packet.cc:550
Packet::cmd
MemCmd cmd
The command field of the packet.
Definition: packet.hh:335
Packet::getRaw
T getRaw() const
Get the data in the packet without byte swapping.
Definition: packet_access.hh:49
MemCmd::CleanSharedReq
@ CleanSharedReq
Definition: packet.hh:118
Packet::createWrite
static PacketPtr createWrite(const RequestPtr &req)
Definition: packet.hh:986
Packet::WRITE_THROUGH
@ WRITE_THROUGH
Definition: packet.hh:291
Packet::get
T get(ByteOrder endian) const
Get the data in the packet byte swapped from the specified endianness.
Definition: packet_access.hh:82
Packet::FROM_TRANSACTION
@ FROM_TRANSACTION
Definition: packet.hh:306
MemCmd::FromCache
@ FromCache
Request originated from a caching agent.
Definition: packet.hh:165
Packet::getLE
T getLE() const
Get the data in the packet byte swapped from little endian to host endian.
Definition: packet_access.hh:75
Packet::pushSenderState
void pushSenderState(SenderState *sender_state)
Push a new sender state to the packet and make the current sender state the predecessor of the new on...
Definition: packet.cc:332
MemCmd::HTMAbort
@ HTMAbort
Definition: packet.hh:138
MemCmd::operator==
bool operator==(MemCmd c2) const
Definition: packet.hh:246
MemCmd::isResponse
bool isResponse() const
Definition: packet.hh:203
MemCmd::NeedsResponse
@ NeedsResponse
Requester needs response from target.
Definition: packet.hh:156
MemCmd::isPrefetch
bool isPrefetch() const
Definition: packet.hh:226
MemCmd::IsUpgrade
@ IsUpgrade
Definition: packet.hh:150
Packet::PrintReqState::printLabels
void printLabels()
Print all of the pending unprinted labels on the stack.
Definition: packet.cc:474
Packet::setBadAddress
void setBadAddress()
Definition: packet.hh:746
types.hh
ArmISA::t
Bitfield< 5 > t
Definition: miscregs_types.hh:67
MemCmd::WriteResp
@ WriteResp
Definition: packet.hh:86
Packet::isClean
bool isClean() const
Definition: packet.hh:573
Packet::setExpressSnoop
void setExpressSnoop()
The express snoop flag is used for two purposes.
Definition: packet.hh:661
MemCmd::MemSyncReq
@ MemSyncReq
Definition: packet.hh:115
MemCmd::IsClean
@ IsClean
Cleans any existing dirty blocks.
Definition: packet.hh:152
Packet::dataStatic
void dataStatic(T *p)
Set the data pointer to the following value that should not be freed.
Definition: packet.hh:1107
MemCmd::StoreCondResp
@ StoreCondResp
Definition: packet.hh:110
Packet::EXPRESS_SNOOP
@ EXPRESS_SNOOP
Special timing-mode atomic snoop for multi-level coherence.
Definition: packet.hh:278
Packet::makeHtmTransactionalReqResponse
void makeHtmTransactionalReqResponse(const HtmCacheFailure ret_code)
Communicates to the core that a packet was processed by the memory subsystem while running in transac...
Definition: packet.cc:498
Packet
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition: packet.hh:257
MemCmd::BadAddressError
@ BadAddressError
Definition: packet.hh:127
Packet::popSenderState
SenderState * popSenderState()
Pop the top of the state stack and return a pointer to it.
Definition: packet.cc:340
Packet::Packet
Packet(const PacketPtr pkt, bool clear_flags, bool alloc_data)
Alternate constructor for copying a packet.
Definition: packet.hh:891
Packet::isMaskedWrite
bool isMaskedWrite() const
Definition: packet.hh:1373
MemCmd::InvalidateReq
@ InvalidateReq
Definition: packet.hh:133
Packet::_qosValue
uint8_t _qosValue
Definition: packet.hh:368
logging.hh
Packet::isWrite
bool isWrite() const
Definition: packet.hh:557
MemCmd::fromCache
bool fromCache() const
Definition: packet.hh:209
Packet::PrintReqState::printObj
void printObj(Printable *obj)
Print a Printable object to os, because it matched the address on a PrintReq.
Definition: packet.cc:491
Packet::STATIC_DATA
@ STATIC_DATA
Is the data pointer set to a value that shouldn't be freed when the packet is destroyed?
Definition: packet.hh:314
Packet::setLE
void setLE(T v)
Set the value in the data pointer to v as little endian.
Definition: packet_access.hh:105
Packet::HAS_SHARERS
@ HAS_SHARERS
Definition: packet.hh:274
Packet::getPtr
T * getPtr()
get a pointer to the data ptr.
Definition: packet.hh:1157
Packet::FlagsType
uint32_t FlagsType
Definition: packet.hh:260
MemCmd::isPrint
bool isPrint() const
Definition: packet.hh:229
MemCmd::ReadSharedReq
@ ReadSharedReq
Definition: packet.hh:106
Packet::SATISFIED
@ SATISFIED
Definition: packet.hh:295
Packet::size
unsigned size
The size of the request or transfer.
Definition: packet.hh:360
MemCmd::isHWPrefetch
bool isHWPrefetch() const
Definition: packet.hh:225
PacketList
std::list< PacketPtr > PacketList
Definition: packet.hh:68
MemCmd::operator!=
bool operator!=(MemCmd c2) const
Definition: packet.hh:247
MemCmd::ReadResp
@ ReadResp
Definition: packet.hh:83
MemCmd::InvalidateResp
@ InvalidateResp
Definition: packet.hh:134
MemCmd::hasData
bool hasData() const
Check if this particular packet type carries payload data.
Definition: packet.hh:222
MemCmd::WriteClean
@ WriteClean
Definition: packet.hh:90
PacketId
uint64_t PacketId
Definition: packet.hh:69
Packet::clearBlockCached
void clearBlockCached()
Definition: packet.hh:721
MemCmd::IsInvalidate
@ IsInvalidate
Definition: packet.hh:151
Flags::isSet
bool isSet() const
Definition: flags.hh:79
Packet::isFlush
bool isFlush() const
Definition: packet.hh:585
MemCmd::CleanInvalidReq
@ CleanInvalidReq
Definition: packet.hh:120
Packet::RESPONDER_FLAGS
@ RESPONDER_FLAGS
Definition: packet.hh:270
Packet::senderState
SenderState * senderState
This packet's sender state.
Definition: packet.hh:508
Packet::getHtmTransactionFailedInCacheRC
HtmCacheFailure getHtmTransactionFailedInCacheRC() const
If a packet/request has returned from the cache hierarchy in a failed transaction,...
Definition: packet.cc:530
MipsISA::p
Bitfield< 0 > p
Definition: pra_constants.hh:323
Packet::isPrint
bool isPrint() const
Definition: packet.hh:584
std::list
STL list class.
Definition: stl.hh:51
Packet::RESPONDER_HAD_WRITABLE
@ RESPONDER_HAD_WRITABLE
Allow a responding cache to inform the cache hierarchy that it had a writable copy before responding.
Definition: packet.hh:283
Packet::isBlockCached
bool isBlockCached() const
Definition: packet.hh:720
Packet::isWriteback
bool isWriteback() const
Definition: packet.hh:575
Packet::allocate
void allocate()
Allocate memory for the packet.
Definition: packet.hh:1299
MemCmd::ReadExReq
@ ReadExReq
Definition: packet.hh:103
MemCmd::CleanInvalidResp
@ CleanInvalidResp
Definition: packet.hh:121
MemCmd::UpgradeFailResp
@ UpgradeFailResp
Definition: packet.hh:102
Packet::DYNAMIC_DATA
@ DYNAMIC_DATA
The data pointer points to a value that should be freed when the packet is destroyed.
Definition: packet.hh:318
Packet::SenderState::predecessor
SenderState * predecessor
Definition: packet.hh:433
MemCmd::NeedsWritable
@ NeedsWritable
Requires writable copy to complete in-cache.
Definition: packet.hh:153
Packet::trySatisfyFunctional
bool trySatisfyFunctional(PacketPtr other)
Check a functional request against a memory value stored in another packet (i.e.
Definition: packet.hh:1331
Packet::PrintReqState::labelStack
LabelStack labelStack
Definition: packet.hh:457
MemCmd::StoreCondReq
@ StoreCondReq
Definition: packet.hh:108
Packet::clearWriteThrough
void clearWriteThrough()
Definition: packet.hh:701
Packet::getConstPtr
const T * getConstPtr() const
Definition: packet.hh:1166
Packet::setFunctionalResponseStatus
void setFunctionalResponseStatus(bool success)
Definition: packet.hh:1028
ArmISA::v
Bitfield< 28 > v
Definition: miscregs_types.hh:51
Packet::FAILS_TRANSACTION
@ FAILS_TRANSACTION
Definition: packet.hh:302
MemCmd::NUM_MEM_CMDS
@ NUM_MEM_CMDS
Definition: packet.hh:139
MemCmd::UpgradeResp
@ UpgradeResp
Definition: packet.hh:100
MemCmd::responseCommand
Command responseCommand() const
Definition: packet.hh:233
Packet::popLabel
void popLabel()
Pop label for PrintReq (safe to call unconditionally).
Definition: packet.hh:1403
Packet::VALID_ADDR
@ VALID_ADDR
Are the 'addr' and 'size' fields valid?
Definition: packet.hh:309
MemCmd::isWrite
bool isWrite() const
Definition: packet.hh:200
MemCmd::StoreCondFailReq
@ StoreCondFailReq
Definition: packet.hh:109
MemCmd::PrintReq
@ PrintReq
Definition: packet.hh:131
Packet::setSize
void setSize(unsigned size)
Definition: packet.hh:1040
Packet::deleteData
void deleteData()
delete the data pointed to in the data pointer.
Definition: packet.hh:1288
Packet::Command
MemCmd::Command Command
Definition: packet.hh:332

Generated on Wed Sep 30 2020 14:02:13 for gem5 by doxygen 1.8.17