gem5 v24.0.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. | |
typedef List::iterator | Iterator |
WriteQueueEntry list iterator. | |
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. | |
WriteQueueEntry (const std::string &name) | |
A simple constructor. | |
void | allocate (Addr blk_addr, unsigned blk_size, PacketPtr pkt, Tick when_ready, Counter _order) |
Allocate a miss to this entry. | |
void | deallocate () |
Mark this entry as free. | |
int | getNumTargets () const |
Returns the current number of allocated targets. | |
bool | hasTargets () const |
Returns true if there are targets left. | |
Target * | getTarget () override |
Returns a reference to the first target. | |
void | popTarget () |
Pop first target. | |
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. | |
std::string | print () const |
A no-args wrapper of print(std::ostream...) meant to be invoked from DPRINTFs avoiding string overheads in fast mode. | |
bool | matchBlockAddr (const Addr addr, const bool is_secure) const override |
Check if entry corresponds to the one being looked for. | |
bool | matchBlockAddr (const PacketPtr pkt) const override |
Check if entry contains a packet that corresponds to the one being looked for. | |
bool | conflictAddr (const QueueEntry *entry) const override |
Check if given entry's packets conflict with this' entries packets. | |
Public Member Functions inherited from gem5::QueueEntry | |
QueueEntry (const std::string &name) | |
bool | isUncacheable () const |
Public Member Functions inherited from gem5::Packet::SenderState | |
SenderState () | |
virtual | ~SenderState () |
Public Member Functions inherited from gem5::Named | |
Named (const std::string &name_) | |
virtual | ~Named ()=default |
virtual std::string | name () const |
Public Member Functions inherited from gem5::Printable | |
Printable () | |
virtual | ~Printable () |
Private Attributes | |
Iterator | readyIter |
Pointer to this entry on the ready list. | |
Iterator | allocIter |
Pointer to this entry on the allocated list. | |
TargetList | targets |
List of all requests that match the address. | |
Friends | |
template<typename Entry > | |
class | Queue |
Consider the queues friends to avoid making everything public. | |
class | WriteQueue |
Additional Inherited Members | |
Public Attributes inherited from gem5::QueueEntry | |
bool | inService |
True if the entry has been sent downstream. | |
Counter | order |
Order number assigned to disambiguate writes and misses. | |
Addr | blkAddr |
Block aligned address. | |
unsigned | blkSize |
Block size of the cache. | |
bool | isSecure |
True if the entry targets the secure memory space. | |
Public Attributes inherited from gem5::Packet::SenderState | |
SenderState * | predecessor |
Protected Attributes inherited from gem5::QueueEntry | |
Tick | readyTime |
Tick when ready to issue. | |
bool | _isUncacheable |
True if the entry is uncacheable. | |
Write queue entry.
Definition at line 67 of file write_queue_entry.hh.
typedef List::iterator gem5::WriteQueueEntry::Iterator |
WriteQueueEntry list iterator.
Definition at line 93 of file write_queue_entry.hh.
typedef std::list<WriteQueueEntry *> gem5::WriteQueueEntry::List |
A list of write queue entriess.
Definition at line 91 of file write_queue_entry.hh.
|
inline |
A simple constructor.
Definition at line 117 of file write_queue_entry.hh.
void gem5::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 90 of file write_queue_entry.cc.
References gem5::QueueEntry::_isUncacheable, gem5::WriteQueueEntry::TargetList::add(), gem5::QueueEntry::blkAddr, gem5::QueueEntry::blkSize, gem5::Packet::cmd, gem5::QueueEntry::inService, gem5::Packet::isEviction(), gem5::Packet::isSecure(), gem5::QueueEntry::isSecure, gem5::Packet::isWrite(), gem5::Packet::matchBlockAddr(), gem5::QueueEntry::order, panic_if, gem5::QueueEntry::readyTime, gem5::Packet::req, targets, and gem5::MemCmd::WriteClean.
Referenced by gem5::WriteQueue::allocate().
|
overridevirtual |
Check if given entry's packets conflict with this' entries packets.
entry | Other entry to compare against. |
Implements gem5::QueueEntry.
Definition at line 161 of file write_queue_entry.cc.
References gem5::QueueEntry::blkAddr, hasTargets(), gem5::QueueEntry::isSecure, and gem5::QueueEntry::matchBlockAddr().
void gem5::WriteQueueEntry::deallocate | ( | ) |
Mark this entry as free.
Definition at line 120 of file write_queue_entry.cc.
References gem5::QueueEntry::inService, and targets.
|
inline |
Returns the current number of allocated targets.
Definition at line 142 of file write_queue_entry.hh.
References targets.
Referenced by gem5::BaseCache::access(), gem5::WriteQueue::allocate(), and gem5::Cache::recvTimingSnoopReq().
|
inlineoverridevirtual |
Returns a reference to the first target.
Implements gem5::QueueEntry.
Definition at line 155 of file write_queue_entry.hh.
References hasTargets(), and targets.
Referenced by gem5::BaseCache::access(), gem5::Cache::recvTimingSnoopReq(), and gem5::BaseCache::sendWriteQueuePacket().
|
inline |
Returns true if there are targets left.
Definition at line 149 of file write_queue_entry.hh.
References targets.
Referenced by conflictAddr(), getTarget(), matchBlockAddr(), 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 gem5::QueueEntry.
Definition at line 147 of file write_queue_entry.cc.
References gem5::X86ISA::addr, gem5::QueueEntry::blkAddr, hasTargets(), and gem5::QueueEntry::isSecure.
|
overridevirtual |
Check if entry contains a packet that corresponds to the one being looked for.
pkt | The packet to search for. |
Implements gem5::QueueEntry.
Definition at line 154 of file write_queue_entry.cc.
References gem5::QueueEntry::blkAddr, gem5::QueueEntry::blkSize, hasTargets(), gem5::QueueEntry::isSecure, and gem5::Packet::matchBlockAddr().
|
inline |
Pop first target.
Definition at line 164 of file write_queue_entry.hh.
References targets.
Referenced by gem5::WriteQueue::markInService().
std::string gem5::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 182 of file write_queue_entry.cc.
References print().
Referenced by print().
|
overridevirtual |
Prints the contents of this MSHR for debugging.
Implements gem5::Printable.
Definition at line 168 of file write_queue_entry.cc.
References gem5::QueueEntry::_isUncacheable, gem5::QueueEntry::blkAddr, gem5::QueueEntry::blkSize, gem5::ccprintf(), gem5::QueueEntry::inService, gem5::QueueEntry::isSecure, gem5::X86ISA::os, gem5::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 gem5::QueueEntry.
Definition at line 141 of file write_queue_entry.cc.
References gem5::BaseCache::sendWriteQueuePacket().
bool gem5::WriteQueueEntry::trySatisfyFunctional | ( | PacketPtr | pkt | ) |
Definition at line 127 of file write_queue_entry.cc.
References gem5::QueueEntry::blkAddr, gem5::QueueEntry::blkSize, gem5::Packet::isPrint(), gem5::QueueEntry::isSecure, targets, gem5::Packet::trySatisfyFunctional(), and gem5::WriteQueueEntry::TargetList::trySatisfyFunctional().
|
friend |
Consider the queues friends to avoid making everything public.
Definition at line 74 of file write_queue_entry.hh.
|
friend |
Definition at line 75 of file write_queue_entry.hh.
|
private |
Pointer to this entry on the allocated list.
Definition at line 109 of file write_queue_entry.hh.
Referenced by gem5::WriteQueue::allocate().
|
private |
Pointer to this entry on the ready list.
Definition at line 103 of file write_queue_entry.hh.
Referenced by gem5::WriteQueue::allocate().
|
private |
List of all requests that match the address.
Definition at line 112 of file write_queue_entry.hh.
Referenced by allocate(), deallocate(), getNumTargets(), getTarget(), hasTargets(), popTarget(), print(), and trySatisfyFunctional().