# Coverage Fulfillment Automation in Hardware Functional Verification Using Genetic Algorithms
## 4 Results
### Coverage Collector for Ambiental Controller  
The DUT which implements the Ambiental controller functionality receives input values from humidity, light, and temperature sensors. Based on the received values, the design controls several actuators which are common in a smart house environment (A/C, dehumidifier, blinds). The signal for which the coverage is measured is used to supply the DUT with the values from the luminosity sensor. The legal luminosity values are constrained between 0 and 900 lumens/squared meter. As in the previously described cases, the values range is split into 15 or 20 intervals. The current design reuses the approaches developed for the smart lamp controller. The main difference between the two approaches is that in the case of the Ambiental controller, although the signal is 10 bits wide, the values from 901... 1023 are illegal. As can be observed in Table 7, only the v3.2 and v3.3 genetic algorithm approaches were tested for the current DUT, as these versions performed best in the case of the smart lamp controller. Considering the results in Table 7, v3.3 again obtained the best results in terms of coverage fulfillment. Although for v3.2 a trial with 200 parents per generation was run, when the values range was split into 20 intervals the 100% coverage value was not reached. However, as expected, having multiple individuals per generation was beneficial, as the coverage value increased from 90 to 95. As can be seen in Table 7, the approaches based on genetic algorithms outperformed random simulations depicting constrained-random verification. In the case of random simulations, even if 400 sequences of stimuli were \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Citierion** & \multicolumn{5}{c}{**15 Intervals**} & \multicolumn{5}{c}{**20 Intervals**} & \multirow{2}{*}{**v3.2**} \\  & **v3.2** & & & **Random** & & **Stimuli2** \\ \hline maximum reached coverage [\%] & 100 & 100 & 93.3 & 90 & 95 & 100 & 85 \\ \hline Parents/generation & 20 & 20 & 400 & 20 & 200 & 20 & 400 \\ \hline first iteration containing a dataset & \multirow{2}{*}{12} & \multirow{2}{*}{9} & \multirow{2}{*}{1} & \multirow{2}{*}{13} & \multirow{2}{*}{3} & \multirow{2}{*}{29} & \multirow{2}{*}{1} \\ which leads to maximum coverage & & & & & & & \\ \hline first generation when at least & \multirow{2}{*}{23} & \multirow{2}{*}{14} & \multirow{2}{*}{n/a} & \multirow{2}{*}{n/a} & \multirow{2}{*}{n/a} & \multirow{2}{*}{35} & \multirow{2}{*}{n/a} \\ n\_pop\({}^{\text{*}}\)/2 elements having & & & & & & & \\ maximum coverage were obtained & & & & & & & \\ \hline number of stimulus sets achieving & \multirow{2}{*}{10 1  & 128 1 & 15 & 1 & 2 & 30 1  & \multicolumn{1}{c}{} \\ \hline \hline \end{tabular}
\end{table} 
Table 7: Results obtained when the Ambiental controller was stimulated with values provided by programs based on genetic algorithms. Figure 8: Two examples for evolution of a population of 20 individuals across 40 generations during the v3.3 approach: (**a**) represents the visual description of the numerical data inTable 6; (**b**) represents the visual description of another result of the same v3.3 approach. transmitted to the DUT, none of them reached the maximum coverage level achieved by genetic algorithm-based approaches. v3.3 even succeeded in reaching a 100% coverage target when the value of the result was split into 20 intervals; this means that each stimulus in the 20 element sequence reached a different interval of values. In Figure 9, it can be seen that the evolution of the best-performing approach was v3.3 when values were grouped in 20 intervals. After obtaining the first stimulus set with 100% coverage, there were many generations when no other winning sequence was found. However, by increasing mutation coverage more and more, similar data sets began to appear. Furthermore, in Figure 9 the orange dots show a close-to-ideal evolution process. Even in the situations where the coverage level does not increase, more and more sets of stimuli which achieve the maximum meet the coverage level.