gem5  v20.1.0.0
Classes | Public Member Functions | Private Attributes | List of all members
HWScheduler Class Reference

#include <hw_scheduler.hh>

Classes

class  SchedulerWakeupEvent
 

Public Member Functions

 HWScheduler (HSAPacketProcessor *hsa_pp, Tick wakeup_delay)
 
void write (Addr db_addr, uint32_t doorbell_reg)
 
void registerNewQueue (uint64_t hostReadIndexPointer, uint64_t basePointer, uint64_t queue_id, uint32_t size)
 
void unregisterQueue (uint64_t queue_id)
 
void wakeup ()
 
void schedWakeup ()
 
bool isRLQIdle (uint32_t rl_idx)
 
bool findNextActiveALQ ()
 
bool findNextIdleRLQ ()
 
bool unmapQFromRQ ()
 
bool contextSwitchQ ()
 
bool findEmptyHWQ ()
 
bool mapQIfSlotAvlbl (uint32_t al_idx, AQLRingBuffer *aql_buf, HSAQueueDescriptor *q_desc)
 
void addQCntxt (uint32_t al_idx, AQLRingBuffer *aql_buf, HSAQueueDescriptor *q_desc)
 
void removeQCntxt ()
 
void scheduleAndWakeupMappedQ ()
 
void updateRRVars (uint32_t al_idx, uint32_t rl_idx)
 

Private Attributes

std::map< uint32_t, QCntxtactiveList
 
std::map< Addr, uint32_t > dbMap
 
std::map< uint32_t, uint32_t > regdListMap
 
HSAPacketProcessorhsaPP
 
uint32_t nextALId
 
uint32_t nextRLId
 
const Tick wakeupDelay
 
SchedulerWakeupEvent schedWakeupEvent
 

Detailed Description

Definition at line 45 of file hw_scheduler.hh.

Constructor & Destructor Documentation

◆ HWScheduler()

HWScheduler::HWScheduler ( HSAPacketProcessor hsa_pp,
Tick  wakeup_delay 
)
inline

Definition at line 48 of file hw_scheduler.hh.

Member Function Documentation

◆ addQCntxt()

void HWScheduler::addQCntxt ( uint32_t  al_idx,
AQLRingBuffer aql_buf,
HSAQueueDescriptor q_desc 
)

◆ contextSwitchQ()

bool HWScheduler::contextSwitchQ ( )

◆ findEmptyHWQ()

bool HWScheduler::findEmptyHWQ ( )

◆ findNextActiveALQ()

bool HWScheduler::findNextActiveALQ ( )

Definition at line 262 of file hw_scheduler.cc.

References activeList, DPRINTF, MAX_ACTIVE_QUEUES, nextALId, and regdListMap.

Referenced by contextSwitchQ().

◆ findNextIdleRLQ()

bool HWScheduler::findNextIdleRLQ ( )

Definition at line 284 of file hw_scheduler.cc.

References hsaPP, isRLQIdle(), nextRLId, and HSAPacketProcessor::numHWQueues.

Referenced by unmapQFromRQ().

◆ isRLQIdle()

bool HWScheduler::isRLQIdle ( uint32_t  rl_idx)

◆ mapQIfSlotAvlbl()

bool HWScheduler::mapQIfSlotAvlbl ( uint32_t  al_idx,
AQLRingBuffer aql_buf,
HSAQueueDescriptor q_desc 
)

◆ registerNewQueue()

void HWScheduler::registerNewQueue ( uint64_t  hostReadIndexPointer,
uint64_t  basePointer,
uint64_t  queue_id,
uint32_t  size 
)

◆ removeQCntxt()

void HWScheduler::removeQCntxt ( )

◆ scheduleAndWakeupMappedQ()

void HWScheduler::scheduleAndWakeupMappedQ ( )

◆ schedWakeup()

void HWScheduler::schedWakeup ( )

◆ unmapQFromRQ()

bool HWScheduler::unmapQFromRQ ( )

Definition at line 230 of file hw_scheduler.cc.

References findNextIdleRLQ(), and removeQCntxt().

Referenced by contextSwitchQ().

◆ unregisterQueue()

void HWScheduler::unregisterQueue ( uint64_t  queue_id)

◆ updateRRVars()

void HWScheduler::updateRRVars ( uint32_t  al_idx,
uint32_t  rl_idx 
)

◆ wakeup()

void HWScheduler::wakeup ( )

Definition at line 57 of file hw_scheduler.cc.

References contextSwitchQ(), and schedWakeup().

Referenced by HWScheduler::SchedulerWakeupEvent::process().

◆ write()

void HWScheduler::write ( Addr  db_addr,
uint32_t  doorbell_reg 
)

Member Data Documentation

◆ activeList

std::map<uint32_t, QCntxt> HWScheduler::activeList
private

◆ dbMap

std::map<Addr, uint32_t> HWScheduler::dbMap
private

Definition at line 88 of file hw_scheduler.hh.

Referenced by registerNewQueue(), removeQCntxt(), unregisterQueue(), and write().

◆ hsaPP

HSAPacketProcessor* HWScheduler::hsaPP
private

◆ nextALId

uint32_t HWScheduler::nextALId
private

Definition at line 100 of file hw_scheduler.hh.

Referenced by contextSwitchQ(), findNextActiveALQ(), and updateRRVars().

◆ nextRLId

uint32_t HWScheduler::nextRLId
private

◆ regdListMap

std::map<uint32_t, uint32_t> HWScheduler::regdListMap
private

◆ schedWakeupEvent

SchedulerWakeupEvent HWScheduler::schedWakeupEvent
private

Definition at line 103 of file hw_scheduler.hh.

Referenced by schedWakeup().

◆ wakeupDelay

const Tick HWScheduler::wakeupDelay
private

Definition at line 102 of file hw_scheduler.hh.

Referenced by schedWakeup().


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

Generated on Wed Sep 30 2020 14:02:26 for gem5 by doxygen 1.8.17