# CPU-GPU-Memory DVFS for Power-Efficient MPSoC in Mobile Cyber Physical Systems
## 5 Proposed Methodology: CGM-DVFS
### Steps in Detail: Profiling, Fetch Desired Config and Set Desired DVFS  
In the profiling step, we utilise the concept of clustering performance for a range of DVFS, as introduced in [7], in which [PERSON] et al. proposed that for a group of DVFS values for the same processing element the performance outcome remains similar. For example, for \(App_{i}\) a set of consecutive DVFS values could lead to more or less the same performance output \(Prf_{i}\) and hence, instead of selecting each of these DVFS values during the design space exploration (Profiling), only one representative DVFS value from the set is selected and then profiled only for that value. In this way, the agent can reduce the number of configurations that it has to profile. For our experimental device, Odroid XU4, we chose the following DVFS configurations: four DVFS levels for big CPUs (2 GHz, 1.4 GHz, 0.8 GHz, 0.2 GHz); four DVFS levels for LITTLE CPUs (1.4 GHz, 1 GHz, 0.8 GHz, 0.2 GHz); three DVFS levels for GPUs (600 MHz, 420 MHz, 177 MHz) and three DVFS levels for memory (825 MHz, 413 MHz, 138 MHz). In [7], the equation for the combined design point (CDP) is provided for an MPSoC where DVFS capability is only considered in big CPUs, LITTLE CPUs and GPUs. Since, in this paper, we also consider DVFS in the memory, the equation for CDP is modified to incorporate the operating frequency levels of memory as well and is represented in Equation (1). In Equation (1), \(n_{b}\) and \(n_{L}\) represent the number of big CPUs and LITTLE CPUs respectively, whereas, \(f_{b}\), \(f_{L}\), \(f_{CPU}\), \(f_{mem}\) represent the number of operating frequency levels for big CPUs, LITTLE CPUs, GPUs and memory, respectively.  
\[\begin{split} CDP=\{((n_{b}\times f_{b})+(n_{L}\times f_{L}))+(n_ {b}\times f_{b}\\ \times n_{L}\times f_{L})\}\times f_{CPU}\times f_{mem}\end{split} \tag{1}\]  
Figure 3: Block diagram illustrating the CGM-DVFS methodology.  
Since, in our chosen platform and methodology, DVFS in big and LITTLE CPUs is performed cluster-wise, the total number of reduced CDPs for the aforementioned configuration, as per Equation (1), is 216 (\(\left\{\left(\left(1\times 4\right)+\left(1\times 4\right)\right)+\left(1 \times 4\times 1\times 4\right)\right\}\times 3\times 3\right)\). The agent starts the profiling process by selecting the maximum DVFS level for big CPUs, LITTLE CPUs, GPUs and memory; records the performance output, temperature and power consumption for that configuration and then selects the next-lowest DVFS level in the configuration to record the same. The agent uses a waterfall method in which the DVFS levels are selected from high to low on big CPUs first, then on the LITTLE CPUs, then on the GPUs and then on the memory. Based on our empirical data, we noticed that to profile accurately it is best to profile each of the reduced CDPs every 100 milliseconds for 1 s and hence the total number of profiling points become 2160 (\(216\times 10\)). Once all the 2160 profiling points are traversed and configurations are recorded and stored on the disk memory, these configurations will be used (as in the \"Fetch desired config\" and \"Set desired DVFS\" steps) by the agent to find \(Prf_{desired}\), in which the system consumes the least amount of power (\(P_{least}\)) and set the DVFS values accordingly.