|
gem5 [DEVELOP-FOR-25.0]
|
#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? | |
| void | deleteRequest (LSQRequestPtr request) |
| Delete the given request and free the slot it occupied. | |
| void | insert (LSQRequestPtr request) |
| Insert a request at the back of the queue. | |
| AddrRangeCoverage | canForwardDataToLoad (LSQRequestPtr request, unsigned int &found_slot) |
| Look for a store which satisfies the given load. | |
| void | forwardStoreData (LSQRequestPtr load, unsigned int slot_number) |
| Fill the given packet with appropriate date from slot slot_number. | |
| unsigned int | numUnissuedStores () |
| Number of stores in the store buffer which have not been completely issued to the memory system. | |
| void | countIssuedStore (LSQRequestPtr request) |
| Count a store being issued to memory by decrementing numUnissuedAccesses. | |
| bool | isDrained () const |
| Drained if there is absolutely nothing left in the buffer. | |
| void | step () |
| Try to issue more stores to memory. | |
| void | minorTrace () const |
| Report queue contents for MinorTrace. | |
Public Member Functions inherited from gem5::Named | |
| Named (std::string_view name_) | |
| virtual | ~Named ()=default |
| virtual std::string | name () const |
Public Attributes | |
| LSQ & | lsq |
| My owner. | |
| const unsigned int | numSlots |
| Number of slots, this is a bound on the size of slots. | |
| const unsigned int | storeLimitPerCycle |
| Maximum number of stores that can be issued per cycle. | |
| std::deque< LSQRequestPtr > | slots |
| Queue of store requests on their way to memory. | |
| unsigned int | numUnissuedAccesses |
| Number of occupied slots which have not yet issued a memory access. | |
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
| gem5::minor::LSQ::StoreBuffer::StoreBuffer | ( | std::string | name_, |
| LSQ & | lsq_, | ||
| unsigned int | store_buffer_size, | ||
| unsigned int | store_limit_per_cycle ) |
Definition at line 1684 of file lsq.cc.
References gem5::minor::LSQ::LSQ(), lsq, gem5::Named::Named(), numSlots, numUnissuedAccesses, slots, and storeLimitPerCycle.
| LSQ::AddrRangeCoverage gem5::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 763 of file lsq.cc.
References gem5::minor::LSQ::LSQRequest::containsAddrRangeOf(), DPRINTF, gem5::ArmISA::i, gem5::minor::LSQ::LSQRequest::inst, gem5::minor::LSQ::NoAddrRangeCoverage, gem5::minor::LSQ::LSQRequest::packet, gem5::Packet::req, gem5::minor::LSQ::LSQRequest::request, and slots.
| bool gem5::minor::LSQ::StoreBuffer::canInsert | ( | ) | const |
| void gem5::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 834 of file lsq.cc.
References gem5::minor::LSQ::LSQRequest::isBarrier(), and numUnissuedAccesses.
Referenced by step().
| void gem5::minor::LSQ::StoreBuffer::deleteRequest | ( | LSQRequestPtr | request | ) |
Delete the given request and free the slot it occupied.
Definition at line 727 of file lsq.cc.
References DPRINTF, gem5::minor::LSQ::LSQRequest::inst, and slots.
| void gem5::minor::LSQ::StoreBuffer::forwardStoreData | ( | LSQRequestPtr | load, |
| unsigned int | slot_number ) |
Fill the given packet with appropriate date from slot slot_number.
Definition at line 804 of file lsq.cc.
References gem5::minor::LSQ::LSQRequest::containsAddrRangeOf(), DPRINTF, gem5::minor::LSQ::FullAddrRangeCoverage, gem5::Packet::getPtr(), gem5::minor::LSQ::LSQRequest::isLoad, gem5::minor::LSQ::LSQRequest::packet, gem5::minor::LSQ::LSQRequest::request, and slots.
| void gem5::minor::LSQ::StoreBuffer::insert | ( | LSQRequestPtr | request | ) |
Insert a request at the back of the queue.
Definition at line 741 of file lsq.cc.
References canInsert(), gem5::minor::LSQ::LSQRequest::Complete, DPRINTF, gem5::minor::Pipeline::ExecuteStageId, gem5::minor::LSQ::LSQRequest::inst, lsq, gem5::Named::name(), numUnissuedAccesses, gem5::minor::LSQ::LSQRequest::setState(), slots, gem5::minor::LSQ::LSQRequest::state, gem5::minor::LSQ::LSQRequest::StoreInStoreBuffer, and warn.
|
inline |
| void gem5::minor::LSQ::StoreBuffer::minorTrace | ( | ) | const |
Report queue contents for MinorTrace.
Definition at line 930 of file lsq.cc.
References gem5::ArmISA::i, gem5::minor::minorTrace(), numSlots, numUnissuedAccesses, gem5::X86ISA::os, gem5::minor::LSQ::LSQRequest::reportData(), and slots.
|
inline |
Number of stores in the store buffer which have not been completely issued to the memory system.
Definition at line 520 of file lsq.hh.
References numUnissuedAccesses.
| void gem5::minor::LSQ::StoreBuffer::step | ( | ) |
Try to issue more stores to memory.
Definition at line 843 of file lsq.cc.
References countIssuedStore(), DPRINTF, gem5::ArmISA::i, gem5::minor::LSQ::LSQRequest::inst, gem5::minor::LSQ::LSQRequest::isBarrier(), gem5::minor::LSQ::LSQRequest::isComplete(), lsq, gem5::minor::LSQ::MemoryNeedsRetry, gem5::minor::LSQ::MemoryRunning, numUnissuedAccesses, gem5::minor::LSQ::LSQRequest::sentAllPackets(), slots, gem5::minor::LSQ::LSQRequest::state, gem5::minor::LSQ::LSQRequest::StoreBufferIssuing, and storeLimitPerCycle.
| LSQ& gem5::minor::LSQ::StoreBuffer::lsq |
| const unsigned int gem5::minor::LSQ::StoreBuffer::numSlots |
Number of slots, this is a bound on the size of slots.
Definition at line 478 of file lsq.hh.
Referenced by canInsert(), minorTrace(), and StoreBuffer().
| unsigned int gem5::minor::LSQ::StoreBuffer::numUnissuedAccesses |
Number of occupied slots which have not yet issued a memory access.
Definition at line 489 of file lsq.hh.
Referenced by countIssuedStore(), insert(), minorTrace(), numUnissuedStores(), step(), and StoreBuffer().
| std::deque<LSQRequestPtr> gem5::minor::LSQ::StoreBuffer::slots |
Queue of store requests on their way to memory.
Definition at line 485 of file lsq.hh.
Referenced by canForwardDataToLoad(), canInsert(), deleteRequest(), forwardStoreData(), insert(), isDrained(), minorTrace(), step(), and StoreBuffer().
| const unsigned int gem5::minor::LSQ::StoreBuffer::storeLimitPerCycle |
Maximum number of stores that can be issued per cycle.
Definition at line 481 of file lsq.hh.
Referenced by step(), and StoreBuffer().