Go to the documentation of this file.
48 #ifndef __MEM_REQUEST_HH__
49 #define __MEM_REQUEST_HH__
78 namespace context_switch_task_id
533 auto mgmt_req = std::make_shared<Request>();
534 mgmt_req->_flags.set(
flags);
535 mgmt_req->_requestorId =
id;
538 assert(mgmt_req->isMemMgmt());
615 req1 = std::make_shared<Request>(*
this);
616 req2 = std::make_shared<Request>(*
this);
617 req1->_size = split_addr -
_vaddr;
618 req2->_vaddr = split_addr;
619 req2->_size =
_size - req1->_size;
1119 #endif // __MEM_REQUEST_HH__
@ ACQUIRE
The request should be marked with ACQUIRE.
InstSeqNum getReqInstSeqNum() const
bool hasHtmAbortCause() const
Accessor for hardware transactional memory abort cause.
Tick curTick()
The universal simulation clock.
Counter _instCount
The instruction count at the time this request is created.
@ ARCH_BITS
Architecture specific flags.
Flags _flags
Flag structure for the request.
@ HTM_COMMIT
The request commits a HTM transaction.
@ funcRequestorId
This requestor id is used for functional requests that don't come from a particular device.
bool isAtomicNoReturn() const
void setLocalAccessor(LocalAccessor acc)
Set the function which will enact that access.
unsigned _size
The size of the request.
@ TLBI
The Request is a TLB shootdown.
Request()
Minimal constructor.
@ ATOMIC_NO_RETURN_OP
The request is an atomic that does not return data.
@ HTM_ABORT
The request aborts a HTM transaction.
ArchFlagsType getArchFlags() const
Accessor function for architecture-specific flags.
void setAccessLatency()
Set/Get the time taken to complete this request's access, not including the time to successfully tran...
gem5::Flags< PrivateFlagsType > PrivateFlags
LocalAccessor _localAccessor
RequestorID _requestorId
The requestor ID which is unique in the system for all ports that are capable of issuing a transactio...
bool hasAtomicOpFunctor()
Accessor for atomic-op functor.
bool isStrictlyOrdered() const
@ VALID_SIZE
Whether or not the size is valid.
@ VALID_STREAM_ID
Whether or not the stream ID and substream ID is valid.
Tick getAccessLatency() const
bool isPrefetchEx() const
Static instruction class for unknown (illegal) instructions.
bool isUncacheable() const
Accessor functions for flags.
@ TLBI_SYNC
The Request is a TLB shootdown sync.
@ INVALIDATE
The request invalidates a memory location.
std::function< Cycles(ThreadContext *tc, Packet *pkt)> LocalAccessor
@ VALID_INST_COUNT
Whether or not the instruction count is valid.
void set(Type mask)
Set all flag's bits matching the given mask.
void splitOnVaddr(Addr split_addr, RequestPtr &req1, RequestPtr &req2)
Generate two requests as if this request had been split into two pieces.
const ContextID InvalidContextID
void clear()
Clear all flag's bits.
@ VALID_INST_SEQ_NUM
Whether or not the instruction sequence number is valid.
@ RELEASE
The request should be marked with RELEASE.
uint64_t _extraData
Extra data for the request, such as the return value of store conditional or the compare value for a ...
uint32_t streamId() const
@ ATOMIC_RETURN_OP
The request is an atomic that returns data.
Counter getInstCount() const
Request(const Request &other)
@ CLEAN
The request cleans a memory location.
void setReqInstSeqNum(const InstSeqNum seq_num)
static const FlagsType HTM_CMD
HtmFailureFaultCause getHtmAbortCause() const
bool isInvL1() const
Accessor functions for the memory space configuration flags and used by GPU ISAs such as the Heteroge...
Addr _paddr
The physical address of the request.
@ DST_BITS
Bits to define the destination of a request.
@ READ_MODIFY_WRITE
This request is a read which will be followed by a write.
@ CACHE_BLOCK_ZERO
This is a write that is targeted and zeroing an entire cache block.
@ VALID_EXTRA_DATA
Whether or not the sc result is valid.
@ STRICT_ORDER
The request is required to be strictly ordered by CPU models and is non-speculative.
bool hasInstSeqNum() const
Accessor for the sequence number of instruction that creates the request.
void clearCacheCoherenceFlags(CacheCoherenceFlags extraFlags)
static RequestPtr createMemManagement(Flags flags, RequestorID id)
Factory method for creating memory management requests, with unspecified addr and size.
@ VALID_HTM_ABORT_CAUSE
Whether or not the abort cause is valid.
Request(Addr vaddr, unsigned size, Flags flags, RequestorID id, Addr pc, ContextID cid, AtomicOpFunctorPtr atomic_op=nullptr)
bool hasVaddr() const
Accessor function for vaddr.
bool isReadModifyWrite() const
void setStreamId(uint32_t sid)
Cycles is a wrapper class for representing cycle counts, i.e.
@ DST_POC
The request targets the point of coherence.
@ EVICT_NEXT
The request should be marked as LRU.
uint32_t _taskId
The task id associated with this request.
@ TLBI_EXT_SYNC
The Request tells the CPU model that a remote TLB Sync has been requested.
@ TLBI_EXT_SYNC_COMP
The Request tells the interconnect that a remote TLB Sync request has completed.
@ SLC_BIT
user-policy flags
gem5::Flags< FlagsType > Flags
@ PF_EXCLUSIVE
The request should be prefetched into the exclusive state.
uint64_t getExtraData() const
Accessor function for store conditional return value.
Addr _pc
program counter of initiating access; for tracing/debugging
@ PREFETCH
The request is a prefetch.
PrivateFlags privateFlags
Private flags for field validity checking.
static const FlagsType TLBI_CMD
void setHtmAbortCause(HtmFailureFaultCause val)
Flags getFlags()
Accessor for flags.
ThreadContext is the external interface to all thread state for anything outside of the CPU.
bool isTlbiExtSync() const
@ DST_POU
The request targets the point of unification.
bool isSet(Type mask) const
Verifies whether any bit matching the given mask is set.
bool hasSize() const
Accessor for size.
@ invldRequestorId
Invalid requestor id for assertion checking only.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
@ LLSC
The request is a Load locked/store conditional.
@ wbRequestorId
This requestor id is used for writeback requests by the caches.
ProbePointArg< PacketInfo > Packet
Packet probe point.
uint64_t Tick
Tick count type.
uint32_t substreamId() const
bool _systemReq
For fullsystem GPU simulation, this determines if a requests destination is system (host) memory or d...
void setPaddr(Addr paddr)
Set just the physical address.
std::shared_ptr< Request > RequestPtr
@ VALID_CONTEXT_ID
Whether or not the context ID is valid.
Tick _time
The time this request was started.
uint64_t CacheCoherenceFlagsType
CacheCoherenceFlags _cacheCoherenceFlags
Flags that control how downstream cache system maintains coherence.
void setExtraData(uint64_t extraData)
Accessor function for store conditional return value.
bool isAtomicReturn() const
int getAccessDepth() const
bool isCacheMaintenance() const
bool hasSubstreamId() const
bool hasPaddr() const
Accessor for paddr.
void setSubstreamId(uint32_t ssid)
void setContext(ContextID context_id)
Set up Context numbers.
@ UNCACHEABLE
The request is to an uncacheable address.
uint32_t _substreamId
The substream ID identifies an "execution context" within a device behind an SMMU/IOMMU.
@ LOCKED_RMW
This request will lock or unlock the accessed memory.
bool isGL2CacheFlush() const
bool isCacheInvalidate() const
HtmFailureFaultCause _htmAbortCause
The cause for HTM transaction abort.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
void setFlags(Flags flags)
Note that unlike other accessors, this function sets specific flags (ORs them in); it does not assign...
const std::vector< bool > & getByteEnable() const
gem5::Flags< CacheCoherenceFlagsType > CacheCoherenceFlags
RequestorID requestorId() const
Accesssor for the requestor id.
uint16_t PrivateFlagsType
bool isTlbiExtSyncComp() const
InstSeqNum _reqInstSeqNum
Sequence number of the instruction that creates the request.
Cycles localAccessor(ThreadContext *tc, Packet *pkt)
Perform the installed local access.
@ I_CACHE_INV
mem_sync_op flags
@ VALID_PADDR
Whether or not paddr is valid (has been written yet).
@ PT_WALK
The request is a page table walk.
@ VALID_VADDR
Whether or not the vaddr is valid.
void setVirt(Addr vaddr, unsigned size, Flags flags, RequestorID id, Addr pc, AtomicOpFunctorPtr amo_op=nullptr)
Set up a virtual (e.g., CPU) request in a previously allocated Request object.
@ MEM_SWAP
This request is for a memory swap.
static const FlagsType STORE_NO_DATA
AtomicOpFunctorPtr atomicOpFunctor
A pointer to an atomic operation.
ContextID contextId() const
Accessor function for context ID.
@ HTM_CANCEL
The request cancels a HTM transaction.
void setByteEnable(const std::vector< bool > &be)
bool hasContextId() const
bool hasInstCount() const
Accessor for instruction count.
@ INST_FETCH
The request was an instruction fetch.
void setTranslateLatency()
Set/Get the time taken for this request to be successfully translated.
uint32_t _streamId
The stream ID uniquely identifies a device behind the SMMU/IOMMU Each transaction arriving at the SMM...
int ContextID
Globally unique thread context ID.
@ SECURE
The request targets the secure memory space.
double Counter
All counters are of 64-bit values.
bool isCacheClean() const
Accessor functions to determine whether this request is part of a cache maintenance operation.
@ PRIVILEGED
This request is made in privileged mode.
AtomicOpFunctor * getAtomicOpFunctor()
@ KERNEL
The request should be marked with KERNEL.
@ STICKY_PRIVATE_FLAGS
These flags are not cleared when a Request object is reused (assigned a new address).
Tick time() const
Accessor for time.
std::vector< bool > _byteEnable
Byte-enable mask for writes.
ContextID _contextId
The context ID (for statistics, locks, and wakeups).
void clearFlags(Flags flags)
@ STICKY_FLAGS
These flags are not cleared when a Request object is reused (assigned a new address).
@ HTM_START
hardware transactional memory
Addr _vaddr
The virtual address of the request.
void incAccessDepth() const
Increment/Get the depth at which this request is responded to.
@ PHYSICAL
The virtual address is also the physical address.
Tick getTranslateLatency() const
std::unique_ptr< AtomicOpFunctor > AtomicOpFunctorPtr
void requestorId(RequestorID rid)
bool isMasked() const
Returns true if the memory request is masked, which means there is at least one byteEnable element wh...
Tick translateDelta
Time for the TLB/table walker to successfully translate this request.
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
bool isGLCSet() const
Accessor functions for the cache bypass flags.
@ intRequestorId
This requestor id is used for message signaled interrupts.
Request(Addr paddr, unsigned size, Flags flags, RequestorID id)
Constructor for physical (e.g.
bool isLocalAccess()
Is this request for a local memory mapped resource/register?
bool isToPOU() const
Accessor functions for the destination of a memory request.
void setInstCount(Counter val)
@ NO_ACCESS
The request should not cause a memory access.
int depth
Level of the cache hierachy where this request was responded to (e.g.
bool extraDataValid() const
Accessor function to check if sc result is valid.
Addr getPC() const
Accessor function for pc.
void setSystemReq(bool sysReq)
Tick accessDelta
Access latency to complete this memory transaction not including translation time.
void setCacheCoherenceFlags(CacheCoherenceFlags extraFlags)
@ VALID_PC
Whether or not the pc is valid.
Generated on Sun Jul 30 2023 01:56:58 for gem5 by doxygen 1.8.17