Go to the documentation of this file.
36 #include "debug/HSAPacketProcessor.hh"
39 #define HWSCHDLR_EVENT_DESCRIPTION_GENERATOR(XEVENT) \
41 HWScheduler::XEVENT::description() const \
88 uint32_t size,
int doorbellSize,
89 GfxVersion gfxVersion)
95 Addr db_offset = queue_id * doorbellSize;
97 panic(
"Creating an already existing queue (queueID %d)", queue_id);
101 dbMap[db_offset] = queue_id;
104 panic(
"Attempting to create a queue (queueID %d)" \
105 " beyond PIO range", queue_id);
110 hostReadIndexPointer, size, gfxVersion);
113 QCntxt q_cntxt(q_desc, aql_buf);
118 [[maybe_unused]]
bool register_q =
122 "%s: offset = %p, qID = %d, is_regd = %s, AL size %d\n",
123 __FUNCTION__, db_offset, queue_id,
124 (register_q) ?
"true" :
"false",
dbMap.size());
131 "Trying to find empty HW queue, @ %s\n", __FUNCTION__);
144 panic(
"Cannot find empty queue\n");
154 "Trying to map new queue, @ %s\n", __FUNCTION__);
194 "Trying to map next queue, @ %s", __FUNCTION__);
253 uint32_t al_idx =
dbMap[db_offset];
271 "Next Active ALQ %d (current %d), max ALQ %d\n",
299 "@ %s, analyzing hw queue %d\n", __FUNCTION__, rl_idx);
321 auto dbmap_iter =
dbMap.find(db_addr);
322 if (dbmap_iter ==
dbMap.end()) {
323 panic(
"Writing to a non-existing queue (db_offset %x)", db_addr);
325 uint32_t al_idx =
dbMap[db_addr];
327 activeList[al_idx].qDesc->writeIndex = doorbell_reg;
338 Addr db_offset = queue_id * doorbellSize;
339 auto dbmap_iter =
dbMap.find(db_offset);
340 if (dbmap_iter ==
dbMap.end()) {
341 panic(
"Destroying a non-existing queue (db_offset %x)",
344 uint32_t al_idx =
dbMap[db_offset];
345 assert(
dbMap[db_offset] == dbmap_iter->second);
354 warn(
"Destroying a non-empty queue");
360 dbMap.erase(db_offset);
Tick curTick()
The universal simulation clock.
void schedAQLProcessing(uint32_t rl_idx)
std::map< Addr, uint32_t > dbMap
uint64_t inFlightPkts(uint32_t queId)
void schedule(Event &event, Tick when)
void getCommandsFromHost(int pid, uint32_t rl_idx)
bool isRLQIdle(uint32_t rl_idx)
#define HWSCHDLR_EVENT_DESCRIPTION_GENERATOR(XEVENT)
virtual std::string name() const
class RQLEntry * getRegdListEntry(uint32_t queId)
SignalState depSignalRdState
void unregisterQueue(uint64_t queue_id, int doorbellSize)
bool mapQIfSlotAvlbl(uint32_t al_idx, AQLRingBuffer *aql_buf, HSAQueueDescriptor *q_desc)
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
std::map< uint32_t, QCntxt > activeList
void registerNewQueue(uint64_t hostReadIndexPointer, uint64_t basePointer, uint64_t queue_id, uint32_t size, int doorbellSize, GfxVersion gfxVersion)
void addQCntxt(uint32_t al_idx, AQLRingBuffer *aql_buf, HSAQueueDescriptor *q_desc)
std::vector< class RQLEntry * > regdQList
HSAPacketProcessor * hsaPP
void scheduleAndWakeupMappedQ()
Internal ring buffer which is used to prefetch/store copies of the in-memory HSA ring buffer.
void updateRRVars(uint32_t al_idx, uint32_t rl_idx)
HSAQueueDescriptor * qDesc
SchedulerWakeupEvent schedWakeupEvent
void write(Addr db_addr, uint64_t doorbell_reg)
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
std::map< uint32_t, uint32_t > regdListMap
bool scheduled() const
Determine if the current event is scheduled.
#define panic(...)
This implements a cprintf based panic() function.
#define MAX_ACTIVE_QUEUES
QueueProcessEvent aqlProcessEvent
Generated on Tue Feb 8 2022 11:47:07 for gem5 by doxygen 1.8.17