gem5
|
A high-level queue interface, to be used by both the MSHR queue and the write buffer. More...
#include <queue.hh>
Public Member Functions | |
Queue (const std::string &_label, int num_entries, int reserve) | |
Create a queue with a given number of entries. More... | |
bool | isEmpty () const |
bool | isFull () const |
int | numInService () const |
Entry * | findMatch (Addr blk_addr, bool is_secure) const |
Find the first WriteQueueEntry that matches the provided address. More... | |
bool | checkFunctional (PacketPtr pkt, Addr blk_addr) |
Entry * | findPending (Addr blk_addr, bool is_secure) const |
Find any pending requests that overlap the given request. More... | |
Entry * | getNext () const |
Returns the WriteQueueEntry at the head of the readyList. More... | |
Tick | nextReadyTime () const |
void | deallocate (Entry *entry) |
Removes the given entry from the queue. More... | |
DrainState | drain () override |
Notify an object that it needs to drain its state. More... | |
Public Member Functions inherited from Drainable | |
DrainState | drainState () const |
Return the current drain state of an object. More... | |
virtual void | notifyFork () |
Notify a child process of a fork. More... | |
Protected Member Functions | |
Entry::Iterator | addToReadyList (Entry *entry) |
Protected Member Functions inherited from Drainable | |
Drainable () | |
virtual | ~Drainable () |
virtual void | drainResume () |
Resume execution after a successful drain. More... | |
void | signalDrainDone () const |
Signal that an object is drained. More... | |
Protected Attributes | |
const std::string | label |
Local label (for functional print requests) More... | |
const int | numEntries |
The total number of entries in this queue. More... | |
const int | numReserve |
The number of entries to hold as a temporary overflow space. More... | |
std::vector< Entry > | entries |
Actual storage. More... | |
Entry::List | allocatedList |
Holds pointers to all allocated entries. More... | |
Entry::List | readyList |
Holds pointers to entries that haven't been sent downstream. More... | |
Entry::List | freeList |
Holds non allocated entries. More... | |
int | _numInService |
The number of entries that are in service. More... | |
int | allocated |
The number of currently allocated entries. More... | |
A high-level queue interface, to be used by both the MSHR queue and the write buffer.
|
inlineprotected |
Definition at line 173 of file queue.hh.
Referenced by Cache::functionalAccess().
|
inline |
Removes the given entry from the queue.
This places the entry on the free list.
entry |
Definition at line 225 of file queue.hh.
Referenced by Cache::recvTimingResp().
|
inlineoverridevirtual |
Notify an object that it needs to drain its state.
If the object does not need further simulation to drain internal buffers, it returns DrainState::Drained and automatically switches to the Drained state. If the object needs more simulation, it returns DrainState::Draining and automatically enters the Draining state. Other return values are invalid.
Implements Drainable.
|
inline |
Find the first WriteQueueEntry that matches the provided address.
blk_addr | The block address to find. |
is_secure | True if the target memory space is secure. |
Definition at line 156 of file queue.hh.
Referenced by Cache::access(), Cache::allocateBlock(), BaseCache::allocateWriteBuffer(), Cache::functionalAccess(), Cache::getNextQueueEntry(), Cache::handleFill(), Cache::inMissQueue(), Cache::recvTimingReq(), and Cache::recvTimingSnoopReq().
|
inline |
Find any pending requests that overlap the given request.
blk_addr | Block address. |
is_secure | True if the target memory space is secure. |
Definition at line 192 of file queue.hh.
Referenced by Cache::getNextQueueEntry().
|
inline |
Returns the WriteQueueEntry at the head of the readyList.
Definition at line 206 of file queue.hh.
Referenced by Cache::getNextQueueEntry().
|
inline |
Definition at line 135 of file queue.hh.
Referenced by Cache::outstandingMisses().
|
inline |
Definition at line 140 of file queue.hh.
Referenced by BaseCache::allocateMissBuffer(), BaseCache::allocateWriteBuffer(), Cache::getNextQueueEntry(), BaseCache::markInService(), and Cache::recvTimingResp().
Definition at line 214 of file queue.hh.
Referenced by Cache::nextQueueReadyTime().
|
inline |
|
protected |
The number of entries that are in service.
Definition at line 112 of file queue.hh.
Referenced by Queue< WriteQueueEntry >::deallocate(), and Queue< WriteQueueEntry >::numInService().
|
protected |
The number of currently allocated entries.
Definition at line 115 of file queue.hh.
Referenced by Queue< WriteQueueEntry >::deallocate(), Queue< WriteQueueEntry >::drain(), Queue< WriteQueueEntry >::isEmpty(), and Queue< WriteQueueEntry >::isFull().
|
protected |
Holds pointers to all allocated entries.
Definition at line 89 of file queue.hh.
Referenced by Queue< WriteQueueEntry >::checkFunctional(), Queue< WriteQueueEntry >::deallocate(), and Queue< WriteQueueEntry >::findMatch().
|
protected |
Actual storage.
Definition at line 87 of file queue.hh.
Referenced by Queue< WriteQueueEntry >::Queue().
|
protected |
Holds non allocated entries.
Definition at line 93 of file queue.hh.
Referenced by Queue< WriteQueueEntry >::deallocate(), and Queue< WriteQueueEntry >::Queue().
|
protected |
Local label (for functional print requests)
Definition at line 68 of file queue.hh.
Referenced by Queue< WriteQueueEntry >::checkFunctional().
|
protected |
The total number of entries in this queue.
This number is set as the number of entries requested plus any reserve. This allows for the same number of effective entries while still maintaining an overflow reserve.
Definition at line 76 of file queue.hh.
Referenced by Queue< WriteQueueEntry >::isFull(), and Queue< WriteQueueEntry >::Queue().
|
protected |
The number of entries to hold as a temporary overflow space.
This is used to allow temporary overflow of the number of entries as we only check the full condition under certain conditions.
Definition at line 84 of file queue.hh.
Referenced by Queue< WriteQueueEntry >::isFull().
|
protected |
Holds pointers to entries that haven't been sent downstream.
Definition at line 91 of file queue.hh.
Referenced by Queue< WriteQueueEntry >::addToReadyList(), Queue< WriteQueueEntry >::deallocate(), Queue< WriteQueueEntry >::findPending(), Queue< WriteQueueEntry >::getNext(), and Queue< WriteQueueEntry >::nextReadyTime().