|
gem5 [DEVELOP-FOR-25.0]
|
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. | |
| bool | skippedMemAccess () |
| Was no memory access attempted for this request? | |
| void | setSkipped () |
| Set this request as having been skipped before a memory transfer was attempt. | |
| AddrRangeCoverage | containsAddrRangeOf (LSQRequest *other_request) |
| Does this request's address range fully cover the range of other_request? | |
| virtual void | startAddrTranslation ()=0 |
| Start the address translation process for this request. | |
| virtual PacketPtr | getHeadPacket ()=0 |
| Get the next packet to issue for this request. | |
| virtual void | stepToNextPacket ()=0 |
| Step to the next packet for the next call to getHeadPacket. | |
| virtual bool | sentAllPackets ()=0 |
| Have all packets been sent? | |
| 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. | |
| virtual void | retireResponse (PacketPtr packet_)=0 |
| Retire a response packet into the LSQRequest packet possibly completing this transfer. | |
| virtual bool | isBarrier () |
| Is this a request a barrier? | |
| bool | needsToBeSentToStoreBuffer () |
| This request, once processed by the requests/transfers queues, will need to go to the store buffer. | |
| void | setState (LSQRequestState new_state) |
| Set state and output trace output. | |
| bool | isComplete () const |
| Has this request been completed. | |
| void | reportData (std::ostream &os) const |
| MinorTrace report interface. | |
Public Member Functions inherited from gem5::BaseMMU::Translation | |
| virtual | ~Translation () |
| virtual void | finish (const Fault &fault, const RequestPtr &req, ThreadContext *tc, BaseMMU::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. | |
Public Member Functions inherited from gem5::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. | |
Public Attributes | |
| LSQ & | port |
| Owning port. | |
| MinorDynInstPtr | inst |
| Instruction which made this request. | |
| bool | isLoad |
| Load/store indication used for building packet. | |
| PacketDataPtr | data |
| Dynamically allocated and populated data carried for building write packets. | |
| PacketPtr | packet |
| RequestPtr | request |
| The underlying request of this LSQRequest. | |
| uint64_t * | res |
| Res from pushRequest. | |
| bool | skipped |
| Was skipped. | |
| bool | issuedToMemory |
| This in an access other than a normal cacheable load that's visited the memory system. | |
| bool | isTranslationDelayed |
| Address translation is delayed due to table walk. | |
| LSQRequestState | state |
Public Attributes inherited from gem5::Packet::SenderState | |
| SenderState * | predecessor |
Protected Member Functions | |
| void | markDelayed () |
| BaseMMU::Translation interface. | |
| void | tryToSuppressFault () |
| Instructions may want to suppress translation faults (e.g. | |
| void | disableMemAccess () |
| void | completeDisabledMemAccess () |
Derived SenderState to carry data access info.
through address translation, the queues in this port and back from the memory system.
| gem5::minor::LSQ::LSQRequest::LSQRequest | ( | LSQ & | port_, |
| MinorDynInstPtr | inst_, | ||
| bool | isLoad_, | ||
| PacketDataPtr | data_ = NULL, | ||
| uint64_t * | res_ = NULL ) |
Definition at line 59 of file lsq.cc.
References data, inst, isLoad, issuedToMemory, isTranslationDelayed, gem5::minor::LSQ::LSQ(), NotIssued, packet, port, request, res, gem5::Packet::SenderState::SenderState(), skipped, and state.
Referenced by containsAddrRangeOf(), gem5::minor::LSQ::SingleDataRequest::SingleDataRequest(), gem5::minor::LSQ::SpecialDataRequest::SpecialDataRequest(), and gem5::minor::LSQ::SplitDataRequest::SplitDataRequest().
|
virtual |
|
protected |
Definition at line 97 of file lsq.cc.
References gem5::PCStateBase::clone(), DPRINTFS, inst, gem5::SimpleThread::pcState(), port, and gem5::minor::ExecContext::setMemAccPredicate().
Referenced by gem5::minor::LSQ::SingleDataRequest::finish(), and gem5::minor::LSQ::SplitDataRequest::finish().
|
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 121 of file lsq.cc.
References gem5::minor::LSQ::FullAddrRangeCoverage, gem5::minor::LSQ::NoAddrRangeCoverage, and gem5::minor::LSQ::PartialAddrRangeCoverage.
Referenced by gem5::minor::LSQ::StoreBuffer::canForwardDataToLoad(), and gem5::minor::LSQ::StoreBuffer::forwardStoreData().
| AddrRangeCoverage gem5::minor::LSQ::LSQRequest::containsAddrRangeOf | ( | LSQRequest * | other_request | ) |
Does this request's address range fully cover the range of other_request?
References LSQRequest().
|
protected |
Definition at line 114 of file lsq.cc.
References DPRINTFS, inst, and port.
Referenced by gem5::minor::LSQ::SingleDataRequest::startAddrTranslation(), and gem5::minor::LSQ::SplitDataRequest::startAddrTranslation().
|
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 gem5::minor::LSQ::SingleDataRequest, gem5::minor::LSQ::SpecialDataRequest, and gem5::minor::LSQ::SplitDataRequest.
Referenced by gem5::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 gem5::minor::LSQ::SingleDataRequest, gem5::minor::LSQ::SpecialDataRequest, and gem5::minor::LSQ::SplitDataRequest.
Referenced by gem5::minor::LSQ::recvTimingResp(), and gem5::minor::LSQ::tryToSendToTransfers().
|
virtual |
Is this a request a barrier?
Reimplemented in gem5::minor::LSQ::BarrierDataRequest.
Definition at line 158 of file lsq.cc.
References inst.
Referenced by gem5::minor::LSQ::StoreBuffer::countIssuedStore(), gem5::minor::LSQ::findResponse(), gem5::minor::LSQ::recvTimingResp(), and gem5::minor::LSQ::StoreBuffer::step().
| bool gem5::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 178 of file lsq.cc.
References Complete, and state.
Referenced by gem5::minor::LSQ::findResponse(), gem5::minor::LSQ::recvTimingResp(), gem5::minor::LSQ::SplitDataRequest::retireResponse(), gem5::minor::LSQ::StoreBuffer::step(), and gem5::minor::LSQ::tryToSendToTransfers().
| void gem5::minor::LSQ::LSQRequest::makePacket | ( | ) |
Make a packet to use with the memory transaction.
Definition at line 1729 of file lsq.cc.
References data, inst, isLoad, gem5::minor::makePacketForRequest(), gem5::NoFault, packet, and request.
Referenced by gem5::minor::LSQ::SingleDataRequest::finish(), and gem5::minor::LSQ::SplitDataRequest::makeFragmentPackets().
|
inlineprotectedvirtual |
BaseMMU::Translation interface.
Implements gem5::BaseMMU::Translation.
Definition at line 195 of file lsq.hh.
References isTranslationDelayed.
| bool gem5::minor::LSQ::LSQRequest::needsToBeSentToStoreBuffer | ( | ) |
This request, once processed by the requests/transfers queues, will need to go to the store buffer.
Definition at line 164 of file lsq.cc.
References state, and StoreToStoreBuffer.
Referenced by gem5::minor::Execute::handleMemResponse().
| void gem5::minor::LSQ::LSQRequest::reportData | ( | std::ostream & | os | ) | const |
MinorTrace report interface.
Definition at line 186 of file lsq.cc.
References inst, isLoad, gem5::X86ISA::os, and state.
Referenced by gem5::minor::LSQ::StoreBuffer::minorTrace().
|
pure virtual |
Retire a response packet into the LSQRequest packet possibly completing this transfer.
Implemented in gem5::minor::LSQ::SingleDataRequest, gem5::minor::LSQ::SpecialDataRequest, and gem5::minor::LSQ::SplitDataRequest.
References gem5::X86ISA::os.
Referenced by gem5::minor::LSQ::recvTimingResp().
|
pure virtual |
Have all packets been sent?
Implemented in gem5::minor::LSQ::SingleDataRequest, gem5::minor::LSQ::SpecialDataRequest, and gem5::minor::LSQ::SplitDataRequest.
Referenced by gem5::minor::LSQ::StoreBuffer::step(), and gem5::minor::LSQ::tryToSend().
|
inline |
Set this request as having been skipped before a memory transfer was attempt.
Definition at line 219 of file lsq.hh.
References skipped.
Referenced by gem5::minor::LSQ::SplitDataRequest::retireResponse(), and gem5::minor::LSQ::tryToSendToTransfers().
| void gem5::minor::LSQ::LSQRequest::setState | ( | LSQRequestState | new_state | ) |
Set state and output trace output.
Definition at line 170 of file lsq.cc.
References DPRINTFS, inst, port, and state.
Referenced by gem5::minor::LSQ::SingleDataRequest::finish(), gem5::minor::LSQ::SplitDataRequest::finish(), gem5::minor::LSQ::StoreBuffer::insert(), gem5::minor::LSQ::SingleDataRequest::retireResponse(), gem5::minor::LSQ::SplitDataRequest::retireResponse(), gem5::minor::LSQ::SingleDataRequest::startAddrTranslation(), gem5::minor::LSQ::SplitDataRequest::startAddrTranslation(), gem5::minor::LSQ::tryToSend(), and gem5::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 gem5::minor::LSQ::SingleDataRequest, gem5::minor::LSQ::SpecialDataRequest, and gem5::minor::LSQ::SplitDataRequest.
Referenced by gem5::minor::LSQ::pushRequest().
|
pure virtual |
Step to the next packet for the next call to getHeadPacket.
Implemented in gem5::minor::LSQ::SingleDataRequest, gem5::minor::LSQ::SpecialDataRequest, and gem5::minor::LSQ::SplitDataRequest.
Referenced by gem5::minor::LSQ::tryToSend().
|
protected |
Instructions may want to suppress translation faults (e.g.
non-faulting vector loads).
Definition at line 78 of file lsq.cc.
References gem5::PCStateBase::clone(), DPRINTFS, inst, gem5::NoFault, gem5::SimpleThread::pcState(), and port.
Referenced by gem5::minor::LSQ::SingleDataRequest::finish(), and gem5::minor::LSQ::SplitDataRequest::finish().
| PacketDataPtr gem5::minor::LSQ::LSQRequest::data |
Dynamically allocated and populated data carried for building write packets.
Definition at line 143 of file lsq.hh.
Referenced by LSQRequest(), gem5::minor::LSQ::SplitDataRequest::makeFragmentPackets(), makePacket(), gem5::minor::LSQ::SplitDataRequest::retireResponse(), and ~LSQRequest().
| MinorDynInstPtr gem5::minor::LSQ::LSQRequest::inst |
Instruction which made this request.
Definition at line 135 of file lsq.hh.
Referenced by gem5::minor::LSQ::StoreBuffer::canForwardDataToLoad(), completeDisabledMemAccess(), gem5::minor::LSQ::StoreBuffer::deleteRequest(), disableMemAccess(), gem5::minor::LSQ::findResponse(), gem5::minor::LSQ::SingleDataRequest::finish(), gem5::minor::LSQ::SplitDataRequest::finish(), gem5::minor::LSQ::StoreBuffer::insert(), isBarrier(), LSQRequest(), gem5::minor::LSQ::SplitDataRequest::makeFragmentPackets(), makePacket(), gem5::minor::LSQ::popResponse(), gem5::minor::LSQ::recvTimingResp(), reportData(), gem5::minor::LSQ::SplitDataRequest::retireResponse(), gem5::minor::LSQ::SplitDataRequest::sendNextFragmentToTranslation(), gem5::minor::LSQ::sendStoreToStoreBuffer(), setState(), gem5::minor::LSQ::SingleDataRequest::startAddrTranslation(), gem5::minor::LSQ::StoreBuffer::step(), gem5::minor::LSQ::threadSnoop(), gem5::minor::LSQ::tryToSend(), gem5::minor::LSQ::tryToSendToTransfers(), and tryToSuppressFault().
| bool gem5::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 139 of file lsq.hh.
Referenced by gem5::minor::LSQ::StoreBuffer::forwardStoreData(), LSQRequest(), gem5::minor::LSQ::SplitDataRequest::makeFragmentPackets(), makePacket(), gem5::minor::LSQ::moveFromRequestsToTransfers(), gem5::minor::LSQ::popResponse(), reportData(), gem5::minor::LSQ::SplitDataRequest::retireResponse(), gem5::minor::LSQ::SplitDataRequest::sendNextFragmentToTranslation(), gem5::minor::LSQ::SingleDataRequest::startAddrTranslation(), gem5::minor::LSQ::tryToSend(), and gem5::minor::LSQ::tryToSendToTransfers().
| bool gem5::minor::LSQ::LSQRequest::issuedToMemory |
This in an access other than a normal cacheable load that's visited the memory system.
Definition at line 164 of file lsq.hh.
Referenced by LSQRequest(), gem5::minor::LSQ::popResponse(), and gem5::minor::LSQ::tryToSendToTransfers().
| bool gem5::minor::LSQ::LSQRequest::isTranslationDelayed |
Address translation is delayed due to table walk.
Definition at line 167 of file lsq.hh.
Referenced by gem5::minor::LSQ::SingleDataRequest::finish(), gem5::minor::LSQ::SplitDataRequest::finish(), LSQRequest(), and markDelayed().
| PacketPtr gem5::minor::LSQ::LSQRequest::packet |
Definition at line 149 of file lsq.hh.
Referenced by gem5::minor::LSQ::StoreBuffer::canForwardDataToLoad(), gem5::minor::LSQ::StoreBuffer::forwardStoreData(), gem5::minor::LSQ::SingleDataRequest::getHeadPacket(), gem5::minor::Execute::handleMemResponse(), LSQRequest(), makePacket(), gem5::minor::LSQ::SingleDataRequest::retireResponse(), gem5::minor::LSQ::SplitDataRequest::retireResponse(), gem5::minor::LSQ::threadSnoop(), gem5::minor::LSQ::tryToSendToTransfers(), and ~LSQRequest().
| LSQ& gem5::minor::LSQ::LSQRequest::port |
Owning port.
Definition at line 132 of file lsq.hh.
Referenced by completeDisabledMemAccess(), disableMemAccess(), gem5::minor::LSQ::SingleDataRequest::finish(), gem5::minor::LSQ::SplitDataRequest::finish(), LSQRequest(), gem5::minor::LSQ::SplitDataRequest::makeFragmentPackets(), gem5::minor::LSQ::SplitDataRequest::makeFragmentRequests(), gem5::minor::LSQ::SingleDataRequest::retireResponse(), gem5::minor::LSQ::SplitDataRequest::retireResponse(), gem5::minor::LSQ::SplitDataRequest::sendNextFragmentToTranslation(), setState(), gem5::minor::LSQ::SingleDataRequest::startAddrTranslation(), and tryToSuppressFault().
| RequestPtr gem5::minor::LSQ::LSQRequest::request |
The underlying request of this LSQRequest.
Definition at line 152 of file lsq.hh.
Referenced by gem5::minor::LSQ::StoreBuffer::canForwardDataToLoad(), gem5::minor::LSQ::StoreBuffer::forwardStoreData(), LSQRequest(), gem5::minor::LSQ::SplitDataRequest::makeFragmentPackets(), gem5::minor::LSQ::SplitDataRequest::makeFragmentRequests(), makePacket(), gem5::minor::LSQ::pushRequest(), gem5::minor::LSQ::SplitDataRequest::retireResponse(), gem5::minor::LSQ::SingleDataRequest::startAddrTranslation(), gem5::minor::LSQ::tryToSend(), and gem5::minor::LSQ::tryToSendToTransfers().
| uint64_t* gem5::minor::LSQ::LSQRequest::res |
| bool gem5::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 160 of file lsq.hh.
Referenced by LSQRequest(), gem5::minor::LSQ::SplitDataRequest::retireResponse(), setSkipped(), and skippedMemAccess().
| LSQRequestState gem5::minor::LSQ::LSQRequest::state |
Definition at line 191 of file lsq.hh.
Referenced by gem5::minor::LSQ::BarrierDataRequest::BarrierDataRequest(), gem5::minor::LSQ::FailedDataRequest::FailedDataRequest(), gem5::minor::LSQ::findResponse(), gem5::minor::LSQ::StoreBuffer::insert(), isComplete(), LSQRequest(), needsToBeSentToStoreBuffer(), gem5::minor::LSQ::popResponse(), gem5::minor::LSQ::recvTimingResp(), reportData(), gem5::minor::LSQ::sendStoreToStoreBuffer(), setState(), gem5::minor::LSQ::StoreBuffer::step(), gem5::minor::LSQ::tryToSend(), and gem5::minor::LSQ::tryToSendToTransfers().