gem5  v19.0.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
request.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012-2013,2017-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) 2002-2005 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  * Authors: Ron Dreslinski
42  * Steve Reinhardt
43  * Ali Saidi
44  */
45 
52 #ifndef __MEM_REQUEST_HH__
53 #define __MEM_REQUEST_HH__
54 
55 #include <cassert>
56 #include <climits>
57 
58 #include "base/amo.hh"
59 #include "base/flags.hh"
60 #include "base/logging.hh"
61 #include "base/types.hh"
62 #include "cpu/inst_seq.hh"
63 #include "sim/core.hh"
64 
74  enum TaskId {
75  MaxNormalTaskId = 1021, /* Maximum number of normal tasks */
76  Prefetcher = 1022, /* For cache lines brought in by prefetcher */
77  DMA = 1023, /* Mostly Table Walker */
78  Unknown = 1024,
80  };
81 }
82 
83 class Request;
84 
85 typedef std::shared_ptr<Request> RequestPtr;
86 typedef uint16_t MasterID;
87 
88 class Request
89 {
90  public:
91  typedef uint64_t FlagsType;
92  typedef uint8_t ArchFlagsType;
93  typedef ::Flags<FlagsType> Flags;
94 
95  enum : FlagsType {
103  ARCH_BITS = 0x000000FF,
105  INST_FETCH = 0x00000100,
107  PHYSICAL = 0x00000200,
115  UNCACHEABLE = 0x00000400,
125  STRICT_ORDER = 0x00000800,
127  MMAPPED_IPR = 0x00002000,
129  PRIVILEGED = 0x00008000,
130 
135  CACHE_BLOCK_ZERO = 0x00010000,
136 
138  NO_ACCESS = 0x00080000,
146  LOCKED_RMW = 0x00100000,
148  LLSC = 0x00200000,
150  MEM_SWAP = 0x00400000,
151  MEM_SWAP_COND = 0x00800000,
152 
154  PREFETCH = 0x01000000,
156  PF_EXCLUSIVE = 0x02000000,
158  EVICT_NEXT = 0x04000000,
160  ACQUIRE = 0x00020000,
162  RELEASE = 0x00040000,
163 
165  ATOMIC_RETURN_OP = 0x40000000,
167  ATOMIC_NO_RETURN_OP = 0x80000000,
168 
173  KERNEL = 0x00001000,
174 
176  SECURE = 0x10000000,
178  PT_WALK = 0x20000000,
179 
181  INVALIDATE = 0x0000000100000000,
183  CLEAN = 0x0000000200000000,
184 
186  DST_POU = 0x0000001000000000,
187 
189  DST_POC = 0x0000002000000000,
190 
192  DST_BITS = 0x0000003000000000,
193 
198  STICKY_FLAGS = INST_FETCH
199  };
200  static const FlagsType STORE_NO_DATA = CACHE_BLOCK_ZERO |
201  CLEAN | INVALIDATE;
202 
205  enum : MasterID {
207  wbMasterId = 0,
212  funcMasterId = 1,
214  intMasterId = 2,
219  invldMasterId = std::numeric_limits<MasterID>::max()
220  };
223  typedef uint32_t MemSpaceConfigFlagsType;
224  typedef ::Flags<MemSpaceConfigFlagsType> MemSpaceConfigFlags;
225 
226  enum : MemSpaceConfigFlagsType {
228  SCOPE_VALID = 0x00000001,
230  WAVEFRONT_SCOPE = 0x00000002,
232  WORKGROUP_SCOPE = 0x00000004,
234  DEVICE_SCOPE = 0x00000008,
236  SYSTEM_SCOPE = 0x00000010,
237 
239  GLOBAL_SEGMENT = 0x00000020,
241  GROUP_SEGMENT = 0x00000040,
243  PRIVATE_SEGMENT = 0x00000080,
245  KERNARG_SEGMENT = 0x00000100,
247  READONLY_SEGMENT = 0x00000200,
249  SPILL_SEGMENT = 0x00000400,
251  ARG_SEGMENT = 0x00000800,
252  };
253 
254  private:
255  typedef uint16_t PrivateFlagsType;
256  typedef ::Flags<PrivateFlagsType> PrivateFlags;
257 
258  enum : PrivateFlagsType {
260  VALID_SIZE = 0x00000001,
262  VALID_PADDR = 0x00000002,
264  VALID_VADDR = 0x00000004,
266  VALID_INST_SEQ_NUM = 0x00000008,
268  VALID_PC = 0x00000010,
270  VALID_CONTEXT_ID = 0x00000020,
272  VALID_EXTRA_DATA = 0x00000080,
274  VALID_STREAM_ID = 0x00000100,
275  VALID_SUBSTREAM_ID = 0x00000200,
280  STICKY_PRIVATE_FLAGS = VALID_CONTEXT_ID
281  };
282 
283  private:
284 
289  void
290  setPhys(Addr paddr, unsigned size, Flags flags, MasterID mid, Tick time)
291  {
292  _paddr = paddr;
293  _size = size;
294  _time = time;
295  _masterId = mid;
296  _flags.clear(~STICKY_FLAGS);
297  _flags.set(flags);
298  privateFlags.clear(~STICKY_PRIVATE_FLAGS);
299  privateFlags.set(VALID_PADDR|VALID_SIZE);
300  depth = 0;
301  accessDelta = 0;
302  //translateDelta = 0;
303  }
304 
310 
316  unsigned _size;
317 
320 
325 
327  Flags _flags;
328 
330  MemSpaceConfigFlags _memSpaceConfigFlags;
331 
333  PrivateFlags privateFlags;
334 
341 
345  uint32_t _taskId;
346 
347  union {
348  struct {
354  uint32_t _streamId;
355 
362  uint32_t _substreamId;
363  };
364 
366  uint64_t _asid;
367  };
368 
371 
375  uint64_t _extraData;
376 
379 
382 
385 
388 
389  public:
390 
397  : _paddr(0), _size(0), _masterId(invldMasterId), _time(0),
398  _taskId(ContextSwitchTaskId::Unknown), _asid(0), _vaddr(0),
399  _extraData(0), _contextId(0), _pc(0),
400  _reqInstSeqNum(0), atomicOpFunctor(nullptr), translateDelta(0),
401  accessDelta(0), depth(0)
402  {}
403 
404  Request(Addr paddr, unsigned size, Flags flags, MasterID mid,
405  InstSeqNum seq_num, ContextID cid)
406  : _paddr(0), _size(0), _masterId(invldMasterId), _time(0),
407  _taskId(ContextSwitchTaskId::Unknown), _asid(0), _vaddr(0),
408  _extraData(0), _contextId(0), _pc(0),
409  _reqInstSeqNum(seq_num), atomicOpFunctor(nullptr), translateDelta(0),
410  accessDelta(0), depth(0)
411  {
412  setPhys(paddr, size, flags, mid, curTick());
413  setContext(cid);
414  privateFlags.set(VALID_INST_SEQ_NUM);
415  }
416 
422  Request(Addr paddr, unsigned size, Flags flags, MasterID mid)
423  : _paddr(0), _size(0), _masterId(invldMasterId), _time(0),
424  _taskId(ContextSwitchTaskId::Unknown), _asid(0), _vaddr(0),
425  _extraData(0), _contextId(0), _pc(0),
426  _reqInstSeqNum(0), atomicOpFunctor(nullptr), translateDelta(0),
427  accessDelta(0), depth(0)
428  {
429  setPhys(paddr, size, flags, mid, curTick());
430  }
431 
432  Request(Addr paddr, unsigned size, Flags flags, MasterID mid, Tick time)
433  : _paddr(0), _size(0), _masterId(invldMasterId), _time(0),
434  _taskId(ContextSwitchTaskId::Unknown), _asid(0), _vaddr(0),
435  _extraData(0), _contextId(0), _pc(0),
436  _reqInstSeqNum(0), atomicOpFunctor(nullptr), translateDelta(0),
437  accessDelta(0), depth(0)
438  {
439  setPhys(paddr, size, flags, mid, time);
440  }
441 
442  Request(Addr paddr, unsigned size, Flags flags, MasterID mid, Tick time,
443  Addr pc)
444  : _paddr(0), _size(0), _masterId(invldMasterId), _time(0),
445  _taskId(ContextSwitchTaskId::Unknown), _asid(0), _vaddr(0),
446  _extraData(0), _contextId(0), _pc(pc),
447  _reqInstSeqNum(0), atomicOpFunctor(nullptr), translateDelta(0),
448  accessDelta(0), depth(0)
449  {
450  setPhys(paddr, size, flags, mid, time);
451  privateFlags.set(VALID_PC);
452  }
453 
454  Request(uint64_t asid, Addr vaddr, unsigned size, Flags flags,
455  MasterID mid, Addr pc, ContextID cid)
456  : _paddr(0), _size(0), _masterId(invldMasterId), _time(0),
457  _taskId(ContextSwitchTaskId::Unknown), _asid(0), _vaddr(0),
458  _extraData(0), _contextId(0), _pc(0),
459  _reqInstSeqNum(0), atomicOpFunctor(nullptr), translateDelta(0),
460  accessDelta(0), depth(0)
461  {
462  setVirt(asid, vaddr, size, flags, mid, pc);
463  setContext(cid);
464  }
465 
466  Request(uint64_t asid, Addr vaddr, unsigned size, Flags flags,
467  MasterID mid, Addr pc, ContextID cid,
468  AtomicOpFunctorPtr atomic_op)
469  {
470  setVirt(asid, vaddr, size, flags, mid, pc, std::move(atomic_op));
471  setContext(cid);
472  }
473 
474  Request(const Request& other)
475  : _paddr(other._paddr), _size(other._size),
476  _byteEnable(other._byteEnable),
477  _masterId(other._masterId),
478  _flags(other._flags),
479  _memSpaceConfigFlags(other._memSpaceConfigFlags),
480  privateFlags(other.privateFlags),
481  _time(other._time),
482  _taskId(other._taskId), _asid(other._asid), _vaddr(other._vaddr),
483  _extraData(other._extraData), _contextId(other._contextId),
484  _pc(other._pc), _reqInstSeqNum(other._reqInstSeqNum),
485  translateDelta(other.translateDelta),
486  accessDelta(other.accessDelta), depth(other.depth)
487  {
488 
489  atomicOpFunctor.reset(other.atomicOpFunctor ?
490  other.atomicOpFunctor->clone() : nullptr);
491  }
492 
493  ~Request() {}
494 
498  void
499  setContext(ContextID context_id)
500  {
501  _contextId = context_id;
502  privateFlags.set(VALID_CONTEXT_ID);
503  }
504 
505  void
506  setStreamId(uint32_t sid)
507  {
508  _streamId = sid;
509  privateFlags.set(VALID_STREAM_ID);
510  }
511 
512  void
513  setSubStreamId(uint32_t ssid)
514  {
515  assert(privateFlags.isSet(VALID_STREAM_ID));
516  _substreamId = ssid;
517  privateFlags.set(VALID_SUBSTREAM_ID);
518  }
519 
524  void
525  setVirt(uint64_t asid, Addr vaddr, unsigned size, Flags flags,
526  MasterID mid, Addr pc, AtomicOpFunctorPtr amo_op = nullptr)
527  {
528  _asid = asid;
529  _vaddr = vaddr;
530  _size = size;
531  _masterId = mid;
532  _pc = pc;
533  _time = curTick();
534 
535  _flags.clear(~STICKY_FLAGS);
536  _flags.set(flags);
537  privateFlags.clear(~STICKY_PRIVATE_FLAGS);
538  privateFlags.set(VALID_VADDR|VALID_SIZE|VALID_PC);
539  depth = 0;
540  accessDelta = 0;
541  translateDelta = 0;
542  atomicOpFunctor = std::move(amo_op);
543  }
544 
552  void
553  setPaddr(Addr paddr)
554  {
555  _paddr = paddr;
556  privateFlags.set(VALID_PADDR);
557  }
558 
563  // TODO: this function is still required by TimingSimpleCPU - should be
564  // removed once TimingSimpleCPU will support arbitrarily long multi-line
565  // mem. accesses
566  void splitOnVaddr(Addr split_addr, RequestPtr &req1, RequestPtr &req2)
567  {
568  assert(privateFlags.isSet(VALID_VADDR));
569  assert(privateFlags.noneSet(VALID_PADDR));
570  assert(split_addr > _vaddr && split_addr < _vaddr + _size);
571  req1 = std::make_shared<Request>(*this);
572  req2 = std::make_shared<Request>(*this);
573  req1->_size = split_addr - _vaddr;
574  req2->_vaddr = split_addr;
575  req2->_size = _size - req1->_size;
576  if (!_byteEnable.empty()) {
577  req1->_byteEnable = std::vector<bool>(
578  _byteEnable.begin(),
579  _byteEnable.begin() + req1->_size);
580  req2->_byteEnable = std::vector<bool>(
581  _byteEnable.begin() + req1->_size,
582  _byteEnable.end());
583  }
584  }
585 
589  bool
590  hasPaddr() const
591  {
592  return privateFlags.isSet(VALID_PADDR);
593  }
594 
595  Addr
596  getPaddr() const
597  {
598  assert(privateFlags.isSet(VALID_PADDR));
599  return _paddr;
600  }
601 
606 
612 
617  mutable int depth;
618 
622  bool
623  hasSize() const
624  {
625  return privateFlags.isSet(VALID_SIZE);
626  }
627 
628  unsigned
629  getSize() const
630  {
631  assert(privateFlags.isSet(VALID_SIZE));
632  return _size;
633  }
634 
635  const std::vector<bool>&
637  {
638  return _byteEnable;
639  }
640 
641  void
643  {
644  assert(be.empty() || be.size() == _size);
645  _byteEnable = be;
646  }
647 
653  bool
654  isMasked() const
655  {
656  return std::find(
657  _byteEnable.begin(),
658  _byteEnable.end(),
659  false) != _byteEnable.end();
660  }
661 
663  Tick
664  time() const
665  {
666  assert(privateFlags.isSet(VALID_PADDR|VALID_VADDR));
667  return _time;
668  }
669 
673  bool
675  {
676  return (bool)atomicOpFunctor;
677  }
678 
681  {
682  assert(atomicOpFunctor);
683  return atomicOpFunctor.get();
684  }
685 
687  Flags
689  {
690  assert(privateFlags.isSet(VALID_PADDR|VALID_VADDR));
691  return _flags;
692  }
693 
698  void
699  setFlags(Flags flags)
700  {
701  assert(privateFlags.isSet(VALID_PADDR|VALID_VADDR));
702  _flags.set(flags);
703  }
704 
705  void
706  setMemSpaceConfigFlags(MemSpaceConfigFlags extraFlags)
707  {
708  assert(privateFlags.isSet(VALID_PADDR | VALID_VADDR));
709  _memSpaceConfigFlags.set(extraFlags);
710  }
711 
713  bool
714  hasVaddr() const
715  {
716  return privateFlags.isSet(VALID_VADDR);
717  }
718 
719  Addr
720  getVaddr() const
721  {
722  assert(privateFlags.isSet(VALID_VADDR));
723  return _vaddr;
724  }
725 
727  MasterID
728  masterId() const
729  {
730  return _masterId;
731  }
732 
733  uint32_t
734  taskId() const
735  {
736  return _taskId;
737  }
738 
739  void
740  taskId(uint32_t id) {
741  _taskId = id;
742  }
743 
745  uint64_t
746  getAsid() const
747  {
748  assert(privateFlags.isSet(VALID_VADDR));
749  return _asid;
750  }
751 
753  void
754  setAsid(uint64_t asid)
755  {
756  _asid = asid;
757  }
758 
760  ArchFlagsType
761  getArchFlags() const
762  {
763  assert(privateFlags.isSet(VALID_PADDR|VALID_VADDR));
764  return _flags & ARCH_BITS;
765  }
766 
768  bool
770  {
771  return privateFlags.isSet(VALID_EXTRA_DATA);
772  }
773 
775  uint64_t
776  getExtraData() const
777  {
778  assert(privateFlags.isSet(VALID_EXTRA_DATA));
779  return _extraData;
780  }
781 
783  void
784  setExtraData(uint64_t extraData)
785  {
786  _extraData = extraData;
787  privateFlags.set(VALID_EXTRA_DATA);
788  }
789 
790  bool
791  hasContextId() const
792  {
793  return privateFlags.isSet(VALID_CONTEXT_ID);
794  }
795 
797  ContextID
798  contextId() const
799  {
800  assert(privateFlags.isSet(VALID_CONTEXT_ID));
801  return _contextId;
802  }
803 
804  uint32_t
805  streamId() const
806  {
807  assert(privateFlags.isSet(VALID_STREAM_ID));
808  return _streamId;
809  }
810 
811  bool
813  {
814  return privateFlags.isSet(VALID_SUBSTREAM_ID);
815  }
816 
817  uint32_t
818  substreamId() const
819  {
820  assert(privateFlags.isSet(VALID_SUBSTREAM_ID));
821  return _substreamId;
822  }
823 
824  void
826  {
827  privateFlags.set(VALID_PC);
828  _pc = pc;
829  }
830 
831  bool
832  hasPC() const
833  {
834  return privateFlags.isSet(VALID_PC);
835  }
836 
838  Addr
839  getPC() const
840  {
841  assert(privateFlags.isSet(VALID_PC));
842  return _pc;
843  }
844 
849  void incAccessDepth() const { depth++; }
850  int getAccessDepth() const { return depth; }
851 
855  void setTranslateLatency() { translateDelta = curTick() - _time; }
856  Tick getTranslateLatency() const { return translateDelta; }
857 
862  void setAccessLatency() { accessDelta = curTick() - _time - translateDelta; }
863  Tick getAccessLatency() const { return accessDelta; }
864 
869  bool
871  {
872  return privateFlags.isSet(VALID_INST_SEQ_NUM);
873  }
874 
875  InstSeqNum
877  {
878  assert(privateFlags.isSet(VALID_INST_SEQ_NUM));
879  return _reqInstSeqNum;
880  }
881 
882  void
884  {
885  privateFlags.set(VALID_INST_SEQ_NUM);
886  _reqInstSeqNum = seq_num;
887  }
888 
891  bool isUncacheable() const { return _flags.isSet(UNCACHEABLE); }
892  bool isStrictlyOrdered() const { return _flags.isSet(STRICT_ORDER); }
893  bool isInstFetch() const { return _flags.isSet(INST_FETCH); }
894  bool isPrefetch() const { return (_flags.isSet(PREFETCH) ||
895  _flags.isSet(PF_EXCLUSIVE)); }
896  bool isPrefetchEx() const { return _flags.isSet(PF_EXCLUSIVE); }
897  bool isLLSC() const { return _flags.isSet(LLSC); }
898  bool isPriv() const { return _flags.isSet(PRIVILEGED); }
899  bool isLockedRMW() const { return _flags.isSet(LOCKED_RMW); }
900  bool isSwap() const { return _flags.isSet(MEM_SWAP|MEM_SWAP_COND); }
901  bool isCondSwap() const { return _flags.isSet(MEM_SWAP_COND); }
902  bool isMmappedIpr() const { return _flags.isSet(MMAPPED_IPR); }
903  bool isSecure() const { return _flags.isSet(SECURE); }
904  bool isPTWalk() const { return _flags.isSet(PT_WALK); }
905  bool isAcquire() const { return _flags.isSet(ACQUIRE); }
906  bool isRelease() const { return _flags.isSet(RELEASE); }
907  bool isKernel() const { return _flags.isSet(KERNEL); }
908  bool isAtomicReturn() const { return _flags.isSet(ATOMIC_RETURN_OP); }
909  bool isAtomicNoReturn() const { return _flags.isSet(ATOMIC_NO_RETURN_OP); }
910 
911  bool
912  isAtomic() const
913  {
914  return _flags.isSet(ATOMIC_RETURN_OP) ||
915  _flags.isSet(ATOMIC_NO_RETURN_OP);
916  }
917 
925  bool isToPOU() const { return _flags.isSet(DST_POU); }
926  bool isToPOC() const { return _flags.isSet(DST_POC); }
927  Flags getDest() const { return _flags & DST_BITS; }
928 
935  bool isScoped() const { return _memSpaceConfigFlags.isSet(SCOPE_VALID); }
936 
937  bool
939  {
940  assert(isScoped());
941  return _memSpaceConfigFlags.isSet(WAVEFRONT_SCOPE);
942  }
943 
944  bool
946  {
947  assert(isScoped());
948  return _memSpaceConfigFlags.isSet(WORKGROUP_SCOPE);
949  }
950 
951  bool
953  {
954  assert(isScoped());
955  return _memSpaceConfigFlags.isSet(DEVICE_SCOPE);
956  }
957 
958  bool
960  {
961  assert(isScoped());
962  return _memSpaceConfigFlags.isSet(SYSTEM_SCOPE);
963  }
964 
965  bool
967  {
968  return _memSpaceConfigFlags.isSet(GLOBAL_SEGMENT) ||
969  (!isGroupSegment() && !isPrivateSegment() &&
970  !isKernargSegment() && !isReadonlySegment() &&
971  !isSpillSegment() && !isArgSegment());
972  }
973 
974  bool
976  {
977  return _memSpaceConfigFlags.isSet(GROUP_SEGMENT);
978  }
979 
980  bool
982  {
983  return _memSpaceConfigFlags.isSet(PRIVATE_SEGMENT);
984  }
985 
986  bool
988  {
989  return _memSpaceConfigFlags.isSet(KERNARG_SEGMENT);
990  }
991 
992  bool
994  {
995  return _memSpaceConfigFlags.isSet(READONLY_SEGMENT);
996  }
997 
998  bool
1000  {
1001  return _memSpaceConfigFlags.isSet(SPILL_SEGMENT);
1002  }
1003 
1004  bool
1006  {
1007  return _memSpaceConfigFlags.isSet(ARG_SEGMENT);
1008  }
1009 
1022  bool isCacheClean() const { return _flags.isSet(CLEAN); }
1023  bool isCacheInvalidate() const { return _flags.isSet(INVALIDATE); }
1024  bool isCacheMaintenance() const { return _flags.isSet(CLEAN|INVALIDATE); }
1026 };
1027 
1028 #endif // __MEM_REQUEST_HH__
bool isPrefetchEx() const
Definition: request.hh:896
std::vector< bool > _byteEnable
Byte-enable mask for writes.
Definition: request.hh:319
ContextID _contextId
The context ID (for statistics, locks, and wakeups).
Definition: request.hh:378
bool isGroupSegment() const
Definition: request.hh:975
void setPC(Addr pc)
Definition: request.hh:825
bool isDeviceScope() const
Definition: request.hh:952
Tick time() const
Accessor for time.
Definition: request.hh:664
::Flags< PrivateFlagsType > PrivateFlags
Definition: request.hh:256
void setStreamId(uint32_t sid)
Definition: request.hh:506
void setMemSpaceConfigFlags(MemSpaceConfigFlags extraFlags)
Definition: request.hh:706
void setSubStreamId(uint32_t ssid)
Definition: request.hh:513
bool isAcquire() const
Definition: request.hh:905
PrivateFlags privateFlags
Private flags for field validity checking.
Definition: request.hh:333
int depth
Level of the cache hierachy where this request was responded to (e.g.
Definition: request.hh:617
bool isUncacheable() const
Accessor functions for flags.
Definition: request.hh:891
Tick _time
The time this request was started.
Definition: request.hh:340
uint64_t getExtraData() const
Accessor function for store conditional return value.
Definition: request.hh:776
Flags _flags
Flag structure for the request.
Definition: request.hh:327
uint64_t _extraData
Extra data for the request, such as the return value of store conditional or the compare value for a ...
Definition: request.hh:375
unsigned _size
The size of the request.
Definition: request.hh:316
bool isKernargSegment() const
Definition: request.hh:987
void setExtraData(uint64_t extraData)
Accessor function for store conditional return value.
Definition: request.hh:784
::Flags< FlagsType > Flags
Definition: request.hh:93
bool hasAtomicOpFunctor()
Accessor for atomic-op functor.
Definition: request.hh:674
InstSeqNum _reqInstSeqNum
Sequence number of the instruction that creates the request.
Definition: request.hh:384
std::shared_ptr< Request > RequestPtr
Definition: request.hh:83
bool isSet() const
Definition: flags.hh:62
void clear()
Definition: flags.hh:68
Request(uint64_t asid, Addr vaddr, unsigned size, Flags flags, MasterID mid, Addr pc, ContextID cid)
Definition: request.hh:454
Request(uint64_t asid, Addr vaddr, unsigned size, Flags flags, MasterID mid, Addr pc, ContextID cid, AtomicOpFunctorPtr atomic_op)
Definition: request.hh:466
bool hasPaddr() const
Accessor for paddr.
Definition: request.hh:590
std::unique_ptr< AtomicOpFunctor > AtomicOpFunctorPtr
Definition: amo.hh:230
bool isRelease() const
Definition: request.hh:906
MasterID _masterId
The requestor ID which is unique in the system for all ports that are capable of issuing a transactio...
Definition: request.hh:324
void setContext(ContextID context_id)
Set up Context numbers.
Definition: request.hh:499
MasterID masterId() const
Accesssor for the requestor id.
Definition: request.hh:728
uint32_t _streamId
The stream ID uniquely identifies a device behind the SMMU/IOMMU Each transaction arriving at the SMM...
Definition: request.hh:354
uint16_t PrivateFlagsType
Definition: request.hh:255
bool isScoped() const
Accessor functions for the memory space configuration flags and used by GPU ISAs such as the Heteroge...
Definition: request.hh:935
bool isInstFetch() const
Definition: request.hh:893
Addr _paddr
The physical address of the request.
Definition: request.hh:309
void setVirt(uint64_t asid, Addr vaddr, unsigned size, Flags flags, MasterID mid, Addr pc, AtomicOpFunctorPtr amo_op=nullptr)
Set up a virtual (e.g., CPU) request in a previously allocated Request object.
Definition: request.hh:525
bool isSwap() const
Definition: request.hh:900
void setAccessLatency()
Set/Get the time taken to complete this request&#39;s access, not including the time to successfully tran...
Definition: request.hh:862
uint32_t _taskId
The task id associated with this request.
Definition: request.hh:345
Bitfield< 33 > id
uint32_t _substreamId
The substream ID identifies an "execution context" within a device behind an SMMU/IOMMU.
Definition: request.hh:362
bool isCacheClean() const
Accessor functions to determine whether this request is part of a cache maintenance operation...
Definition: request.hh:1022
bool isSystemScope() const
Definition: request.hh:959
bool hasVaddr() const
Accessor function for vaddr.
Definition: request.hh:714
Request(Addr paddr, unsigned size, Flags flags, MasterID mid, Tick time, Addr pc)
Definition: request.hh:442
::Flags< MemSpaceConfigFlagsType > MemSpaceConfigFlags
Definition: request.hh:224
Tick getAccessLatency() const
Definition: request.hh:863
bool isGlobalSegment() const
Definition: request.hh:966
bool isKernel() const
Definition: request.hh:907
Tick curTick()
The current simulated tick.
Definition: core.hh:47
Bitfield< 4 > pc
AtomicOpFunctor * getAtomicOpFunctor()
Definition: request.hh:680
Addr _vaddr
The virtual address of the request.
Definition: request.hh:370
Request(Addr paddr, unsigned size, Flags flags, MasterID mid)
Constructor for physical (e.g.
Definition: request.hh:422
ContextID contextId() const
Accessor function for context ID.
Definition: request.hh:798
void incAccessDepth() const
Increment/Get the depth at which this request is responded to.
Definition: request.hh:849
Tick accessDelta
Access latency to complete this memory transaction not including translation time.
Definition: request.hh:611
Request()
Minimal constructor.
Definition: request.hh:396
uint64_t Tick
Tick count type.
Definition: types.hh:63
Request(const Request &other)
Definition: request.hh:474
bool isCacheInvalidate() const
Definition: request.hh:1023
bool isMasked() const
Returns true if the memory request is masked, which means there is at least one byteEnable element wh...
Definition: request.hh:654
bool isAtomicNoReturn() const
Definition: request.hh:909
int getAccessDepth() const
Definition: request.hh:850
void splitOnVaddr(Addr split_addr, RequestPtr &req1, RequestPtr &req2)
Generate two requests as if this request had been split into two pieces.
Definition: request.hh:566
bool isWorkgroupScope() const
Definition: request.hh:945
uint64_t InstSeqNum
Definition: inst_seq.hh:40
uint32_t taskId() const
Definition: request.hh:734
bool isSpillSegment() const
Definition: request.hh:999
uint32_t streamId() const
Definition: request.hh:805
bool isCondSwap() const
Definition: request.hh:901
uint8_t ArchFlagsType
Definition: request.hh:92
void setPhys(Addr paddr, unsigned size, Flags flags, MasterID mid, Tick time)
Set up a physical (e.g.
Definition: request.hh:290
void setReqInstSeqNum(const InstSeqNum seq_num)
Definition: request.hh:883
const std::vector< bool > & getByteEnable() const
Definition: request.hh:636
bool extraDataValid() const
Accessor function to check if sc result is valid.
Definition: request.hh:769
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,16,32,64}_t.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:142
uint16_t MasterID
Definition: request.hh:86
bool isStrictlyOrdered() const
Definition: request.hh:892
uint64_t _asid
The address space ID.
Definition: request.hh:366
bool hasContextId() const
Definition: request.hh:791
Special TaskIds that are used for per-context-switch stats dumps and Cache Occupancy.
Definition: request.hh:73
void setByteEnable(const std::vector< bool > &be)
Definition: request.hh:642
bool isLLSC() const
Definition: request.hh:897
Flags getFlags()
Accessor for flags.
Definition: request.hh:688
bool isReadonlySegment() const
Definition: request.hh:993
Flags getDest() const
Definition: request.hh:927
~Request()
Definition: request.hh:493
Bitfield< 15 > be
AtomicOpFunctorPtr atomicOpFunctor
A pointer to an atomic operation.
Definition: request.hh:387
uint32_t substreamId() const
Definition: request.hh:818
bool hasPC() const
Definition: request.hh:832
Tick translateDelta
Time for the TLB/table walker to successfully translate this request.
Definition: request.hh:605
bool isPrefetch() const
Definition: request.hh:894
Request(Addr paddr, unsigned size, Flags flags, MasterID mid, Tick time)
Definition: request.hh:432
Addr _pc
program counter of initiating access; for tracing/debugging
Definition: request.hh:381
bool isPriv() const
Definition: request.hh:898
bool isMmappedIpr() const
Definition: request.hh:902
bool isToPOC() const
Definition: request.hh:926
bool isSecure() const
Definition: request.hh:903
bool isWavefrontScope() const
Definition: request.hh:938
bool isCacheMaintenance() const
Definition: request.hh:1024
Addr getVaddr() const
Definition: request.hh:720
void setAsid(uint64_t asid)
Accessor function for asid.
Definition: request.hh:754
bool isArgSegment() const
Definition: request.hh:1005
ArchFlagsType getArchFlags() const
Accessor function for architecture-specific flags.
Definition: request.hh:761
bool hasInstSeqNum() const
Accessor for the sequence number of instruction that creates the request.
Definition: request.hh:870
Addr getPC() const
Accessor function for pc.
Definition: request.hh:839
bool isPrivateSegment() const
Definition: request.hh:981
bool isAtomicReturn() const
Definition: request.hh:908
bool isPTWalk() const
Definition: request.hh:904
Addr getPaddr() const
Definition: request.hh:596
uint64_t FlagsType
Definition: request.hh:91
InstSeqNum getReqInstSeqNum() const
Definition: request.hh:876
void setPaddr(Addr paddr)
Set just the physical address.
Definition: request.hh:553
void setFlags(Flags flags)
Note that unlike other accessors, this function sets specific flags (ORs them in); it does not assign...
Definition: request.hh:699
Tick getTranslateLatency() const
Definition: request.hh:856
MemSpaceConfigFlags _memSpaceConfigFlags
Memory space configuraiton flag structure for the request.
Definition: request.hh:330
void set(Type flags)
Definition: flags.hh:70
uint64_t getAsid() const
Accessor function for asid.
Definition: request.hh:746
bool hasSubstreamId() const
Definition: request.hh:812
int ContextID
Globally unique thread context ID.
Definition: types.hh:231
Request(Addr paddr, unsigned size, Flags flags, MasterID mid, InstSeqNum seq_num, ContextID cid)
Definition: request.hh:404
bool hasSize() const
Accessor for size.
Definition: request.hh:623
uint32_t MemSpaceConfigFlagsType
Definition: request.hh:223
void taskId(uint32_t id)
Definition: request.hh:740
bool isAtomic() const
Definition: request.hh:912
void setTranslateLatency()
Set/Get the time taken for this request to be successfully translated.
Definition: request.hh:855
bool isToPOU() const
Accessor functions for the destination of a memory request.
Definition: request.hh:925
bool isLockedRMW() const
Definition: request.hh:899
unsigned getSize() const
Definition: request.hh:629
bool noneSet() const
Definition: flags.hh:66

Generated on Fri Feb 28 2020 16:27:02 for gem5 by doxygen 1.8.13