mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-01-24 13:58:00 -05:00
Documentation describing the Low Power control algorithm and synchronization with the system using dedicated sentinels and drivers.
40 lines
810 B
Plaintext
40 lines
810 B
Plaintext
@startuml
|
|
start
|
|
|
|
if (cpuLoad > frequencyShiftUpperThreshold) then (yes)
|
|
: aboveThresholdCounter++
|
|
belowThresholdCounter = 0;
|
|
else (no)
|
|
if (cpuLoad < frequencyShiftLowerThreshold) then (yes)
|
|
: belowThresholdCounter++
|
|
aboveThresholdCounter = 0;
|
|
else (no)
|
|
: belowThresholdCounter = 0
|
|
aboveThresholdCounter = 0;
|
|
endif
|
|
endif
|
|
|
|
if (
|
|
aboveThresholdCounter >= maxAboveThresholdCount
|
|
or
|
|
minFrequencyRequested > currentCpuFrequency
|
|
) then (yes)
|
|
: IncreaseCpuFrequency()
|
|
|
|
belowThresholdCounter = 0
|
|
aboveThresholdCounter = 0;
|
|
else (no)
|
|
if (
|
|
belowThresholdCounter >= maxBelowThresholdCount
|
|
and
|
|
currentCpuFreq > minFrequencyRequested
|
|
) then (yes)
|
|
: DecreaseCpuFrequency()
|
|
|
|
belowThresholdCounter = 0
|
|
aboveThresholdCounter = 0;
|
|
endif
|
|
endif
|
|
|
|
stop
|
|
@enduml |