gem5 v24.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, const std::string &name) | |
Create a queue with a given number of entries. | |
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. | |
bool | trySatisfyFunctional (PacketPtr pkt) |
Entry * | findPending (const QueueEntry *entry) const |
Find any pending requests that overlap the given request of a different queue. | |
Entry * | getNext () const |
Returns the WriteQueueEntry at the head of the readyList. | |
Tick | nextReadyTime () const |
virtual void | deallocate (Entry *entry) |
Removes the given entry from the queue. | |
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. | |
Public Member Functions inherited from gem5::Drainable | |
DrainState | drainState () const |
Return the current drain state of an object. | |
virtual void | notifyFork () |
Notify a child process of a fork. | |
Public Member Functions inherited from gem5::Named | |
Named (const std::string &name_) | |
virtual | ~Named ()=default |
virtual std::string | name () const |
Protected Member Functions | |
Entry::Iterator | addToReadyList (Entry *entry) |
Protected Member Functions inherited from gem5::Drainable | |
Drainable () | |
virtual | ~Drainable () |
virtual void | drainResume () |
Resume execution after a successful drain. | |
void | signalDrainDone () const |
Signal that an object is drained. | |
Protected Attributes | |
const std::string | label |
Local label (for functional print requests) | |
const int | numEntries |
The total number of entries in this queue. | |
const int | numReserve |
The number of entries to hold as a temporary overflow space. | |
std::vector< Entry > | entries |
Actual storage. | |
Entry::List | allocatedList |
Holds pointers to all allocated entries. | |
Entry::List | readyList |
Holds pointers to entries that haven't been sent downstream. | |
Entry::List | freeList |
Holds non allocated entries. | |
int | _numInService |
The number of entries that are in service. | |
int | allocated |
The number of currently allocated entries. | |
A high-level queue interface, to be used by both the MSHR queue and the write buffer.
|
inline |
Create a queue with a given number of entries.
num_entries | The number of entries in this queue. |
reserve | The extra overflow entries needed. |
Definition at line 133 of file queue.hh.
References gem5::Queue< Entry >::entries, gem5::Queue< Entry >::freeList, gem5::ArmISA::i, and gem5::Queue< Entry >::numEntries.
|
inlineprotected |
Definition at line 104 of file queue.hh.
References gem5::ArmISA::i, panic, and gem5::Queue< Entry >::readyList.
|
inlinevirtual |
Removes the given entry from the queue.
This places the entry on the free list.
entry |
Reimplemented in gem5::MSHRQueue.
Definition at line 241 of file queue.hh.
References gem5::Queue< Entry >::_numInService, gem5::Queue< Entry >::allocated, gem5::Queue< Entry >::allocatedList, DPRINTF, gem5::Draining, gem5::Drainable::drainState(), gem5::Queue< Entry >::freeList, gem5::Queue< Entry >::readyList, and gem5::Drainable::signalDrainDone().
Referenced by gem5::MSHRQueue::deallocate().
|
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 gem5::Drainable.
Definition at line 261 of file queue.hh.
References gem5::Queue< Entry >::allocated, gem5::Drained, and gem5::Draining.
|
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 168 of file queue.hh.
References gem5::Queue< Entry >::allocatedList.
Referenced by gem5::BaseCache::access(), gem5::BaseCache::allocateWriteBuffer(), gem5::BaseCache::functionalAccess(), gem5::BaseCache::getNextQueueEntry(), gem5::BaseCache::handleEvictions(), gem5::BaseCache::handleFill(), gem5::BaseCache::handleTimingReqHit(), gem5::Cache::handleTimingReqMiss(), gem5::NoncoherentCache::handleTimingReqMiss(), gem5::BaseCache::inMissQueue(), and gem5::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 207 of file queue.hh.
References gem5::Queue< Entry >::readyList.
Referenced by gem5::BaseCache::getNextQueueEntry().
|
inline |
Returns the WriteQueueEntry at the head of the readyList.
Definition at line 221 of file queue.hh.
References gem5::curTick(), and gem5::Queue< Entry >::readyList.
Referenced by gem5::BaseCache::getNextQueueEntry().
|
inline |
Definition at line 145 of file queue.hh.
References gem5::Queue< Entry >::allocated.
|
inline |
Definition at line 150 of file queue.hh.
References gem5::Queue< Entry >::allocated, gem5::Queue< Entry >::numEntries, and gem5::Queue< Entry >::numReserve.
Referenced by gem5::BaseCache::allocateMissBuffer(), gem5::BaseCache::allocateWriteBuffer(), gem5::BaseCache::getNextQueueEntry(), gem5::BaseCache::markInService(), gem5::BaseCache::markInService(), and gem5::BaseCache::recvTimingResp().
|
inline |
Definition at line 229 of file queue.hh.
References gem5::MaxTick, and gem5::Queue< Entry >::readyList.
Referenced by gem5::BaseCache::nextQueueReadyTime().
|
inline |
Definition at line 155 of file queue.hh.
References gem5::Queue< Entry >::_numInService.
|
inline |
Definition at line 186 of file queue.hh.
References gem5::Queue< Entry >::allocatedList, gem5::Queue< Entry >::label, gem5::Packet::popLabel(), and gem5::Packet::pushLabel().
Referenced by gem5::BaseCache::functionalAccess().
|
protected |
The number of entries that are in service.
Definition at line 120 of file queue.hh.
Referenced by gem5::Queue< Entry >::deallocate(), and gem5::Queue< Entry >::numInService().
|
protected |
The number of currently allocated entries.
Definition at line 123 of file queue.hh.
Referenced by gem5::Queue< Entry >::deallocate(), gem5::Queue< Entry >::drain(), gem5::Queue< Entry >::isEmpty(), and gem5::Queue< Entry >::isFull().
|
protected |
Holds pointers to all allocated entries.
Definition at line 98 of file queue.hh.
Referenced by gem5::Queue< Entry >::deallocate(), gem5::Queue< Entry >::findMatch(), and gem5::Queue< Entry >::trySatisfyFunctional().
|
protected |
Actual storage.
Definition at line 96 of file queue.hh.
Referenced by gem5::Queue< Entry >::Queue().
|
protected |
Holds non allocated entries.
Definition at line 102 of file queue.hh.
Referenced by gem5::Queue< Entry >::deallocate(), and gem5::Queue< Entry >::Queue().
|
protected |
Local label (for functional print requests)
Definition at line 77 of file queue.hh.
Referenced by gem5::Queue< Entry >::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 gem5::Queue< Entry >::isFull(), and gem5::Queue< Entry >::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 gem5::Queue< Entry >::isFull().
|
protected |
Holds pointers to entries that haven't been sent downstream.
Definition at line 100 of file queue.hh.
Referenced by gem5::Queue< Entry >::addToReadyList(), gem5::Queue< Entry >::deallocate(), gem5::Queue< Entry >::findPending(), gem5::Queue< Entry >::getNext(), and gem5::Queue< Entry >::nextReadyTime().