gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Types | Public Member Functions | Private Attributes | Friends | List of all members
WriteQueueEntry Class Reference

Write queue entry. More...

#include <write_queue_entry.hh>

Inheritance diagram for WriteQueueEntry:
QueueEntry Printable Packet::SenderState

Classes

class  Target
 
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 (Cache &cache)
 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...
 
TargetgetTarget ()
 Returns a reference to the first target. More...
 
void popTarget ()
 Pop first target. More...
 
bool checkFunctional (PacketPtr pkt)
 
void print (std::ostream &os, int verbosity=0, const std::string &prefix="") const
 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...
 
- 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
SenderStatepredecessor
 
- Protected Attributes inherited from QueueEntry
Tick readyTime
 Tick when ready to issue. More...
 
bool _isUncacheable
 True if the entry is uncacheable. More...
 

Detailed Description

Write queue entry.

Definition at line 62 of file write_queue_entry.hh.

Member Typedef Documentation

typedef List::iterator WriteQueueEntry::Iterator

WriteQueueEntry list iterator.

Definition at line 102 of file write_queue_entry.hh.

A list of write queue entriess.

Definition at line 100 of file write_queue_entry.hh.

Constructor & Destructor Documentation

WriteQueueEntry::WriteQueueEntry ( )
inline

A simple constructor.

Definition at line 126 of file write_queue_entry.hh.

Member Function Documentation

void WriteQueueEntry::allocate ( Addr  blk_addr,
unsigned  blk_size,
PacketPtr  pkt,
Tick  when_ready,
Counter  _order 
)

Allocate a miss to this entry.

Parameters
blk_addrThe address of the block.
blk_sizeThe number of bytes to request.
pktThe original write.
when_readyWhen should the write be sent out.
_orderThe logical order of this write.

Definition at line 96 of file write_queue_entry.cc.

References Packet::isEviction(), Packet::isSecure(), Request::isUncacheable(), Packet::isWrite(), panic_if(), and Packet::req.

bool WriteQueueEntry::checkFunctional ( PacketPtr  pkt)

Definition at line 129 of file write_queue_entry.cc.

References Packet::checkFunctional(), and Packet::isPrint().

void WriteQueueEntry::deallocate ( )

Mark this entry as free.

Definition at line 122 of file write_queue_entry.cc.

int WriteQueueEntry::getNumTargets ( ) const
inline

Returns the current number of allocated targets.

Returns
The current number of allocated targets.

Definition at line 149 of file write_queue_entry.hh.

References targets.

Referenced by Cache::access(), and Cache::recvTimingSnoopReq().

Target* WriteQueueEntry::getTarget ( )
inline

Returns a reference to the first target.

Returns
A pointer to the first target.

Definition at line 162 of file write_queue_entry.hh.

References hasTargets(), and targets.

Referenced by Cache::access(), Cache::recvTimingSnoopReq(), and Cache::sendWriteQueuePacket().

bool WriteQueueEntry::hasTargets ( ) const
inline

Returns true if there are targets left.

Returns
true if there are targets

Definition at line 156 of file write_queue_entry.hh.

References targets.

Referenced by getTarget().

void WriteQueueEntry::popTarget ( )
inline

Pop first target.

Definition at line 171 of file write_queue_entry.hh.

References targets.

Referenced by WriteQueue::markInService().

void WriteQueueEntry::print ( std::ostream &  os,
int  verbosity = 0,
const std::string &  prefix = "" 
) const
virtual

Prints the contents of this MSHR for debugging.

Implements Printable.

Definition at line 149 of file write_queue_entry.cc.

References ccprintf().

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.

Returns
string with mshr fields

Definition at line 163 of file write_queue_entry.cc.

bool WriteQueueEntry::sendPacket ( Cache cache)
virtual

Send this queue entry as a downstream packet, with the exact behaviour depending on the specific entry type.

Implements QueueEntry.

Definition at line 143 of file write_queue_entry.cc.

References Cache::sendWriteQueuePacket().

Friends And Related Function Documentation

template<typename Entry >
friend class Queue
friend

Consider the queues friends to avoid making everything public.

Definition at line 69 of file write_queue_entry.hh.

friend class WriteQueue
friend

Definition at line 70 of file write_queue_entry.hh.

Member Data Documentation

Iterator WriteQueueEntry::allocIter
private

Pointer to this entry on the allocated list.

See Also
MissQueue, WriteQueue::allocatedList

Definition at line 118 of file write_queue_entry.hh.

Iterator WriteQueueEntry::readyIter
private

Pointer to this entry on the ready list.

See Also
MissQueue, WriteQueue::readyList

Definition at line 112 of file write_queue_entry.hh.

TargetList WriteQueueEntry::targets
private

List of all requests that match the address.

Definition at line 121 of file write_queue_entry.hh.

Referenced by getNumTargets(), getTarget(), hasTargets(), and popTarget().


The documentation for this class was generated from the following files:

Generated on Fri Jun 9 2017 13:04:23 for gem5 by doxygen 1.8.6