class EnergyModel

Defined at line 263 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)

Defined at line 29 of file ../../zircon/kernel/lib/power-management/energy-model.cc

zx::result<EnergyModel> Create (std::span<const ProcessorPowerLevel> levels, std::span<const ProcessorPowerLevelTransition> transitions)

Defined at line 29 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 146 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 168 of file ../../zircon/kernel/lib/power-management/energy-model.cc

void EnergyModel ()

Defined at line 268 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h

void EnergyModel (const EnergyModel & )

Defined at line 269 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h

void EnergyModel (EnergyModel && )

Defined at line 270 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 279 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 283 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 288 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 298 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 306 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 314 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 320 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 326 of file ../../zircon/kernel/lib/power-management/include/lib/power-management/energy-model.h