43#ifndef __SIM_POWER_STATE_HH__
44#define __SIM_POWER_STATE_HH__
51#include "enums/PwrState.hh"
52#include "params/PowerState.hh"
81 void set(enums::PwrState
p);
84 inline enums::PwrState
get()
const
The PowerDomain groups PowerState objects together to regulate their power states.
Helper class for objects that have power states.
virtual void addFollower(PowerState *pwr_obj)
void unserialize(CheckpointIn &cp) override
Unserialize an object.
std::set< enums::PwrState > getPossibleStates() const
Return the power states this object can be in.
enums::PwrState _currState
To keep track of the current power state.
void computeStats()
Record stats values like state residency by computing the time difference from previous update.
gem5::PowerState::PowerStateStats stats
PowerState(const PowerStateParams &p)
std::string getName() const
PARAMS(PowerState)
Parameters of PowerState object.
std::vector< double > getWeights() const
Returns the percentage residency for each power state.
std::set< enums::PwrState > possibleStates
The possible power states this object can be in.
PowerDomain * controlledDomain
The power domain that this power state leads, nullptr if it doesn't lead any.
enums::PwrState matchPwrState(enums::PwrState p)
Change the power state of this object to a power state equal to OR more performant than p.
Tick prvEvalTick
Last tick the power stats were calculated.
void setControlledDomain(PowerDomain *pwr_dom)
enums::PwrState get() const
void serialize(CheckpointOut &cp) const override
Serialize an object.
Abstract superclass for simulation objects.
A simple distribution stat.
This is a simple scalar statistic, like a counter.
A vector of scalar stats.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
std::ostream CheckpointOut
uint64_t Tick
Tick count type.
Declaration of Statistics objects.
statistics::Distribution ticksClkGated
statistics::Vector pwrStateResidencyTicks
Tracks the time spent in each of the power states.
PowerStateStats(PowerState &ps)
void regStats() override
Callback to set stat parameters.
void preDumpStats() override
Callback before stats are dumped.
statistics::Scalar numPwrMatchStateTransitions
statistics::Scalar numTransitions