Porting Autogenerated C code from Deep learning toolbox to embedded environment

71 ビュー (過去 30 日間)
Nitin Skandan
Nitin Skandan 2025 年 2 月 3 日 19:26
移動済み: Walter Roberson 2025 年 2 月 6 日 17:36
In ANN Auto C code all matrices are appearing as Static const variables which means that they will be RAM. These variables need to be in FLASH and always read from FLASH due to limitations in RAM size. How is it possible to customise the autocode from Matlab scripts to achieve this ?
Are there are any code generation configuration which allows us to achieve this ?
Please note that I am using MATLAB coder and M-scripts (not SIMULINK)
  1 件のコメント
Walter Roberson
Walter Roberson 2025 年 2 月 3 日 19:59
Huh, I would have thought that static const variables would be the most likely to be kept in FLASH.

サインインしてコメントする。

採用された回答

Ram Kokku
Ram Kokku 2025 年 2 月 6 日 14:36
移動済み: Walter Roberson 2025 年 2 月 6 日 17:36
@Nitin Skandan, mapping constants to hardware depends on the backend C/C++ compiler. MATLAB Coder allows customization of deep learning constant generation using the config option LargeConstantGeneration ( https://www.mathworks.com/help/coder/ref/coder.codeconfig.html ). If this does not meet your requirements, please provide an example code snippet that describes your requirements.
  1 件のコメント
Nitin Skandan
Nitin Skandan 2025 年 2 月 6 日 14:49
移動済み: Walter Roberson 2025 年 2 月 6 日 17:36
Will try with LargeConstantGeneration options. But looks like this will help us seggregate the weights from the C Source files .

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDeep Learning with GPU Coder についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by