gem5
v20.1.0.0
|
Store buffer. More...
#include <lsq.hh>
Public Member Functions | |
StoreBuffer (std::string name_, LSQ &lsq_, unsigned int store_buffer_size, unsigned int store_limit_per_cycle) | |
bool | canInsert () const |
Can a new request be inserted into the queue? More... | |
void | deleteRequest (LSQRequestPtr request) |
Delete the given request and free the slot it occupied. More... | |
void | insert (LSQRequestPtr request) |
Insert a request at the back of the queue. More... | |
AddrRangeCoverage | canForwardDataToLoad (LSQRequestPtr request, unsigned int &found_slot) |
Look for a store which satisfies the given load. More... | |
void | forwardStoreData (LSQRequestPtr load, unsigned int slot_number) |
Fill the given packet with appropriate date from slot slot_number. More... | |
unsigned int | numUnissuedStores () |
Number of stores in the store buffer which have not been completely issued to the memory system. More... | |
void | countIssuedStore (LSQRequestPtr request) |
Count a store being issued to memory by decrementing numUnissuedAccesses. More... | |
bool | isDrained () const |
Drained if there is absolutely nothing left in the buffer. More... | |
void | step () |
Try to issue more stores to memory. More... | |
void | minorTrace () const |
Report queue contents for MinorTrace. More... | |
Public Member Functions inherited from Named | |
Named (const std::string &name_) | |
const std::string & | name () const |
Public Attributes | |
LSQ & | lsq |
My owner. More... | |
const unsigned int | numSlots |
Number of slots, this is a bound on the size of slots. More... | |
const unsigned int | storeLimitPerCycle |
Maximum number of stores that can be issued per cycle. More... | |
std::deque< LSQRequestPtr > | slots |
Queue of store requests on their way to memory. More... | |
unsigned int | numUnissuedAccesses |
Number of occupied slots which have not yet issued a memory access. More... | |
Additional Inherited Members | |
Protected Attributes inherited from Named | |
const std::string | _name |
Store buffer.
This contains stores which have been committed but whose memory transfers have not yet been issued. Load data can be forwarded out of the store buffer
Minor::LSQ::StoreBuffer::StoreBuffer | ( | std::string | name_, |
LSQ & | lsq_, | ||
unsigned int | store_buffer_size, | ||
unsigned int | store_limit_per_cycle | ||
) |
LSQ::AddrRangeCoverage Minor::LSQ::StoreBuffer::canForwardDataToLoad | ( | LSQRequestPtr | request, |
unsigned int & | found_slot | ||
) |
Look for a store which satisfies the given load.
Returns an indication whether the forwarding request can be wholly, partly or not all all satisfied. If the request can be wholly satisfied, the store buffer slot number which can be used is returned in found_slot
Definition at line 766 of file lsq.cc.
References Minor::LSQ::LSQRequest::containsAddrRangeOf(), DPRINTF, ArmISA::i, Minor::LSQ::LSQRequest::inst, Minor::LSQ::NoAddrRangeCoverage, Minor::LSQ::LSQRequest::packet, Packet::req, and Minor::LSQ::LSQRequest::request.
Referenced by Minor::LSQ::tryToSendToTransfers().
bool Minor::LSQ::StoreBuffer::canInsert | ( | ) | const |
Can a new request be inserted into the queue?
Definition at line 723 of file lsq.cc.
Referenced by Minor::LSQ::canPushIntoStoreBuffer(), and Minor::LSQ::findResponse().
void Minor::LSQ::StoreBuffer::countIssuedStore | ( | LSQRequestPtr | request | ) |
Count a store being issued to memory by decrementing numUnissuedAccesses.
Does not count barrier requests as they will be handles as barriers are cleared from the buffer
Definition at line 837 of file lsq.cc.
References Minor::LSQ::LSQRequest::isBarrier().
Referenced by Minor::LSQ::recvReqRetry().
void Minor::LSQ::StoreBuffer::deleteRequest | ( | LSQRequestPtr | request | ) |
Delete the given request and free the slot it occupied.
Definition at line 730 of file lsq.cc.
References DPRINTF, and Minor::LSQ::LSQRequest::inst.
Referenced by Minor::LSQ::recvTimingResp().
void Minor::LSQ::StoreBuffer::forwardStoreData | ( | LSQRequestPtr | load, |
unsigned int | slot_number | ||
) |
Fill the given packet with appropriate date from slot slot_number.
Definition at line 807 of file lsq.cc.
References Minor::LSQ::LSQRequest::containsAddrRangeOf(), DPRINTF, Minor::LSQ::FullAddrRangeCoverage, Packet::getPtr(), Minor::LSQ::LSQRequest::isLoad, Minor::LSQ::LSQRequest::packet, and Minor::LSQ::LSQRequest::request.
Referenced by Minor::LSQ::tryToSendToTransfers().
void Minor::LSQ::StoreBuffer::insert | ( | LSQRequestPtr | request | ) |
Insert a request at the back of the queue.
Definition at line 744 of file lsq.cc.
References Minor::LSQ::LSQRequest::Complete, DPRINTF, Minor::Pipeline::ExecuteStageId, Minor::LSQ::LSQRequest::inst, Named::name(), Minor::LSQ::LSQRequest::setState(), Minor::LSQ::LSQRequest::state, Minor::LSQ::LSQRequest::StoreInStoreBuffer, and warn.
Referenced by Minor::LSQ::completeMemBarrierInst(), and Minor::LSQ::sendStoreToStoreBuffer().
|
inline |
Drained if there is absolutely nothing left in the buffer.
Definition at line 520 of file lsq.hh.
References slots.
Referenced by Minor::LSQ::isDrained(), and Minor::LSQ::tryToSendToTransfers().
void Minor::LSQ::StoreBuffer::minorTrace | ( | ) | const |
Report queue contents for MinorTrace.
Definition at line 933 of file lsq.cc.
References ArmISA::i, MINORTRACE, X86ISA::os, and Minor::LSQ::LSQRequest::reportData().
Referenced by Minor::LSQ::minorTrace().
|
inline |
Number of stores in the store buffer which have not been completely issued to the memory system.
Definition at line 512 of file lsq.hh.
References numUnissuedAccesses.
Referenced by Minor::LSQ::needsToTick().
void Minor::LSQ::StoreBuffer::step | ( | ) |
Try to issue more stores to memory.
Definition at line 846 of file lsq.cc.
References DPRINTF, ArmISA::i, Minor::LSQ::LSQRequest::inst, Minor::LSQ::LSQRequest::isBarrier(), Minor::LSQ::LSQRequest::isComplete(), Minor::LSQ::MemoryNeedsRetry, Minor::LSQ::MemoryRunning, Minor::LSQ::LSQRequest::sentAllPackets(), Minor::LSQ::LSQRequest::state, and Minor::LSQ::LSQRequest::StoreBufferIssuing.
Referenced by Minor::LSQ::step().
const unsigned int Minor::LSQ::StoreBuffer::numSlots |
unsigned int Minor::LSQ::StoreBuffer::numUnissuedAccesses |
Number of occupied slots which have not yet issued a memory access.
Definition at line 481 of file lsq.hh.
Referenced by numUnissuedStores().
std::deque<LSQRequestPtr> Minor::LSQ::StoreBuffer::slots |
Queue of store requests on their way to memory.
Definition at line 477 of file lsq.hh.
Referenced by isDrained().
const unsigned int Minor::LSQ::StoreBuffer::storeLimitPerCycle |