gem5
v19.0.0.0
|
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, bool ignore_uncacheable=true) const |
Find the first entry that matches the provided address. More... | |
bool | trySatisfyFunctional (PacketPtr pkt) |
Entry * | findPending (const QueueEntry *entry) const |
Find any pending requests that overlap the given request of a different queue. 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... | |
![]() | |
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) |
![]() | |
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 |
|
inline |
Removes the given entry from the queue.
This places the entry on the free list.
entry |
Definition at line 238 of file queue.hh.
Referenced by BaseCache::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 entry that matches the provided address.
blk_addr | The block address to find. |
is_secure | True if the target memory space is secure. |
ignore_uncacheable | Should uncacheables be ignored or not |
Definition at line 166 of file queue.hh.
Referenced by BaseCache::access(), BaseCache::allocateWriteBuffer(), BaseCache::functionalAccess(), BaseCache::getNextQueueEntry(), BaseCache::handleEvictions(), BaseCache::handleFill(), NoncoherentCache::handleTimingReqMiss(), Cache::handleTimingReqMiss(), BaseCache::inMissQueue(), and Cache::recvTimingSnoopReq().
|
inline |
Find any pending requests that overlap the given request of a different queue.
entry | The entry to be compared against. |
Definition at line 205 of file queue.hh.
Referenced by BaseCache::getNextQueueEntry().
|
inline |
Returns the WriteQueueEntry at the head of the readyList.
Definition at line 219 of file queue.hh.
Referenced by BaseCache::getNextQueueEntry().
|
inline |
|
inline |
Definition at line 148 of file queue.hh.
Referenced by BaseCache::allocateMissBuffer(), BaseCache::allocateWriteBuffer(), BaseCache::getNextQueueEntry(), BaseCache::markInService(), and BaseCache::recvTimingResp().
Definition at line 227 of file queue.hh.
Referenced by BaseCache::nextQueueReadyTime().
|
inline |
Definition at line 184 of file queue.hh.
Referenced by BaseCache::functionalAccess().
|
protected |
The number of entries that are in service.
Definition at line 120 of file queue.hh.
Referenced by Queue< WriteQueueEntry >::deallocate(), and Queue< WriteQueueEntry >::numInService().
|
protected |
The number of currently allocated entries.
Definition at line 123 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 98 of file queue.hh.
Referenced by Queue< WriteQueueEntry >::deallocate(), Queue< WriteQueueEntry >::findMatch(), and Queue< WriteQueueEntry >::trySatisfyFunctional().
|
protected |
|
protected |
Holds non allocated entries.
Definition at line 102 of file queue.hh.
Referenced by Queue< WriteQueueEntry >::deallocate(), and Queue< WriteQueueEntry >::Queue().
|
protected |
Local label (for functional print requests)
Definition at line 73 of file queue.hh.
Referenced by Queue< WriteQueueEntry >::trySatisfyFunctional().
|
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 85 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 93 of file queue.hh.
Referenced by Queue< WriteQueueEntry >::isFull().
|
protected |
Holds pointers to entries that haven't been sent downstream.
Definition at line 100 of file queue.hh.
Referenced by Queue< WriteQueueEntry >::addToReadyList(), Queue< WriteQueueEntry >::deallocate(), Queue< WriteQueueEntry >::findPending(), Queue< WriteQueueEntry >::getNext(), and Queue< WriteQueueEntry >::nextReadyTime().