49 #ifndef __MEM_CACHE_QUEUE_HH__
50 #define __MEM_CACHE_QUEUE_HH__
55 #include "debug/Drain.hh"
98 readyList.back()->readyTime <= entry->readyTime) {
103 if ((*i)->readyTime > entry->readyTime) {
125 Queue(
const std::string &_label,
int num_entries,
int reserve) :
165 if (!entry->isUncacheable() && entry->blkAddr == blk_addr &&
166 entry->isSecure == is_secure) {
177 if (entry->blkAddr == blk_addr && entry->checkFunctional(pkt)) {
195 if (entry->blkAddr == blk_addr && entry->isSecure == is_secure) {
230 if (entry->inService) {
240 DPRINTF(Drain,
"Queue now empty, signalling drained\n");
251 #endif //__MEM_CACHE_QUEUE_HH__
Entry * findMatch(Addr blk_addr, bool is_secure) const
Find the first WriteQueueEntry that matches the provided address.
Entry * findPending(Addr blk_addr, bool is_secure) const
Find any pending requests that overlap the given request.
Entry::List readyList
Holds pointers to entries that haven't been sent downstream.
DrainState
Object drain/handover states.
Entry::Iterator addToReadyList(Entry *entry)
const int numReserve
The number of entries to hold as a temporary overflow space.
void pushLabel(const std::string &lbl)
Push label for PrintReq (safe to call unconditionally).
A high-level queue interface, to be used by both the MSHR queue and the write buffer.
bool checkFunctional(PacketPtr pkt, Addr blk_addr)
void deallocate(Entry *entry)
Removes the given entry from the queue.
Interface for objects that might require draining before checkpointing.
Tick curTick()
The current simulated tick.
uint64_t Tick
Tick count type.
DrainState drain() override
Notify an object that it needs to drain its state.
void popLabel()
Pop label for PrintReq (safe to call unconditionally).
const int numEntries
The total number of entries in this queue.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Draining buffers pending serialization/handover.
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
Entry::List freeList
Holds non allocated entries.
Tick nextReadyTime() const
const std::string label
Local label (for functional print requests)
void signalDrainDone() const
Signal that an object is drained.
Entry * getNext() const
Returns the WriteQueueEntry at the head of the readyList.
Entry::List allocatedList
Holds pointers to all allocated entries.
DrainState drainState() const
Return the current drain state of an object.
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.
std::vector< Entry > entries
Actual storage.
int allocated
The number of currently allocated entries.