gem5
v20.1.0.0
|
Write queue entry. More...
#include <write_queue_entry.hh>
Classes | |
class | TargetList |
Public Types | |
typedef std::list< WriteQueueEntry * > | List |
A list of write queue entriess. More... | |
typedef List::iterator | Iterator |
WriteQueueEntry list iterator. More... | |
Public Member Functions | |
bool | sendPacket (BaseCache &cache) override |
Send this queue entry as a downstream packet, with the exact behaviour depending on the specific entry type. More... | |
WriteQueueEntry () | |
A simple constructor. More... | |
void | allocate (Addr blk_addr, unsigned blk_size, PacketPtr pkt, Tick when_ready, Counter _order) |
Allocate a miss to this entry. More... | |
void | deallocate () |
Mark this entry as free. More... | |
int | getNumTargets () const |
Returns the current number of allocated targets. More... | |
bool | hasTargets () const |
Returns true if there are targets left. More... | |
Target * | getTarget () override |
Returns a reference to the first target. More... | |
void | popTarget () |
Pop first target. More... | |
bool | trySatisfyFunctional (PacketPtr pkt) |
void | print (std::ostream &os, int verbosity=0, const std::string &prefix="") const override |
Prints the contents of this MSHR for debugging. More... | |
std::string | print () const |
A no-args wrapper of print(std::ostream...) meant to be invoked from DPRINTFs avoiding string overheads in fast mode. More... | |
bool | matchBlockAddr (const Addr addr, const bool is_secure) const override |
Check if entry corresponds to the one being looked for. More... | |
bool | matchBlockAddr (const PacketPtr pkt) const override |
Check if entry contains a packet that corresponds to the one being looked for. More... | |
bool | conflictAddr (const QueueEntry *entry) const override |
Check if given entry's packets conflict with this' entries packets. More... | |
Public Member Functions inherited from QueueEntry | |
QueueEntry () | |
bool | isUncacheable () const |
Public Member Functions inherited from Packet::SenderState | |
SenderState () | |
virtual | ~SenderState () |
Public Member Functions inherited from Printable | |
Printable () | |
virtual | ~Printable () |
Private Attributes | |
Iterator | readyIter |
Pointer to this entry on the ready list. More... | |
Iterator | allocIter |
Pointer to this entry on the allocated list. More... | |
TargetList | targets |
List of all requests that match the address. More... | |
Friends | |
template<typename Entry > | |
class | Queue |
Consider the queues friends to avoid making everything public. More... | |
class | WriteQueue |
Additional Inherited Members | |
Public Attributes inherited from QueueEntry | |
bool | inService |
True if the entry has been sent downstream. More... | |
Counter | order |
Order number assigned to disambiguate writes and misses. More... | |
Addr | blkAddr |
Block aligned address. More... | |
unsigned | blkSize |
Block size of the cache. More... | |
bool | isSecure |
True if the entry targets the secure memory space. More... | |
Public Attributes inherited from Packet::SenderState | |
SenderState * | predecessor |
Protected Attributes inherited from QueueEntry | |
Tick | readyTime |
Tick when ready to issue. More... | |
bool | _isUncacheable |
True if the entry is uncacheable. More... | |
Write queue entry.
Definition at line 65 of file write_queue_entry.hh.
typedef List::iterator WriteQueueEntry::Iterator |
WriteQueueEntry list iterator.
Definition at line 90 of file write_queue_entry.hh.
typedef std::list<WriteQueueEntry *> WriteQueueEntry::List |
A list of write queue entriess.
Definition at line 88 of file write_queue_entry.hh.
|
inline |
A simple constructor.
Definition at line 114 of file write_queue_entry.hh.
void WriteQueueEntry::allocate | ( | Addr | blk_addr, |
unsigned | blk_size, | ||
PacketPtr | pkt, | ||
Tick | when_ready, | ||
Counter | _order | ||
) |
Allocate a miss to this entry.
blk_addr | The address of the block. |
blk_size | The number of bytes to request. |
pkt | The original write. |
when_ready | When should the write be sent out. |
_order | The logical order of this write. |
Definition at line 87 of file write_queue_entry.cc.
References QueueEntry::_isUncacheable, WriteQueueEntry::TargetList::add(), QueueEntry::blkAddr, QueueEntry::blkSize, Packet::cmd, QueueEntry::inService, Packet::isEviction(), QueueEntry::isSecure, Packet::isSecure(), Packet::isWrite(), Packet::matchBlockAddr(), QueueEntry::order, panic_if, QueueEntry::readyTime, Packet::req, targets, and MemCmd::WriteClean.
Referenced by WriteQueue::allocate().
|
overridevirtual |
Check if given entry's packets conflict with this' entries packets.
entry | Other entry to compare against. |
Implements QueueEntry.
Definition at line 158 of file write_queue_entry.cc.
References QueueEntry::blkAddr, hasTargets(), QueueEntry::isSecure, and QueueEntry::matchBlockAddr().
void WriteQueueEntry::deallocate | ( | ) |
Mark this entry as free.
Definition at line 117 of file write_queue_entry.cc.
References QueueEntry::inService, and targets.
|
inline |
Returns the current number of allocated targets.
Definition at line 137 of file write_queue_entry.hh.
References targets.
Referenced by BaseCache::access(), WriteQueue::allocate(), and Cache::recvTimingSnoopReq().
|
inlineoverridevirtual |
Returns a reference to the first target.
Implements QueueEntry.
Definition at line 150 of file write_queue_entry.hh.
References hasTargets(), and targets.
Referenced by BaseCache::access(), Cache::recvTimingSnoopReq(), and BaseCache::sendWriteQueuePacket().
|
inline |
Returns true if there are targets left.
Definition at line 144 of file write_queue_entry.hh.
References targets.
Referenced by conflictAddr(), getTarget(), and matchBlockAddr().
|
overridevirtual |
Check if entry corresponds to the one being looked for.
addr | Address to match against. |
is_secure | Whether the target should be in secure space or not. |
Implements QueueEntry.
Definition at line 144 of file write_queue_entry.cc.
References addr, QueueEntry::blkAddr, hasTargets(), and QueueEntry::isSecure.
|
overridevirtual |
Check if entry contains a packet that corresponds to the one being looked for.
pkt | The packet to search for. |
Implements QueueEntry.
Definition at line 151 of file write_queue_entry.cc.
References QueueEntry::blkAddr, QueueEntry::blkSize, hasTargets(), QueueEntry::isSecure, and Packet::matchBlockAddr().
|
inline |
Pop first target.
Definition at line 159 of file write_queue_entry.hh.
References targets.
Referenced by WriteQueue::markInService().
std::string WriteQueueEntry::print | ( | ) | const |
A no-args wrapper of print(std::ostream...) meant to be invoked from DPRINTFs avoiding string overheads in fast mode.
Definition at line 179 of file write_queue_entry.cc.
|
overridevirtual |
Prints the contents of this MSHR for debugging.
Implements Printable.
Definition at line 165 of file write_queue_entry.cc.
References QueueEntry::_isUncacheable, QueueEntry::blkAddr, QueueEntry::blkSize, ccprintf(), QueueEntry::inService, QueueEntry::isSecure, X86ISA::os, WriteQueueEntry::TargetList::print(), and targets.
|
overridevirtual |
Send this queue entry as a downstream packet, with the exact behaviour depending on the specific entry type.
Implements QueueEntry.
Definition at line 138 of file write_queue_entry.cc.
References BaseCache::sendWriteQueuePacket().
bool WriteQueueEntry::trySatisfyFunctional | ( | PacketPtr | pkt | ) |
Definition at line 124 of file write_queue_entry.cc.
References QueueEntry::blkAddr, QueueEntry::blkSize, Packet::isPrint(), QueueEntry::isSecure, targets, WriteQueueEntry::TargetList::trySatisfyFunctional(), and Packet::trySatisfyFunctional().
|
friend |
Consider the queues friends to avoid making everything public.
Definition at line 72 of file write_queue_entry.hh.
|
friend |
Definition at line 73 of file write_queue_entry.hh.
|
private |
Pointer to this entry on the allocated list.
Definition at line 106 of file write_queue_entry.hh.
Referenced by WriteQueue::allocate().
|
private |
Pointer to this entry on the ready list.
Definition at line 100 of file write_queue_entry.hh.
Referenced by WriteQueue::allocate().
|
private |
List of all requests that match the address.
Definition at line 109 of file write_queue_entry.hh.
Referenced by allocate(), deallocate(), getNumTargets(), getTarget(), hasTargets(), popTarget(), print(), and trySatisfyFunctional().