gem5 v24.0.0.0
|
#include <schedule_stage.hh>
Classes | |
struct | ScheduleStageStats |
Public Member Functions | |
ScheduleStage (const ComputeUnitParams &p, ComputeUnit &cu, ScoreboardCheckToSchedule &from_scoreboard_check, ScheduleToExecute &to_execute) | |
~ScheduleStage () | |
void | init () |
void | exec () |
const std::string & | name () const |
void | deleteFromSch (Wavefront *w) |
Protected Attributes | |
gem5::ScheduleStage::ScheduleStageStats | stats |
Private Member Functions | |
bool | addToSchList (int exeType, const GPUDynInstPtr &gpu_dyn_inst) |
void | reinsertToSchList (int exeType, const GPUDynInstPtr &gpu_dyn_inst) |
void | checkRfOperandReadComplete () |
void | checkMemResources () |
bool | dispatchReady (const GPUDynInstPtr &gpu_dyn_inst) |
void | fillDispatchList () |
void | arbitrateVrfToLdsBus () |
void | scheduleRfDestOperands () |
bool | schedRfWrites (int exeType, const GPUDynInstPtr &gpu_dyn_inst) |
void | reserveResources () |
void | doDispatchListTransition (int unitId, DISPATCH_STATUS s, const GPUDynInstPtr &gpu_dyn_inst) |
void | doDispatchListTransition (int unitId, DISPATCH_STATUS s) |
Private Attributes | |
ComputeUnit & | computeUnit |
ScoreboardCheckToSchedule & | fromScoreboardCheck |
ScheduleToExecute & | toExecute |
std::vector< Scheduler > | scheduler |
const std::string | _name |
bool | vectorAluRdy |
bool | scalarAluRdy |
bool | scalarMemBusRdy |
bool | scalarMemIssueRdy |
bool | glbMemBusRdy |
bool | glbMemIssueRdy |
bool | locMemBusRdy |
bool | locMemIssueRdy |
std::unordered_set< uint64_t > | wavesInSch |
std::vector< std::deque< std::pair< GPUDynInstPtr, SCH_STATUS > > > | schList |
Definition at line 62 of file schedule_stage.hh.
Enumerator | |
---|---|
RFBUSY | |
RFREADY |
Definition at line 118 of file schedule_stage.hh.
Definition at line 74 of file schedule_stage.hh.
Enumerator | |
---|---|
SCH_VRF_OPD_NRDY | |
SCH_SRF_OPD_NRDY | |
SCH_RF_OPD_NRDY | |
SCH_RF_OPD_NRDY_CONDITIONS |
Definition at line 97 of file schedule_stage.hh.
Enumerator | |
---|---|
SCH_VRF_RD_ACCESS_NRDY | |
SCH_VRF_WR_ACCESS_NRDY | |
SCH_SRF_RD_ACCESS_NRDY | |
SCH_SRF_WR_ACCESS_NRDY | |
SCH_RF_ACCESS_NRDY | |
SCH_RF_ACCESS_NRDY_CONDITIONS |
Definition at line 104 of file schedule_stage.hh.
gem5::ScheduleStage::ScheduleStage | ( | const ComputeUnitParams & | p, |
ComputeUnit & | cu, | ||
ScoreboardCheckToSchedule & | from_scoreboard_check, | ||
ScheduleToExecute & | to_execute ) |
Definition at line 49 of file schedule_stage.cc.
References gem5::MipsISA::dq, gem5::ComputeUnit::numExeUnits(), gem5::MipsISA::p, scheduler, schList, and wavesInSch.
gem5::ScheduleStage::~ScheduleStage | ( | ) |
Definition at line 69 of file schedule_stage.cc.
References scheduler, schList, and wavesInSch.
|
private |
Definition at line 295 of file schedule_stage.cc.
References computeUnit, DPRINTF, gem5::Wavefront::hasBarrier(), gem5::ComputeUnit::insertInPipeMap(), gem5::Wavefront::isOldestInstBarrier(), gem5::Wavefront::isOldestInstSleep(), gem5::Wavefront::isOldestInstWaitcnt(), gem5::ScheduleStage::ScheduleStageStats::rfAccessStalls, RFBUSY, gem5::Wavefront::S_BARRIER, gem5::Wavefront::S_STALLED_SLEEP, gem5::Wavefront::S_WAITCNT, SCH_RF_ACCESS_NRDY, SCH_SRF_RD_ACCESS_NRDY, SCH_VRF_RD_ACCESS_NRDY, schList, gem5::Wavefront::WavefrontStats::schRfAccessStalls, gem5::Wavefront::WavefrontStats::schStalls, gem5::Wavefront::setStatus(), gem5::Wavefront::simdId, gem5::ComputeUnit::srf, stats, gem5::Wavefront::stats, gem5::ComputeUnit::vrf, wavesInSch, and gem5::Wavefront::wfDynId.
Referenced by exec().
|
private |
Definition at line 626 of file schedule_stage.cc.
References computeUnit, gem5::ScheduleToExecute::dispatchStatus(), doDispatchListTransition(), DPRINTF, gem5::EXREADY, gem5::ComputeUnit::firstMemUnit(), gem5::ArmISA::i, gem5::ScheduleStage::ScheduleStageStats::ldsBusArbStalls, gem5::Wavefront::localMem, gem5::ComputeUnit::numVectorGlobalMemUnits, gem5::ScheduleToExecute::readyInst(), reinsertToSchList(), gem5::SKIP, stats, and toExecute.
Referenced by exec().
|
private |
Definition at line 379 of file schedule_stage.cc.
References computeUnit, glbMemBusRdy, glbMemIssueRdy, locMemBusRdy, locMemIssueRdy, gem5::WaitClass::rdy(), scalarMemBusRdy, scalarMemIssueRdy, gem5::ComputeUnit::scalarMemUnit, gem5::ComputeUnit::srfToScalarMemPipeBus, gem5::ComputeUnit::vectorGlobalMemUnit, gem5::ComputeUnit::vectorSharedMemUnit, gem5::ComputeUnit::vrfToGlobalMemPipeBus, and gem5::ComputeUnit::vrfToLocalMemPipeBus.
Referenced by fillDispatchList().
|
private |
Definition at line 665 of file schedule_stage.cc.
References computeUnit, DPRINTF, gem5::ComputeUnit::numExeUnits(), gem5::ScheduleStage::ScheduleStageStats::opdNrdyStalls, gem5::MipsISA::p, RFBUSY, RFREADY, SCH_RF_OPD_NRDY, SCH_SRF_OPD_NRDY, SCH_VRF_OPD_NRDY, gem5::Wavefront::WavefrontStats::schCycles, schList, gem5::Wavefront::WavefrontStats::schOpdNrdyStalls, gem5::Wavefront::WavefrontStats::schStalls, gem5::Wavefront::simdId, gem5::ComputeUnit::srf, stats, gem5::Wavefront::stats, gem5::ComputeUnit::vrf, and gem5::Wavefront::wfDynId.
Referenced by exec().
void gem5::ScheduleStage::deleteFromSch | ( | Wavefront * | w | ) |
Definition at line 787 of file schedule_stage.cc.
References gem5::MipsISA::w, and wavesInSch.
|
private |
Definition at line 417 of file schedule_stage.cc.
References gem5::GlobalMemPipeline::coalescerReady(), computeUnit, gem5::ScheduleStage::ScheduleStageStats::dispNrdyStalls, glbMemBusRdy, glbMemIssueRdy, gem5::ComputeUnit::globalMemoryPipe, gem5::ScalarMemPipeline::isGMReqFIFOWrRdy(), gem5::ComputeUnit::localMemoryPipe, locMemBusRdy, locMemIssueRdy, gem5::GlobalMemPipeline::outstandingReqsCheck(), panic, gem5::Wavefront::rdLmReqsInPipe, gem5::Wavefront::scalarAlu, scalarAluRdy, gem5::ComputeUnit::scalarALUs, scalarMemBusRdy, scalarMemIssueRdy, gem5::ComputeUnit::scalarMemoryPipe, gem5::Wavefront::scalarRdGmReqsInPipe, gem5::Wavefront::scalarWrGmReqsInPipe, SCH_FLAT_MEM_BUS_BUSY_NRDY, SCH_FLAT_MEM_COALESCER_NRDY, SCH_FLAT_MEM_FIFO_NRDY, SCH_FLAT_MEM_ISSUE_NRDY, SCH_FLAT_MEM_REQS_NRDY, SCH_LOCAL_MEM_BUS_BUSY_NRDY, SCH_LOCAL_MEM_FIFO_NRDY, SCH_LOCAL_MEM_ISSUE_NRDY, SCH_RDY, SCH_SCALAR_ALU_NRDY, SCH_SCALAR_MEM_BUS_BUSY_NRDY, SCH_SCALAR_MEM_FIFO_NRDY, SCH_SCALAR_MEM_ISSUE_NRDY, SCH_VECTOR_ALU_NRDY, SCH_VECTOR_MEM_BUS_BUSY_NRDY, SCH_VECTOR_MEM_COALESCER_NRDY, SCH_VECTOR_MEM_ISSUE_NRDY, SCH_VECTOR_MEM_REQS_NRDY, gem5::Wavefront::simdId, stats, vectorAluRdy, gem5::ComputeUnit::vectorALUs, and gem5::Wavefront::wrLmReqsInPipe.
Referenced by fillDispatchList().
|
private |
Definition at line 221 of file schedule_stage.cc.
References gem5::ScheduleToExecute::dispatchTransition(), gem5::ArmISA::s, and toExecute.
|
private |
Definition at line 214 of file schedule_stage.cc.
References gem5::ScheduleToExecute::dispatchTransition(), gem5::ArmISA::s, and toExecute.
Referenced by arbitrateVrfToLdsBus(), fillDispatchList(), and scheduleRfDestOperands().
void gem5::ScheduleStage::exec | ( | ) |
Remove any wave that already has an instruction present in SCH waiting for RF reads to complete. This prevents out of order execution within a wave.
Definition at line 91 of file schedule_stage.cc.
References addToSchList(), gem5::ScheduleStage::ScheduleStageStats::addToSchListStalls, arbitrateVrfToLdsBus(), checkRfOperandReadComplete(), computeUnit, fillDispatchList(), gem5::ComputeUnit::firstMemUnit(), fromScoreboardCheck, gem5::Wavefront::incExpInstsIssued(), gem5::Wavefront::incLGKMInstsIssued(), gem5::Wavefront::incVMemInstsIssued(), gem5::Wavefront::instructionBuffer, gem5::ComputeUnit::lastMemUnit(), gem5::ComputeUnit::numExeUnits(), gem5::ScheduleStage::ScheduleStageStats::rdyListEmpty, gem5::ScheduleStage::ScheduleStageStats::rdyListNotEmpty, gem5::ScoreboardCheckToSchedule::readyWFs(), reserveResources(), gem5::ScheduleToExecute::reset(), gem5::Wavefront::WavefrontStats::schCycles, scheduler, scheduleRfDestOperands(), stats, gem5::Wavefront::stats, toExecute, gem5::ScoreboardCheckToSchedule::updateReadyList(), and wavesInSch.
Referenced by gem5::ComputeUnit::exec().
|
private |
Definition at line 557 of file schedule_stage.cc.
References gem5::GlobalMemPipeline::acqCoalescerToken(), checkMemResources(), computeUnit, dispatchReady(), gem5::ScheduleToExecute::dispatchStatus(), doDispatchListTransition(), DPRINTF, gem5::EMPTY, gem5::EXREADY, gem5::ComputeUnit::globalMemoryPipe, gem5::ArmISA::mp, gem5::ComputeUnit::numExeUnits(), RFREADY, schList, gem5::ScheduleStage::ScheduleStageStats::schListToDispList, gem5::ScheduleStage::ScheduleStageStats::schListToDispListStalls, stats, and toExecute.
Referenced by exec().
void gem5::ScheduleStage::init | ( | ) |
Definition at line 77 of file schedule_stage.cc.
References computeUnit, fatal_if, fromScoreboardCheck, gem5::ComputeUnit::numExeUnits(), gem5::ScoreboardCheckToSchedule::numReadyLists(), gem5::ComputeUnit::numVectorGlobalMemUnits, gem5::ComputeUnit::numVectorSharedMemUnits, gem5::ScoreboardCheckToSchedule::readyWFs(), and scheduler.
Referenced by gem5::ComputeUnit::init().
|
inline |
Definition at line 73 of file schedule_stage.hh.
References _name.
|
private |
Definition at line 363 of file schedule_stage.cc.
References RFREADY, and schList.
Referenced by arbitrateVrfToLdsBus(), and scheduleRfDestOperands().
|
private |
Definition at line 721 of file schedule_stage.cc.
References computeUnit, gem5::ScheduleToExecute::dispatchStatus(), DPRINTF, gem5::EMPTY, gem5::EXREADY, gem5::Wavefront::globalMem, gem5::Wavefront::localMem, gem5::ComputeUnit::numExeUnits(), panic_if, gem5::ScheduleToExecute::readyInst(), gem5::Wavefront::reserveResources(), gem5::ArmISA::s, gem5::Wavefront::simdId, gem5::SKIP, gem5::ComputeUnit::srf, gem5::ArmISA::ss, toExecute, gem5::ComputeUnit::vrf, and gem5::Wavefront::wfDynId.
Referenced by exec().
|
private |
Definition at line 227 of file schedule_stage.cc.
References computeUnit, gem5::ScheduleStage::ScheduleStageStats::rfAccessStalls, SCH_RF_ACCESS_NRDY, SCH_SRF_WR_ACCESS_NRDY, SCH_VRF_WR_ACCESS_NRDY, gem5::Wavefront::WavefrontStats::schRfAccessStalls, gem5::Wavefront::WavefrontStats::schStalls, gem5::Wavefront::simdId, gem5::ComputeUnit::srf, stats, gem5::Wavefront::stats, and gem5::ComputeUnit::vrf.
Referenced by scheduleRfDestOperands().
|
private |
Definition at line 263 of file schedule_stage.cc.
References computeUnit, gem5::ScheduleToExecute::dispatchStatus(), doDispatchListTransition(), gem5::EMPTY, gem5::Wavefront::instructionBuffer, gem5::Wavefront::localMem, gem5::ComputeUnit::numExeUnits(), gem5::ScheduleToExecute::readyInst(), reinsertToSchList(), schedRfWrites(), gem5::SKIP, and toExecute.
Referenced by exec().
|
private |
Definition at line 133 of file schedule_stage.hh.
Referenced by name().
|
private |
Definition at line 125 of file schedule_stage.hh.
Referenced by addToSchList(), arbitrateVrfToLdsBus(), checkMemResources(), checkRfOperandReadComplete(), dispatchReady(), exec(), fillDispatchList(), init(), reserveResources(), schedRfWrites(), and scheduleRfDestOperands().
|
private |
Definition at line 126 of file schedule_stage.hh.
|
private |
Definition at line 147 of file schedule_stage.hh.
Referenced by checkMemResources(), and dispatchReady().
|
private |
Definition at line 148 of file schedule_stage.hh.
Referenced by checkMemResources(), and dispatchReady().
|
private |
Definition at line 149 of file schedule_stage.hh.
Referenced by checkMemResources(), and dispatchReady().
|
private |
Definition at line 150 of file schedule_stage.hh.
Referenced by checkMemResources(), and dispatchReady().
|
private |
Definition at line 144 of file schedule_stage.hh.
Referenced by dispatchReady().
|
private |
Definition at line 145 of file schedule_stage.hh.
Referenced by checkMemResources(), and dispatchReady().
|
private |
Definition at line 146 of file schedule_stage.hh.
Referenced by checkMemResources(), and dispatchReady().
|
private |
Definition at line 131 of file schedule_stage.hh.
Referenced by exec(), init(), ScheduleStage(), and ~ScheduleStage().
|
private |
Definition at line 185 of file schedule_stage.hh.
Referenced by addToSchList(), checkRfOperandReadComplete(), fillDispatchList(), reinsertToSchList(), ScheduleStage(), and ~ScheduleStage().
|
protected |
Referenced by addToSchList(), arbitrateVrfToLdsBus(), checkRfOperandReadComplete(), dispatchReady(), exec(), fillDispatchList(), and schedRfWrites().
|
private |
Definition at line 127 of file schedule_stage.hh.
Referenced by arbitrateVrfToLdsBus(), doDispatchListTransition(), doDispatchListTransition(), exec(), fillDispatchList(), reserveResources(), and scheduleRfDestOperands().
|
private |
Definition at line 143 of file schedule_stage.hh.
Referenced by dispatchReady().
|
private |
Definition at line 174 of file schedule_stage.hh.
Referenced by addToSchList(), deleteFromSch(), exec(), ScheduleStage(), and ~ScheduleStage().