class EnergyModel
Defined at line 312 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
forward declaration.
Public Methods
zx::result<EnergyModel> Create (std::span<const ProcessorPowerLevel>levels,std::span<const ProcessorPowerLevelTransition>transitions,uint64_tmax_processing_rate)
Defined at line 47 of file ../../zircon/kernel/lib/power-management/energy-model.cc
zx::result<EnergyModel> Create (std::span<const ProcessorPowerLevel>levels,std::span<const ProcessorPowerLevelTransition>transitions,uint64_tmax_processing_rate)
Defined at line 47 of file ../../zircon/kernel/lib/power-management/energy-model.cc
std::optional<uint8_t> FindPowerLevel (ControlInterface interface_id, uint64_t control_argument)
Defined at line 174 of file ../../zircon/kernel/lib/power-management/energy-model.cc
const PowerLevel * FindActivePowerLevelForRate (ProcessingRate processing_rate)
Returns the lowest active power level that is compatible with (i.e. has a
processing rate greater or equal to) the given processing rate. However, to
simplify power calculations, the maximum active power level is returned if
the given rate exceeds the maximum processing rate for the power domain.
Defined at line 196 of file ../../zircon/kernel/lib/power-management/energy-model.cc
void EnergyModel ()
Defined at line 318 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
void EnergyModel (const EnergyModel & )
Defined at line 319 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
void EnergyModel (EnergyModel && )
Defined at line 320 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
uint64_t max_processing_rate_scale ()
Scale used to normalize raw integer rates into fixed-point ProcessingRate.
Defined at line 323 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
ProcessingRate ToProcessingRate (uint64_t processing_rate)
Defined at line 324 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
uint64_t FromProcessingRate (ProcessingRate processing_rate)
Defined at line 327 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
std::span<const PowerLevel> levels ()
All power levels described in the model, sorted by processing power and energy consumption.
(1) The processing rate of power level i is less or equal than the processing rate of power
level j, where i
<
= j.
(2) The energy cost of power level i is less or equal than the processing rate of power level
j, where i
<
= j.
Defined at line 338 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
std::span<const PowerLevel> idle_levels ()
Following the same rules as `levels()` but returns only the set of power levels whose type is
`PowerLevel::Type::kIdle`. This set may be empty.
Defined at line 342 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
std::optional<uint8_t> max_idle_power_level ()
Returns the idle power level with the maximum power consumption.
Defined at line 347 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
std::optional<uint64_t> max_idle_power_coefficient_nw ()
Returns the power coefficient of the idle power level with the maximum power consumption. This
idle power level typically corresponds to clock gating, such that the power consumption is
almost entirely leakage power loss.
Defined at line 357 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
std::optional<ControlInterface> max_idle_power_level_interface ()
Returns the control interface of the idle power level with the maximum power consumption.
Defined at line 365 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
ProcessingRate max_processing_rate ()
Returns the processing rate of the fastest power level.
Defined at line 373 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
std::span<const PowerLevel> active_levels ()
Following the same rules as `levels()` but returns only the set of power levels whose type is
`PowerLevel::Type::kActive`. This set may be empty.
Defined at line 379 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h
TransitionMatrix transitions ()
Returns a transition matrix, where the entry
,j> represents the transition costs for
transitioning from i to j.
Defined at line 385 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h