- \State Initialize the variable $\Dist=0$
- \State Set dynamic and static power values.
- \State Set $\Pstates$ to the number of available frequencies.
- \State Set the variable $\Fnew$ to max. frequency, $\Fnew = \Fmax $
- \State Set the variable $\Fdiff$ to the difference between two successive
- frequencies.
- \For {$j := 1$ to $\Pstates $}
- \State $\Fnew = \Fnew - \Fdiff $
- \State $S = \frac{\Fmax}{\Fnew}$
- \State $S_i = S \cdot \frac{T_1}{T_i}
- = \frac{\Fmax}{\Fnew} \cdot \frac{T_1}{T_i}$
- for $i=1,\dots,N$
- \State $\Enorm =
- \frac{\Pdyn \cdot S_1^{-2} \cdot
+ \Require ~
+ \begin{description}
+ \item[$\Pstatic$] static power value
+ \item[$\Pdyn$] dynamic power value
+ \item[$\Pstates$] number of available frequencies
+ \item[$\Fmax$] maximum frequency
+ \item[$\Fdiff$] difference between two successive freq.
+ \end{description}
+ \Ensure $\Sopt$ is the optimal scaling factor
+
+ \State $\Sopt \gets 1$
+ \State $\Dist \gets 0$
+ \State $\Fnew \gets \Fmax$
+ \For {$j = 2$ to $\Pstates$}
+ \State $\Fnew \gets \Fnew - \Fdiff$
+ \State $S \gets \Fmax / \Fnew$
+ \State $\Enorm \gets
+ \frac{\Pdyn \cdot S^{-2} \cdot