gem5 v24.0.0.0
Loading...
Searching...
No Matches
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.
 
virtual PacketQueue::iterator selectPacket (PacketQueue *queue)=0
 Policy selector.
 
void setMemCtrl (MemCtrl *mem)
 Setting a pointer to the Memory Controller implementing the policy.
 
virtual ~QueuePolicy ()
 

Static Public Member Functions

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

Protected Member Functions

 QueuePolicy (const QoSMemCtrlParams &p)
 

Protected Attributes

MemCtrlmemCtrl
 Pointer to parent memory controller implementing the policy.
 

Detailed Description

QoS Queue Policy.

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

Definition at line 65 of file q_policy.hh.

Member Typedef Documentation

◆ PacketQueue

Constructor & Destructor Documentation

◆ ~QueuePolicy()

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

Definition at line 108 of file q_policy.hh.

◆ QueuePolicy()

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

Definition at line 111 of file q_policy.hh.

Member Function Documentation

◆ create()

QueuePolicy * gem5::memory::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 59 of file q_policy.cc.

References gem5::MipsISA::p.

◆ enqueuePacket()

virtual void gem5::memory::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 gem5::memory::qos::LrgQueuePolicy.

Definition at line 89 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.

Parameters
queueNon-empty packet queue to select a packet from
Returns
Iterator pointing to the packet in the queue to be serviced

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

◆ setMemCtrl()

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

Setting a pointer to the Memory Controller implementing the policy.

Definition at line 106 of file q_policy.hh.

References mem, and memCtrl.

Member Data Documentation

◆ memCtrl

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

Pointer to parent memory controller implementing the policy.

Definition at line 116 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 Jun 18 2024 16:24:19 for gem5 by doxygen 1.11.0