|
MicroGPU 1.0
Simple functional model of a GPU for educational purposes
|
Represents a GPU warpThe Warp class encapsulates the state and behavior of a GPU warp, including its ID, program counter, threads, active mask, and current instruction. A warp is a group of threads that execute instructions in lockstep. Each warp has 32 threads in this project. To be added: reconvergence stack to handle divergent control flow. More...
#include <warp.hh>

Public Member Functions | |
| Warp () | |
| Warp (int warpId, const ThreadGroup &threadGroup, WarpState warpState=WarpState::READY, PipelineStage pipelineStage=PipelineStage::NOT_STARTED) | |
| int | getId () const |
| int | getPc () const |
| void | setPc (int pc_) |
| void | setCurrentInstruction (const Instruction &instr) |
| Instruction | getCurrentInstruction () const |
| PipelineStage | getPipelineStage () const |
| void | setPipelineStage (PipelineStage stage) |
| void | setActiveMask (const ActiveMask &mask) |
| std::string | getPipelineStageString () const |
| const ActiveMask & | getActiveMask () const |
| WarpState | getState () const |
Private Attributes | |
| int | id |
| int | pc |
| ThreadGroup | threads |
| ActiveMask | activeMask |
| Instruction | currentInstruction |
| std::vector< reconvergencePoint > | reconvergenceStack |
| WarpState | state |
| PipelineStage | pipelineStage |
Represents a GPU warp
The Warp class encapsulates the state and behavior of a GPU warp, including its ID, program counter, threads, active mask, and current instruction. A warp is a group of threads that execute instructions in lockstep. Each warp has 32 threads in this project. To be added: reconvergence stack to handle divergent control flow.
| Warp::Warp | ( | ) |
| Warp::Warp | ( | int | warpId, |
| const ThreadGroup & | threadGroup, | ||
| WarpState | warpState = WarpState::READY, |
||
| PipelineStage | pipelineStage = PipelineStage::NOT_STARTED |
||
| ) |
| const ActiveMask & Warp::getActiveMask | ( | ) | const |
| Instruction Warp::getCurrentInstruction | ( | ) | const |
| int Warp::getId | ( | ) | const |
| int Warp::getPc | ( | ) | const |
|
inline |
| std::string Warp::getPipelineStageString | ( | ) | const |
|
inline |
|
inline |
| void Warp::setCurrentInstruction | ( | const Instruction & | instr | ) |
| void Warp::setPc | ( | int | pc_ | ) |
|
inline |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |