gem5  v22.0.0.1
Public Member Functions | Protected Attributes | List of all members
gem5::memory::qos::LrgQueuePolicy Class Reference

Least Recently Granted Queue Policy It selects packets from the queue with a round robin-like policy: using the requestor id as a switching parameter rather than switching over a time quantum. More...

#include <q_policy.hh>

Inheritance diagram for gem5::memory::qos::LrgQueuePolicy:
gem5::memory::qos::QueuePolicy

Public Member Functions

 LrgQueuePolicy (const QoSMemCtrlParams &p)
 
void enqueuePacket (PacketPtr pkt) override
 This method is called by the memory controller after it enqueues a packet. More...
 
PacketQueue::iterator selectPacket (PacketQueue *queue) override
 Implements LRG packet select policy. More...
 
- Public Member Functions inherited from gem5::memory::qos::QueuePolicy
void setMemCtrl (MemCtrl *mem)
 Setting a pointer to the Memory Controller implementing the policy. More...
 
virtual ~QueuePolicy ()
 

Protected Attributes

std::list< RequestorIDtoServe
 Support structure for lrg algorithms: keeps track of serviced requestors, always serve the front element. More...
 
- Protected Attributes inherited from gem5::memory::qos::QueuePolicy
MemCtrlmemCtrl
 Pointer to parent memory controller implementing the policy. More...
 

Additional Inherited Members

- Public Types inherited from gem5::memory::qos::QueuePolicy
typedef std::deque< PacketPtrPacketQueue
 
- Static Public Member Functions inherited from gem5::memory::qos::QueuePolicy
static QueuePolicycreate (const QoSMemCtrlParams &p)
 This factory method is used for generating the queue policy. More...
 
- Protected Member Functions inherited from gem5::memory::qos::QueuePolicy
 QueuePolicy (const QoSMemCtrlParams &p)
 

Detailed Description

Least Recently Granted Queue Policy It selects packets from the queue with a round robin-like policy: using the requestor id as a switching parameter rather than switching over a time quantum.

Definition at line 168 of file q_policy.hh.

Constructor & Destructor Documentation

◆ LrgQueuePolicy()

gem5::memory::qos::LrgQueuePolicy::LrgQueuePolicy ( const QoSMemCtrlParams &  p)
inline

Definition at line 171 of file q_policy.hh.

Member Function Documentation

◆ enqueuePacket()

void gem5::memory::qos::LrgQueuePolicy::enqueuePacket ( PacketPtr  pkt)
overridevirtual

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 from gem5::memory::qos::QueuePolicy.

Definition at line 147 of file q_policy.cc.

References gem5::memory::qos::MemCtrl::hasRequestor(), gem5::memory::qos::QueuePolicy::memCtrl, gem5::Packet::requestorId(), and toServe.

◆ selectPacket()

QueuePolicy::PacketQueue::iterator gem5::memory::qos::LrgQueuePolicy::selectPacket ( PacketQueue queue)
overridevirtual

Implements LRG packet select policy.

Parameters
queueThe queue in which to select a packet
Returns
Iterator to the selected packet

Implements gem5::memory::qos::QueuePolicy.

Definition at line 74 of file q_policy.cc.

References DPRINTF, gem5::memory::qos::MemCtrl::hasRequestor(), gem5::memory::qos::QueuePolicy::memCtrl, panic_if, gem5::ArmISA::q, and toServe.

Member Data Documentation

◆ toServe

std::list<RequestorID> gem5::memory::qos::LrgQueuePolicy::toServe
protected

Support structure for lrg algorithms: keeps track of serviced requestors, always serve the front element.

Definition at line 192 of file q_policy.hh.

Referenced by enqueuePacket(), and selectPacket().


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

Generated on Sat Jun 18 2022 08:14:25 for gem5 by doxygen 1.8.17