gem5  v21.2.1.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
hsa_packet_processor.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015-2018 Advanced Micro Devices, Inc.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  *
8  * 1. Redistributions of source code must retain the above copyright notice,
9  * this list of conditions and the following disclaimer.
10  *
11  * 2. Redistributions in binary form must reproduce the above copyright notice,
12  * this list of conditions and the following disclaimer in the documentation
13  * and/or other materials provided with the distribution.
14  *
15  * 3. Neither the name of the copyright holder nor the names of its
16  * contributors may be used to endorse or promote products derived from this
17  * software without specific prior written permission.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29  * POSSIBILITY OF SUCH DAMAGE.
30  */
31 
32 #ifndef __DEV_HSA_HSA_PACKET_PROCESSOR__
33 #define __DEV_HSA_HSA_PACKET_PROCESSOR__
34 
35 #include <algorithm>
36 #include <cstdint>
37 #include <vector>
38 
39 #include "base/types.hh"
40 #include "debug/HSAPacketProcessor.hh"
41 #include "dev/dma_virt_device.hh"
42 #include "dev/hsa/hsa.h"
43 #include "dev/hsa/hsa_queue.hh"
44 #include "enums/GfxVersion.hh"
45 #include "params/HSAPacketProcessor.hh"
46 #include "sim/eventq.hh"
47 
48 #define AQL_PACKET_SIZE 64
49 #define PAGE_SIZE 4096
50 #define NUM_DMA_BUFS 16
51 #define DMA_BUF_SIZE (AQL_PACKET_SIZE * NUM_DMA_BUFS)
52 // HSA runtime supports only 5 signals per barrier packet
53 #define NumSignalsPerBarrier 5
54 
55 namespace gem5
56 {
57 
58 // Ideally, each queue should store this status and
59 // the processPkt() should make decisions based on that
60 // status variable.
61 enum Q_STATE
62 {
63  UNBLOCKED = 0, // Unblocked queue, can submit packets.
64  BLOCKED_BBIT, // Queue blocked by barrier bit.
65  // Can submit packet packets after
66  // previous packet completes.
67  BLOCKED_BPKT, // Queue blocked by barrier packet.
68  // Can submit packet packets after
69  // barrier packet completes.
70 };
71 
72 class GPUCommandProcessor;
73 class HWScheduler;
74 
75 // Our internal representation of an HSA queue
77 {
78  public:
79  uint64_t basePointer;
80  uint64_t doorbellPointer;
81  uint64_t writeIndex;
82  uint64_t readIndex;
83  uint32_t numElts;
84  uint64_t hostReadIndexPtr;
87  GfxVersion gfxVersion;
88 
89  HSAQueueDescriptor(uint64_t base_ptr, uint64_t db_ptr,
90  uint64_t hri_ptr, uint32_t size,
91  GfxVersion gfxVersion)
92  : basePointer(base_ptr), doorbellPointer(db_ptr),
93  writeIndex(0), readIndex(0),
94  numElts(size / AQL_PACKET_SIZE), hostReadIndexPtr(hri_ptr),
97  { }
98  uint64_t spaceRemaining() { return numElts - (writeIndex - readIndex); }
99  uint64_t spaceUsed() { return writeIndex - readIndex; }
100  uint32_t objSize() { return AQL_PACKET_SIZE; }
101  uint32_t numObjs() { return numElts; }
102  bool isFull() { return spaceRemaining() == 0; }
103  bool isEmpty() { return spaceRemaining() == numElts; }
104 
105  uint64_t ptr(uint64_t ix)
106  {
107  /*
108  * Based on ROCm Documentation:
109  * - https://github.com/RadeonOpenCompute/ROCm_Documentation/blob/
110  10ca0a99bbd0252f5bf6f08d1503e59f1129df4a/ROCm_Libraries/
111  rocr/src/core/runtime/amd_aql_queue.cpp#L99
112  * - https://github.com/RadeonOpenCompute/ROCm_Documentation/blob/
113  10ca0a99bbd0252f5bf6f08d1503e59f1129df4a/ROCm_Libraries/
114  rocr/src/core/runtime/amd_aql_queue.cpp#L624
115  *
116  * GFX7 and GFX8 will allocate twice as much space for their HSA
117  * queues as they actually access (using mod operations to map the
118  * virtual addresses from the upper half of the queue to the same
119  * virtual addresses as the lower half). Thus, we need to check if
120  * the ISA is GFX8 and mod the address by half of the queue size if
121  * so.
122  */
123  uint64_t retAddr = 0ll;
124  if ((gfxVersion == GfxVersion::gfx801) ||
125  (gfxVersion == GfxVersion::gfx803)) {
126  retAddr = basePointer + ((ix % (numElts/2)) * objSize());
127  DPRINTF(HSAPacketProcessor, "ptr() gfx8: base: 0x%x, "
128  "index: 0x%x, numElts: 0x%x, numElts/2: 0x%x, "
129  "objSize: 0x%x, retAddr: 0x%x\n", basePointer, ix,
130  numElts, numElts/2, objSize(), retAddr);
131  } else {
132  retAddr = basePointer + ((ix % numElts) * objSize());
133  DPRINTF(HSAPacketProcessor, "ptr() gfx9: base: 0x%x, "
134  "index: 0x%x, numElts: 0x%x, objSize: 0x%x, "
135  "retAddr: 0x%x\n", basePointer, ix, numElts, objSize(),
136  retAddr);
137  }
138  return retAddr;
139  }
140 };
141 
155 {
156  private:
158  std::string _name;
161  uint64_t _wrIdx; // Points to next write location
162  uint64_t _rdIdx; // Read pointer of AQL buffer
163  uint64_t _dispIdx; // Dispatch pointer of AQL buffer
164 
165  public:
166  std::string name() {return _name;}
167  AQLRingBuffer(uint32_t size, const std::string name);
168  int allocEntry(uint32_t nBufReq);
169  bool freeEntry(void *pkt);
170 
180  void
181  saveHostDispAddr(Addr host_pkt_addr, int num_pkts, int ix)
182  {
183  for (int i = 0; i < num_pkts; ++i) {
184  _hostDispAddresses[ix % numObjs()] = host_pkt_addr + i * objSize();
185  ++ix;
186  }
187  }
188 
189  Addr
190  hostDispAddr() const
191  {
192  return _hostDispAddresses[dispIdx() % numObjs()];
193  }
194 
195  bool
196  dispPending() const
197  {
198  int packet_type = (_aqlBuf[_dispIdx % _aqlBuf.size()].header
200  ((1 << HSA_PACKET_HEADER_WIDTH_TYPE) - 1);
201  return (_dispIdx < _wrIdx) && packet_type != HSA_PACKET_TYPE_INVALID;
202  }
203 
212  bool
214  {
215  for (int i = _rdIdx + 1; i < _dispIdx; i++) {
216  if (!_aqlComplete[i % _aqlBuf.size()]) {
217  return false;
218  }
219  }
220  return !_aqlComplete[_rdIdx % _aqlBuf.size()] && _rdIdx != _dispIdx;
221  }
222 
223  uint32_t nFree() const { return _aqlBuf.size() - (_wrIdx - _rdIdx); }
224  void *ptr(uint32_t ix) { return _aqlBuf.data() + (ix % _aqlBuf.size()); }
225  uint32_t numObjs() const { return _aqlBuf.size(); };
226  uint32_t objSize() const { return AQL_PACKET_SIZE; }
227  uint64_t dispIdx() const { return _dispIdx; }
228  uint64_t wrIdx() const { return _wrIdx; }
229  uint64_t rdIdx() const { return _rdIdx; }
230  uint64_t* rdIdxPtr() { return &_rdIdx; }
231  void incRdIdx(uint64_t value) { _rdIdx += value; }
232  void incWrIdx(uint64_t value) { _wrIdx += value; }
233  void incDispIdx(uint64_t value) { _dispIdx += value; }
234  uint64_t compltnPending() { return (_dispIdx - _rdIdx); }
235 };
236 
237 struct QCntxt
238 {
241  // used for HSA packets that enforce synchronization with barrier bit
244  qDesc(q_desc), aqlBuf(aql_buf), barrierBit(false)
245  {}
246  QCntxt() : qDesc(NULL), aqlBuf(NULL), barrierBit(false) {}
247 };
248 
250 {
251  friend class HWScheduler;
252  protected:
253  typedef void (DmaDevice::*DmaFnPtr)(Addr, int, Event*, uint8_t*, Tick);
256 
257  // Structure to store the read values of dependency signals
258  // from shared memory. Also used for tracking the status of
259  // those reads while they are in progress
261  {
262  public:
264  : pendingReads(0), allRead(false), discardRead(false)
265  {
267  }
268  void handleReadDMA();
270  bool allRead;
271  // If this queue is unmapped when there are pending reads, then
272  // the pending reads has to be discarded.
274  // values stores the value of already read dependency signal
276  void
278  {
279  std::fill(values.begin(), values.end(), 1);
280  }
281  };
282 
283  class QueueProcessEvent : public Event
284  {
285  private:
287  uint32_t rqIdx;
288  public:
289  QueueProcessEvent(HSAPacketProcessor *_hsaPP, uint32_t _rqIdx)
290  : Event(Default_Pri), hsaPP(_hsaPP), rqIdx(_rqIdx)
291  {}
292  virtual void process();
293  virtual const char *description() const;
294  };
295 
296  // Registered queue list entry; each entry has one queueDescriptor and
297  // associated AQL buffer
298  class RQLEntry
299  {
300  public:
301  RQLEntry(HSAPacketProcessor *hsaPP, uint32_t rqIdx)
302  : aqlProcessEvent(hsaPP, rqIdx) {}
304  bool dispPending() { return qCntxt.aqlBuf->dispPending() > 0; }
305  uint64_t compltnPending() { return qCntxt.aqlBuf->compltnPending(); }
308  void setBarrierBit(bool set_val) { qCntxt.barrierBit = set_val; }
309  bool getBarrierBit() const { return qCntxt.barrierBit; }
310  bool isLastOutstandingPkt() const
311  {
313  }
314  };
315  // Keeps track of queueDescriptors of registered queues
317 
318  Q_STATE processPkt(void* pkt, uint32_t rl_idx, Addr host_pkt_addr);
319  void displayQueueDescriptor(int pid, uint32_t rl_idx);
320 
321  public:
323  getQueueDesc(uint32_t queId)
324  {
325  return regdQList.at(queId)->qCntxt.qDesc;
326  }
327  class RQLEntry*
328  getRegdListEntry(uint32_t queId)
329  {
330  return regdQList.at(queId);
331  }
332 
333  uint64_t
334  inFlightPkts(uint32_t queId)
335  {
336  auto aqlBuf = regdQList.at(queId)->qCntxt.aqlBuf;
337  return aqlBuf->dispIdx() - aqlBuf->rdIdx();
338  }
339 
345 
346  typedef HSAPacketProcessorParams Params;
347  HSAPacketProcessor(const Params &p);
349  TranslationGenPtr translate(Addr vaddr, Addr size) override;
350  void setDeviceQueueDesc(uint64_t hostReadIndexPointer,
351  uint64_t basePointer,
352  uint64_t queue_id,
353  uint32_t size, int doorbellSize,
354  GfxVersion gfxVersion);
355  void unsetDeviceQueueDesc(uint64_t queue_id, int doorbellSize);
356  void setDevice(GPUCommandProcessor * dev);
357  void updateReadIndex(int, uint32_t);
358  void getCommandsFromHost(int pid, uint32_t rl_idx);
359 
360  // PIO interface
361  virtual Tick read(Packet*) override;
362  virtual Tick write(Packet*) override;
363  virtual AddrRangeList getAddrRanges() const override;
364  void finishPkt(void *pkt, uint32_t rl_idx);
365  void finishPkt(void *pkt) { finishPkt(pkt, 0); }
366  void schedAQLProcessing(uint32_t rl_idx);
367  void schedAQLProcessing(uint32_t rl_idx, Tick delay);
368 
369  void sendAgentDispatchCompletionSignal(void *pkt,
370  hsa_signal_value_t signal);
372 
377  {
378  // deal with the fact dma ops can complete out of issue order
379  uint32_t pkts_ttl;
380  uint32_t pkts_2_go;
381  uint32_t start_ix;
382  uint32_t rl_idx;
383 
384  dma_series_ctx(uint32_t _pkts_ttl,
385  uint32_t _pkts_2_go,
386  uint32_t _start_ix,
387  uint32_t _rl_idx)
388  : pkts_ttl(_pkts_2_go), pkts_2_go(_pkts_2_go),
389  start_ix(_start_ix), rl_idx(_rl_idx)
390  {};
392  };
393 
394  void updateReadDispIdDma();
395  void cmdQueueCmdDma(HSAPacketProcessor *hsaPP, int pid, bool isRead,
396  uint32_t ix_start, unsigned num_pkts,
397  dma_series_ctx *series_ctx, void *dest_4debug);
398  void handleReadDMA();
399 };
400 
401 } // namespace gem5
402 
403 #endif // __DEV_HSA_HSA_PACKET_PROCESSOR__
gem5::HSAPacketProcessor::pioDelay
Tick pioDelay
Definition: hsa_packet_processor.hh:343
gem5::MipsISA::fill
fill
Definition: pra_constants.hh:57
gem5::HSAPacketProcessor::dma_series_ctx::~dma_series_ctx
~dma_series_ctx()
Definition: hsa_packet_processor.hh:391
gem5::HSAPacketProcessor::pioAddr
Addr pioAddr
Definition: hsa_packet_processor.hh:341
gem5::AQLRingBuffer::AQLRingBuffer
AQLRingBuffer(uint32_t size, const std::string name)
Definition: hsa_packet_processor.cc:572
gem5::HSAPacketProcessor::schedAQLProcessing
void schedAQLProcessing(uint32_t rl_idx)
Definition: hsa_packet_processor.cc:255
gem5::AQLRingBuffer::name
std::string name()
Definition: hsa_packet_processor.hh:166
gem5::AQLRingBuffer::allocEntry
int allocEntry(uint32_t nBufReq)
Definition: hsa_packet_processor.cc:612
gem5::HSAPacketProcessor::QueueProcessEvent::hsaPP
HSAPacketProcessor * hsaPP
Definition: hsa_packet_processor.hh:286
gem5::HSAPacketProcessor::processPkt
Q_STATE processPkt(void *pkt, uint32_t rl_idx, Addr host_pkt_addr)
Definition: hsa_packet_processor.cc:261
gem5::HSAPacketProcessor::SignalState::SignalState
SignalState()
Definition: hsa_packet_processor.hh:263
gem5::HSAQueueDescriptor::readIndex
uint64_t readIndex
Definition: hsa_packet_processor.hh:82
gem5::HSAPacketProcessor::RQLEntry::qCntxt
QCntxt qCntxt
Definition: hsa_packet_processor.hh:303
gem5::HSAPacketProcessor::SignalState::resetSigVals
void resetSigVals()
Definition: hsa_packet_processor.hh:277
gem5::HSAQueueDescriptor::hostReadIndexPtr
uint64_t hostReadIndexPtr
Definition: hsa_packet_processor.hh:84
gem5::AQLRingBuffer::_wrIdx
uint64_t _wrIdx
Definition: hsa_packet_processor.hh:161
gem5::AQLRingBuffer::numObjs
uint32_t numObjs() const
Definition: hsa_packet_processor.hh:225
gem5::HSAPacketProcessor::dma_series_ctx::start_ix
uint32_t start_ix
Definition: hsa_packet_processor.hh:381
hsa_signal_value_t
int32_t hsa_signal_value_t
Signal value.
Definition: hsa.h:1322
gem5::HSAPacketProcessor::QueueProcessEvent
Definition: hsa_packet_processor.hh:283
gem5::HSAPacketProcessor::RQLEntry::compltnPending
uint64_t compltnPending()
Definition: hsa_packet_processor.hh:305
gem5::HSAPacketProcessor::unsetDeviceQueueDesc
void unsetDeviceQueueDesc(uint64_t queue_id, int doorbellSize)
Definition: hsa_packet_processor.cc:93
gem5::HSAQueueDescriptor::isEmpty
bool isEmpty()
Definition: hsa_packet_processor.hh:103
gem5::HSAQueueDescriptor::numObjs
uint32_t numObjs()
Definition: hsa_packet_processor.hh:101
gem5::HSAPacketProcessor::getQueueDesc
HSAQueueDescriptor * getQueueDesc(uint32_t queId)
Definition: hsa_packet_processor.hh:323
gem5::HSAQueueDescriptor::basePointer
uint64_t basePointer
Definition: hsa_packet_processor.hh:79
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:181
gem5::HSAQueueDescriptor::gfxVersion
GfxVersion gfxVersion
Definition: hsa_packet_processor.hh:87
NumSignalsPerBarrier
#define NumSignalsPerBarrier
Definition: hsa_packet_processor.hh:53
gem5::HSAPacketProcessor::inFlightPkts
uint64_t inFlightPkts(uint32_t queId)
Definition: hsa_packet_processor.hh:334
gem5::HSAPacketProcessor::RQLEntry::setBarrierBit
void setBarrierBit(bool set_val)
Definition: hsa_packet_processor.hh:308
gem5::HSAPacketProcessor::QueueProcessEvent::rqIdx
uint32_t rqIdx
Definition: hsa_packet_processor.hh:287
std::vector
STL vector class.
Definition: stl.hh:37
AQL_PACKET_SIZE
#define AQL_PACKET_SIZE
Definition: hsa_packet_processor.hh:48
gem5::HSAQueueDescriptor::ptr
uint64_t ptr(uint64_t ix)
Definition: hsa_packet_processor.hh:105
gem5::HSAPacketProcessor::translate
TranslationGenPtr translate(Addr vaddr, Addr size) override
Function used to translate a range of addresses from virtual to physical addresses.
Definition: hsa_packet_processor.cc:164
gem5::AQLRingBuffer::hostDispAddr
Addr hostDispAddr() const
Definition: hsa_packet_processor.hh:190
gem5::Q_STATE
Q_STATE
Definition: hsa_packet_processor.hh:61
gem5::HSAPacketProcessor::SignalState::discardRead
bool discardRead
Definition: hsa_packet_processor.hh:273
gem5::ArmISA::i
Bitfield< 7 > i
Definition: misc_types.hh:67
gem5::HSAPacketProcessor::pioSize
Addr pioSize
Definition: hsa_packet_processor.hh:342
gem5::HSAPacketProcessor::getCommandsFromHost
void getCommandsFromHost(int pid, uint32_t rl_idx)
Definition: hsa_packet_processor.cc:478
gem5::HSAPacketProcessor::setDeviceQueueDesc
void setDeviceQueueDesc(uint64_t hostReadIndexPointer, uint64_t basePointer, uint64_t queue_id, uint32_t size, int doorbellSize, GfxVersion gfxVersion)
Definition: hsa_packet_processor.cc:99
gem5::HSAPacketProcessor::dma_series_ctx::pkts_2_go
uint32_t pkts_2_go
Definition: hsa_packet_processor.hh:380
hsa_queue.hh
hsa.h
gem5::HSAPacketProcessor::RQLEntry::isLastOutstandingPkt
bool isLastOutstandingPkt() const
Definition: hsa_packet_processor.hh:310
gem5::HSAPacketProcessor::SignalState::pendingReads
int pendingReads
Definition: hsa_packet_processor.hh:269
HSA_PACKET_HEADER_WIDTH_TYPE
@ HSA_PACKET_HEADER_WIDTH_TYPE
Definition: hsa.h:2858
gem5::HSAQueueDescriptor::spaceUsed
uint64_t spaceUsed()
Definition: hsa_packet_processor.hh:99
gem5::AQLRingBuffer::freeEntry
bool freeEntry(void *pkt)
Definition: hsa_packet_processor.cc:586
gem5::HSAPacketProcessor::gpu_device
GPUCommandProcessor * gpu_device
Definition: hsa_packet_processor.hh:254
gem5::QCntxt::barrierBit
bool barrierBit
Definition: hsa_packet_processor.hh:242
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:156
gem5::AQLRingBuffer::compltnPending
uint64_t compltnPending()
Definition: hsa_packet_processor.hh:234
gem5::AQLRingBuffer::ptr
void * ptr(uint32_t ix)
Definition: hsa_packet_processor.hh:224
gem5::HSAPacketProcessor::finishPkt
void finishPkt(void *pkt)
Definition: hsa_packet_processor.hh:365
gem5::HSAQueueDescriptor::dmaInProgress
bool dmaInProgress
Definition: hsa_packet_processor.hh:86
gem5::QCntxt::QCntxt
QCntxt(HSAQueueDescriptor *q_desc, AQLRingBuffer *aql_buf)
Definition: hsa_packet_processor.hh:243
gem5::GPUCommandProcessor
Definition: gpu_command_processor.hh:69
gem5::HSAPacketProcessor::finishPkt
void finishPkt(void *pkt, uint32_t rl_idx)
Definition: hsa_packet_processor.cc:631
gem5::HSAPacketProcessor
Definition: hsa_packet_processor.hh:249
gem5::HSAPacketProcessor::handleReadDMA
void handleReadDMA()
DPRINTF
#define DPRINTF(x,...)
Definition: trace.hh:186
gem5::Event
Definition: eventq.hh:251
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:376
gem5::HSAQueueDescriptor::isFull
bool isFull()
Definition: hsa_packet_processor.hh:102
gem5::HSAPacketProcessor::getRegdListEntry
class RQLEntry * getRegdListEntry(uint32_t queId)
Definition: hsa_packet_processor.hh:328
gem5::AQLRingBuffer::incWrIdx
void incWrIdx(uint64_t value)
Definition: hsa_packet_processor.hh:232
gem5::AQLRingBuffer::rdIdx
uint64_t rdIdx() const
Definition: hsa_packet_processor.hh:229
gem5::AQLRingBuffer::_aqlBuf
std::vector< hsa_kernel_dispatch_packet_t > _aqlBuf
Definition: hsa_packet_processor.hh:157
gem5::BLOCKED_BBIT
@ BLOCKED_BBIT
Definition: hsa_packet_processor.hh:64
gem5::HSAQueueDescriptor::spaceRemaining
uint64_t spaceRemaining()
Definition: hsa_packet_processor.hh:98
gem5::MipsISA::p
Bitfield< 0 > p
Definition: pra_constants.hh:326
gem5::QCntxt
Definition: hsa_packet_processor.hh:237
gem5::Tick
uint64_t Tick
Tick count type.
Definition: types.hh:58
gem5::DmaDevice
Definition: dma_device.hh:203
gem5::HSAPacketProcessor::hwSchdlr
HWScheduler * hwSchdlr
Definition: hsa_packet_processor.hh:255
gem5::AQLRingBuffer::dispPending
bool dispPending() const
Definition: hsa_packet_processor.hh:196
gem5::HSAPacketProcessor::RQLEntry::depSignalRdState
SignalState depSignalRdState
Definition: hsa_packet_processor.hh:306
gem5::HSAPacketProcessor::HSAPacketProcessor
HSAPacketProcessor(const Params &p)
Definition: hsa_packet_processor.cc:73
gem5::HSAQueueDescriptor::stalledOnDmaBufAvailability
bool stalledOnDmaBufAvailability
Definition: hsa_packet_processor.hh:85
gem5::HSAPacketProcessor::dma_series_ctx::dma_series_ctx
dma_series_ctx(uint32_t _pkts_ttl, uint32_t _pkts_2_go, uint32_t _start_ix, uint32_t _rl_idx)
Definition: hsa_packet_processor.hh:384
HSA_PACKET_HEADER_TYPE
@ HSA_PACKET_HEADER_TYPE
Packet type.
Definition: hsa.h:2816
gem5::HSAQueueDescriptor
Definition: hsa_packet_processor.hh:76
gem5::AQLRingBuffer::_name
std::string _name
Definition: hsa_packet_processor.hh:158
gem5::AQLRingBuffer::_dispIdx
uint64_t _dispIdx
Definition: hsa_packet_processor.hh:163
gem5::DmaDevice::Params
DmaDeviceParams Params
Definition: dma_device.hh:209
gem5::BLOCKED_BPKT
@ BLOCKED_BPKT
Definition: hsa_packet_processor.hh:67
gem5::HSAPacketProcessor::sendCompletionSignal
void sendCompletionSignal(hsa_signal_value_t signal)
Definition: hsa_packet_processor.cc:703
gem5::HSAPacketProcessor::numHWQueues
int numHWQueues
Definition: hsa_packet_processor.hh:340
gem5::HSAPacketProcessor::RQLEntry::dispPending
bool dispPending()
Definition: hsa_packet_processor.hh:304
gem5::HSAPacketProcessor::RQLEntry::RQLEntry
RQLEntry(HSAPacketProcessor *hsaPP, uint32_t rqIdx)
Definition: hsa_packet_processor.hh:301
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::HSAPacketProcessor::updateReadIndex
void updateReadIndex(int, uint32_t)
Definition: hsa_packet_processor.cc:186
gem5::HSAPacketProcessor::RQLEntry::getBarrierBit
bool getBarrierBit() const
Definition: hsa_packet_processor.hh:309
gem5::Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:147
gem5::AQLRingBuffer::_rdIdx
uint64_t _rdIdx
Definition: hsa_packet_processor.hh:162
gem5::HWScheduler
Definition: hw_scheduler.hh:50
gem5::AQLRingBuffer::incDispIdx
void incDispIdx(uint64_t value)
Definition: hsa_packet_processor.hh:233
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
gem5::HSAPacketProcessor::SignalState::handleReadDMA
void handleReadDMA()
Definition: hsa_packet_processor.cc:465
gem5::HSAPacketProcessor::SignalState
Definition: hsa_packet_processor.hh:260
gem5::AQLRingBuffer::isLastOutstandingPkt
bool isLastOutstandingPkt() const
Packets aren't guaranteed to be completed in-order, and we need to know when the last packet is finis...
Definition: hsa_packet_processor.hh:213
gem5::HSAPacketProcessor::sendAgentDispatchCompletionSignal
void sendAgentDispatchCompletionSignal(void *pkt, hsa_signal_value_t signal)
Definition: hsa_packet_processor.cc:673
gem5::QCntxt::aqlBuf
AQLRingBuffer * aqlBuf
Definition: hsa_packet_processor.hh:240
gem5::QCntxt::QCntxt
QCntxt()
Definition: hsa_packet_processor.hh:246
gem5::AQLRingBuffer::wrIdx
uint64_t wrIdx() const
Definition: hsa_packet_processor.hh:228
gem5::AQLRingBuffer::_hostDispAddresses
std::vector< Addr > _hostDispAddresses
Definition: hsa_packet_processor.hh:159
gem5::HSAPacketProcessor::regdQList
std::vector< class RQLEntry * > regdQList
Definition: hsa_packet_processor.hh:316
gem5::HSAPacketProcessor::pktProcessDelay
const Tick pktProcessDelay
Definition: hsa_packet_processor.hh:344
gem5::HSAPacketProcessor::setDevice
void setDevice(GPUCommandProcessor *dev)
Definition: hsa_packet_processor.cc:606
gem5::AQLRingBuffer::incRdIdx
void incRdIdx(uint64_t value)
Definition: hsa_packet_processor.hh:231
gem5::HSAPacketProcessor::dma_series_ctx::pkts_ttl
uint32_t pkts_ttl
Definition: hsa_packet_processor.hh:379
types.hh
gem5::HSAPacketProcessor::QueueProcessEvent::QueueProcessEvent
QueueProcessEvent(HSAPacketProcessor *_hsaPP, uint32_t _rqIdx)
Definition: hsa_packet_processor.hh:289
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:154
gem5::QCntxt::qDesc
HSAQueueDescriptor * qDesc
Definition: hsa_packet_processor.hh:239
gem5::HSAPacketProcessor::SignalState::allRead
bool allRead
Definition: hsa_packet_processor.hh:270
gem5::AQLRingBuffer::rdIdxPtr
uint64_t * rdIdxPtr()
Definition: hsa_packet_processor.hh:230
gem5::HSAPacketProcessor::QueueProcessEvent::description
virtual const char * description() const
Return a C string describing the event.
gem5::HSAPacketProcessor::Params
HSAPacketProcessorParams Params
Definition: hsa_packet_processor.hh:346
gem5::HSAQueueDescriptor::objSize
uint32_t objSize()
Definition: hsa_packet_processor.hh:100
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:114
gem5::HSAQueueDescriptor::HSAQueueDescriptor
HSAQueueDescriptor(uint64_t base_ptr, uint64_t db_ptr, uint64_t hri_ptr, uint32_t size, GfxVersion gfxVersion)
Definition: hsa_packet_processor.hh:89
dma_virt_device.hh
gem5::HSAPacketProcessor::~HSAPacketProcessor
~HSAPacketProcessor()
Definition: hsa_packet_processor.cc:85
gem5::HSAPacketProcessor::SignalState::values
std::vector< hsa_signal_value_t > values
Definition: hsa_packet_processor.hh:275
gem5::HSAPacketProcessor::RQLEntry
Definition: hsa_packet_processor.hh:298
gem5::AQLRingBuffer::nFree
uint32_t nFree() const
Definition: hsa_packet_processor.hh:223
gem5::AQLRingBuffer::_aqlComplete
std::vector< bool > _aqlComplete
Definition: hsa_packet_processor.hh:160
gem5::DmaVirtDevice
Definition: dma_virt_device.hh:41
gem5::MipsISA::vaddr
vaddr
Definition: pra_constants.hh:278
std::list< AddrRange >
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
gem5::EventBase::Default_Pri
static const Priority Default_Pri
Default is zero for historical reasons.
Definition: eventq.hh:179
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition: tlb.cc:60
gem5::AQLRingBuffer::objSize
uint32_t objSize() const
Definition: hsa_packet_processor.hh:226
gem5::HSAPacketProcessor::QueueProcessEvent::process
virtual void process()
Definition: hsa_packet_processor.cc:413
gem5::HSAPacketProcessor::write
virtual Tick write(Packet *) override
Definition: hsa_packet_processor.cc:126
gem5::UNBLOCKED
@ UNBLOCKED
Definition: hsa_packet_processor.hh:63
gem5::HSAPacketProcessor::DmaFnPtr
void(DmaDevice::* DmaFnPtr)(Addr, int, Event *, uint8_t *, Tick)
Definition: hsa_packet_processor.hh:253
gem5::HSAPacketProcessor::dma_series_ctx::rl_idx
uint32_t rl_idx
Definition: hsa_packet_processor.hh:382
gem5::TranslationGenPtr
std::unique_ptr< TranslationGen > TranslationGenPtr
Definition: translation_gen.hh:128
gem5::HSAQueueDescriptor::writeIndex
uint64_t writeIndex
Definition: hsa_packet_processor.hh:81
gem5::AQLRingBuffer::dispIdx
uint64_t dispIdx() const
Definition: hsa_packet_processor.hh:227
gem5::HSAPacketProcessor::RQLEntry::aqlProcessEvent
QueueProcessEvent aqlProcessEvent
Definition: hsa_packet_processor.hh:307
eventq.hh

Generated on Tue Feb 8 2022 11:47:07 for gem5 by doxygen 1.8.17