31 #ifndef __CPU_ACTIVITY_HH__
32 #define __CPU_ACTIVITY_HH__
56 int longest_latency,
int count);
140 #endif // __CPU_ACTIVITY_HH__
void validate()
Debug function to ensure that the activity count matches the contents of the time buffer...
TimeBuffer< bool > activityBuffer
Time buffer that tracks if any cycles has active communication in them.
bool * stageActive
Records which stages are active/inactive.
int activityCount
Tracks how many stages and cycles of time buffer have activity.
int numStages
Number of stages that can be marked as active or inactive.
const std::string & name() const
void activity()
Records that there is activity this cycle.
void reset()
Clears the time buffer and the activity count.
ActivityRecorder(const std::string &name, int num_stages, int longest_latency, int count)
int getActivityCount() const
Returns how many things are active within the recorder.
void deactivateStage(const int idx)
Deactivates a stage.
void dump()
Debug function to dump the contents of the time buffer.
int getNumStages() const
Returns the number of stages.
void activateStage(const int idx)
Marks a stage as active.
ActivityRecorder helper class that informs the CPU if it can switch over to being idle or not...
bool active()
Returns if the CPU should be active.
int longestLatency
Longest latency time buffer in the CPU.
bool getStageActive(const int idx) const
Returns the activity status of a stage.
void advance()
Advances the activity buffer, decrementing the activityCount if active communication just left the ti...
void setActivityCount(int count)
Sets the count to a starting value.