39#ifndef __SIM_POWER_DOMAIN_HH__
40#define __SIM_POWER_DOMAIN_HH__
46#include "params/PowerDomain.hh"
Wrap a member function inside MemberEventWrapper to use it as an event callback.
The PowerDomain groups PowerState objects together to regulate their power states.
PowerDomain(const PowerDomainParams &p)
std::vector< PowerState * > followers
List of all followers in the PowerDomain.
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.
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,...
void addFollower(PowerState *pwr_obj) override
Function called by a follower to register itself as a dependant of this power domain.
void pwrStateChangeCallback(enums::PwrState new_pwr_state, PowerState *leader)
Register the change in power state in one of the leader.
enums::PwrState leaderTargetState
Power state requested by the leader.
const Tick updateLatency
Latency with which power state changes of the leaders will ripple through to the followers.
gem5::PowerDomain::PowerDomainStats stats
void setFollowerPowerStates()
Update the followers of the newly updated power state.
std::vector< PowerState * > leaders
List of all leaders in the PowerDomain.
bool isPossiblePwrState(enums::PwrState p_state)
Check if a given p_state is available across all leaders and followers in this domain.
MemberEventWrapper<&PowerDomain::setFollowerPowerStates > pwrStateUpdateEvent
Event to update the power states of the followers.
Helper class for objects that have power states.
This is a simple scalar statistic, like a counter.
ClockedObject declaration and implementation.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
uint64_t Tick
Tick count type.
PowerState declaration and implementation.
Declaration of Statistics objects.
void regStats() override
Callback to set stat parameters.
statistics::Scalar numLeaderCalls
PowerDomainStats(PowerDomain &pd)
statistics::Scalar numLeaderCallsChangingState