gem5  v21.1.0.2
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
gem5::memory::qos::QueuePolicy Class Referenceabstract

QoS Queue Policy. More...

#include <q_policy.hh>

Inheritance diagram for gem5::memory::qos::QueuePolicy:
gem5::memory::qos::FifoQueuePolicy gem5::memory::qos::LifoQueuePolicy gem5::memory::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

 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 66 of file q_policy.hh.

Member Typedef Documentation

◆ PacketQueue

Definition at line 69 of file q_policy.hh.

Constructor & Destructor Documentation

◆ ~QueuePolicy()

virtual gem5::memory::qos::QueuePolicy::~QueuePolicy ( )

Definition at line 109 of file q_policy.hh.

◆ QueuePolicy()

gem5::memory::qos::QueuePolicy::QueuePolicy ( const QoSMemCtrlParams &  p)

Definition at line 112 of file q_policy.hh.

Member Function Documentation

◆ create()

QueuePolicy * gem5::memory::qos::QueuePolicy::create ( const QoSMemCtrlParams &  p)

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.

pqos::MemCtrl parameter variable
Pointer to the QueuePolicy

Definition at line 60 of file

References gem5::MipsISA::p.

◆ enqueuePacket()

virtual void gem5::memory::qos::QueuePolicy::enqueuePacket ( PacketPtr  pkt)

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.

pktEnqueued packet

Reimplemented in gem5::memory::qos::LrgQueuePolicy.

Definition at line 90 of file q_policy.hh.

◆ selectPacket()

virtual PacketQueue::iterator gem5::memory::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.

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

Implemented in gem5::memory::qos::LrgQueuePolicy, gem5::memory::qos::FifoQueuePolicy, and gem5::memory::qos::LifoQueuePolicy.

◆ setMemCtrl()

void gem5::memory::qos::QueuePolicy::setMemCtrl ( MemCtrl mem)

Setting a pointer to the Memory Controller implementing the policy.

Definition at line 107 of file q_policy.hh.

References mem, and memCtrl.

Member Data Documentation

◆ memCtrl

MemCtrl* gem5::memory::qos::QueuePolicy::memCtrl

Pointer to parent memory controller implementing the policy.

Definition at line 117 of file q_policy.hh.

Referenced by gem5::memory::qos::LrgQueuePolicy::enqueuePacket(), gem5::memory::qos::LrgQueuePolicy::selectPacket(), and setMemCtrl().

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

Generated on Tue Sep 21 2021 12:31:29 for gem5 by doxygen 1.8.17