48 #ifndef __MEM_CACHE_MSHR_HH__
49 #define __MEM_CACHE_MSHR_HH__
69 template<
typename Entry>
151 Source _source,
bool _markedPending,
bool alloc_on_fill)
221 void print(std::ostream &
os,
int verbosity,
222 const std::string &prefix)
const;
286 Tick when_ready,
Counter _order,
bool alloc_on_fill);
364 const std::string &prefix =
"")
const;
371 std::string
print()
const;
374 #endif // __MEM_CACHE_MSHR_HH__
Iterator readyIter
Pointer to this MSHR on the ready list.
std::string print() const
A no-args wrapper of print(std::ostream...) meant to be invoked from DPRINTFs avoiding string overhea...
bool inService
True if the entry has been sent downstream.
const Tick readyTime
Time when request is ready to be serviced.
A Class for maintaining a list of pending and allocated memory requests.
std::list< MSHR * > List
A list of MSHRs.
bool needsWritable() const
The pending* and post* flags are only valid if inService is true.
bool isReset() const
Tests if the flags of this TargetList have their default values.
const Source source
Request from cpu, memory, or prefetcher?
int getNumTargets() const
Returns the current number of allocated targets.
bool allocOnFill
Set when the response should allocate on fill.
const PacketPtr pkt
Pending request packet.
bool checkFunctional(PacketPtr pkt)
void print(std::ostream &os, int verbosity, const std::string &prefix) const
Tick readyTime
Tick when ready to issue.
Counter order
Order number assigned to disambiguate writes and misses.
TargetList deferredTargets
A high-level queue interface, to be used by both the MSHR queue and the write buffer.
A template-policy based cache.
List::iterator Iterator
MSHR list iterator.
bool postInvalidate
Did we snoop an invalidate while waiting for data?
Target(PacketPtr _pkt, Tick _readyTime, Counter _order, Source _source, bool _markedPending, bool alloc_on_fill)
const bool allocOnFill
Should the response servicing this target list allocate in the cache?
void popTarget()
Pop first target.
Tick curTick()
The current simulated tick.
void allocateTarget(PacketPtr target, Tick when, Counter order, bool alloc_on_fill)
Add a request to the list of targets.
void markInService(bool pending_modified_resp)
Target * getTarget()
Returns a reference to the first target.
uint64_t Tick
Tick count type.
bool hasTargets() const
Returns true if there are targets left.
Miss Status and handling Register.
void clearDownstreamPending()
TargetList targets
List of all requests that match the address.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
bool markedPending
We use this flag to track whether we have cleared the downstreamPending flag for the MSHR of the cach...
int64_t Counter
Statistics counter type.
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
Abstract base class for objects which support being printed to a stream for debugging.
const Counter order
Global order (for memory consistency mgmt)
A queue entry base class, to be used by both the MSHRs and write-queue entries.
void updateFlags(PacketPtr pkt, Target::Source source, bool alloc_on_fill)
Use the provided packet and the source to update the flags of this TargetList.
bool sendPacket(Cache &cache)
Send this queue entry as a downstream packet, with the exact behaviour depending on the specific entr...
void populateFlags()
Goes through the list of targets and uses them to populate the flags of this TargetList.
void clearDownstreamPending()
bool hasPostDowngrade() const
bool handleSnoop(PacketPtr target, Counter order)
void replaceUpgrades()
Convert upgrades to the equivalent request if the cache line they refer to would have been invalid (U...
TargetList extractServiceableTargets(PacketPtr pkt)
Extracts the subset of the targets that can be serviced given a received response.
bool isForward
True if the entry is just a simple forward from an upper level.
MSHR()
A simple constructor.
bool promoteDeferredTargets()
bool pendingModified
Here we use one flag to track both if:
const Tick recvTime
Time when request was received (for stats)
void deallocate()
Mark this MSHR as free.
bool checkFunctional(PacketPtr pkt)
Iterator allocIter
Pointer to this MSHR on the allocated list.
void add(PacketPtr pkt, Tick readyTime, Counter order, Target::Source source, bool markPending, bool alloc_on_fill)
Add the specified packet in the TargetList.
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.
bool hasPostInvalidate() const
bool isPendingModified() const
bool downstreamPending
Flag set by downstream caches.
bool postDowngrade
Did we snoop a read while waiting for data?