| 
    gem5
    
   | 
 
#include <fetch_unit.hh>
Public Member Functions | |
| FetchUnit (const ComputeUnitParams *params) | |
| ~FetchUnit () | |
| void | init (ComputeUnit *cu) | 
| void | exec () | 
| void | bindWaveList (std::vector< Wavefront * > *list) | 
| void | initiateFetch (Wavefront *wavefront) | 
| void | fetch (PacketPtr pkt, Wavefront *wavefront) | 
| void | processFetchReturn (PacketPtr pkt) | 
Static Public Attributes | |
| static uint32_t | globalFetchUnitID | 
Private Attributes | |
| bool | timingSim | 
| ComputeUnit * | computeUnit | 
| TheGpuISA::Decoder | decoder | 
| Scheduler | fetchScheduler | 
| std::vector< Wavefront * > | fetchQueue | 
| std::vector< std::pair < Wavefront *, bool > >  | fetchStatusQueue | 
| std::vector< Wavefront * > * | waveList | 
Definition at line 52 of file fetch_unit.hh.
| FetchUnit::FetchUnit | ( | const ComputeUnitParams * | params | ) | 
Definition at line 50 of file fetch_unit.cc.
| FetchUnit::~FetchUnit | ( | ) | 
Definition at line 58 of file fetch_unit.cc.
References fetchQueue, and fetchStatusQueue.
| void FetchUnit::bindWaveList | ( | std::vector< Wavefront * > * | list | ) | 
Definition at line 312 of file fetch_unit.cc.
References waveList.
| void FetchUnit::exec | ( | ) | 
Definition at line 80 of file fetch_unit.cc.
References Scheduler::chooseWave(), computeUnit, fetchQueue, fetchScheduler, fetchStatusQueue, initiateFetch(), Wavefront::instructionBuffer, Wavefront::instructionBufferHasBranch(), ArmISA::j, Shader::n_wf, Wavefront::pendingFetch, Wavefront::S_RUNNING, ComputeUnit::shader, Wavefront::status, and Wavefront::wfSlotId.
Definition at line 205 of file fetch_unit.cc.
References computeUnit, ComputeUnit::cu_id, data, Packet::dataDynamic(), DPRINTF, Request::getPaddr(), Request::getSize(), Request::hasPaddr(), Request::hasSize(), processFetchReturn(), Packet::req, ComputeUnit::SQCPort::retries, Packet::senderState, MasterPort::sendFunctional(), MasterPort::sendTimingReq(), Wavefront::simdId, ComputeUnit::sqcPort, timingSim, and Wavefront::wfSlotId.
Referenced by initiateFetch().
| void FetchUnit::init | ( | ComputeUnit * | cu | ) | 
Definition at line 65 of file fetch_unit.cc.
References Scheduler::bindList(), computeUnit, fetchQueue, fetchScheduler, fetchStatusQueue, ArmISA::j, Shader::n_wf, ComputeUnit::shader, timingSim, Shader::timingSim, and waveList.
| void FetchUnit::initiateFetch | ( | Wavefront * | wavefront | ) | 
the instruction buffer holds one instruction per entry, regardless of the underlying instruction's size. the PC, however, addresses instrutions on a 32b granularity so we must account for that here.
Definition at line 114 of file fetch_unit.cc.
References Wavefront::basePtr, ComputeUnit::cacheLineSize(), computeUnit, ComputeUnit::cu_id, DPRINTF, BaseTLB::Execute, fetch(), Shader::gpuTc, ArmISA::i, Request::INST_FETCH, Wavefront::instructionBuffer, ComputeUnit::ITLBPort::isStalled(), ComputeUnit::masterId(), Wavefront::pc(), MemCmd::ReadReq, ComputeUnit::ITLBPort::retries, roundDown(), safe_cast(), MasterPort::sendFunctional(), MasterPort::sendTimingReq(), ComputeUnit::shader, Wavefront::simdId, X86ISA::size(), ComputeUnit::sqcTLBPort, ComputeUnit::ITLBPort::stallPort(), timingSim, MipsISA::vaddr, and Wavefront::wfSlotId.
Referenced by exec().
| void FetchUnit::processFetchReturn | ( | PacketPtr | pkt | ) | 
this instruction occupies 2 consecutive entries in the instruction array, the second of which contains a nullptr. so if this inst is 8 bytes we advance two entries instead of 1
Definition at line 253 of file fetch_unit.cc.
References computeUnit, ComputeUnit::cu_id, decoder, GPUStaticInst::disassemble(), DPRINTF, Request::getPaddr(), Packet::getPtr(), Request::getSize(), ArmISA::i, GPUStaticInst::instSize(), Packet::req, safe_cast(), Packet::senderState, and ComputeUnit::SQCPort::SenderState::wavefront.
Referenced by fetch().
      
  | 
  private | 
Definition at line 67 of file fetch_unit.hh.
Referenced by exec(), fetch(), init(), initiateFetch(), and processFetchReturn().
      
  | 
  private | 
Definition at line 68 of file fetch_unit.hh.
Referenced by processFetchReturn().
      
  | 
  private | 
Definition at line 78 of file fetch_unit.hh.
Referenced by exec(), init(), and ~FetchUnit().
      
  | 
  private | 
Definition at line 74 of file fetch_unit.hh.
      
  | 
  private | 
Definition at line 83 of file fetch_unit.hh.
Referenced by exec(), init(), and ~FetchUnit().
      
  | 
  static | 
Definition at line 63 of file fetch_unit.hh.
      
  | 
  private | 
Definition at line 66 of file fetch_unit.hh.
Referenced by fetch(), init(), and initiateFetch().
      
  | 
  private | 
Definition at line 86 of file fetch_unit.hh.
Referenced by bindWaveList(), and init().