|
gem5
v19.0.0.0
|
Least Recently Granted Queue Policy It selects packets from the queue with a round robin-like policy: using the master id as a switching parameter rather than switching over a time quantum. More...
#include <q_policy.hh>
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 QoS::QueuePolicy | |
| void | setMemCtrl (MemCtrl *mem) |
| Setting a pointer to the Memory Controller implementing the policy. More... | |
| virtual | ~QueuePolicy () |
Protected Attributes | |
| std::list< MasterID > | toServe |
| Support structure for lrg algorithms: keeps track of serviced masters, always serve the front element. More... | |
Protected Attributes inherited from QoS::QueuePolicy | |
| MemCtrl * | memCtrl |
| Pointer to parent memory controller implementing the policy. More... | |
Additional Inherited Members | |
Public Types inherited from QoS::QueuePolicy | |
| typedef std::deque< PacketPtr > | PacketQueue |
Static Public Member Functions inherited from QoS::QueuePolicy | |
| static QueuePolicy * | create (const QoSMemCtrlParams *p) |
| This factory method is used for generating the queue policy. More... | |
Protected Member Functions inherited from QoS::QueuePolicy | |
| QueuePolicy (const QoSMemCtrlParams *p) | |
Least Recently Granted Queue Policy It selects packets from the queue with a round robin-like policy: using the master id as a switching parameter rather than switching over a time quantum.
Definition at line 161 of file q_policy.hh.
|
inline |
Definition at line 164 of file q_policy.hh.
References QoS::QueuePolicy::enqueuePacket(), and QoS::QueuePolicy::selectPacket().
|
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.
| pkt | Enqueued packet |
Reimplemented from QoS::QueuePolicy.
Definition at line 139 of file q_policy.cc.
References QoS::MemCtrl::hasMaster(), Packet::masterId(), and QoS::QueuePolicy::memCtrl.
|
overridevirtual |
Implements LRG packet select policy.
| queue | The queue in which to select a packet |
Implements QoS::QueuePolicy.
Definition at line 66 of file q_policy.cc.
References DPRINTF, QoS::MemCtrl::hasMaster(), QoS::QueuePolicy::memCtrl, and panic_if.
Support structure for lrg algorithms: keeps track of serviced masters, always serve the front element.
Definition at line 185 of file q_policy.hh.