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