gem5
v20.1.0.0
|
#include <schedule_stage.hh>
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 | regStats () |
void | deleteFromSch (Wavefront *w) |
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 |
Stats::Vector | rdyListEmpty |
Stats::Vector | rdyListNotEmpty |
Stats::Vector | addToSchListStalls |
Stats::Vector | schListToDispList |
Stats::Vector | schListToDispListStalls |
Stats::Vector | rfAccessStalls |
Stats::Scalar | ldsBusArbStalls |
Stats::Vector | opdNrdyStalls |
Stats::Vector | dispNrdyStalls |
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 59 of file schedule_stage.hh.
Enumerator | |
---|---|
RFBUSY | |
RFREADY |
Definition at line 114 of file schedule_stage.hh.
Definition at line 71 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 93 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 99 of file schedule_stage.hh.
ScheduleStage::ScheduleStage | ( | const ComputeUnitParams * | p, |
ComputeUnit & | cu, | ||
ScoreboardCheckToSchedule & | from_scoreboard_check, | ||
ScheduleToExecute & | to_execute | ||
) |
Definition at line 46 of file schedule_stage.cc.
References MipsISA::dq, ArmISA::j, ComputeUnit::numExeUnits(), MipsISA::p, scheduler, schList, and wavesInSch.
ScheduleStage::~ScheduleStage | ( | ) |
Definition at line 66 of file schedule_stage.cc.
References scheduler, schList, and wavesInSch.
|
private |
Definition at line 289 of file schedule_stage.cc.
References computeUnit, DPRINTF, ComputeUnit::insertInPipeMap(), Wavefront::isOldestInstWaitcnt(), rfAccessStalls, RFBUSY, Wavefront::S_WAITCNT, SCH_RF_ACCESS_NRDY, SCH_SRF_RD_ACCESS_NRDY, SCH_VRF_RD_ACCESS_NRDY, schList, Wavefront::schRfAccessStalls, Wavefront::schStalls, Wavefront::setStatus(), Wavefront::simdId, ComputeUnit::srf, ComputeUnit::vrf, wavesInSch, and Wavefront::wfDynId.
Referenced by exec().
|
private |
Definition at line 609 of file schedule_stage.cc.
References computeUnit, ScheduleToExecute::dispatchStatus(), doDispatchListTransition(), DPRINTF, EXREADY, ComputeUnit::firstMemUnit(), ArmISA::i, ldsBusArbStalls, Wavefront::localMem, ComputeUnit::numVectorGlobalMemUnits, ScheduleToExecute::readyInst(), reinsertToSchList(), SKIP, and toExecute.
Referenced by exec().
|
private |
Definition at line 367 of file schedule_stage.cc.
References computeUnit, glbMemBusRdy, glbMemIssueRdy, locMemBusRdy, locMemIssueRdy, WaitClass::rdy(), scalarMemBusRdy, scalarMemIssueRdy, ComputeUnit::scalarMemUnit, ComputeUnit::srfToScalarMemPipeBus, ComputeUnit::vectorGlobalMemUnit, ComputeUnit::vectorSharedMemUnit, ComputeUnit::vrfToGlobalMemPipeBus, and ComputeUnit::vrfToLocalMemPipeBus.
Referenced by fillDispatchList().
|
private |
Definition at line 650 of file schedule_stage.cc.
References computeUnit, DPRINTF, ArmISA::j, ComputeUnit::numExeUnits(), opdNrdyStalls, MipsISA::p, RFBUSY, RFREADY, SCH_RF_OPD_NRDY, SCH_SRF_OPD_NRDY, SCH_VRF_OPD_NRDY, Wavefront::schCycles, schList, Wavefront::schOpdNrdyStalls, Wavefront::schStalls, Wavefront::simdId, ComputeUnit::srf, ComputeUnit::vrf, and Wavefront::wfDynId.
Referenced by exec().
void ScheduleStage::deleteFromSch | ( | Wavefront * | w | ) |
Definition at line 772 of file schedule_stage.cc.
References MipsISA::w, and wavesInSch.
|
private |
Definition at line 405 of file schedule_stage.cc.
References GlobalMemPipeline::coalescerReady(), computeUnit, dispNrdyStalls, glbMemBusRdy, glbMemIssueRdy, ComputeUnit::globalMemoryPipe, ScalarMemPipeline::isGMReqFIFOWrRdy(), ComputeUnit::localMemoryPipe, locMemBusRdy, locMemIssueRdy, GlobalMemPipeline::outstandingReqsCheck(), panic, Wavefront::rdLmReqsInPipe, Wavefront::scalarAlu, scalarAluRdy, ComputeUnit::scalarALUs, scalarMemBusRdy, scalarMemIssueRdy, ComputeUnit::scalarMemoryPipe, Wavefront::scalarRdGmReqsInPipe, 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, Wavefront::simdId, vectorAluRdy, ComputeUnit::vectorALUs, and Wavefront::wrLmReqsInPipe.
Referenced by fillDispatchList().
|
private |
Definition at line 215 of file schedule_stage.cc.
References ScheduleToExecute::dispatchTransition(), ArmISA::s, and toExecute.
|
private |
Definition at line 208 of file schedule_stage.cc.
References ScheduleToExecute::dispatchTransition(), ArmISA::s, and toExecute.
Referenced by arbitrateVrfToLdsBus(), fillDispatchList(), and scheduleRfDestOperands().
void 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 88 of file schedule_stage.cc.
References addToSchList(), addToSchListStalls, arbitrateVrfToLdsBus(), checkRfOperandReadComplete(), computeUnit, fillDispatchList(), ComputeUnit::firstMemUnit(), fromScoreboardCheck, Wavefront::incLGKMInstsIssued(), Wavefront::incVMemInstsIssued(), Wavefront::instructionBuffer, ArmISA::j, ComputeUnit::lastMemUnit(), ComputeUnit::numExeUnits(), rdyListEmpty, rdyListNotEmpty, ScoreboardCheckToSchedule::readyWFs(), reserveResources(), ScheduleToExecute::reset(), Wavefront::schCycles, scheduler, scheduleRfDestOperands(), toExecute, ScoreboardCheckToSchedule::updateReadyList(), and wavesInSch.
Referenced by ComputeUnit::exec().
|
private |
Definition at line 545 of file schedule_stage.cc.
References GlobalMemPipeline::acqCoalescerToken(), checkMemResources(), computeUnit, dispatchReady(), ScheduleToExecute::dispatchStatus(), doDispatchListTransition(), DPRINTF, EMPTY, EXREADY, ComputeUnit::globalMemoryPipe, ArmISA::j, ArmISA::mp, ComputeUnit::numExeUnits(), RFREADY, schList, schListToDispList, schListToDispListStalls, and toExecute.
Referenced by exec().
void ScheduleStage::init | ( | ) |
Definition at line 74 of file schedule_stage.cc.
References computeUnit, fatal_if, fromScoreboardCheck, ArmISA::j, ComputeUnit::numExeUnits(), ScoreboardCheckToSchedule::numReadyLists(), ComputeUnit::numVectorGlobalMemUnits, ComputeUnit::numVectorSharedMemUnits, ScoreboardCheckToSchedule::readyWFs(), and scheduler.
Referenced by ComputeUnit::init().
|
inline |
void ScheduleStage::regStats | ( | ) |
Definition at line 778 of file schedule_stage.cc.
References addToSchListStalls, computeUnit, csprintf(), Stats::DataWrap< Derived, InfoProxyType >::desc(), dispNrdyStalls, Stats::VectorBase< Derived, Stor >::init(), ldsBusArbStalls, name(), Stats::DataWrap< Derived, InfoProxyType >::name(), ComputeUnit::numExeUnits(), opdNrdyStalls, rdyListEmpty, rdyListNotEmpty, rfAccessStalls, SCH_CEDE_SIMD_NRDY, SCH_FLAT_MEM_BUS_BUSY_NRDY, SCH_FLAT_MEM_COALESCER_NRDY, SCH_FLAT_MEM_FIFO_NRDY, SCH_FLAT_MEM_ISSUE_NRDY, SCH_LOCAL_MEM_BUS_BUSY_NRDY, SCH_LOCAL_MEM_FIFO_NRDY, SCH_LOCAL_MEM_ISSUE_NRDY, SCH_NRDY_CONDITIONS, SCH_RDY, SCH_RF_ACCESS_NRDY, SCH_RF_ACCESS_NRDY_CONDITIONS, SCH_RF_OPD_NRDY, SCH_RF_OPD_NRDY_CONDITIONS, SCH_SCALAR_ALU_NRDY, SCH_SCALAR_MEM_BUS_BUSY_NRDY, SCH_SCALAR_MEM_FIFO_NRDY, SCH_SCALAR_MEM_ISSUE_NRDY, SCH_SRF_OPD_NRDY, SCH_SRF_RD_ACCESS_NRDY, SCH_SRF_WR_ACCESS_NRDY, SCH_VECTOR_ALU_NRDY, SCH_VECTOR_MEM_BUS_BUSY_NRDY, SCH_VECTOR_MEM_COALESCER_NRDY, SCH_VECTOR_MEM_ISSUE_NRDY, SCH_VRF_OPD_NRDY, SCH_VRF_RD_ACCESS_NRDY, SCH_VRF_WR_ACCESS_NRDY, schListToDispList, schListToDispListStalls, and Stats::DataWrapVec< Derived, InfoProxyType >::subname().
Referenced by ComputeUnit::regStats().
|
private |
Definition at line 351 of file schedule_stage.cc.
References RFREADY, and schList.
Referenced by arbitrateVrfToLdsBus(), and scheduleRfDestOperands().
|
private |
Definition at line 706 of file schedule_stage.cc.
References computeUnit, ScheduleToExecute::dispatchStatus(), DPRINTF, EMPTY, EXREADY, Wavefront::globalMem, ArmISA::j, Wavefront::localMem, ComputeUnit::numExeUnits(), panic_if, ScheduleToExecute::readyInst(), Wavefront::reserveResources(), ArmISA::s, Wavefront::simdId, SKIP, ComputeUnit::srf, ArmISA::ss, toExecute, ComputeUnit::vrf, and Wavefront::wfDynId.
Referenced by exec().
|
private |
Definition at line 221 of file schedule_stage.cc.
References computeUnit, rfAccessStalls, SCH_RF_ACCESS_NRDY, SCH_SRF_WR_ACCESS_NRDY, SCH_VRF_WR_ACCESS_NRDY, Wavefront::schRfAccessStalls, Wavefront::schStalls, Wavefront::simdId, ComputeUnit::srf, and ComputeUnit::vrf.
Referenced by scheduleRfDestOperands().
|
private |
Definition at line 257 of file schedule_stage.cc.
References computeUnit, ScheduleToExecute::dispatchStatus(), doDispatchListTransition(), EMPTY, Wavefront::instructionBuffer, ArmISA::j, Wavefront::localMem, ComputeUnit::numExeUnits(), ScheduleToExecute::readyInst(), reinsertToSchList(), schedRfWrites(), SKIP, and toExecute.
Referenced by exec().
|
private |
Definition at line 171 of file schedule_stage.hh.
Referenced by name().
|
private |
Definition at line 139 of file schedule_stage.hh.
Referenced by exec(), and regStats().
|
private |
Definition at line 121 of file schedule_stage.hh.
Referenced by addToSchList(), arbitrateVrfToLdsBus(), checkMemResources(), checkRfOperandReadComplete(), dispatchReady(), exec(), fillDispatchList(), init(), regStats(), reserveResources(), schedRfWrites(), and scheduleRfDestOperands().
|
private |
Definition at line 169 of file schedule_stage.hh.
Referenced by dispatchReady(), and regStats().
|
private |
Definition at line 122 of file schedule_stage.hh.
|
private |
Definition at line 185 of file schedule_stage.hh.
Referenced by checkMemResources(), and dispatchReady().
|
private |
Definition at line 186 of file schedule_stage.hh.
Referenced by checkMemResources(), and dispatchReady().
|
private |
Definition at line 160 of file schedule_stage.hh.
Referenced by arbitrateVrfToLdsBus(), and regStats().
|
private |
Definition at line 187 of file schedule_stage.hh.
Referenced by checkMemResources(), and dispatchReady().
|
private |
Definition at line 188 of file schedule_stage.hh.
Referenced by checkMemResources(), and dispatchReady().
|
private |
Definition at line 164 of file schedule_stage.hh.
Referenced by checkRfOperandReadComplete(), and regStats().
|
private |
Definition at line 133 of file schedule_stage.hh.
Referenced by exec(), and regStats().
|
private |
Definition at line 134 of file schedule_stage.hh.
Referenced by exec(), and regStats().
|
private |
Definition at line 155 of file schedule_stage.hh.
Referenced by addToSchList(), regStats(), and schedRfWrites().
|
private |
Definition at line 182 of file schedule_stage.hh.
Referenced by dispatchReady().
|
private |
Definition at line 183 of file schedule_stage.hh.
Referenced by checkMemResources(), and dispatchReady().
|
private |
Definition at line 184 of file schedule_stage.hh.
Referenced by checkMemResources(), and dispatchReady().
|
private |
Definition at line 127 of file schedule_stage.hh.
Referenced by exec(), init(), ScheduleStage(), and ~ScheduleStage().
|
private |
Definition at line 223 of file schedule_stage.hh.
Referenced by addToSchList(), checkRfOperandReadComplete(), fillDispatchList(), reinsertToSchList(), ScheduleStage(), and ~ScheduleStage().
|
private |
Definition at line 144 of file schedule_stage.hh.
Referenced by fillDispatchList(), and regStats().
|
private |
Definition at line 148 of file schedule_stage.hh.
Referenced by fillDispatchList(), and regStats().
|
private |
Definition at line 123 of file schedule_stage.hh.
Referenced by arbitrateVrfToLdsBus(), doDispatchListTransition(), exec(), fillDispatchList(), reserveResources(), and scheduleRfDestOperands().
|
private |
Definition at line 181 of file schedule_stage.hh.
Referenced by dispatchReady().
|
private |
Definition at line 212 of file schedule_stage.hh.
Referenced by addToSchList(), deleteFromSch(), exec(), ScheduleStage(), and ~ScheduleStage().