gem5  v20.1.0.0
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
ScoreboardCheckStage Class Reference

#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

ComputeUnitcomputeUnit
 
ScoreboardCheckToScheduletoSchedule
 Interface between scoreboard check and schedule stages. More...
 
Stats::Vector stallCycles
 
const std::string _name
 

Detailed Description

Definition at line 59 of file scoreboard_check_stage.hh.

Member Enumeration Documentation

◆ nonrdytype_e

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.

Constructor & Destructor Documentation

◆ ScoreboardCheckStage()

ScoreboardCheckStage::ScoreboardCheckStage ( const ComputeUnitParams *  p,
ComputeUnit cu,
ScoreboardCheckToSchedule to_schedule 
)

Definition at line 47 of file scoreboard_check_stage.cc.

◆ ~ScoreboardCheckStage()

ScoreboardCheckStage::~ScoreboardCheckStage ( )

Definition at line 56 of file scoreboard_check_stage.cc.

Member Function Documentation

◆ collectStatistics()

void ScoreboardCheckStage::collectStatistics ( nonrdytype_e  rdyStatus)
private

Definition at line 61 of file scoreboard_check_stage.cc.

References NRDY_CONDITIONS, NRDY_ILLEGAL, panic_if, and stallCycles.

Referenced by exec().

◆ 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().

◆ mapWaveToExeUnit()

int ScoreboardCheckStage::mapWaveToExeUnit ( Wavefront w)
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().

◆ name()

const std::string& ScoreboardCheckStage::name ( ) const
inline

Definition at line 80 of file scoreboard_check_stage.hh.

References _name.

Referenced by regStats().

◆ ready()

bool ScoreboardCheckStage::ready ( Wavefront w,
nonrdytype_e rdyStatus,
int *  exeResType,
int  wfSlot 
)
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().

◆ regStats()

void ScoreboardCheckStage::regStats ( )

Member Data Documentation

◆ _name

const std::string ScoreboardCheckStage::_name
private

Definition at line 100 of file scoreboard_check_stage.hh.

Referenced by name().

◆ computeUnit

ComputeUnit& ScoreboardCheckStage::computeUnit
private

Definition at line 88 of file scoreboard_check_stage.hh.

Referenced by exec(), mapWaveToExeUnit(), and ready().

◆ stallCycles

Stats::Vector ScoreboardCheckStage::stallCycles
private

Definition at line 98 of file scoreboard_check_stage.hh.

Referenced by collectStatistics(), and regStats().

◆ toSchedule

ScoreboardCheckToSchedule& ScoreboardCheckStage::toSchedule
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().


The documentation for this class was generated from the following files:

Generated on Wed Sep 30 2020 14:02:31 for gem5 by doxygen 1.8.17