The PowerDomain groups PowerState objects together to regulate their power states.
gem5::PowerDomain::PowerDomainStats stats
void setFollowerPowerStates()
Update the followers of the newly updated power state.
bool isPossiblePwrState(enums::PwrState p_state)
Check if a given p_state is available across all leaders and followers in this domain.
enums::PwrState leaderTargetState
Power state requested by the leader.
void addFollower(PowerState *pwr_obj) override
Function called by a follower to register itself as a dependant of this power domain.
std::vector< PowerState * > leaders
List of all leaders in the PowerDomain.
PowerDomain(const PowerDomainParams &p)
void pwrStateChangeCallback(enums::PwrState new_pwr_state, PowerState *leader)
Register the change in power state in one of the leader.
std::vector< PowerState * > followers
List of all followers in the PowerDomain.
void calculatePossiblePwrStates()
Calculate the possible power states of the domain based upon the intersection of the power states of ...
statistics::Scalar numLeaderCallsChangingState
enums::PwrState calculatePowerDomainState(const std::vector< enums::PwrState > &f_states={})
Calculate the power state of the power domain, based upon the power states of the leaders.
EventWrapper< PowerDomain, &PowerDomain::setFollowerPowerStates > pwrStateUpdateEvent
Event to update the power states of the followers.
PowerDomainStats(PowerDomain &pd)
void startup() override
During startup, the list of possible power states the PowerDomain can be in is populated,...
const Tick updateLatency
Latency with which power state changes of the leaders will ripple through to the followers.
statistics::Scalar numLeaderCalls
void regStats() override
Callback to set stat parameters.