32#ifndef __FETCH_UNIT_HH__
33#define __FETCH_UNIT_HH__
42#include "arch/gpu_decoder.hh"
44#include "config/the_gpu_isa.hh"
126 return reserved_pc->second;
137 bool is_reserved = (reserved_pc !=
reservedPCs.end());
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,...
static const FlagsType AutoDelete
void setFlags(Flags _flags)
int reservedLines() const
std::map< Addr, uint8_t * > reservedPCs
void reserveBuf(Addr vaddr)
reserve an entry in the fetch buffer for PC = vaddr,
void decoder(TheGpuISA::Decoder *dec)
uint8_t * readPtr
pointer that points to the next chunk of inst data to be decoded.
int fetchBytesRemaining() const
calculates the number of fetched bytes that have yet to be decoded.
void checkWaveReleaseBuf()
checks if the wavefront can release any of its fetch buffer entries.
bool hasFetchDataToProcess() const
checks if the buffer contains valid data.
std::map< Addr, uint8_t * > bufferedPCs
the set of PCs (fetch addresses) that are currently buffered.
int bufferedAndReservedLines() const
bool isReserved(Addr vaddr) const
returns true if there is an entry reserved for this address, and false otherwise
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),...
int bufferedLines() const
bool hasFreeSpace() const
void fetchDone(PacketPtr ptr)
uint8_t * reservedBuf(Addr vaddr) const
return a pointer to the raw fetch buffer data.
bool pcBuffered(Addr pc) const
bool splitDecode() const
check if the next instruction to be processed out of the fetch buffer is split across the end/beginni...
void decodeInsts()
each time the fetch stage is ticked, we check if there are any data in the fetch buffer that may be d...
uint8_t * bufStart
raw instruction buffer.
TheGpuISA::Decoder * _decoder
int bufferedBytes() const
std::deque< uint8_t * > freeList
represents the fetch buffer free list.
SystemHubEvent(PacketPtr pkt, FetchUnit *fetch_unit)
static uint32_t globalFetchUnitID
std::vector< Wavefront * > * waveList
void bindWaveList(std::vector< Wavefront * > *list)
FetchUnit(const ComputeUnitParams &p, ComputeUnit &cu)
void fetch(PacketPtr pkt, Wavefront *wavefront)
std::vector< Wavefront * > fetchQueue
void initiateFetch(Wavefront *wavefront)
int fetchDepth
number of cache lines we can fetch and buffer.
TheGpuISA::Decoder decoder
ComputeUnit & computeUnit
void processFetchReturn(PacketPtr pkt)
std::vector< FetchBufDesc > fetchBuf
void flushBuf(int wfSlotId)
std::vector< std::pair< Wavefront *, bool > > fetchStatusQueue
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Declaration of the Packet class.