49#include "debug/MSHR.hh"
56 int num_entries,
int reserve,
57 int demand_reserve, std::string cache_name =
"")
58 :
Queue<
MSHR>(_label, num_entries, reserve, cache_name +
".mshr_queue"),
71 DPRINTF(
MSHR,
"Allocating new MSHR. Number in use will be %lu/%lu\n",
74 mshr->
allocate(blk_addr, blk_size, pkt, when_ready, order, alloc_on_fill);
88 DPRINTF(
MSHR,
"MSHR deallocated. Number in use: %lu/%lu\n",
106 mshr->
delay(delay_ticks);
108 [mshr] (
const MSHR* _mshr) {
109 return mshr->readyTime >= _mshr->readyTime;
148 return was_full && !
isFull();
void delay(MSHR *mshr, Tick delay_ticks)
Adds a delay to the provided MSHR and moves MSHRs that will be ready earlier than this entry to the t...
void deallocate(MSHR *mshr) override
Deallocate a MSHR and its targets.
const int demandReserve
The number of entries to reserve for future demand accesses.
void markPending(MSHR *mshr)
Mark an in service entry as pending, used to resend a request.
bool forceDeallocateTarget(MSHR *mshr)
Deallocate top target, possibly freeing the MSHR.
void moveToFront(MSHR *mshr)
Moves the MSHR to the front of the pending list if it is not in service.
MSHRQueue(const std::string &_label, int num_entries, int reserve, int demand_reserve, std::string cache_name)
Create a queue with a given number of entries.
void markInService(MSHR *mshr, bool pending_modified_resp)
Mark the given MSHR as in service.
MSHR * allocate(Addr blk_addr, unsigned blk_size, PacketPtr pkt, Tick when_ready, Counter order, bool alloc_on_fill)
Allocates a new MSHR for the request and size.
Miss Status and handling Register.
void delay(Tick delay_ticks)
Adds a delay relative to the current tick to the current MSHR.
void markInService(bool pending_modified_resp)
void popTarget()
Pop first target.
void allocate(Addr blk_addr, unsigned blk_size, PacketPtr pkt, Tick when_ready, Counter _order, bool alloc_on_fill)
Allocate a miss to this MSHR.
void print(std::ostream &os, int verbosity=0, const std::string &prefix="") const override
Prints the contents of this MSHR for debugging.
int getNumTargets() const
Returns the current number of allocated targets.
Iterator readyIter
Pointer to this MSHR on the ready list.
bool promoteDeferredTargets()
Iterator allocIter
Pointer to this MSHR on the allocated list.
bool hasTargets() const
Returns true if there are targets left.
bool inService
True if the entry has been sent downstream.
Queue(const std::string &_label, int num_entries, int reserve, const std::string &name)
virtual void deallocate(Entry *entry)
Removes the given entry from the queue.
MSHR::Iterator addToReadyList(MSHR *entry)
Miss Status and Handling Register (MSHR) declaration.
Declaration of a structure to manage MSHRs.
double Counter
All counters are of 64-bit values.
Copyright (c) 2024 Arm Limited All rights reserved.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
uint64_t Tick
Tick count type.