Go to the documentation of this file.
45 #ifndef __MEM_CACHE_QUEUE_HH__
46 #define __MEM_CACHE_QUEUE_HH__
50 #include <type_traits>
55 #include "debug/Drain.hh"
68 static_assert(std::is_base_of<QueueEntry, Entry>::value,
69 "Entry must be derived from QueueEntry");
73 const std::string
label;
103 readyList.back()->readyTime <= entry->readyTime) {
108 if ((*i)->readyTime > entry->readyTime) {
112 panic(
"Failed to add to ready list.");
129 Queue(
const std::string &_label,
int num_entries,
int reserve) :
163 bool ignore_uncacheable =
true)
const
172 if (!(ignore_uncacheable && entry->isUncacheable()) &&
173 entry->matchBlockAddr(blk_addr, is_secure)) {
184 if (entry->matchBlockAddr(pkt) &&
185 entry->trySatisfyFunctional(pkt)) {
203 for (
const auto& ready_entry :
readyList) {
204 if (ready_entry->conflictAddr(entry)) {
239 if (entry->inService) {
249 DPRINTF(Drain,
"Queue now empty, signalling drained\n");
260 #endif //__MEM_CACHE_QUEUE_HH__
int allocated
The number of currently allocated entries.
Entry * getNext() const
Returns the WriteQueueEntry at the head of the readyList.
Entry::List readyList
Holds pointers to entries that haven't been sent downstream.
Entry::Iterator addToReadyList(Entry *entry)
uint64_t Tick
Tick count type.
void pushLabel(const std::string &lbl)
Push label for PrintReq (safe to call unconditionally).
const int numReserve
The number of entries to hold as a temporary overflow space.
@ Drained
Buffers drained, ready for serialization/handover.
DrainState
Object drain/handover states.
Interface for objects that might require draining before checkpointing.
void deallocate(Entry *entry)
Removes the given entry from the queue.
void signalDrainDone() const
Signal that an object is drained.
const int numEntries
The total number of entries in this queue.
Entry * findMatch(Addr blk_addr, bool is_secure, bool ignore_uncacheable=true) const
Find the first entry that matches the provided address.
Entry::List freeList
Holds non allocated entries.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
DrainState drain() override
Draining is the process of clearing out the states of SimObjects.These are the SimObjects that are pa...
DrainState drainState() const
Return the current drain state of an object.
Entry * findPending(const QueueEntry *entry) const
Find any pending requests that overlap the given request of a different queue.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
A high-level queue interface, to be used by both the MSHR queue and the write buffer.
Tick nextReadyTime() const
A queue entry base class, to be used by both the MSHRs and write-queue entries.
Entry::List allocatedList
Holds pointers to all allocated entries.
Queue(const std::string &_label, int num_entries, int reserve)
Create a queue with a given number of entries.
int _numInService
The number of entries that are in service.
const std::string label
Local label (for functional print requests)
bool trySatisfyFunctional(PacketPtr pkt)
void popLabel()
Pop label for PrintReq (safe to call unconditionally).
@ Draining
Draining buffers pending serialization/handover.
#define panic(...)
This implements a cprintf based panic() function.
Tick curTick()
The current simulated tick.
std::vector< Entry > entries
Actual storage.
Generated on Wed Sep 30 2020 14:02:12 for gem5 by doxygen 1.8.17