gem5
v20.1.0.0
|
#include <scoreboard_check_stage.hh>
Public Types | |
enum | nonrdytype_e { NRDY_ILLEGAL, NRDY_WF_STOP, NRDY_IB_EMPTY, NRDY_WAIT_CNT, NRDY_BARRIER_WAIT, NRDY_VGPR_NRDY, NRDY_SGPR_NRDY, INST_RDY, NRDY_CONDITIONS } |
Public Member Functions | |
ScoreboardCheckStage (const ComputeUnitParams *p, ComputeUnit &cu, ScoreboardCheckToSchedule &to_schedule) | |
~ScoreboardCheckStage () | |
void | exec () |
const std::string & | name () const |
void | regStats () |
Private Member Functions | |
void | collectStatistics (nonrdytype_e rdyStatus) |
int | mapWaveToExeUnit (Wavefront *w) |
bool | ready (Wavefront *w, nonrdytype_e *rdyStatus, int *exeResType, int wfSlot) |
Private Attributes | |
ComputeUnit & | computeUnit |
ScoreboardCheckToSchedule & | toSchedule |
Interface between scoreboard check and schedule stages. More... | |
Stats::Vector | stallCycles |
const std::string | _name |
Definition at line 59 of file scoreboard_check_stage.hh.
Enumerator | |
---|---|
NRDY_ILLEGAL | |
NRDY_WF_STOP | |
NRDY_IB_EMPTY | |
NRDY_WAIT_CNT | |
NRDY_BARRIER_WAIT | |
NRDY_VGPR_NRDY | |
NRDY_SGPR_NRDY | |
INST_RDY | |
NRDY_CONDITIONS |
Definition at line 62 of file scoreboard_check_stage.hh.
ScoreboardCheckStage::ScoreboardCheckStage | ( | const ComputeUnitParams * | p, |
ComputeUnit & | cu, | ||
ScoreboardCheckToSchedule & | to_schedule | ||
) |
Definition at line 47 of file scoreboard_check_stage.cc.
ScoreboardCheckStage::~ScoreboardCheckStage | ( | ) |
Definition at line 56 of file scoreboard_check_stage.cc.
|
private |
Definition at line 61 of file scoreboard_check_stage.cc.
References NRDY_CONDITIONS, NRDY_ILLEGAL, panic_if, and stallCycles.
Referenced by exec().
void ScoreboardCheckStage::exec | ( | ) |
Reset the ready list for all execution units; ready list will be constructed every cycle because resource availability may change.
Definition at line 237 of file scoreboard_check_stage.cc.
References collectStatistics(), computeUnit, DPRINTF, ScoreboardCheckToSchedule::markWFReady(), Shader::n_wf, Wavefront::nextInstr(), NRDY_ILLEGAL, ComputeUnit::numVectorALUs, ready(), ScoreboardCheckToSchedule::reset(), ComputeUnit::shader, Wavefront::simdId, toSchedule, Wavefront::wfDynId, and ComputeUnit::wfList.
Referenced by ComputeUnit::exec().
|
private |
NOTE: Flat memory ops requires both GM and LM resources. The simulator models consumption of both GM and LM resources in the schedule stage. At instruction execution time, after the aperture check is performed, only the GM or LM pipe is actually reserved by the timing model. The GM unit is returned here since Flat ops occupy the GM slot in the ready and dispatch lists. They also consume the LM slot in the dispatch list.
Definition at line 195 of file scoreboard_check_stage.cc.
References computeUnit, ComputeUnit::numExeUnits(), panic, and MipsISA::w.
Referenced by ready().
|
inline |
Definition at line 80 of file scoreboard_check_stage.hh.
References _name.
Referenced by regStats().
|
private |
The waitCnt checks have to be done BEFORE checking for Instruction buffer empty condition. Otherwise, it will result into a deadlock if the last instruction in the Instruction buffer is a waitCnt: after executing the waitCnt, the Instruction buffer would be empty and the ready check logic will exit BEFORE checking for wait counters being satisfied.
Definition at line 74 of file scoreboard_check_stage.cc.
References ComputeUnit::allAtBarrier(), computeUnit, ComputeUnit::cu_id, DPRINTF, INST_RDY, mapWaveToExeUnit(), NRDY_BARRIER_WAIT, NRDY_IB_EMPTY, NRDY_SGPR_NRDY, NRDY_VGPR_NRDY, NRDY_WAIT_CNT, NRDY_WF_STOP, panic, ComputeUnit::releaseWFsFromBarrier(), ComputeUnit::resetBarrier(), Wavefront::S_BARRIER, Wavefront::S_RETURNING, Wavefront::S_STALLED, Wavefront::S_STOPPED, Wavefront::S_WAITCNT, ComputeUnit::srf, ComputeUnit::vrf, and MipsISA::w.
Referenced by exec().
void ScoreboardCheckStage::regStats | ( | ) |
Definition at line 270 of file scoreboard_check_stage.cc.
References csprintf(), Stats::DataWrap< Derived, InfoProxyType >::desc(), Stats::VectorBase< Derived, Stor >::init(), INST_RDY, name(), Stats::DataWrap< Derived, InfoProxyType >::name(), NRDY_BARRIER_WAIT, NRDY_CONDITIONS, NRDY_IB_EMPTY, NRDY_SGPR_NRDY, NRDY_VGPR_NRDY, NRDY_WAIT_CNT, NRDY_WF_STOP, stallCycles, and Stats::DataWrapVec< Derived, InfoProxyType >::subname().
Referenced by ComputeUnit::regStats().
|
private |
Definition at line 100 of file scoreboard_check_stage.hh.
Referenced by name().
|
private |
Definition at line 88 of file scoreboard_check_stage.hh.
Referenced by exec(), mapWaveToExeUnit(), and ready().
|
private |
Definition at line 98 of file scoreboard_check_stage.hh.
Referenced by collectStatistics(), and regStats().
|
private |
Interface between scoreboard check and schedule stages.
Each cycle the scoreboard check stage populates this interface with information needed by the schedule stage.
Definition at line 95 of file scoreboard_check_stage.hh.
Referenced by exec().