cancel
Showing results for 
Search instead for 
Did you mean: 

RAM/ROM measurement for AI model

visakh
Associate

Hi Team,

Memory calculations for STM32N6570 DK board.

Peak RAM & Peak Flash Estimation STM Cube IDE

  • For CPU only
    Peak RAM = .data + .bss
    Peak Flash = .text + .data
  • For CPU+NPU
    Peak RAM = (.data + .bss) of application code + (.data) of model hex
    Peak Flash = (.text + .data) of application code + (.data) of model hex

 .data of model hex needs to be added separately, as the model hex is generated and flashed separately on the STM32N6

 

From the IDE we get this bss,data,and text size

visakh_0-1780986801458.jpeg

 

Flash = text + data = 205,404 + 1,616 = 207,020 bytes ≈ 202.17 KB

RAM  = data + bss = 1,616 + 102,040 = 103,656 bytes ≈ 101.23 KB

For cpu+npu we flash the model in hex format, so we need to add the peak ram and peak flash of hex file with IDE peak ram and peak flash.

 model size - STEDGEAI 3.0

visakh_1-1780986801459.jpeg

 

Total Peak Ram and Peak Flash

  • Peak RAM = (103,656 + 22,065 =  122.77 KB)
  • Peak Flash = (207,020 + 22,065 =  223.72 KB)

Is my calculation for peak RAM and peak FLASH are correct?
could you please confirm this?

0 REPLIES 0
Announcement

We’re moving the ST Community to a new platform to give you a better and more reliable community experience.