Go to the documentation of this file.
34 #ifndef __FETCH_UNIT_HH__
35 #define __FETCH_UNIT_HH__
40 #include "arch/gpu_decoder.hh"
42 #include "config/the_gpu_isa.hh"
120 return reserved_pc->second;
131 bool is_reserved = (reserved_pc !=
reservedPCs.end());
268 #endif // __FETCH_UNIT_HH__
std::map< Addr, uint8_t * > reservedPCs
ComputeUnit & computeUnit
int bufferedAndReservedLines() const
int fetchBytesRemaining() const
calculates the number of fetched bytes that have yet to be decoded.
int bufferedBytes() const
std::map< Addr, uint8_t * > bufferedPCs
the set of PCs (fetch addresses) that are currently buffered.
bool isReserved(Addr vaddr) const
returns true if there is an entry reserved for this address, and false otherwise
FetchUnit(const ComputeUnitParams *p, ComputeUnit &cu)
void initiateFetch(Wavefront *wavefront)
void decoder(TheGpuISA::Decoder *dec)
std::vector< FetchBufDesc > fetchBuf
void bindWaveList(std::vector< Wavefront * > *list)
TheGpuISA::Decoder * _decoder
static scfx_rep_node * list
int bufferedLines() const
int fetchDepth
number of cache lines we can fetch and buffer.
uint8_t * readPtr
pointer that points to the next chunk of inst data to be decoded.
void flushBuf(int wfSlotId)
std::deque< uint8_t * > freeList
represents the fetch buffer free list.
void reserveBuf(Addr vaddr)
reserve an entry in the fetch buffer for PC = vaddr,
bool hasFreeSpace() const
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
void fetch(PacketPtr pkt, Wavefront *wavefront)
bool pcBuffered(Addr pc) const
uint8_t * reservedBuf(Addr vaddr) const
return a pointer to the raw fetch buffer data.
void decodeInsts()
each time the fetch stage is ticked, we check if there are any data in the fetch buffer that may be d...
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
uint8_t * bufStart
raw instruction buffer.
bool hasFetchDataToProcess() const
checks if the buffer contains valid data.
std::vector< Wavefront * > fetchQueue
TheGpuISA::Decoder decoder
void fetchDone(Addr vaddr)
void processFetchReturn(PacketPtr pkt)
bool splitDecode() const
check if the next instruction to be processed out of the fetch buffer is split across the end/beginni...
void allocateBuf(int fetch_depth, int cache_line_size, Wavefront *wf)
allocate the fetch buffer space, and set the fetch depth (number of lines that may be buffered),...
std::vector< std::pair< Wavefront *, bool > > fetchStatusQueue
std::vector< Wavefront * > * waveList
int reservedLines() const
static uint32_t globalFetchUnitID
void checkWaveReleaseBuf()
checks if the wavefront can release any of its fetch buffer entries.
Generated on Wed Sep 30 2020 14:02:12 for gem5 by doxygen 1.8.17