gem5
|
Derived SenderState to carry data access info. More...
#include <lsq.hh>
Public Types | |
enum | LSQRequestState { NotIssued, InTranslation, Translated, Failed, RequestIssuing, StoreToStoreBuffer, RequestNeedsRetry, StoreInStoreBuffer, StoreBufferIssuing, StoreBufferNeedsRetry, Complete } |
Public Member Functions | |
LSQRequest (LSQ &port_, MinorDynInstPtr inst_, bool isLoad_, PacketDataPtr data_=NULL, uint64_t *res_=NULL) | |
virtual | ~LSQRequest () |
void | makePacket () |
Make a packet to use with the memory transaction. More... | |
bool | skippedMemAccess () |
Was no memory access attempted for this request? More... | |
void | setSkipped () |
Set this request as having been skipped before a memory transfer was attempt. More... | |
AddrRangeCoverage | containsAddrRangeOf (LSQRequest *other_request) |
Does this request's address range fully cover the range of other_request? More... | |
virtual void | startAddrTranslation ()=0 |
Start the address translation process for this request. More... | |
virtual PacketPtr | getHeadPacket ()=0 |
Get the next packet to issue for this request. More... | |
virtual void | stepToNextPacket ()=0 |
Step to the next packet for the next call to getHeadPacket. More... | |
virtual bool | sentAllPackets ()=0 |
Have all packets been sent? More... | |
virtual bool | hasPacketsInMemSystem ()=0 |
True if this request has any issued packets in the memory system and so can't be interrupted until it gets responses. More... | |
virtual void | retireResponse (PacketPtr packet_)=0 |
Retire a response packet into the LSQRequest packet possibly completing this transfer. More... | |
virtual bool | isBarrier () |
Is this a request a barrier? More... | |
bool | needsToBeSentToStoreBuffer () |
This request, once processed by the requests/transfers queues, will need to go to the store buffer. More... | |
void | setState (LSQRequestState new_state) |
Set state and output trace output. More... | |
bool | isComplete () const |
Has this request been completed. More... | |
void | reportData (std::ostream &os) const |
MinorTrace report interface. More... | |
Public Member Functions inherited from BaseTLB::Translation | |
virtual | ~Translation () |
virtual void | finish (const Fault &fault, RequestPtr req, ThreadContext *tc, Mode mode)=0 |
virtual bool | squashed () const |
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... | |
Public Member Functions inherited from Packet::SenderState | |
SenderState () | |
virtual | ~SenderState () |
Static Public Member Functions | |
static AddrRangeCoverage | containsAddrRangeOf (Addr req1_addr, unsigned int req1_size, Addr req2_addr, unsigned int req2_size) |
Does address range req1 (req1_addr to req1_addr + req1_size - 1) fully cover, partially cover or not cover at all the range req2. More... | |
Public Attributes | |
LSQ & | port |
Owning port. More... | |
MinorDynInstPtr | inst |
Instruction which made this request. More... | |
bool | isLoad |
Load/store indication used for building packet. More... | |
PacketDataPtr | data |
Dynamically allocated and populated data carried for building write packets. More... | |
PacketPtr | packet |
Request | request |
The underlying request of this LSQRequest. More... | |
Fault | fault |
Fault generated performing this request. More... | |
uint64_t * | res |
Res from pushRequest. More... | |
bool | skipped |
Was skipped. More... | |
bool | issuedToMemory |
This in an access other than a normal cacheable load that's visited the memory system. More... | |
LSQRequestState | state |
Public Attributes inherited from Packet::SenderState | |
SenderState * | predecessor |
Protected Member Functions | |
void | markDelayed () |
BaseTLB::Translation interface. More... | |
Derived SenderState to carry data access info.
through address translation, the queues in this port and back from the memory system.
Minor::LSQ::LSQRequest::LSQRequest | ( | LSQ & | port_, |
MinorDynInstPtr | inst_, | ||
bool | isLoad_, | ||
PacketDataPtr | data_ = NULL , |
||
uint64_t * | res_ = NULL |
||
) |
|
virtual |
|
static |
Does address range req1 (req1_addr to req1_addr + req1_size - 1) fully cover, partially cover or not cover at all the range req2.
Definition at line 89 of file lsq.cc.
References Minor::LSQ::FullAddrRangeCoverage, Minor::LSQ::NoAddrRangeCoverage, and Minor::LSQ::PartialAddrRangeCoverage.
Referenced by Minor::LSQ::StoreBuffer::canForwardDataToLoad(), and Minor::LSQ::StoreBuffer::forwardStoreData().
AddrRangeCoverage Minor::LSQ::LSQRequest::containsAddrRangeOf | ( | LSQRequest * | other_request | ) |
Does this request's address range fully cover the range of other_request?
|
pure virtual |
Get the next packet to issue for this request.
For split transfers, it will be necessary to step through the available packets by calling do { getHeadPacket ; stepToNextPacket } while (!sentAllPackets) and by retiring response using retireResponse
Implemented in Minor::LSQ::SplitDataRequest, Minor::LSQ::SingleDataRequest, and Minor::LSQ::SpecialDataRequest.
Referenced by Minor::LSQ::tryToSend().
|
pure virtual |
True if this request has any issued packets in the memory system and so can't be interrupted until it gets responses.
Implemented in Minor::LSQ::SplitDataRequest, Minor::LSQ::SingleDataRequest, and Minor::LSQ::SpecialDataRequest.
Referenced by Minor::LSQ::recvTimingResp(), and Minor::LSQ::tryToSendToTransfers().
|
virtual |
Is this a request a barrier?
Reimplemented in Minor::LSQ::BarrierDataRequest.
Definition at line 118 of file lsq.cc.
Referenced by Minor::LSQ::StoreBuffer::countIssuedStore(), Minor::LSQ::findResponse(), Minor::LSQ::recvTimingResp(), and Minor::LSQ::StoreBuffer::step().
bool Minor::LSQ::LSQRequest::isComplete | ( | ) | const |
Has this request been completed.
This includes all reasons for completion: successful transfers, faults, skipped because of preceding faults
Definition at line 138 of file lsq.cc.
References Minor::LSQ::state.
Referenced by Minor::LSQ::findResponse(), Minor::LSQ::recvTimingResp(), Minor::LSQ::StoreBuffer::step(), and Minor::LSQ::tryToSendToTransfers().
void Minor::LSQ::LSQRequest::makePacket | ( | ) |
Make a packet to use with the memory transaction.
Definition at line 1585 of file lsq.cc.
References data, Minor::makePacketForRequest(), and NoFault.
|
inlineprotectedvirtual |
BaseTLB::Translation interface.
Implements BaseTLB::Translation.
bool Minor::LSQ::LSQRequest::needsToBeSentToStoreBuffer | ( | ) |
This request, once processed by the requests/transfers queues, will need to go to the store buffer.
Definition at line 124 of file lsq.cc.
References Minor::LSQ::state.
Referenced by Minor::Execute::handleMemResponse().
void Minor::LSQ::LSQRequest::reportData | ( | std::ostream & | os | ) | const |
MinorTrace report interface.
Definition at line 146 of file lsq.cc.
References Minor::LSQ::state.
Referenced by Minor::LSQ::StoreBuffer::minorTrace().
|
pure virtual |
Retire a response packet into the LSQRequest packet possibly completing this transfer.
Implemented in Minor::LSQ::SplitDataRequest, Minor::LSQ::SingleDataRequest, and Minor::LSQ::SpecialDataRequest.
Referenced by Minor::LSQ::recvTimingResp().
|
pure virtual |
Have all packets been sent?
Implemented in Minor::LSQ::SplitDataRequest, Minor::LSQ::SingleDataRequest, and Minor::LSQ::SpecialDataRequest.
Referenced by Minor::LSQ::StoreBuffer::step(), and Minor::LSQ::tryToSend().
|
inline |
Set this request as having been skipped before a memory transfer was attempt.
Definition at line 206 of file lsq.hh.
References skipped.
Referenced by Minor::LSQ::tryToSendToTransfers().
void Minor::LSQ::LSQRequest::setState | ( | LSQRequestState | new_state | ) |
Set state and output trace output.
Definition at line 130 of file lsq.cc.
References DPRINTFS, and Minor::LSQ::state.
Referenced by Minor::LSQ::StoreBuffer::insert(), Minor::LSQ::recvReqRetry(), Minor::LSQ::tryToSend(), and Minor::LSQ::tryToSendToTransfers().
|
inline |
|
pure virtual |
Start the address translation process for this request.
This will issue a translation request to the TLB.
Implemented in Minor::LSQ::SplitDataRequest, Minor::LSQ::SingleDataRequest, and Minor::LSQ::SpecialDataRequest.
Referenced by Minor::LSQ::pushRequest().
|
pure virtual |
Step to the next packet for the next call to getHeadPacket.
Implemented in Minor::LSQ::SplitDataRequest, Minor::LSQ::SingleDataRequest, and Minor::LSQ::SpecialDataRequest.
Referenced by Minor::LSQ::tryToSend().
PacketDataPtr Minor::LSQ::LSQRequest::data |
Dynamically allocated and populated data carried for building write packets.
Definition at line 137 of file lsq.hh.
Referenced by ~LSQRequest().
Fault Minor::LSQ::LSQRequest::fault |
Fault generated performing this request.
Definition at line 149 of file lsq.hh.
Referenced by Minor::Execute::handleMemResponse(), and Minor::LSQ::tryToSendToTransfers().
MinorDynInstPtr Minor::LSQ::LSQRequest::inst |
Instruction which made this request.
Definition at line 129 of file lsq.hh.
Referenced by Minor::LSQ::StoreBuffer::canForwardDataToLoad(), Minor::LSQ::StoreBuffer::deleteRequest(), Minor::LSQ::findResponse(), Minor::LSQ::StoreBuffer::insert(), Minor::LSQ::popResponse(), Minor::LSQ::recvTimingResp(), Minor::LSQ::sendStoreToStoreBuffer(), Minor::LSQ::StoreBuffer::step(), Minor::LSQ::threadSnoop(), Minor::LSQ::tryToSend(), and Minor::LSQ::tryToSendToTransfers().
bool Minor::LSQ::LSQRequest::isLoad |
Load/store indication used for building packet.
This isn't carried by Request so we need to keep it here
Definition at line 133 of file lsq.hh.
Referenced by Minor::LSQ::StoreBuffer::forwardStoreData(), Minor::LSQ::moveFromRequestsToTransfers(), Minor::LSQ::popResponse(), Minor::LSQ::tryToSend(), and Minor::LSQ::tryToSendToTransfers().
bool Minor::LSQ::LSQRequest::issuedToMemory |
This in an access other than a normal cacheable load that's visited the memory system.
Definition at line 161 of file lsq.hh.
Referenced by Minor::LSQ::popResponse(), and Minor::LSQ::tryToSendToTransfers().
PacketPtr Minor::LSQ::LSQRequest::packet |
Definition at line 143 of file lsq.hh.
Referenced by Minor::LSQ::StoreBuffer::canForwardDataToLoad(), Minor::LSQ::StoreBuffer::forwardStoreData(), Minor::LSQ::SingleDataRequest::getHeadPacket(), Minor::Execute::handleMemResponse(), Minor::LSQ::threadSnoop(), Minor::LSQ::tryToSendToTransfers(), and ~LSQRequest().
Request Minor::LSQ::LSQRequest::request |
The underlying request of this LSQRequest.
Definition at line 146 of file lsq.hh.
Referenced by Minor::LSQ::StoreBuffer::canForwardDataToLoad(), Minor::LSQ::StoreBuffer::forwardStoreData(), Minor::LSQ::pushRequest(), Minor::LSQ::tryToSend(), and Minor::LSQ::tryToSendToTransfers().
bool Minor::LSQ::LSQRequest::skipped |
Was skipped.
Set to indicate any reason (faulted, bad stream sequence number, in a fault shadow) that this request did not perform a memory transfer
Definition at line 157 of file lsq.hh.
Referenced by setSkipped(), and skippedMemAccess().
LSQRequestState Minor::LSQ::LSQRequest::state |
Definition at line 185 of file lsq.hh.
Referenced by Minor::LSQ::BarrierDataRequest::BarrierDataRequest(), Minor::LSQ::FailedDataRequest::FailedDataRequest(), Minor::LSQ::findResponse(), Minor::LSQ::StoreBuffer::insert(), Minor::LSQ::needsToTick(), Minor::LSQ::popResponse(), Minor::LSQ::recvReqRetry(), Minor::LSQ::recvTimingResp(), Minor::LSQ::sendStoreToStoreBuffer(), Minor::LSQ::StoreBuffer::step(), Minor::LSQ::tryToSend(), and Minor::LSQ::tryToSendToTransfers().