MicroGPU 1.0
Simple functional model of a GPU for educational purposes
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
MicroGPU Class Reference

Represents a microGPUThe MicroGPU class encapsulates the state and behavior of a microGPU, which consists of multiple compute units (CUs) that execute warps of threads. In this project miroGPU has 16 compute units, each capable of executing one warp at a time. MicroGPU schedules warps from its global warp collection to the compute units and then Compute Units execute the warps in a simple round-robin fashion. More...

#include <ugpu.hh>

Collaboration diagram for MicroGPU:
Collaboration graph

Public Member Functions

 MicroGPU ()
 
void init ()
 
void assignWarpToSM (int smId, const Warp &warp)
 
void addWarpToGlobalCollection (const Warp &warp)
 
int getGlobalWarpCollectionSize () const
 
int getCurrentCycle () const
 
void incrementCycle ()
 
void performWarpScheduling ()
 
void performWarpSchedulingSimple ()
 
void setMaxCycles (int cycles)
 
void createGlobalWarpCollectionTest ()
 
void printComputeUnitStatus () const
 
bool allComputeUnitsDone () const
 
bool allWarpsCompleted () const
 
void executeComputeUnits ()
 Execute all compute units for one cycle.
 
void executeGPU ()
 Execute the entire GPU until all warps are completed.
 

Private Attributes

std::vector< WarpglobalWarpCollection
 
std::array< ComputeUnit, CU_COUNTcomputeUnit
 
int currentCycle
 
int maxCycles
 

Detailed Description

Represents a microGPU

The MicroGPU class encapsulates the state and behavior of a microGPU, which consists of multiple compute units (CUs) that execute warps of threads. In this project miroGPU has 16 compute units, each capable of executing one warp at a time. MicroGPU schedules warps from its global warp collection to the compute units and then Compute Units execute the warps in a simple round-robin fashion.

Constructor & Destructor Documentation

◆ MicroGPU()

MicroGPU::MicroGPU ( )

Member Function Documentation

◆ addWarpToGlobalCollection()

void MicroGPU::addWarpToGlobalCollection ( const Warp warp)
Here is the call graph for this function:

◆ allComputeUnitsDone()

bool MicroGPU::allComputeUnitsDone ( ) const

◆ allWarpsCompleted()

bool MicroGPU::allWarpsCompleted ( ) const
Here is the call graph for this function:

◆ assignWarpToSM()

void MicroGPU::assignWarpToSM ( int  smId,
const Warp warp 
)
Here is the call graph for this function:

◆ createGlobalWarpCollectionTest()

void MicroGPU::createGlobalWarpCollectionTest ( )
Here is the call graph for this function:

◆ executeComputeUnits()

void MicroGPU::executeComputeUnits ( )

Execute all compute units for one cycle.

◆ executeGPU()

void MicroGPU::executeGPU ( )

Execute the entire GPU until all warps are completed.

Here is the call graph for this function:

◆ getCurrentCycle()

int MicroGPU::getCurrentCycle ( ) const
inline

◆ getGlobalWarpCollectionSize()

int MicroGPU::getGlobalWarpCollectionSize ( ) const

◆ incrementCycle()

void MicroGPU::incrementCycle ( )
inline

◆ init()

void MicroGPU::init ( )

◆ performWarpScheduling()

void MicroGPU::performWarpScheduling ( )
Here is the call graph for this function:

◆ performWarpSchedulingSimple()

void MicroGPU::performWarpSchedulingSimple ( )
Here is the call graph for this function:

◆ printComputeUnitStatus()

void MicroGPU::printComputeUnitStatus ( ) const

◆ setMaxCycles()

void MicroGPU::setMaxCycles ( int  cycles)
inline

Member Data Documentation

◆ computeUnit

std::array<ComputeUnit, CU_COUNT> MicroGPU::computeUnit
private

◆ currentCycle

int MicroGPU::currentCycle
private

◆ globalWarpCollection

std::vector<Warp> MicroGPU::globalWarpCollection
private

◆ maxCycles

int MicroGPU::maxCycles
private

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