gem5  v20.1.0.0
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
QoS::QueuePolicy Class Referenceabstract

QoS Queue Policy. More...

#include <q_policy.hh>

Inheritance diagram for QoS::QueuePolicy:
QoS::FifoQueuePolicy QoS::LifoQueuePolicy QoS::LrgQueuePolicy

Public Types

typedef std::deque< PacketPtrPacketQueue
 

Public Member Functions

virtual void enqueuePacket (PacketPtr pkt)
 This method is called by the memory controller after it enqueues a packet. More...
 
virtual PacketQueue::iterator selectPacket (PacketQueue *queue)=0
 Policy selector. More...
 
void setMemCtrl (MemCtrl *mem)
 Setting a pointer to the Memory Controller implementing the policy. More...
 
virtual ~QueuePolicy ()
 

Static Public Member Functions

static QueuePolicycreate (const QoSMemCtrlParams *p)
 This factory method is used for generating the queue policy. More...
 

Protected Member Functions

 QueuePolicy (const QoSMemCtrlParams *p)
 

Protected Attributes

MemCtrlmemCtrl
 Pointer to parent memory controller implementing the policy. More...
 

Detailed Description

QoS Queue Policy.

The QoS Queue Policy class implements algorithms to schedule packets within the same QoS priority queue

Definition at line 59 of file q_policy.hh.

Member Typedef Documentation

◆ PacketQueue

Definition at line 62 of file q_policy.hh.

Constructor & Destructor Documentation

◆ ~QueuePolicy()

virtual QoS::QueuePolicy::~QueuePolicy ( )
inlinevirtual

Definition at line 102 of file q_policy.hh.

◆ QueuePolicy()

QoS::QueuePolicy::QueuePolicy ( const QoSMemCtrlParams *  p)
inlineprotected

Definition at line 105 of file q_policy.hh.

Member Function Documentation

◆ create()

QueuePolicy * QoS::QueuePolicy::create ( const QoSMemCtrlParams *  p)
static

This factory method is used for generating the queue policy.

It takes the memory controller params as an argument and returns the related QueuePolicy object. If no particular QueuePolicy has been specified in the QoSMemCtrlParams, the method will default to a LIFO queue policy.

Parameters
pQoS::MemCtrl parameter variable
Returns
Pointer to the QueuePolicy

Definition at line 52 of file q_policy.cc.

References MipsISA::p.

◆ enqueuePacket()

virtual void QoS::QueuePolicy::enqueuePacket ( PacketPtr  pkt)
inlinevirtual

This method is called by the memory controller after it enqueues a packet.

It is a way for the queue policy to hook into the packet enqueuing and update relevant metadata. This will then be used once the QueuePolicy::selectPacket will be called.

Parameters
pktEnqueued packet

Reimplemented in QoS::LrgQueuePolicy.

Definition at line 83 of file q_policy.hh.

◆ selectPacket()

virtual PacketQueue::iterator QoS::QueuePolicy::selectPacket ( PacketQueue queue)
pure virtual

Policy selector.

The implementation of this virtual method selects the packet to be serviced from the packet queue passed as an argument.

Parameters
queuePacket queue
Returns
Iterator pointing to the packet in the queue to be serviced

Implemented in QoS::LrgQueuePolicy, QoS::FifoQueuePolicy, and QoS::LifoQueuePolicy.

◆ setMemCtrl()

void QoS::QueuePolicy::setMemCtrl ( MemCtrl mem)
inline

Setting a pointer to the Memory Controller implementing the policy.

Definition at line 100 of file q_policy.hh.

References mem, and memCtrl.

Member Data Documentation

◆ memCtrl

MemCtrl* QoS::QueuePolicy::memCtrl
protected

Pointer to parent memory controller implementing the policy.

Definition at line 110 of file q_policy.hh.

Referenced by QoS::LrgQueuePolicy::enqueuePacket(), QoS::LrgQueuePolicy::selectPacket(), and setMemCtrl().


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

Generated on Wed Sep 30 2020 14:03:08 for gem5 by doxygen 1.8.17