|
gem5 [DEVELOP-FOR-25.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 (std::string_view 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 _numInService, allocated, entries, freeList, gem5::ArmISA::i, label, gem5::Named::name(), gem5::Named::Named(), numEntries, and numReserve.
|
inlineprotected |
Definition at line 104 of file queue.hh.
References gem5::ArmISA::i, panic, and 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 _numInService, allocated, allocatedList, DPRINTF, gem5::Draining, gem5::Drainable::drainState(), freeList, 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 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 allocatedList.
|
inline |
|
inline |
Returns the WriteQueueEntry at the head of the readyList.
Definition at line 221 of file queue.hh.
References gem5::curTick(), and readyList.
|
inline |
|
inline |
Definition at line 150 of file queue.hh.
References allocated, numEntries, and numReserve.
|
inline |
Definition at line 229 of file queue.hh.
References gem5::MaxTick, and readyList.
|
inline |
Definition at line 155 of file queue.hh.
References _numInService.
|
inline |
Definition at line 186 of file queue.hh.
References allocatedList, label, gem5::Packet::popLabel(), and gem5::Packet::pushLabel().
|
protected |
The number of entries that are in service.
Definition at line 120 of file queue.hh.
Referenced by deallocate(), numInService(), and Queue().
|
protected |
|
protected |
Holds pointers to all allocated entries.
Definition at line 98 of file queue.hh.
Referenced by deallocate(), findMatch(), and trySatisfyFunctional().
|
protected |
|
protected |
Holds non allocated entries.
Definition at line 102 of file queue.hh.
Referenced by deallocate(), and Queue().
|
protected |
Local label (for functional print requests)
Definition at line 77 of file queue.hh.
Referenced by Queue(), and trySatisfyFunctional().
|
protected |
|
protected |
|
protected |
Holds pointers to entries that haven't been sent downstream.
Definition at line 100 of file queue.hh.
Referenced by addToReadyList(), deallocate(), findPending(), getNext(), and nextReadyTime().