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"),
59 demandReserve(demand_reserve)
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.
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.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
bool inService
True if the entry has been sent downstream.
A high-level queue interface, to be used by both the MSHR queue and the write buffer.
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 - Pranith Kumar Copyright (c) 2020 Inria 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.