11#include "../warp/warp.hh"
75 void printId()
const { std::cout <<
"(ComputeUnit) ComputeUnit ID: " <<
smId << std::endl; }
Represents a GPU compute unitThe ComputeUnit class encapsulates the state and behavior of a GPU compu...
Definition computeUnit.hh:37
void calculateNextWarpId()
Method to calculate the next warp ID to execute based on round-robin scheduling.
Definition computeUnit.cc:61
void incrementCycle()
Definition computeUnit.hh:62
SMState state
Definition computeUnit.hh:50
int getWarpCollectionSize() const
Definition computeUnit.cc:20
void setState(SMState newState)
Definition computeUnit.cc:3
void execute()
Execute the current warp and advance its pipeline stage. Called once per cycle.
Definition computeUnit.cc:24
void setCurrentWarpId(int warpId)
Definition computeUnit.cc:7
void printId() const
Definition computeUnit.hh:75
int getCurrentWarpId()
Definition computeUnit.cc:13
SMState getState() const
Definition computeUnit.cc:16
void setSmId(int id)
Definition computeUnit.hh:59
std::vector< Warp > warps
Definition computeUnit.hh:38
int getCurrentCycle() const
Definition computeUnit.hh:71
void setWarp(const Warp &warp)
Definition computeUnit.cc:10
int smId
Definition computeUnit.hh:41
int getSmId() const
Definition computeUnit.hh:72
ComputeUnit()
Definition computeUnit.hh:53
size_t currentWarpId
Definition computeUnit.hh:44
int currentCycle
Definition computeUnit.hh:47
Represents a GPU warpThe Warp class encapsulates the state and behavior of a GPU warp,...
Definition warp.hh:77
SMState
Definition computeUnit.hh:13
@ ERROR
Definition computeUnit.hh:16
@ BUSY
Definition computeUnit.hh:15
@ IDLE
Definition computeUnit.hh:14