## 4 Evaluation  
We select two TinyML cases to evaluate the MAIL framework, consisting of fundamental FC and CNN computations. The first case is a speech recognition application using the TinyConv model architecture [28]. It consists of one CNN and one FC layer and outputs the classification result using a spectrogram. The second case is a gesture recognition (Gesture) model using a 3-axis accelerometer [29]. The detailed structure of each model is illustrated in Figure 6. The max pooling operation is used only in the second Gesture model in Figure 6b. It consists of two pairs of CNN and FC layers and includes a maxpooling layer. The two workloads used in the evaluation are representative case models used in TFLM. These neural network models were selected as evaluation workloads because they are considered representative cases of TinyML. We performed int8 linear quantization to deploy the model on MCU and simplify the MA RTL computation. In addition, all activations use int16 format. We deployed the model to STM32F407 (Cortex-M4, 128 kB SRAM/1 MB Flash) for MAIL and physical MCU comparison. The STM32F407 board uses the STM32F407 VGT6 MCU. The MCU is designed based on the Arm Cortex-M4 (CM4), which is a mid-performance Cortex lineup between the CM0 and CM7. We selected the CM4 as the target for evaluation because it can achieve a balance between performance and power efficiency, making it suitable for embedded systems. The STM32F407 clock  
Figure 5: MA peripheral and DMA controller model interaction in MAIL. The DMA controller model is generated as a testbench to instantiate the MA RTL. configuration was chosen to be 168 MHz and used for latency normalization. We utilized a Cadence NCVerilog as the RTL simulator within MAIL for the experiment. The TinyML inference time includes not only the FC and CNN layers, but also the pooling and softmax operations. Table 1 compared the proportions of the CNN, FC operation and the remaining operations in the evaluation cases. The results of the elapsed time ratio of the part excluding the FC, CNN in two cases are under 1% and 6.7%, respectively. The proportion of calculations other than CNN and FC in the entire TinyML process can be negligible. Therefore, when we compared the acceleration result using MA in the MAIL framework with the existing TinyML inference library, we only compared the CNN and FC calculation parts. Figure 7 compares the cycle latency result obtained from TinyML software executed by baremetal, existing inference library and MAIL by replacing MA within neural computation. The inference library used to run TinyML is X-Cube-AI [30], which is inference library for 32 bits STMicro MCUs, and TFLM [6]. In order to insert MA, we have to decompose the atomic neural calculations of the internal source code, we inserted the MA register enable code into the CNN and FC parts in baremetal instead of the existing libraries. The graphs in Figure 7 plot the cycle latency for each CNN, FC layer for the two cases. DMAC Req. Clock Timing, Memory Read Clock, Memory Write Clock are selected at 5, 3, 3 clock. conv2d, fc denote a CNN, FC layers within the first application, conv2d1, conv2d2, fc1, fc2 denote a pair of CNN, FC layers within the second application. If the MA is inserted in the CNN layer, it replaces the convolution of the single-channel input and the filter, and if it is inserted in the FC layer, it replaces the input vector and weight matrix multiplication. \begin{table}
\begin{tabular}{c c c c} \hline \hline \multirow{2}{*}{**Model**} & \multicolumn{2}{c}{**Speech Recognition**} & \multicolumn{2}{c}{**Gesture Recognition**} \\ \cline{2-4}  & **Elapsed Time (\(\mu\)s)** & **Ratio (\%)** & **Elapsed Time (\(\mu\)s)** & **Ratio (\%)** \\ \hline conv2d & 23,049 & & 4882 & \\ fc & 302 & & 91 & \\ \hline pooling & - & \(<\)1 & 336 & \\ non-linear & 22 & & 23 & \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Executed TinyML models on STM32F407 device using TFLM and measured elapsed time. Calculate the proportion of elapsed time for each type of neural network computation.