gem5
v20.1.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 |
Draining is the process of clearing out the states of SimObjects.These are the SimObjects that are partially executed or are partially in flight. 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 |
|
inline |
Removes the given entry from the queue.
This places the entry on the free list.
entry |
Definition at line 234 of file queue.hh.
Referenced by BaseCache::recvTimingResp().
|
inlineoverridevirtual |
Draining is the process of clearing out the states of SimObjects.These are the SimObjects that are partially executed or are partially in flight.
Draining is mostly used before forking and creating a check point.
This function notifies 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 162 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 201 of file queue.hh.
Referenced by BaseCache::getNextQueueEntry().
|
inline |
Returns the WriteQueueEntry at the head of the readyList.
Definition at line 215 of file queue.hh.
Referenced by BaseCache::getNextQueueEntry().
|
inline |
|
inline |
Definition at line 144 of file queue.hh.
Referenced by BaseCache::allocateMissBuffer(), BaseCache::allocateWriteBuffer(), BaseCache::getNextQueueEntry(), BaseCache::markInService(), and BaseCache::recvTimingResp().
Definition at line 223 of file queue.hh.
Referenced by BaseCache::nextQueueReadyTime().
|
inline |
Definition at line 180 of file queue.hh.
Referenced by BaseCache::functionalAccess().
|
protected |
The number of entries that are in service.
Definition at line 116 of file queue.hh.
Referenced by Queue< WriteQueueEntry >::deallocate(), and Queue< WriteQueueEntry >::numInService().
|
protected |
The number of currently allocated entries.
Definition at line 119 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 94 of file queue.hh.
Referenced by Queue< WriteQueueEntry >::deallocate(), Queue< WriteQueueEntry >::findMatch(), and Queue< WriteQueueEntry >::trySatisfyFunctional().
|
protected |
Actual storage.
Definition at line 92 of file queue.hh.
Referenced by Queue< WriteQueueEntry >::Queue().
|
protected |
Holds non allocated entries.
Definition at line 98 of file queue.hh.
Referenced by Queue< WriteQueueEntry >::deallocate(), and Queue< WriteQueueEntry >::Queue().
|
protected |
Local label (for functional print requests)
Definition at line 69 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 81 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 89 of file queue.hh.
Referenced by Queue< WriteQueueEntry >::isFull().
|
protected |
Holds pointers to entries that haven't been sent downstream.
Definition at line 96 of file queue.hh.
Referenced by Queue< WriteQueueEntry >::addToReadyList(), Queue< WriteQueueEntry >::deallocate(), Queue< WriteQueueEntry >::findPending(), Queue< WriteQueueEntry >::getNext(), and Queue< WriteQueueEntry >::nextReadyTime().