gem5  v21.1.0.2
hsa_packet_processor.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015-2018 Advanced Micro Devices, Inc.
3  * All rights reserved.
4  *
5  * For use for simulation and test purposes only
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions are met:
9  *
10  * 1. Redistributions of source code must retain the above copyright notice,
11  * this list of conditions and the following disclaimer.
12  *
13  * 2. Redistributions in binary form must reproduce the above copyright notice,
14  * this list of conditions and the following disclaimer in the documentation
15  * and/or other materials provided with the distribution.
16  *
17  * 3. Neither the name of the copyright holder nor the names of its
18  * contributors may be used to endorse or promote products derived from this
19  * software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
25  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31  * POSSIBILITY OF SUCH DAMAGE.
32  */
33 
35 
36 #include <cassert>
37 #include <cstring>
38 
39 #include "base/chunk_generator.hh"
40 #include "base/compiler.hh"
41 #include "base/logging.hh"
42 #include "base/trace.hh"
43 #include "debug/HSAPacketProcessor.hh"
44 #include "dev/dma_device.hh"
45 #include "dev/hsa/hsa_packet.hh"
46 #include "dev/hsa/hw_scheduler.hh"
48 #include "mem/packet_access.hh"
49 #include "mem/page_table.hh"
50 #include "sim/process.hh"
51 #include "sim/proxy_ptr.hh"
52 #include "sim/system.hh"
53 
54 #define HSAPP_EVENT_DESCRIPTION_GENERATOR(XEVENT) \
55  const char* \
56  HSAPacketProcessor::XEVENT::description() const \
57  { \
58  return #XEVENT; \
59  }
60 
61 #define PKT_TYPE(PKT) ((hsa_packet_type_t)(((PKT->header) >> \
62  HSA_PACKET_HEADER_TYPE) & (HSA_PACKET_HEADER_WIDTH_TYPE - 1)))
63 
64 // checks if the barrier bit is set in the header -- shift the barrier bit
65 // to LSB, then bitwise "and" to mask off all other bits
66 #define IS_BARRIER(PKT) ((hsa_packet_header_t)(((PKT->header) >> \
67  HSA_PACKET_HEADER_BARRIER) & HSA_PACKET_HEADER_WIDTH_BARRIER))
68 
69 namespace gem5
70 {
71 
72 HSAPP_EVENT_DESCRIPTION_GENERATOR(QueueProcessEvent)
73 
75  : DmaVirtDevice(p), numHWQueues(p.numHWQueues), pioAddr(p.pioAddr),
76  pioSize(PAGE_SIZE), pioDelay(10), pktProcessDelay(p.pktProcessDelay)
77 {
78  DPRINTF(HSAPacketProcessor, "%s:\n", __FUNCTION__);
79  hwSchdlr = new HWScheduler(this, p.wakeupDelay);
80  regdQList.resize(numHWQueues);
81  for (int i = 0; i < numHWQueues; i++) {
82  regdQList[i] = new RQLEntry(this, i);
83  }
84 }
85 
87 {
88  for (auto &queue : regdQList) {
89  delete queue;
90  }
91 }
92 
93 void
94 HSAPacketProcessor::unsetDeviceQueueDesc(uint64_t queue_id, int doorbellSize)
95 {
96  hwSchdlr->unregisterQueue(queue_id, doorbellSize);
97 }
98 
99 void
100 HSAPacketProcessor::setDeviceQueueDesc(uint64_t hostReadIndexPointer,
101  uint64_t basePointer,
102  uint64_t queue_id,
103  uint32_t size, int doorbellSize)
104 {
106  "%s:base = %p, qID = %d, ze = %d\n", __FUNCTION__,
107  (void *)basePointer, queue_id, size);
108  hwSchdlr->registerNewQueue(hostReadIndexPointer,
109  basePointer, queue_id, size, doorbellSize);
110 }
111 
114 {
115  assert(pioSize != 0);
116 
117  AddrRangeList ranges;
118  ranges.push_back(RangeSize(pioAddr, pioSize));
119 
120  return ranges;
121 }
122 
123 // Basically only processes writes to the queue doorbell register.
124 Tick
126 {
127  assert(pkt->getAddr() >= pioAddr && pkt->getAddr() < pioAddr + pioSize);
128 
129  // TODO: How to get pid??
130  GEM5_VAR_USED Addr daddr = pkt->getAddr() - pioAddr;
131 
133  "%s: write of size %d to reg-offset %d (0x%x)\n",
134  __FUNCTION__, pkt->getSize(), daddr, daddr);
135 
136  assert(gpu_device->driver()->doorbellSize() == pkt->getSize());
137 
138  uint64_t doorbell_reg(0);
139  if (pkt->getSize() == 8)
140  doorbell_reg = pkt->getLE<uint64_t>() + 1;
141  else if (pkt->getSize() == 4)
142  doorbell_reg = pkt->getLE<uint32_t>();
143  else
144  fatal("invalid db size");
145 
147  "%s: write data 0x%x to offset %d (0x%x)\n",
148  __FUNCTION__, doorbell_reg, daddr, daddr);
149  hwSchdlr->write(daddr, doorbell_reg);
150  pkt->makeAtomicResponse();
151  return pioDelay;
152 }
153 
154 Tick
156 {
157  pkt->makeAtomicResponse();
158  pkt->setBadAddress();
159  return pioDelay;
160 }
161 
162 void
164 {
165  // Grab the process and try to translate the virtual address with it; with
166  // new extensions, it will likely be wrong to just arbitrarily grab context
167  // zero.
168  auto process = sys->threads[0]->getProcessPtr();
169 
170  if (!process->pTable->translate(vaddr, paddr))
171  fatal("failed translation: vaddr 0x%x\n", vaddr);
172 }
173 
179 void
181 {
182  DPRINTF(HSAPacketProcessor, "updateReaddispId\n");
183 }
184 
185 void
186 HSAPacketProcessor::updateReadIndex(int pid, uint32_t rl_idx)
187 {
188  AQLRingBuffer* aqlbuf = regdQList[rl_idx]->qCntxt.aqlBuf;
189  HSAQueueDescriptor* qDesc = regdQList[rl_idx]->qCntxt.qDesc;
190  auto cb = new DmaVirtCallback<uint64_t>(
191  [ = ] (const uint32_t &dma_data) { this->updateReadDispIdDma(); }, 0);
192 
194  "%s: read-pointer offset [0x%x]\n", __FUNCTION__, aqlbuf->rdIdx());
195 
196  dmaWriteVirt((Addr)qDesc->hostReadIndexPtr, sizeof(aqlbuf->rdIdx()),
197  cb, aqlbuf->rdIdxPtr());
198 
200  "%s: rd-ptr offset [0x%x], wr-ptr offset [0x%x], space used = %d," \
201  " q size = %d, is_empty = %s, active list ID = %d\n", __FUNCTION__,
202  qDesc->readIndex, qDesc->writeIndex, qDesc->spaceUsed(),
203  qDesc->numElts, qDesc->isEmpty()? "true" : "false", rl_idx);
204  if (qDesc->writeIndex != aqlbuf->wrIdx()) {
205  getCommandsFromHost(pid, rl_idx);
206  }
207 }
208 
209 void
211  bool isRead, uint32_t ix_start, unsigned num_pkts,
212  dma_series_ctx *series_ctx, void *dest_4debug)
213 {
214  uint32_t rl_idx = series_ctx->rl_idx;
215  GEM5_VAR_USED AQLRingBuffer *aqlRingBuffer =
216  hsaPP->regdQList[rl_idx]->qCntxt.aqlBuf;
217  HSAQueueDescriptor* qDesc =
218  hsaPP->regdQList[rl_idx]->qCntxt.qDesc;
219  DPRINTF(HSAPacketProcessor, ">%s, ix = %d, npkts = %d," \
220  " pktsRemaining = %d, active list ID = %d\n", __FUNCTION__,
221  ix_start, num_pkts, series_ctx->pkts_2_go,
222  rl_idx);
223  if (isRead) {
224  series_ctx->pkts_2_go -= num_pkts;
225  if (series_ctx->pkts_2_go == 0) {
226  // Mark DMA as completed
227  qDesc->dmaInProgress = false;
229  "%s: schedule Qwakeup next cycle, rdIdx %d, wrIdx %d," \
230  " dispIdx %d, active list ID = %d\n",
231  __FUNCTION__, aqlRingBuffer->rdIdx(),
232  aqlRingBuffer->wrIdx(), aqlRingBuffer->dispIdx(), rl_idx);
233  // schedule queue wakeup
234  hsaPP->schedAQLProcessing(rl_idx);
235  delete series_ctx;
236  }
237  }
238 }
239 
240 void
242 {
243  RQLEntry *queue = regdQList[rl_idx];
244  if (!queue->aqlProcessEvent.scheduled()) {
245  Tick processingTick = curTick() + delay;
246  schedule(queue->aqlProcessEvent, processingTick);
247  DPRINTF(HSAPacketProcessor, "AQL processing scheduled at tick: %d\n",
248  processingTick);
249  } else {
250  DPRINTF(HSAPacketProcessor, "AQL processing already scheduled\n");
251  }
252 }
253 
254 void
256 {
258 }
259 
260 Q_STATE
261 HSAPacketProcessor::processPkt(void* pkt, uint32_t rl_idx, Addr host_pkt_addr)
262 {
263  Q_STATE is_submitted = BLOCKED_BPKT;
264  SignalState *dep_sgnl_rd_st = &(regdQList[rl_idx]->depSignalRdState);
265  // Dependency signals are not read yet. And this can only be a retry.
266  // The retry logic will schedule the packet processor wakeup
267  if (dep_sgnl_rd_st->pendingReads != 0) {
268  return BLOCKED_BPKT;
269  }
270  // `pkt` can be typecasted to any type of AQL packet since they all
271  // have header information at offset zero
272  auto disp_pkt = (_hsa_dispatch_packet_t *)pkt;
273  hsa_packet_type_t pkt_type = PKT_TYPE(disp_pkt);
274  if (IS_BARRIER(disp_pkt) &&
275  regdQList[rl_idx]->compltnPending() > 0) {
276  // If this packet is using the "barrier bit" to enforce ordering with
277  // previous packets, and if there are outstanding packets, set the
278  // barrier bit for this queue and block the queue.
279  DPRINTF(HSAPacketProcessor, "%s: setting barrier bit for active" \
280  " list ID = %d\n", __FUNCTION__, rl_idx);
281  regdQList[rl_idx]->setBarrierBit(true);
282  return BLOCKED_BBIT;
283  }
284  if (pkt_type == HSA_PACKET_TYPE_VENDOR_SPECIFIC) {
285  DPRINTF(HSAPacketProcessor, "%s: submitting vendor specific pkt" \
286  " active list ID = %d\n", __FUNCTION__, rl_idx);
287  // Submit packet to HSA device (dispatcher)
288  gpu_device->submitVendorPkt((void *)disp_pkt, rl_idx, host_pkt_addr);
289  is_submitted = UNBLOCKED;
290  } else if (pkt_type == HSA_PACKET_TYPE_KERNEL_DISPATCH) {
291  DPRINTF(HSAPacketProcessor, "%s: submitting kernel dispatch pkt" \
292  " active list ID = %d\n", __FUNCTION__, rl_idx);
293  // Submit packet to HSA device (dispatcher)
294  gpu_device->submitDispatchPkt((void *)disp_pkt, rl_idx, host_pkt_addr);
295  is_submitted = UNBLOCKED;
296  /*
297  If this packet is using the "barrier bit" to enforce ordering with
298  subsequent kernels, set the bit for this queue now, after
299  dispatching.
300  */
301  if (IS_BARRIER(disp_pkt)) {
302  DPRINTF(HSAPacketProcessor, "%s: setting barrier bit for active" \
303  " list ID = %d\n", __FUNCTION__, rl_idx);
304  regdQList[rl_idx]->setBarrierBit(true);
305  }
306  } else if (pkt_type == HSA_PACKET_TYPE_BARRIER_AND) {
307  DPRINTF(HSAPacketProcessor, "%s: Processing barrier packet" \
308  " active list ID = %d\n", __FUNCTION__, rl_idx);
309  auto bar_and_pkt = (_hsa_barrier_and_packet_t *)pkt;
310  bool isReady = true;
311  // Loop thorugh all the completion signals to see if this barrier
312  // packet is ready.
313  for (int i = 0; i < NumSignalsPerBarrier; i++) {
314  // dep_signal = zero imply no signal connected
315  if (bar_and_pkt->dep_signal[i]) {
316  // The signal value is aligned 8 bytes from
317  // the actual handle in the runtime
318  uint64_t signal_addr =
319  (uint64_t) (((uint64_t *) bar_and_pkt->dep_signal[i]) + 1);
320  hsa_signal_value_t *signal_val =
321  &(dep_sgnl_rd_st->values[i]);
322  DPRINTF(HSAPacketProcessor, "%s: Barrier pkt dep sgnl[%d]" \
323  " , sig addr %x, value %d active list ID = %d\n",
324  __FUNCTION__, i, signal_addr,
325  *signal_val, rl_idx);
326  // The if condition will be executed everytime except the
327  // very first time this barrier packet is encounteresd.
328  if (dep_sgnl_rd_st->allRead) {
329  if (*signal_val != 0) {
330  // This signal is not yet ready, read it again
331  isReady = false;
332 
333  auto cb = new DmaVirtCallback<int64_t>(
334  [ = ] (const uint32_t &dma_data)
335  { dep_sgnl_rd_st->handleReadDMA(); }, 0);
336  dmaReadVirt(signal_addr, sizeof(hsa_signal_value_t),
337  cb, signal_val);
338  dep_sgnl_rd_st->pendingReads++;
339  DPRINTF(HSAPacketProcessor, "%s: Pending reads %d," \
340  " active list %d\n", __FUNCTION__,
341  dep_sgnl_rd_st->pendingReads, rl_idx);
342  }
343  } else {
344  // This signal is not yet ready, read it again
345  isReady = false;
346  auto cb = new DmaVirtCallback<int64_t>(
347  [ = ] (const uint32_t &dma_data)
348  { dep_sgnl_rd_st->handleReadDMA(); }, 0);
349  dmaReadVirt(signal_addr, sizeof(hsa_signal_value_t),
350  cb, signal_val);
351  dep_sgnl_rd_st->pendingReads++;
352  DPRINTF(HSAPacketProcessor, "%s: Pending reads %d," \
353  " active list %d\n", __FUNCTION__,
354  dep_sgnl_rd_st->pendingReads, rl_idx);
355  }
356  }
357  }
358  if (isReady) {
359  assert(dep_sgnl_rd_st->pendingReads == 0);
360  DPRINTF(HSAPacketProcessor, "%s: Barrier packet completed" \
361  " active list ID = %d\n", __FUNCTION__, rl_idx);
362  // TODO: Completion signal of barrier packet to be
363  // atomically decremented here
364  finishPkt((void*)bar_and_pkt, rl_idx);
365  is_submitted = UNBLOCKED;
366  // Reset signal values
367  dep_sgnl_rd_st->resetSigVals();
368  // The completion signal is connected
369  if (bar_and_pkt->completion_signal != 0) {
370  // HACK: The semantics of the HSA signal is to
371  // decrement the current signal value
372  // I'm going to cheat here and read out
373  // the value from main memory using functional
374  // access, and then just DMA the decremented value.
375  uint64_t signal_value = gpu_device->functionalReadHsaSignal(\
376  bar_and_pkt->completion_signal);
377 
378  DPRINTF(HSAPacketProcessor, "Triggering barrier packet" \
379  " completion signal! Addr: %x\n",
380  bar_and_pkt->completion_signal);
381 
382  gpu_device->updateHsaSignal(bar_and_pkt->completion_signal,
383  signal_value - 1);
384  }
385  }
386  if (dep_sgnl_rd_st->pendingReads > 0) {
387  // Atleast one DepSignalsReadDmaEvent is scheduled this cycle
388  dep_sgnl_rd_st->allRead = false;
389  dep_sgnl_rd_st->discardRead = false;
390  }
391  } else if (pkt_type == HSA_PACKET_TYPE_BARRIER_OR) {
392  fatal("Unsupported packet type HSA_PACKET_TYPE_BARRIER_OR");
393  } else if (pkt_type == HSA_PACKET_TYPE_INVALID) {
394  fatal("Unsupported packet type HSA_PACKET_TYPE_INVALID");
395  } else if (pkt_type == HSA_PACKET_TYPE_AGENT_DISPATCH) {
396  DPRINTF(HSAPacketProcessor, "%s: submitting agent dispatch pkt" \
397  " active list ID = %d\n", __FUNCTION__, rl_idx);
398  // Submit packet to HSA device (dispatcher)
400  (void *)disp_pkt, rl_idx, host_pkt_addr);
401  is_submitted = UNBLOCKED;
402  sendAgentDispatchCompletionSignal((void *)disp_pkt,0);
403  } else {
404  fatal("Unsupported packet type %d\n", pkt_type);
405  }
406  return is_submitted;
407 }
408 
409 // Wakes up every fixed time interval (pktProcessDelay) and processes a single
410 // packet from the queue that scheduled this wakeup. If there are more
411 // packets in that queue, the next wakeup is scheduled.
412 void
414 {
415  AQLRingBuffer *aqlRingBuffer = hsaPP->regdQList[rqIdx]->qCntxt.aqlBuf;
417  "%s: Qwakeup , rdIdx %d, wrIdx %d," \
418  " dispIdx %d, active list ID = %d\n",
419  __FUNCTION__, aqlRingBuffer->rdIdx(),
420  aqlRingBuffer->wrIdx(), aqlRingBuffer->dispIdx(), rqIdx);
421  // If barrier bit is set, then this wakeup is a dummy wakeup
422  // just to model the processing time. Do nothing.
423  if (hsaPP->regdQList[rqIdx]->getBarrierBit()) {
425  "Dummy wakeup with barrier bit for rdIdx %d\n", rqIdx);
426  return;
427  }
428  // In the future, we may support batch processing of packets.
429  // Then, we can just remove the break statements and the code
430  // will support batch processing. That is why we are using a
431  // "while loop" here instead on an "if" condition.
432  while (hsaPP->regdQList[rqIdx]->dispPending()) {
433  void *pkt = aqlRingBuffer->ptr(aqlRingBuffer->dispIdx());
434  DPRINTF(HSAPacketProcessor, "%s: Attempting dispatch @ dispIdx[%d]\n",
435  __FUNCTION__, aqlRingBuffer->dispIdx());
436  Addr host_addr = aqlRingBuffer->hostDispAddr();
437  Q_STATE q_state = hsaPP->processPkt(pkt, rqIdx, host_addr);
438  if (q_state == UNBLOCKED) {
439  aqlRingBuffer->incDispIdx(1);
440  DPRINTF(HSAPacketProcessor, "%s: Increment dispIdx[%d]\n",
441  __FUNCTION__, aqlRingBuffer->dispIdx());
442  if (hsaPP->regdQList[rqIdx]->dispPending()) {
444  }
445  break;
446  } else if (q_state == BLOCKED_BPKT) {
447  // This queue is blocked by barrier packet,
448  // schedule a processing event
450  break;
451  } else if (q_state == BLOCKED_BBIT) {
452  // This queue is blocked by barrier bit, and processing event
453  // should be scheduled from finishPkt(). However, to elapse
454  // "pktProcessDelay" processing time, let us schedule a dummy
455  // wakeup once which will just wakeup and will do nothing.
457  break;
458  } else {
459  panic("Unknown queue state\n");
460  }
461  }
462 }
463 
464 void
466 {
467  assert(pendingReads > 0);
468  pendingReads--;
469  if (pendingReads == 0) {
470  allRead = true;
471  if (discardRead) {
472  resetSigVals();
473  }
474  }
475 }
476 
477 void
479 {
480  HSAQueueDescriptor* qDesc = regdQList[rl_idx]->qCntxt.qDesc;
481  AQLRingBuffer *aqlRingBuffer = regdQList[rl_idx]->qCntxt.aqlBuf;
482 
484  "%s: read-pointer offset[0x%x], write-pointer offset[0x%x]"
485  " doorbell(%d)[0x%x] \n",
486  __FUNCTION__, qDesc->readIndex,
487  qDesc->writeIndex, pid, qDesc->doorbellPointer);
488 
489  if (qDesc->dmaInProgress) {
490  // we'll try again when this dma transfer completes in updateReadIndex
491  return;
492  }
493  uint32_t num_umq = qDesc->spaceUsed();
494  if (num_umq == 0)
495  return; // nothing to be gotten
496  uint32_t umq_nxt = qDesc->readIndex;
497  // Total AQL buffer size
498  uint32_t ttl_aql_buf = aqlRingBuffer->numObjs();
499  // Available AQL buffer size. If the available buffer is less than
500  // demanded, number of available buffer is returned
501  uint32_t got_aql_buf = aqlRingBuffer->allocEntry(num_umq);
502  qDesc->readIndex += got_aql_buf;
503  uint32_t dma_start_ix = (aqlRingBuffer->wrIdx() - got_aql_buf) %
504  ttl_aql_buf;
505  dma_series_ctx *series_ctx = NULL;
506 
507  DPRINTF(HSAPacketProcessor, "%s: umq_nxt = %d, ttl_aql_buf = %d, "
508  "dma_start_ix = %d, num_umq = %d\n", __FUNCTION__, umq_nxt,
509  ttl_aql_buf, dma_start_ix, num_umq);
510 
511  if (got_aql_buf == 0) {
512  // we'll try again when some dma bufs are freed in freeEntry
513  qDesc->stalledOnDmaBufAvailability = true;
514  return;
515  } else {
516  qDesc->stalledOnDmaBufAvailability = false;
517  }
518 
519  uint32_t dma_b4_wrap = ttl_aql_buf - dma_start_ix;
520  while (got_aql_buf != 0 && num_umq != 0) {
521  uint32_t umq_b4_wrap = qDesc->numObjs() -
522  (umq_nxt % qDesc->objSize());
523  uint32_t num_2_xfer
524  = std::min({umq_b4_wrap, dma_b4_wrap, num_umq, got_aql_buf});
525  if (!series_ctx) {
526  qDesc->dmaInProgress = true;
527  series_ctx = new dma_series_ctx(got_aql_buf, got_aql_buf,
528  dma_start_ix, rl_idx);
529  }
530 
531  void *aql_buf = aqlRingBuffer->ptr(dma_start_ix);
532  auto cb = new DmaVirtCallback<uint64_t>(
533  [ = ] (const uint32_t &dma_data)
534  { this->cmdQueueCmdDma(this, pid, true, dma_start_ix,
535  num_2_xfer, series_ctx, aql_buf); }, 0);
536  dmaReadVirt(qDesc->ptr(umq_nxt), num_2_xfer * qDesc->objSize(),
537  cb, aql_buf);
538 
539  aqlRingBuffer->saveHostDispAddr(qDesc->ptr(umq_nxt), num_2_xfer,
540  dma_start_ix);
541 
543  "%s: aql_buf = %p, umq_nxt = %d, dma_ix = %d, num2xfer = %d\n",
544  __FUNCTION__, aql_buf, umq_nxt, dma_start_ix, num_2_xfer);
545 
546  num_umq -= num_2_xfer;
547  got_aql_buf -= num_2_xfer;
548  dma_start_ix = (dma_start_ix + num_2_xfer) % ttl_aql_buf;
549  umq_nxt = (umq_nxt + num_2_xfer) % qDesc->numObjs();
550  if (got_aql_buf == 0 && num_umq != 0) {
551  // There are more packets in the queue but
552  // not enough DMA buffers. Set the stalledOnDmaBufAvailability,
553  // we will try again in freeEntry
554  qDesc->stalledOnDmaBufAvailability = true;
555  }
556  }
557 }
558 
559 void
561 {
562  GEM5_VAR_USED HSAQueueDescriptor* qDesc = regdQList[rl_idx]->qCntxt.qDesc;
564  "%s: pid[%d], basePointer[0x%lx], dBPointer[0x%lx], "
565  "writeIndex[0x%x], readIndex[0x%x], size(bytes)[0x%x]\n",
566  __FUNCTION__, pid, qDesc->basePointer,
567  qDesc->doorbellPointer, qDesc->writeIndex,
568  qDesc->readIndex, qDesc->numElts);
569 }
570 
572  const std::string name)
573  : _name(name), _wrIdx(0), _rdIdx(0), _dispIdx(0)
574 {
575  _aqlBuf.resize(size);
576  _aqlComplete.resize(size);
577  _hostDispAddresses.resize(size);
578  // Mark all packets as invalid and incomplete
579  for (auto& it : _aqlBuf)
580  it.header = HSA_PACKET_TYPE_INVALID;
581  std::fill(_aqlComplete.begin(), _aqlComplete.end(), false);
582 }
583 
584 bool
586 {
587  _aqlComplete[(hsa_kernel_dispatch_packet_t *) pkt - _aqlBuf.data()] = true;
588  DPRINTF(HSAPacketProcessor, "%s: pkt_ix = %d; "\
589  " # free entries = %d, wrIdx = %d, rdIdx = %d\n", __FUNCTION__,
590  (hsa_kernel_dispatch_packet_t *) pkt - _aqlBuf.data(),
591  nFree(), wrIdx(), rdIdx());
592  // Packets can complete out-of-order. This code "retires" packets in-order
593  // by updating the read pointer in the MQD when a contiguous chunk of
594  // packets have finished.
595  uint32_t old_rdIdx = rdIdx();
596  while (_aqlComplete[rdIdx() % numObjs()]) {
597  _aqlComplete[rdIdx() % numObjs()] = false;
599  incRdIdx(1);
600  }
601  return (old_rdIdx != rdIdx());
602 }
603 
604 void
606 {
607  this->gpu_device = dev;
608 }
609 
610 int
611 AQLRingBuffer::allocEntry(uint32_t nBufReq)
612 {
613  DPRINTF(HSAPacketProcessor, "%s: nReq = %d\n", __FUNCTION__, nBufReq);
614  if (nFree() == 0) {
615  DPRINTF(HSAPacketProcessor, "%s: return = %d\n", __FUNCTION__, 0);
616  return 0;
617  }
618 
619  if (nBufReq > nFree())
620  nBufReq = nFree();
621 
622  DPRINTF(HSAPacketProcessor, "%s: ix1stFree = %d\n", __FUNCTION__, wrIdx());
623  incWrIdx(nBufReq);
624  DPRINTF(HSAPacketProcessor, "%s: return = %d, wrIdx = %d\n",
625  __FUNCTION__, nBufReq, wrIdx());
626  return nBufReq;
627 }
628 
629 void
630 HSAPacketProcessor::finishPkt(void *pvPkt, uint32_t rl_idx)
631 {
632  HSAQueueDescriptor* qDesc = regdQList[rl_idx]->qCntxt.qDesc;
633 
634  // if barrier bit was set and this is the last
635  // outstanding packet from that queue,
636  // unset it here
637  if (regdQList[rl_idx]->getBarrierBit() &&
638  regdQList[rl_idx]->isLastOutstandingPkt()) {
640  "Unset barrier bit for active list ID %d\n", rl_idx);
641  regdQList[rl_idx]->setBarrierBit(false);
642  // if pending kernels in the queue after this kernel, reschedule
643  if (regdQList[rl_idx]->dispPending()) {
645  "Rescheduling active list ID %d after unsetting barrier "
646  "bit\n", rl_idx);
647  schedAQLProcessing(rl_idx);
648  }
649  }
650 
651  // If set, then blocked schedule, so need to reschedule
652  if (regdQList[rl_idx]->qCntxt.aqlBuf->freeEntry(pvPkt))
653  updateReadIndex(0, rl_idx);
655  "%s: rd-ptr offset [0x%x], wr-ptr offset [0x%x], space used = %d," \
656  " q size = %d, stalled = %s, empty = %s, active list ID = %d\n",
657  __FUNCTION__, qDesc->readIndex, qDesc->writeIndex,
658  qDesc->spaceUsed(), qDesc->numElts,
659  qDesc->stalledOnDmaBufAvailability? "true" : "false",
660  qDesc->isEmpty()? "true" : "false", rl_idx);
661  // DMA buffer is freed, check the queue to see if there are DMA
662  // accesses blocked becasue of non-availability of DMA buffer
663  if (qDesc->stalledOnDmaBufAvailability) {
664  assert(!qDesc->isEmpty());
665  getCommandsFromHost(0, rl_idx); // TODO:assign correct pid
666  // when implementing
667  // multi-process support
668  }
669 }
670 
671 void
673  void *pkt, hsa_signal_value_t signal)
674 {
675  auto agent_pkt = (_hsa_agent_dispatch_packet_t *)pkt;
676  uint64_t signal_addr =
677  (uint64_t) (((uint64_t *)agent_pkt->completion_signal) + 1);
678  DPRINTF(HSAPacketProcessor, "Triggering Agent Dispatch packet" \
679  " completion signal: %x!\n", signal_addr);
689  VPtr<uint64_t> prev_signal(signal_addr, sys->threads[0]);
690 
691  DPRINTF(HSAPacketProcessor,"HSADriver: Sending signal to %lu\n",
692  (uint64_t)sys->threads[0]->cpuId());
693 
694 
695  hsa_signal_value_t *new_signal = new hsa_signal_value_t;
696  *new_signal = (hsa_signal_value_t) *prev_signal - 1;
697 
698  dmaWriteVirt(signal_addr, sizeof(hsa_signal_value_t), nullptr, new_signal, 0);
699 }
700 
701 void
703 {
704  uint64_t signal_addr = (uint64_t) (((uint64_t *)signal) + 1);
705  DPRINTF(HSAPacketProcessor, "Triggering completion signal: %x!\n",
706  signal_addr);
716  VPtr<uint64_t> prev_signal(signal_addr, sys->threads[0]);
717 
718  hsa_signal_value_t *new_signal = new hsa_signal_value_t;
719  *new_signal = (hsa_signal_value_t) *prev_signal - 1;
720 
721  dmaWriteVirt(signal_addr, sizeof(hsa_signal_value_t), nullptr, new_signal, 0);
722 }
723 
724 } // namespace gem5
gem5::_hsa_agent_dispatch_packet_t
Definition: hsa_packet.hh:74
gem5::curTick
Tick curTick()
The universal simulation clock.
Definition: cur_tick.hh:46
fatal
#define fatal(...)
This implements a cprintf based fatal() function.
Definition: logging.hh:189
gem5::MipsISA::fill
fill
Definition: pra_constants.hh:57
gem5::HSAPacketProcessor::pioDelay
Tick pioDelay
Definition: hsa_packet_processor.hh:318
gem5::HSAPacketProcessor::pioAddr
Addr pioAddr
Definition: hsa_packet_processor.hh:316
gem5::AQLRingBuffer::AQLRingBuffer
AQLRingBuffer(uint32_t size, const std::string name)
Definition: hsa_packet_processor.cc:571
gem5::HSAPacketProcessor::schedAQLProcessing
void schedAQLProcessing(uint32_t rl_idx)
Definition: hsa_packet_processor.cc:255
gem5::AQLRingBuffer::allocEntry
int allocEntry(uint32_t nBufReq)
Definition: hsa_packet_processor.cc:611
gem5::HSAPacketProcessor::QueueProcessEvent::hsaPP
HSAPacketProcessor * hsaPP
Definition: hsa_packet_processor.hh:261
gem5::HSAPacketProcessor::processPkt
Q_STATE processPkt(void *pkt, uint32_t rl_idx, Addr host_pkt_addr)
Definition: hsa_packet_processor.cc:261
gem5::HSAQueueDescriptor::readIndex
uint64_t readIndex
Definition: hsa_packet_processor.hh:82
system.hh
HSAPP_EVENT_DESCRIPTION_GENERATOR
#define HSAPP_EVENT_DESCRIPTION_GENERATOR(XEVENT)
Definition: hsa_packet_processor.cc:54
hsa_kernel_dispatch_packet_s
AQL kernel dispatch packet.
Definition: hsa.h:2900
gem5::HSAPacketProcessor::SignalState::resetSigVals
void resetSigVals()
Definition: hsa_packet_processor.hh:252
gem5::HSAQueueDescriptor::hostReadIndexPtr
uint64_t hostReadIndexPtr
Definition: hsa_packet_processor.hh:84
gem5::DmaVirtDevice::DmaVirtCallback
Wraps a std::function object in a DmaCallback.
Definition: dma_virt_device.hh:55
gem5::DmaVirtDevice::dmaReadVirt
void dmaReadVirt(Addr host_addr, unsigned size, DmaCallback *cb, void *data, Tick delay=0)
Initiate a DMA read from virtual address host_addr.
Definition: dma_virt_device.cc:45
gem5::RangeSize
AddrRange RangeSize(Addr start, Addr size)
Definition: addr_range.hh:661
gem5::AQLRingBuffer::numObjs
uint32_t numObjs() const
Definition: hsa_packet_processor.hh:200
hsa_packet_processor.hh
hsa_signal_value_t
int32_t hsa_signal_value_t
Signal value.
Definition: hsa.h:1322
gem5::Packet::setBadAddress
void setBadAddress()
Definition: packet.hh:773
gem5::HSAPacketProcessor::unsetDeviceQueueDesc
void unsetDeviceQueueDesc(uint64_t queue_id, int doorbellSize)
Definition: hsa_packet_processor.cc:94
gem5::HSAQueueDescriptor::isEmpty
bool isEmpty()
Definition: hsa_packet_processor.hh:101
gem5::HSAQueueDescriptor::numObjs
uint32_t numObjs()
Definition: hsa_packet_processor.hh:99
gem5::AQLRingBuffer::saveHostDispAddr
void saveHostDispAddr(Addr host_pkt_addr, int num_pkts, int ix)
the kernel may try to read from the dispatch packet, so we need to keep the host address that corresp...
Definition: hsa_packet_processor.hh:156
NumSignalsPerBarrier
#define NumSignalsPerBarrier
Definition: hsa_packet_processor.hh:53
gem5::HSAPacketProcessor::QueueProcessEvent::rqIdx
uint32_t rqIdx
Definition: hsa_packet_processor.hh:262
gem5::EventManager::schedule
void schedule(Event &event, Tick when)
Definition: eventq.hh:1019
proxy_ptr.hh
gem5::HSAQueueDescriptor::ptr
uint64_t ptr(uint64_t ix)
Definition: hsa_packet_processor.hh:103
gem5::Packet::makeAtomicResponse
void makeAtomicResponse()
Definition: packet.hh:1043
gem5::AQLRingBuffer::hostDispAddr
Addr hostDispAddr() const
Definition: hsa_packet_processor.hh:165
gem5::Q_STATE
Q_STATE
Definition: hsa_packet_processor.hh:61
gem5::HSAPacketProcessor::SignalState::discardRead
bool discardRead
Definition: hsa_packet_processor.hh:248
gem5::ArmISA::i
Bitfield< 7 > i
Definition: misc_types.hh:66
hw_scheduler.hh
gem5::HSAPacketProcessor::pioSize
Addr pioSize
Definition: hsa_packet_processor.hh:317
gem5::HSAPacketProcessor::getCommandsFromHost
void getCommandsFromHost(int pid, uint32_t rl_idx)
Definition: hsa_packet_processor.cc:478
gem5::HSAPacketProcessor::dma_series_ctx::pkts_2_go
uint32_t pkts_2_go
Definition: hsa_packet_processor.hh:354
gem5::HSAPacketProcessor::setDeviceQueueDesc
void setDeviceQueueDesc(uint64_t hostReadIndexPointer, uint64_t basePointer, uint64_t queue_id, uint32_t size, int doorbellSize)
Definition: hsa_packet_processor.cc:100
gem5::GPUCommandProcessor::submitDispatchPkt
void submitDispatchPkt(void *raw_pkt, uint32_t queue_id, Addr host_pkt_addr)
submitDispatchPkt() is the entry point into the CP from the HSAPP and is only meant to be used with A...
Definition: gpu_command_processor.cc:98
gem5::HSAPacketProcessor::SignalState::pendingReads
int pendingReads
Definition: hsa_packet_processor.hh:244
gem5::GPUCommandProcessor::updateHsaSignal
void updateHsaSignal(Addr signal_handle, uint64_t signal_value, HsaSignalCallbackFunction function=[](const uint64_t &) { })
Definition: gpu_command_processor.cc:186
gem5::HSAQueueDescriptor::spaceUsed
uint64_t spaceUsed()
Definition: hsa_packet_processor.hh:97
gem5::AQLRingBuffer::freeEntry
bool freeEntry(void *pkt)
Definition: hsa_packet_processor.cc:585
gem5::HSAPacketProcessor::gpu_device
GPUCommandProcessor * gpu_device
Definition: hsa_packet_processor.hh:229
gem5::HSAPacketProcessor::cmdQueueCmdDma
void cmdQueueCmdDma(HSAPacketProcessor *hsaPP, int pid, bool isRead, uint32_t ix_start, unsigned num_pkts, dma_series_ctx *series_ctx, void *dest_4debug)
Definition: hsa_packet_processor.cc:210
gem5::HSAPacketProcessor::read
virtual Tick read(Packet *) override
Definition: hsa_packet_processor.cc:155
gem5::AQLRingBuffer::ptr
void * ptr(uint32_t ix)
Definition: hsa_packet_processor.hh:199
HSA_PACKET_TYPE_KERNEL_DISPATCH
@ HSA_PACKET_TYPE_KERNEL_DISPATCH
Packet used by agents for dispatching jobs to kernel agents.
Definition: hsa.h:2761
dma_device.hh
gem5::HSAQueueDescriptor::dmaInProgress
bool dmaInProgress
Definition: hsa_packet_processor.hh:86
gem5::GPUCommandProcessor
Definition: gpu_command_processor.hh:71
gem5::HSAPacketProcessor::finishPkt
void finishPkt(void *pkt, uint32_t rl_idx)
Definition: hsa_packet_processor.cc:630
gem5::Named::name
virtual std::string name() const
Definition: named.hh:47
gem5::HSAPacketProcessor
Definition: hsa_packet_processor.hh:224
DPRINTF
#define DPRINTF(x,...)
Definition: trace.hh:186
gem5::Packet
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition: packet.hh:283
gem5::HSAPacketProcessor::dma_series_ctx
Calls getCurrentEntry once the queueEntry has been dmaRead.
Definition: hsa_packet_processor.hh:350
PAGE_SIZE
#define PAGE_SIZE
Definition: base.cc:60
gem5::AQLRingBuffer::incWrIdx
void incWrIdx(uint64_t value)
Definition: hsa_packet_processor.hh:207
gem5::AQLRingBuffer::rdIdx
uint64_t rdIdx() const
Definition: hsa_packet_processor.hh:204
gem5::AQLRingBuffer::_aqlBuf
std::vector< hsa_kernel_dispatch_packet_t > _aqlBuf
Definition: hsa_packet_processor.hh:132
gem5::BLOCKED_BBIT
@ BLOCKED_BBIT
Definition: hsa_packet_processor.hh:64
gem5::MipsISA::p
Bitfield< 0 > p
Definition: pra_constants.hh:326
gem5::Tick
uint64_t Tick
Tick count type.
Definition: types.hh:58
gem5::PioDevice::sys
System * sys
Definition: io_device.hh:105
process.hh
gem5::HSAPacketProcessor::hwSchdlr
HWScheduler * hwSchdlr
Definition: hsa_packet_processor.hh:230
gem5::HWScheduler::registerNewQueue
void registerNewQueue(uint64_t hostReadIndexPointer, uint64_t basePointer, uint64_t queue_id, uint32_t size, int doorbellSize)
Definition: hw_scheduler.cc:87
gem5::HSAPacketProcessor::translateOrDie
void translateOrDie(Addr vaddr, Addr &paddr) override
Function used to translate from virtual to physical addresses.
Definition: hsa_packet_processor.cc:163
gem5::GPUCommandProcessor::submitAgentDispatchPkt
void submitAgentDispatchPkt(void *raw_pkt, uint32_t queue_id, Addr host_pkt_addr)
submitAgentDispatchPkt() is for accepting agent dispatch packets.
Definition: gpu_command_processor.cc:268
gem5::HSAQueueDescriptor::stalledOnDmaBufAvailability
bool stalledOnDmaBufAvailability
Definition: hsa_packet_processor.hh:85
hsa_packet.hh
gem5::HSAQueueDescriptor
Definition: hsa_packet_processor.hh:76
gem5::ProxyPtr
Definition: proxy_ptr.hh:238
PKT_TYPE
#define PKT_TYPE(PKT)
Definition: hsa_packet_processor.cc:61
gem5::DmaDevice::Params
DmaDeviceParams Params
Definition: dma_device.hh:209
gem5::BLOCKED_BPKT
@ BLOCKED_BPKT
Definition: hsa_packet_processor.hh:67
compiler.hh
gem5::HSAPacketProcessor::sendCompletionSignal
void sendCompletionSignal(hsa_signal_value_t signal)
Definition: hsa_packet_processor.cc:702
gem5::HWScheduler::unregisterQueue
void unregisterQueue(uint64_t queue_id, int doorbellSize)
Definition: hw_scheduler.cc:336
gpu_command_processor.hh
gem5::_hsa_dispatch_packet_t
Definition: hsa_packet.hh:55
HSA_PACKET_TYPE_BARRIER_OR
@ HSA_PACKET_TYPE_BARRIER_OR
Packet used by agents to delay processing of subsequent packets, and to express complex dependencies ...
Definition: hsa.h:2778
gem5::HSAPacketProcessor::displayQueueDescriptor
void displayQueueDescriptor(int pid, uint32_t rl_idx)
Definition: hsa_packet_processor.cc:560
gem5::HSAQueueDescriptor::doorbellPointer
uint64_t doorbellPointer
Definition: hsa_packet_processor.hh:80
gem5::DmaVirtDevice::dmaWriteVirt
void dmaWriteVirt(Addr host_addr, unsigned size, DmaCallback *b, void *data, Tick delay=0)
Initiate a DMA write from virtual address host_addr.
Definition: dma_virt_device.cc:52
gem5::HSAPacketProcessor::updateReadIndex
void updateReadIndex(int, uint32_t)
Definition: hsa_packet_processor.cc:186
HSA_PACKET_TYPE_VENDOR_SPECIFIC
@ HSA_PACKET_TYPE_VENDOR_SPECIFIC
Vendor-specific packet.
Definition: hsa.h:2750
gem5::Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:147
gem5::HWScheduler
Definition: hw_scheduler.hh:51
gem5::AQLRingBuffer::incDispIdx
void incDispIdx(uint64_t value)
Definition: hsa_packet_processor.hh:208
packet_access.hh
gem5::GPUComputeDriver::doorbellSize
int doorbellSize()
Definition: gpu_compute_driver.hh:88
HSA_PACKET_TYPE_INVALID
@ HSA_PACKET_TYPE_INVALID
The packet has been processed in the past, but has not been reassigned to the packet processor.
Definition: hsa.h:2756
hsa_packet_type_t
hsa_packet_type_t
Packet type.
Definition: hsa.h:2745
gem5::HSAPacketProcessor::SignalState::handleReadDMA
void handleReadDMA()
Definition: hsa_packet_processor.cc:465
gem5::HSAPacketProcessor::SignalState
Definition: hsa_packet_processor.hh:235
HSA_PACKET_TYPE_AGENT_DISPATCH
@ HSA_PACKET_TYPE_AGENT_DISPATCH
Packet used by agents for dispatching jobs to agents.
Definition: hsa.h:2772
gem5::HSAPacketProcessor::sendAgentDispatchCompletionSignal
void sendAgentDispatchCompletionSignal(void *pkt, hsa_signal_value_t signal)
Definition: hsa_packet_processor.cc:672
gem5::AQLRingBuffer::wrIdx
uint64_t wrIdx() const
Definition: hsa_packet_processor.hh:203
gem5::AQLRingBuffer::_hostDispAddresses
std::vector< Addr > _hostDispAddresses
Definition: hsa_packet_processor.hh:134
gem5::HSAPacketProcessor::regdQList
std::vector< class RQLEntry * > regdQList
Definition: hsa_packet_processor.hh:291
IS_BARRIER
#define IS_BARRIER(PKT)
Definition: hsa_packet_processor.cc:66
gem5::HSAPacketProcessor::pktProcessDelay
const Tick pktProcessDelay
Definition: hsa_packet_processor.hh:319
gem5::HSAPacketProcessor::setDevice
void setDevice(GPUCommandProcessor *dev)
Definition: hsa_packet_processor.cc:605
gem5::AQLRingBuffer::incRdIdx
void incRdIdx(uint64_t value)
Definition: hsa_packet_processor.hh:206
gem5::System::threads
Threads threads
Definition: system.hh:316
gem5::HSAQueueDescriptor::numElts
uint32_t numElts
Definition: hsa_packet_processor.hh:83
gem5::AQLRingBuffer
Internal ring buffer which is used to prefetch/store copies of the in-memory HSA ring buffer.
Definition: hsa_packet_processor.hh:129
gem5::GPUCommandProcessor::submitVendorPkt
void submitVendorPkt(void *raw_pkt, uint32_t queue_id, Addr host_pkt_addr)
submitVendorPkt() is for accepting vendor-specific packets from the HSAPP.
Definition: gpu_command_processor.cc:254
gem5::GPUCommandProcessor::functionalReadHsaSignal
uint64_t functionalReadHsaSignal(Addr signal_handle)
Definition: gpu_command_processor.cc:177
gem5::HSAPacketProcessor::SignalState::allRead
bool allRead
Definition: hsa_packet_processor.hh:245
logging.hh
gem5::Packet::getLE
T getLE() const
Get the data in the packet byte swapped from little endian to host endian.
Definition: packet_access.hh:78
chunk_generator.hh
gem5::AQLRingBuffer::rdIdxPtr
uint64_t * rdIdxPtr()
Definition: hsa_packet_processor.hh:205
gem5::HSAQueueDescriptor::objSize
uint32_t objSize()
Definition: hsa_packet_processor.hh:98
gem5::HSAPacketProcessor::getAddrRanges
virtual AddrRangeList getAddrRanges() const override
Every PIO device is obliged to provide an implementation that returns the address ranges the device r...
Definition: hsa_packet_processor.cc:113
HSA_PACKET_TYPE_BARRIER_AND
@ HSA_PACKET_TYPE_BARRIER_AND
Packet used by agents to delay processing of subsequent packets, and to express complex dependencies ...
Definition: hsa.h:2767
gem5::HSAPacketProcessor::~HSAPacketProcessor
~HSAPacketProcessor()
Definition: hsa_packet_processor.cc:86
gem5::HSAPacketProcessor::SignalState::values
std::vector< hsa_signal_value_t > values
Definition: hsa_packet_processor.hh:250
trace.hh
gem5::HSAPacketProcessor::RQLEntry
Definition: hsa_packet_processor.hh:273
gem5::HWScheduler::write
void write(Addr db_addr, uint64_t doorbell_reg)
Definition: hw_scheduler.cc:319
gem5::AQLRingBuffer::nFree
uint32_t nFree() const
Definition: hsa_packet_processor.hh:198
gem5::AQLRingBuffer::_aqlComplete
std::vector< bool > _aqlComplete
Definition: hsa_packet_processor.hh:135
gem5::DmaVirtDevice
Definition: dma_virt_device.hh:42
gem5::MipsISA::vaddr
vaddr
Definition: pra_constants.hh:278
std::list< AddrRange >
gem5::Packet::getAddr
Addr getAddr() const
Definition: packet.hh:781
gem5::HSAPacketProcessor::updateReadDispIdDma
void updateReadDispIdDma()
this event is used to update the read_disp_id field (the read pointer) of the MQD,...
Definition: hsa_packet_processor.cc:180
page_table.hh
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition: decoder.cc:40
gem5::_hsa_barrier_and_packet_t
Definition: hsa_packet.hh:85
gem5::HSAPacketProcessor::QueueProcessEvent::process
virtual void process()
Definition: hsa_packet_processor.cc:413
gem5::UNBLOCKED
@ UNBLOCKED
Definition: hsa_packet_processor.hh:63
gem5::HSAPacketProcessor::write
virtual Tick write(Packet *) override
Definition: hsa_packet_processor.cc:125
gem5::Packet::getSize
unsigned getSize() const
Definition: packet.hh:791
gem5::Named::_name
const std::string _name
Definition: named.hh:41
gem5::HSAPacketProcessor::dma_series_ctx::rl_idx
uint32_t rl_idx
Definition: hsa_packet_processor.hh:356
gem5::HSAQueueDescriptor::writeIndex
uint64_t writeIndex
Definition: hsa_packet_processor.hh:81
gem5::Event::scheduled
bool scheduled() const
Determine if the current event is scheduled.
Definition: eventq.hh:465
gem5::AQLRingBuffer::dispIdx
uint64_t dispIdx() const
Definition: hsa_packet_processor.hh:202
panic
#define panic(...)
This implements a cprintf based panic() function.
Definition: logging.hh:177
gem5::GPUCommandProcessor::driver
GPUComputeDriver * driver()
Definition: gpu_command_processor.cc:231
gem5::HSAPacketProcessor::RQLEntry::aqlProcessEvent
QueueProcessEvent aqlProcessEvent
Definition: hsa_packet_processor.hh:282

Generated on Tue Sep 21 2021 12:25:15 for gem5 by doxygen 1.8.17