gem5  v20.1.0.0
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
LSQ< Impl >::SingleDataRequest Class Reference

#include <lsq.hh>

Inheritance diagram for LSQ< Impl >::SingleDataRequest:
LSQ< Impl >::LSQRequest BaseTLB::Translation LSQ< Impl >::HtmCmdRequest

Public Member Functions

 SingleDataRequest (LSQUnit *port, const DynInstPtr &inst, bool isLoad, const Addr &addr, const uint32_t &size, const Request::Flags &flags_, PacketDataPtr data=nullptr, uint64_t *res=nullptr, AtomicOpFunctorPtr amo_op=nullptr)
 
virtual ~SingleDataRequest ()
 
virtual void initiateTranslation ()
 
virtual void finish (const Fault &fault, const RequestPtr &req, ThreadContext *tc, BaseTLB::Mode mode)
 
virtual bool recvTimingResp (PacketPtr pkt)
 
virtual void sendPacketToCache ()
 
virtual void buildPackets ()
 
virtual Cycles handleLocalAccess (ThreadContext *thread, PacketPtr pkt)
 Memory mapped IPR accesses. More...
 
virtual bool isCacheBlockHit (Addr blockAddr, Addr cacheBlockMask)
 Test if the request accesses a particular cache line. More...
 
virtual std::string name () const
 
- Public Member Functions inherited from LSQ< Impl >::LSQRequest
void packetSent ()
 Update the status to reflect that a packet was sent. More...
 
void packetNotSent ()
 Update the status to reflect that a packet was not sent. More...
 
void sendFragmentToTranslation (int i)
 
bool isComplete ()
 
bool isInTranslation ()
 
bool isTranslationComplete ()
 
bool isTranslationBlocked ()
 
bool isSent ()
 
bool isPartialFault ()
 
bool isMemAccessRequired ()
 
void setStateToFault ()
 
void freeLSQEntry ()
 The LSQ entry is cleared. More...
 
void discard ()
 The request is discarded (e.g. More...
 
void packetReplied ()
 
void writebackScheduled ()
 
void writebackDone ()
 
void squashTranslation ()
 
void complete ()
 
void setContext (const ContextID &context_id)
 Convenience getters/setters. More...
 
const DynInstPtrinstruction ()
 
void setVirt (Addr vaddr, unsigned size, Request::Flags flags_, RequestorID requestor_id, Addr pc)
 Set up virtual request. More...
 
void taskId (const uint32_t &v)
 
uint32_t taskId () const
 
RequestPtr request (int idx=0)
 
const RequestPtr request (int idx=0) const
 
Addr getVaddr (int idx=0) const
 
PacketPtr packet (int idx=0)
 
virtual PacketPtr mainPacket ()
 
virtual RequestPtr mainRequest ()
 
void senderState (LSQSenderState *st)
 
const LSQSenderStatesenderState () const
 
void discardSenderState ()
 Mark senderState as discarded. More...
 
bool isAnyOutstandingRequest ()
 Test if there is any in-flight translation or mem access request. More...
 
bool isSplit () const
 
- Public Member Functions inherited from BaseTLB::Translation
virtual ~Translation ()
 

Protected Types

using Flag = typename LSQRequest::Flag
 
using State = typename LSQRequest::State
 
- Protected Types inherited from LSQ< Impl >::LSQRequest
enum  Flag : FlagsStorage {
  IsLoad = 0x00000001, WbStore = 0x00000002, Delayed = 0x00000004, IsSplit = 0x00000008,
  TranslationStarted = 0x00000010, TranslationFinished = 0x00000020, Sent = 0x00000040, Retry = 0x00000080,
  Complete = 0x00000100, TranslationSquashed = 0x00000200, Discarded = 0x00000400, LSQEntryFreed = 0x00000800,
  WritebackScheduled = 0x00001000, WritebackDone = 0x00002000, IsAtomic = 0x00004000
}
 
enum  State {
  State::NotIssued, State::Translation, State::Request, State::Fault,
  State::PartialFault
}
 
typedef uint32_t FlagsStorage
 
typedef ::Flags< FlagsStorageFlagsType
 

Protected Member Functions

bool isLoad () const
 
bool isTranslationComplete ()
 
LSQUnitlsqUnit ()
 
RequestPtr request (int idx=0)
 
const RequestPtr request (int idx=0) const
 
void sendFragmentToTranslation (int i)
 
void setState (const State &newState)
 
- Protected Member Functions inherited from LSQ< Impl >::LSQRequest
void setState (const State &newState)
 
void markDelayed () override
 Signal that the translation has been delayed due to a hw page table walk. More...
 
bool isDelayed ()
 
LSQUnitlsqUnit ()
 
 LSQRequest (LSQUnit *port, const DynInstPtr &inst, bool isLoad)
 
 LSQRequest (LSQUnit *port, const DynInstPtr &inst, bool isLoad, const Addr &addr, const uint32_t &size, const Request::Flags &flags_, PacketDataPtr data=nullptr, uint64_t *res=nullptr, AtomicOpFunctorPtr amo_op=nullptr)
 
bool isLoad () const
 
bool isAtomic () const
 
void install ()
 Install the request in the LQ/SQ. More...
 
virtual bool squashed () const override
 This function is used by the page table walker to determine if it should translate the a pending request or if the underlying request has been squashed. More...
 
bool isReleased ()
 Test if the LSQRequest has been released, i.e. More...
 
void release (Flag reason)
 Release the LSQRequest. More...
 
void addRequest (Addr addr, unsigned size, const std::vector< bool > &byte_enable)
 Helper function used to add a (sub)request, given its address addr, size size and byte-enable mask byteEnable. More...
 
virtual ~LSQRequest ()
 Destructor. More...
 

Protected Attributes

const Addr _addr
 
std::vector< Fault_fault
 
const Request::Flags _flags
 
const uint32_t _size
 
std::vector< bool > _byteEnable
 
std::vector< RequestPtr_requests
 
const DynInstPtr _inst
 
std::vector< PacketPtr_packets
 
LSQUnit_port
 
uint64_t * _res
 
uint32_t _taskId
 
LSQSenderState_senderState
 
State _state
 
FlagsType flags
 
uint32_t numInTranslationFragments
 
uint32_t numTranslatedFragments
 
uint32_t _numOutstandingPackets
 
AtomicOpFunctorPtr _amo_op
 
- Protected Attributes inherited from LSQ< Impl >::LSQRequest
FlagsType flags
 
State _state
 
LSQSenderState_senderState
 
uint32_t numTranslatedFragments
 
uint32_t numInTranslationFragments
 
uint32_t _entryIdx
 LQ/SQ entry idx. More...
 

Additional Inherited Members

- Public Attributes inherited from LSQ< Impl >::LSQRequest
LSQUnit_port
 
const DynInstPtr _inst
 
uint32_t _taskId
 
PacketDataPtr _data
 
std::vector< PacketPtr_packets
 
std::vector< RequestPtr_requests
 
std::vector< Fault_fault
 
uint64_t * _res
 
const Addr _addr
 
const uint32_t _size
 
const Request::Flags _flags
 
std::vector< bool > _byteEnable
 
uint32_t _numOutstandingPackets
 
AtomicOpFunctorPtr _amo_op
 

Detailed Description

template<class Impl>
class LSQ< Impl >::SingleDataRequest

Definition at line 694 of file lsq.hh.

Member Typedef Documentation

◆ Flag

template<class Impl >
using LSQ< Impl >::SingleDataRequest::Flag = typename LSQRequest::Flag
protected

Definition at line 699 of file lsq.hh.

◆ State

template<class Impl >
using LSQ< Impl >::SingleDataRequest::State = typename LSQRequest::State
protected

Definition at line 700 of file lsq.hh.

Constructor & Destructor Documentation

◆ SingleDataRequest()

template<class Impl >
LSQ< Impl >::SingleDataRequest::SingleDataRequest ( LSQUnit port,
const DynInstPtr inst,
bool  isLoad,
const Addr addr,
const uint32_t &  size,
const Request::Flags flags_,
PacketDataPtr  data = nullptr,
uint64_t *  res = nullptr,
AtomicOpFunctorPtr  amo_op = nullptr 
)
inline

Definition at line 726 of file lsq.hh.

◆ ~SingleDataRequest()

template<class Impl >
virtual LSQ< Impl >::SingleDataRequest::~SingleDataRequest ( )
inlinevirtual

Definition at line 735 of file lsq.hh.

Member Function Documentation

◆ buildPackets()

template<class Impl >
void LSQ< Impl >::SingleDataRequest::buildPackets
virtual

Implements LSQ< Impl >::LSQRequest.

Definition at line 1022 of file lsq_impl.hh.

References Packet::createRead(), Packet::createWrite(), and DPRINTF.

◆ finish()

template<class Impl >
void LSQ< Impl >::SingleDataRequest::finish ( const Fault fault,
const RequestPtr req,
ThreadContext tc,
BaseTLB::Mode  mode 
)
virtual

◆ handleLocalAccess()

template<class Impl >
Cycles LSQ< Impl >::SingleDataRequest::handleLocalAccess ( ThreadContext thread,
PacketPtr  pkt 
)
virtual

Memory mapped IPR accesses.

Implements LSQ< Impl >::LSQRequest.

Definition at line 1143 of file lsq_impl.hh.

References Packet::req, and LSQ< Impl >::thread.

◆ initiateTranslation()

template<class Impl >
void LSQ< Impl >::SingleDataRequest::initiateTranslation
virtual

Implements LSQ< Impl >::LSQRequest.

Reimplemented in LSQ< Impl >::HtmCmdRequest.

Definition at line 850 of file lsq_impl.hh.

◆ isCacheBlockHit()

template<class Impl >
bool LSQ< Impl >::SingleDataRequest::isCacheBlockHit ( Addr  blockAddr,
Addr  cacheBlockMask 
)
virtual

Test if the request accesses a particular cache line.

Implements LSQ< Impl >::LSQRequest.

Definition at line 1172 of file lsq_impl.hh.

References LSQ< Impl >::LSQRequest::_requests.

◆ isLoad()

template<class Impl >
bool LSQ< Impl >::LSQRequest::isLoad
inlineprotected

Definition at line 337 of file lsq.hh.

◆ isTranslationComplete()

template<class Impl >
bool LSQ< Impl >::LSQRequest::isTranslationComplete
inlineprotected

Definition at line 591 of file lsq.hh.

◆ lsqUnit()

template<class Impl >
LSQUnit* LSQ< Impl >::LSQRequest::lsqUnit
inlineprotected

Definition at line 302 of file lsq.hh.

◆ name()

template<class Impl >
virtual std::string LSQ< Impl >::SingleDataRequest::name ( ) const
inlinevirtual

Reimplemented from LSQ< Impl >::LSQRequest.

Reimplemented in LSQ< Impl >::HtmCmdRequest.

Definition at line 744 of file lsq.hh.

◆ recvTimingResp()

template<class Impl >
bool LSQ< Impl >::SingleDataRequest::recvTimingResp ( PacketPtr  pkt)
virtual

◆ request() [1/2]

template<class Impl >
RequestPtr LSQ< Impl >::LSQRequest::request
inlineprotected

Definition at line 473 of file lsq.hh.

◆ request() [2/2]

template<class Impl >
const RequestPtr LSQ< Impl >::LSQRequest::request
inlineprotected

Definition at line 476 of file lsq.hh.

◆ sendFragmentToTranslation()

template<class Impl >
void LSQ< Impl >::LSQRequest::sendFragmentToTranslation
protected

Definition at line 970 of file lsq_impl.hh.

◆ sendPacketToCache()

template<class Impl >
void LSQ< Impl >::SingleDataRequest::sendPacketToCache
virtual

Implements LSQ< Impl >::LSQRequest.

Definition at line 1122 of file lsq_impl.hh.

◆ setState()

template<class Impl >
void LSQ< Impl >::LSQRequest::setState
inlineprotected

Definition at line 275 of file lsq.hh.

Member Data Documentation

◆ _addr

template<class Impl >
const Addr LSQ< Impl >::LSQRequest::_addr
protected

Definition at line 295 of file lsq.hh.

◆ _amo_op

template<class Impl >
AtomicOpFunctorPtr LSQ< Impl >::LSQRequest::_amo_op
protected

Definition at line 300 of file lsq.hh.

◆ _byteEnable

template<class Impl >
std::vector<bool> LSQ< Impl >::LSQRequest::_byteEnable
protected

Definition at line 298 of file lsq.hh.

◆ _fault

template<class Impl >
std::vector<Fault> LSQ< Impl >::LSQRequest::_fault
protected

Definition at line 293 of file lsq.hh.

◆ _flags

template<class Impl >
const Request::Flags LSQ< Impl >::LSQRequest::_flags
protected

Definition at line 297 of file lsq.hh.

◆ _inst

template<class Impl >
const DynInstPtr LSQ< Impl >::LSQRequest::_inst
protected

Definition at line 288 of file lsq.hh.

◆ _numOutstandingPackets

template<class Impl >
uint32_t LSQ< Impl >::LSQRequest::_numOutstandingPackets
protected

Definition at line 299 of file lsq.hh.

◆ _packets

template<class Impl >
std::vector<PacketPtr> LSQ< Impl >::LSQRequest::_packets
protected

Definition at line 291 of file lsq.hh.

◆ _port

template<class Impl >
LSQUnit& LSQ< Impl >::LSQRequest::_port
protected

Definition at line 287 of file lsq.hh.

◆ _requests

template<class Impl >
std::vector<RequestPtr> LSQ< Impl >::LSQRequest::_requests
protected

Definition at line 292 of file lsq.hh.

◆ _res

template<class Impl >
uint64_t* LSQ< Impl >::LSQRequest::_res
protected

Definition at line 294 of file lsq.hh.

◆ _senderState

template<class Impl >
LSQSenderState* LSQ< Impl >::LSQRequest::_senderState
protected

Definition at line 274 of file lsq.hh.

◆ _size

template<class Impl >
const uint32_t LSQ< Impl >::LSQRequest::_size
protected

Definition at line 296 of file lsq.hh.

◆ _state

template<class Impl >
State LSQ< Impl >::LSQRequest::_state
protected

Definition at line 273 of file lsq.hh.

◆ _taskId

template<class Impl >
uint32_t LSQ< Impl >::LSQRequest::_taskId
protected

Definition at line 289 of file lsq.hh.

◆ flags

template<class Impl >
FlagsType LSQ< Impl >::LSQRequest::flags
protected

Definition at line 263 of file lsq.hh.

◆ numInTranslationFragments

template<class Impl >
uint32_t LSQ< Impl >::LSQRequest::numInTranslationFragments
protected

Definition at line 278 of file lsq.hh.

◆ numTranslatedFragments

template<class Impl >
uint32_t LSQ< Impl >::LSQRequest::numTranslatedFragments
protected

Definition at line 277 of file lsq.hh.


The documentation for this class was generated from the following files:

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