gem5  v21.1.0.2
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
gem5::o3::LSQ::SplitDataRequest Class Reference

#include <lsq.hh>

Inheritance diagram for gem5::o3::LSQ::SplitDataRequest:
gem5::o3::LSQ::LSQRequest gem5::BaseMMU::Translation

Public Member Functions

 SplitDataRequest (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)
 
virtual ~SplitDataRequest ()
 
virtual void finish (const Fault &fault, const RequestPtr &req, gem5::ThreadContext *tc, BaseMMU::Mode mode)
 
virtual bool recvTimingResp (PacketPtr pkt)
 
virtual void initiateTranslation ()
 
virtual void sendPacketToCache ()
 
virtual void buildPackets ()
 
virtual Cycles handleLocalAccess (gem5::ThreadContext *thread, PacketPtr pkt)
 Memory mapped IPR accesses. More...
 
virtual bool isCacheBlockHit (Addr blockAddr, Addr cacheBlockMask)
 Caches may probe into the load-store queue to enforce memory ordering guarantees. More...
 
virtual RequestPtr mainRequest ()
 
virtual PacketPtr mainPacket ()
 
virtual std::string name () const
 
- Public Member Functions inherited from gem5::o3::LSQ::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)
 
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 gem5::BaseMMU::Translation
virtual ~Translation ()
 

Protected Types

using Flag = LSQRequest::Flag
 
using State = LSQRequest::State
 
- Protected Types inherited from gem5::o3::LSQ::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 gem5::o3::LSQ::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...
 
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

uint32_t numFragments
 
uint32_t numReceivedPackets
 
RequestPtr mainReq
 
PacketPtr _mainPacket
 
const Addr _addr
 
PacketDataPtr _data
 
std::vector< Fault_fault
 
const Request::Flags _flags
 
const DynInstPtr _inst
 
std::vector< PacketPtr_packets
 
LSQUnit_port
 
std::vector< RequestPtr_requests
 
uint64_t * _res
 
std::vector< bool > _byteEnable
 
LSQSenderState_senderState
 
const uint32_t _size
 
State _state
 
uint32_t _taskId
 
FlagsType flags
 
uint32_t numInTranslationFragments
 
uint32_t numTranslatedFragments
 
uint32_t _numOutstandingPackets
 
- Protected Attributes inherited from gem5::o3::LSQ::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 gem5::o3::LSQ::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

Definition at line 709 of file lsq.hh.

Member Typedef Documentation

◆ Flag

Definition at line 714 of file lsq.hh.

◆ State

Definition at line 715 of file lsq.hh.

Constructor & Destructor Documentation

◆ SplitDataRequest()

gem5::o3::LSQ::SplitDataRequest::SplitDataRequest ( 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 
)
inline

Definition at line 747 of file lsq.hh.

References gem5::o3::LSQ::LSQRequest::flags, and gem5::Flags< T >::set().

◆ ~SplitDataRequest()

virtual gem5::o3::LSQ::SplitDataRequest::~SplitDataRequest ( )
inlinevirtual

Definition at line 760 of file lsq.hh.

References _mainPacket, and mainReq.

Member Function Documentation

◆ buildPackets()

void gem5::o3::LSQ::SplitDataRequest::buildPackets ( )
virtual

◆ finish()

void gem5::o3::LSQ::SplitDataRequest::finish ( const Fault fault,
const RequestPtr req,
gem5::ThreadContext tc,
BaseMMU::Mode  mode 
)
virtual

Implements gem5::BaseMMU::Translation.

Definition at line 893 of file lsq.cc.

References gem5::ArmISA::i, and gem5::NoFault.

◆ handleLocalAccess()

Cycles gem5::o3::LSQ::SplitDataRequest::handleLocalAccess ( gem5::ThreadContext thread,
PacketPtr  pkt 
)
virtual

◆ initiateTranslation()

void gem5::o3::LSQ::SplitDataRequest::initiateTranslation ( )
virtual

Implements gem5::o3::LSQ::LSQRequest.

Definition at line 974 of file lsq.cc.

References gem5::addrBlockAlign(), gem5::ArmISA::i, and gem5::MipsISA::r.

◆ isCacheBlockHit()

bool gem5::o3::LSQ::SplitDataRequest::isCacheBlockHit ( Addr  blockAddr,
Addr  blockMask 
)
virtual

Caches may probe into the load-store queue to enforce memory ordering guarantees.

This method supports probes by providing a mechanism to compare snoop messages with requests tracked by the load-store queue.

Consistency models must enforce ordering constraints. TSO, for instance, must prevent memory reorderings except stores which are reordered after loads. The reordering restrictions negatively impact performance by cutting down on memory level parallelism. However, the core can regain performance by generating speculative loads. Speculative loads may issue without affecting correctness if precautions are taken to handle invalid memory orders. The load queue must squash under memory model violations. Memory model violations may occur when block ownership is granted to another core or the block cannot be accurately monitored by the load queue.

The load-store queue handles partial faults which complicates this method. Physical addresses must be compared between requests and snoops. Some requests will not have a valid physical address, since partial faults may have outstanding translations. Therefore, the existence of a valid request address must be checked before comparing block hits. We assume no pipeline squash is needed if a valid request address does not exist.

Implements gem5::o3::LSQ::LSQRequest.

Definition at line 1328 of file lsq.cc.

References gem5::MipsISA::r.

◆ isLoad()

bool gem5::o3::LSQ::LSQRequest::isLoad
inlineprotected

Definition at line 311 of file lsq.hh.

◆ isTranslationComplete()

bool gem5::o3::LSQ::LSQRequest::isTranslationComplete
inlineprotected

Definition at line 526 of file lsq.hh.

◆ lsqUnit()

LSQUnit* gem5::o3::LSQ::LSQRequest::lsqUnit
inlineprotected

Definition at line 303 of file lsq.hh.

◆ mainPacket()

PacketPtr gem5::o3::LSQ::SplitDataRequest::mainPacket ( )
virtual

Reimplemented from gem5::o3::LSQ::LSQRequest.

Definition at line 962 of file lsq.cc.

◆ mainRequest()

RequestPtr gem5::o3::LSQ::SplitDataRequest::mainRequest ( )
virtual

Reimplemented from gem5::o3::LSQ::LSQRequest.

Definition at line 968 of file lsq.cc.

◆ name()

virtual std::string gem5::o3::LSQ::SplitDataRequest::name ( ) const
inlinevirtual

Reimplemented from gem5::o3::LSQ::LSQRequest.

Definition at line 783 of file lsq.hh.

◆ recvTimingResp()

bool gem5::o3::LSQ::SplitDataRequest::recvTimingResp ( PacketPtr  pkt)
virtual

◆ request() [1/2]

RequestPtr gem5::o3::LSQ::LSQRequest::request
inlineprotected

Definition at line 408 of file lsq.hh.

◆ request() [2/2]

const RequestPtr gem5::o3::LSQ::LSQRequest::request
inlineprotected

Definition at line 411 of file lsq.hh.

◆ sendFragmentToTranslation()

void gem5::o3::LSQ::LSQRequest::sendFragmentToTranslation
protected

Definition at line 1116 of file lsq.cc.

◆ sendPacketToCache()

void gem5::o3::LSQ::SplitDataRequest::sendPacketToCache ( )
virtual

Implements gem5::o3::LSQ::LSQRequest.

Definition at line 1269 of file lsq.cc.

◆ setState()

void gem5::o3::LSQ::LSQRequest::setState
inlineprotected

Definition at line 276 of file lsq.hh.

Member Data Documentation

◆ _addr

const Addr gem5::o3::LSQ::LSQRequest::_addr
protected

Definition at line 296 of file lsq.hh.

◆ _byteEnable

std::vector<bool> gem5::o3::LSQ::LSQRequest::_byteEnable
protected

Definition at line 299 of file lsq.hh.

◆ _data

PacketDataPtr gem5::o3::LSQ::LSQRequest::_data
protected

Definition at line 291 of file lsq.hh.

◆ _fault

std::vector<Fault> gem5::o3::LSQ::LSQRequest::_fault
protected

Definition at line 294 of file lsq.hh.

◆ _flags

const Request::Flags gem5::o3::LSQ::LSQRequest::_flags
protected

Definition at line 298 of file lsq.hh.

◆ _inst

const DynInstPtr gem5::o3::LSQ::LSQRequest::_inst
protected

Definition at line 289 of file lsq.hh.

◆ _mainPacket

PacketPtr gem5::o3::LSQ::SplitDataRequest::_mainPacket
protected

Definition at line 744 of file lsq.hh.

Referenced by ~SplitDataRequest().

◆ _numOutstandingPackets

uint32_t gem5::o3::LSQ::LSQRequest::_numOutstandingPackets
protected

Definition at line 300 of file lsq.hh.

◆ _packets

std::vector<PacketPtr> gem5::o3::LSQ::LSQRequest::_packets
protected

Definition at line 292 of file lsq.hh.

◆ _port

LSQUnit& gem5::o3::LSQ::LSQRequest::_port
protected

Definition at line 288 of file lsq.hh.

◆ _requests

std::vector<RequestPtr> gem5::o3::LSQ::LSQRequest::_requests
protected

Definition at line 293 of file lsq.hh.

◆ _res

uint64_t* gem5::o3::LSQ::LSQRequest::_res
protected

Definition at line 295 of file lsq.hh.

◆ _senderState

LSQSenderState* gem5::o3::LSQ::LSQRequest::_senderState
protected

Definition at line 275 of file lsq.hh.

◆ _size

const uint32_t gem5::o3::LSQ::LSQRequest::_size
protected

Definition at line 297 of file lsq.hh.

◆ _state

State gem5::o3::LSQ::LSQRequest::_state
protected

Definition at line 274 of file lsq.hh.

◆ _taskId

uint32_t gem5::o3::LSQ::LSQRequest::_taskId
protected

Definition at line 290 of file lsq.hh.

◆ flags

FlagsType gem5::o3::LSQ::LSQRequest::flags
protected

Definition at line 264 of file lsq.hh.

◆ mainReq

RequestPtr gem5::o3::LSQ::SplitDataRequest::mainReq
protected

Definition at line 743 of file lsq.hh.

Referenced by ~SplitDataRequest().

◆ numFragments

uint32_t gem5::o3::LSQ::SplitDataRequest::numFragments
protected

Definition at line 741 of file lsq.hh.

◆ numInTranslationFragments

uint32_t gem5::o3::LSQ::LSQRequest::numInTranslationFragments
protected

Definition at line 279 of file lsq.hh.

◆ numReceivedPackets

uint32_t gem5::o3::LSQ::SplitDataRequest::numReceivedPackets
protected

Definition at line 742 of file lsq.hh.

◆ numTranslatedFragments

uint32_t gem5::o3::LSQ::LSQRequest::numTranslatedFragments
protected

Definition at line 278 of file lsq.hh.


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

Generated on Tue Sep 21 2021 12:31:46 for gem5 by doxygen 1.8.17