# Rapid and Accurate PPA Prediction for the Template-Based Processor Design Methods
## 3 PPA Prediction Method
### Parameter and Data Preprocessing  
As the proposed method aims to predict the PPA of the parameter set for template-based methods, it is critical to determine the correlation among parameters and the design space of the parameter set. In Rocket Chip, for instance, a single core is mainly dependent on the parameters of modules, including the Core, Cache, BTB, and BTB's submodule, BHT. First, only one of the parameters with correlations is selected as their representative. In this way, 27 parameters are selected as the parameter set. Second, to determine the design space of the parameter set, the value range of each parameter is designed, as shown partly in Table 1, as follows. * For a bool-type parameter, there is only one optional value, and the default value is negated, except for the original value. \begin{table}
\begin{tabular}{c c c c} \hline \hline \multirow{2}{*}{**Method**} & \multirow{2}{*}{**Accuracy (\%) on the PPA**} & \multicolumn{2}{c}{**Number of the Samples Needed to**} & \multirow{2}{*}{**Parameters for Prediction**} \\  & & **Achieve the Method** & \\ \hline XGBoost & 98.23 & 400 & 3 kinds of knobs \\ NLR PPA & 98.82 = (98.60 + 99.19 + 98.68)/3 & 42 & Particular parameters in \\ estimation method & 98.82 = (98.60 + 99.19 + 98.68)/3 & 42 & HDLs codes \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The proposed method and the state of art methods for PPA prediction in HLS. * For an int-type parameter, there are two situations. For the first situation, there are two optional values except the original value of itself. Moreover, these three values form a proportional sequence with a common ratio of 2. As in the real design process, the parameters such as the size of memory are changed at a ratio of 2. Moreover, the default values will be the smallest, the middle, or the largest among these three values depending on the analysis of the existing designs in Rocket Chip. For other situations, the default values of these parameters are 0 and are still 0 in the existing designs in Rocket Chip. Then, 1 is set as another optional value of these parameters, similar to the rule for a bool-type parameter. Moreover, the proposed method requires the individual influence of each parameter on the PPA to calculate the PPA prediction. Therefore, the bold value in Table 2 is designed as the base parameter set, and each parameter is changed one at a time which are set as changed parameter sets to obtain the individual influence on PPA of each parameter. Specifically, the rules to set the values of the base parameters are that for int-type parameters with 3 optional values, the middle values are chosen, and for int-type parameters with value range, 0 and 1 values and bool-type parameters, the set value depends on the existing designs in Rocket Chip. Moreover, Table 3 shows an instance of changed sets partly. In this way, there are only 42 parameter set samples with PPA needed, and the PPA of the parameter set with the design space of 3.918 \(\times\) 1010 is predictable. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Parameter** & **Module** & **Value Range** \\ \hline mulEarlyOut & Core & **true**, false \\ divEarlyOut & Core & **true**, false \\ divSqrt & Core & **true**, false \\ nSets & Icache & 16, **32**, 64 \\ nWays & Icache & 2, **4**, 8 \\ nTLSuperpages & Icache & 2, **4**, 8 \\ nSets & Decache & 16, **32**, 64 \\ nWays & Dcache & 2, **4**, 8 \\ nTLBSets & Dcache & 1, **2**, 4 \\ nEntries & BTB & 256, **512**, 1024 \\ updatesOutOfOrder & BTB & true, **false** \\ historyLength & BTB & 1, **2**, 4 \\ counterLength & BTB & 2, **4**, 8 \\ \(\cdots\) & \(\cdots\) & \(\cdots\) \\ \hline \hline \end{tabular} The bold values are the defaults.  
\end{table} 
Table 2: The portion of parameters set with value range.