39 #ifndef __SIM_POWER_DOMAIN_HH__ 40 #define __SIM_POWER_DOMAIN_HH__ 46 #include "params/PowerDomain.hh" 166 #endif // __SIM_POWER_DOMAIN_HH__
PowerDomain(const PowerDomainParams *p)
std::vector< PowerState * > leaders
List of all leaders in the PowerDomain.
EventWrapper< PowerDomain, &PowerDomain::setFollowerPowerStates > pwrStateUpdateEvent
Event to update the power states of the followers.
std::vector< PowerState * > followers
List of all followers in the PowerDomain.
Helper class for objects that have power states.
Declaration of Statistics objects.
This is a simple scalar statistic, like a counter.
void addFollower(PowerState *pwr_obj) override
Function called by a follower to register itself as a dependant of this power domain.
const Tick updateLatency
Latency with which power state changes of the leaders will ripple through to the followers.
uint64_t Tick
Tick count type.
ClockedObject declaration and implementation.
void pwrStateChangeCallback(Enums::PwrState new_pwr_state, PowerState *leader)
Register the change in power state in one of the leader.
The PowerDomain groups PowerState objects together to regulate their power states.
Stats::Scalar numLeaderCallsChangingState
void calculatePossiblePwrStates()
Calculate the possible power states of the domain based upon the intersection of the power states of ...
void startup() override
During startup, the list of possible power states the PowerDomain can be in is populated, the power state of the PowerDomain is set and some assertions about the PowerState objects in the Domain are checked.
Enums::PwrState leaderTargetState
Power state requested by the leader.
bool isPossiblePwrState(Enums::PwrState p_state)
Check if a given p_state is available across all leaders and followers in this domain.
Stats::Scalar numLeaderCalls
void regStats() override
Callback to set stat parameters.
PowerState declaration and implementation.
std::vector< Info * > stats
void setFollowerPowerStates()
Update the followers of the newly updated power state.
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...
PowerDomainStats(PowerDomain &pd)