Go to the documentation of this file.
36 #ifndef __DEV_HSA_HSA_PACKET_PROCESSOR__
37 #define __DEV_HSA_HSA_PACKET_PROCESSOR__
46 #include "params/HSAPacketProcessor.hh"
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)
53 #define NumSignalsPerBarrier 5
84 uint64_t hri_ptr, uint32_t size)
98 uint64_t
ptr(uint64_t ix)
146 for (
int i = 0;
i < num_pkts; ++
i) {
297 return regdQList.at(queId)->qCntxt.qDesc;
315 uint64_t basePointer,
327 void finishPkt(
void *pkt, uint32_t rl_idx);
392 uint32_t dma_buf_ix, uint num_bufs,
399 #endif // __DEV_HSA_HSA_PACKET_PROCESSOR__
HSAPacketProcessor * hsaPP
static const FlagsType AutoDelete
UpdateReadDispIdDmaEvent()
bool freeEntry(void *pkt)
const char * description() const override
Return a C string describing the event.
HSAQueueDescriptor * getQueueDesc(uint32_t queId)
QueueProcessEvent(HSAPacketProcessor *_hsaPP, uint32_t _rqIdx)
virtual const char * description() const
Return a C string describing the event.
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...
const Tick pktProcessDelay
bool isLastOutstandingPkt() const
Packets aren't guaranteed to be completed in-order, and we need to know when the last packet is finis...
bool isLastOutstandingPkt() const
QueueContext(HSAQueueDescriptor *q_desc, AQLRingBuffer *aql_buf)
uint64_t Tick
Tick count type.
std::vector< hsa_kernel_dispatch_packet_t > _aqlBuf
#define NumSignalsPerBarrier
struct QueueContext QCntxt
void finishPkt(void *pkt, uint32_t rl_idx)
void dmaWriteVirt(Addr host_addr, unsigned size, Event *event, void *data, Tick delay=0)
HSAPacketProcessor * hsaPP
dma_series_ctx(uint32_t _pkts_ttl, uint32_t _pkts_2_go, uint32_t _start_ix, uint32_t _rl_idx)
void incWrIdx(uint64_t value)
void setDeviceQueueDesc(uint64_t hostReadIndexPointer, uint64_t basePointer, uint64_t queue_id, uint32_t size)
@ HSA_PACKET_HEADER_WIDTH_TYPE
Internal ring buffer which is used to prefetch/store copies of the in-memory HSA ring buffer.
void setDevice(HSADevice *dev)
virtual const char * description() const
Return a C string describing the event.
void getCommandsFromHost(int pid, uint32_t rl_idx)
virtual AddrRangeList getAddrRanges() const
Every PIO device is obliged to provide an implementation that returns the address ranges the device r...
Addr hostDispAddr() const
uint64_t hostReadIndexPtr
uint64_t ptr(uint64_t ix)
void incRdIdx(uint64_t value)
CmdQueueCmdDmaEvent(HSAPacketProcessor *hsaPP, int pid, bool isRead, uint32_t dma_buf_ix, uint num_bufs, dma_series_ctx *series_ctx, void *dest_4debug)
Q_STATE processPkt(void *pkt, uint32_t rl_idx, Addr host_pkt_addr)
AQLRingBuffer(uint32_t size, const std::string name)
void dmaReadVirt(Addr host_addr, unsigned size, Event *event, void *data, Tick delay=0)
uint64_t spaceRemaining()
std::vector< class RQLEntry * > regdQList
HSAPacketProcessorParams Params
void unsetDeviceQueueDesc(uint64_t queue_id)
DepSignalsReadDmaEvent(SignalState *ss)
HSAPacketProcessor(const Params *p)
void dmaVirt(DmaFnPtr, Addr host_addr, unsigned size, Event *event, void *data, Tick delay=0)
@ HSA_PACKET_HEADER_TYPE
Packet type.
void incDispIdx(uint64_t value)
void updateReadIndex(int, uint32_t)
int allocEntry(uint32_t nBufReq)
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
void translateOrDie(Addr vaddr, Addr &paddr)
RQLEntry(HSAPacketProcessor *hsaPP, uint32_t rqIdx)
HSAQueueDescriptor * qDesc
virtual Tick write(Packet *)
@ HSA_PACKET_TYPE_INVALID
The packet has been processed in the past, but has not been reassigned to the packet processor.
std::vector< bool > _aqlComplete
bool stalledOnDmaBufAvailability
bool getBarrierBit() const
QueueProcessEvent aqlProcessEvent
virtual Tick read(Packet *)
SignalState * signalState
class RQLEntry * getRegdListEntry(uint32_t queId)
void schedAQLProcessing(uint32_t rl_idx)
uint64_t compltnPending()
HSAQueueDescriptor(uint64_t base_ptr, uint64_t db_ptr, uint64_t hri_ptr, uint32_t size)
void finishPkt(void *pkt)
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
void(DmaDevice::* DmaFnPtr)(Addr, int, Event *, uint8_t *, Tick)
static const Priority Default_Pri
Default is zero for historical reasons.
virtual const char * description() const
Return a C string describing the event.
void displayQueueDescriptor(int pid, uint32_t rl_idx)
std::vector< Addr > _hostDispAddresses
std::vector< hsa_signal_value_t > values
dma_series_ctx * series_ctx
uint64_t compltnPending()
this event is used to update the read_disp_id field (the read pointer) of the MQD,...
void setBarrierBit(bool set_val)
SignalState depSignalRdState
Calls getCurrentEntry once the queueEntry has been dmaRead.
Generated on Wed Sep 30 2020 14:02:11 for gem5 by doxygen 1.8.17