# Flexible Convolver for Convolutional Neural Networks Deployment onto Hardware-Oriented Applications
## 3 Results
\begin{table}
\begin{tabular}{c c c c c c c c c c c c c c c c c c} \hline \hline  & \multicolumn{6}{c}{**Alexnet**} & \multicolumn{6}{c}{**VGG16**} & \multicolumn{6}{c}{**Darknet19**} \\ \hline \# & \multirow{2}{*}{\(M_{in}\times N_{in}\)} & \multirow{2}{*}{\(CH\)} & \multirow{2}{*}{\(K\)} & \multirow{2}{*}{\(w\)} & \multirow{2}{*}{\(S\)} & \multirow{2}{*}{\(P\)} & \multirow{2}{*}{\(M_{in}\times N_{in}\)} \begin{table}
\begin{tabular}{c c c c} \hline \hline
**CNN Model** & **Config** & \
\begin{tabular}{c} **Processing Time** \\ **(Calculated)** \\ \end{tabular} &
\begin{tabular}{c} **Processing Time** \\ **(Hardware)** \\ \end{tabular} \\ \hline CNN1 & \(1/\)Overall & 245.6 us & 245.6 us \\ \hline \multirow{3}{*}{CNN2} & 1 & 82.14 us & 100.26 us \\ \cline{2-4}  & 2 & 59.32 us & 61.57 us \\ \cline{2-4}  & Overall & 141.46 us & 161.83 us \\ \hline \multirow{3}{*}{CNN3} & 1 & 109.98 us & 134.49 us \\ \cline{2-4}  & 2 & 88.30 us & 91.69 us \\ \cline{2-4}  & 3 & 35.45 us & 35.57 us \\ \cline{2-4}  & Overall & 233.73 us & 261.75 us \\ \hline \multirow{3}{*}{Modified} & 1 & 1.73 ms & 1.73 ms \\ \cline{2-4}  & 2 & 10.54 ms & 10.54 ms \\ \cline{2-4}  & 3 & 8.72 ms & 8.73 ms \\ \cline{2-4}  & 4 & 13.09 ms & 13.09 ms \\ \cline{2-4}  & 5 & 8.72 ms & 8.72 ms \\ \cline{2-4}  & Overall & 42.80 ms & 42.81 ms \\ \hline \multirow{3}{*}{Alexnet} & 1 & 22.96 ms & 23.05 ms \\ \cline{2-4}  & 2 & 155.04 ms & 155.07 ms \\ \cline{2-4}  & 3 & 99.16 ms & 99.17 ms \\ \cline{2-4}  & 4 & 99.16 ms & 99.17 ms \\ \cline{2-4}  & 5 & 66.11 ms & 66.12 ms \\ \cline{2-4}  & Overall & 442.44 ms & 442.58 ms \\ \hline \multirow{3}{*}{VGG16} & 1 & 55.06 ms & 56.57 ms \\ \cline{2-4}  & 2 & 1174.45 ms & 1175.97 ms \\ \cline{2-4}  & 3 & 587.27 ms & 587.66 ms \\ \cline{2-4}  & 4 & 1174.55 ms & 1174.93 ms \\ \cline{2-4}  & 5 & 587.49 ms & 587.58 ms \\ \cline{2-4}  & 6 & 1174.98 ms & 1175.08 ms \\ \cline{2-4}  & 7 & 588.35 ms & 588.37 ms \\ \cline{2-4}  & 8 & 1176.70 ms & 1176.73 ms \\ \cline{2-4}  & 9 & 295.89 ms & 295.90 ms \\ \cline{2-4}  & Overall & 9.75 s & 9.76 s \\ \hline \multirow{3}{*}{Darknet19} & 1 & 27.53 ms & 29.05 ms \\ \cline{2-4}  & 2 & 146.82 ms & 147.20 ms \\ \cline{2-4}  & 3 & 146.88 ms & 146.97 ms \\ \cline{2-4}  & 4 & 110.17 ms & 110.26 ms \\ \cline{2-4}  & 5 & 147.09 ms & 147.11 ms \\ \cline{2-4}  & 6 & 110.39 ms & 110.41 ms \\ \cline{2-4}  & 7 & 147.95 ms & 147.95 ms \\ \cline{2-4}  & 8 & 111.25 ms & 111.25 ms \\ \cline{2-4}  & 9 & 151.39 ms & 151.39 ms \\ \cline{2-4}  & 10 & 114.69 ms & 114.69 ms \\ \cline{2-4}  & 11 & 225.79 ms & 225.79 ms \\ \cline{2-4}  & Overall & 2.62 s & 2.89 s \\ \hline \end{tabular}
\end{table} 
Table 2: Processing time calculated from Equations (5) and (6) and obtained in hardware processing for different state-of-the-art CNN convolution layers. The amount of memory used by varying \(n_{fo}\) and \(n_{fi}\) are the register number hosted within the \(n_{fi}\) line buffers if the device is large enough to leverage intra-output parallelism, where it is established that it is necessary to use a line buffer for each parallel processed feature map, where the amount of memory used in a convolver (quantified in FFDs) can be estimated by:  
\[Mem_{PLB}=nf_{i}\times(N_{in}^{(d)}\times(w^{(j)}-1)+w^{(j)}), \tag{7}\]  
where \(j\) represents the convolution layer that contains the largest filter size and a \(d\) layer that receives the feature maps with the largest number of rows/columns, which is usually the first layer. The memory usage in the SA depends on its dimensions. The number of columns is related to \(n_{fo}\), which is selected based on the common divisors (powers of 2) of the typical numbers of filters. Since the number of multipliers in the device used is 112, the number of columns in the SA was set to 16, so \(nv\) must be equal to 7, adjusting the architecture to the device capabilities. Each PE contains three FFDs, resulting in 336 FFDs within the SA (\(Mem_{SA}\)).