Using lax_codegen with enable dynamic memory allocation

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Using lax_codegen with enable dynamic memory allocation

ソリューションへジャンプ
160件の閲覧回数
OPSofiane
Contributor II

Hello to the mbd community

I am currently exploring the NXP_MBDToolbox_LAX. The code generated by lax_codegen is based on static allocation. I'd like to manage large vectors, how do I enable dynamic memory allocation with LAX_CODEGEN?

Thank you in advance.

Best regards,

OPSofiane

0 件の賞賛
1 解決策
123件の閲覧回数
paulvlase
NXP Employee
NXP Employee

Hello @OPSofiane ,

 

All vectors/matrices in the LAX graph are statically allocated. It would be difficult, maybe impossible, to implement dynamic allocation from the MATLAB code. Could you tell as the approximate size of your vectors?

If your algorithm allows you can execute multiple times the LAX graph on chunks of your vectors. Another option, not supported in our toolbox but it is in the Radar SDK, is to use DMA inside the LAX graph to transfer chunks of matrices/vector and process them. Check my answer also to your previous question posted here:https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/SER45-LAX-memory/m-p/1878230#M9150

 

Regards,

Paul

元の投稿で解決策を見る

0 件の賞賛
2 返答(返信)
105件の閲覧回数
OPSofiane
Contributor II

Hello @paul,

Here is an example of multiplication of two matrices: A(9216x600) and B(600 X1024). the block matrix multiplication can be a solution however I need to reduce the time transfere to and from Lax. Regarding DMA, I need an example to understand and follow its application.

Best regards,

@OPSofiane

0 件の賞賛
124件の閲覧回数
paulvlase
NXP Employee
NXP Employee

Hello @OPSofiane ,

 

All vectors/matrices in the LAX graph are statically allocated. It would be difficult, maybe impossible, to implement dynamic allocation from the MATLAB code. Could you tell as the approximate size of your vectors?

If your algorithm allows you can execute multiple times the LAX graph on chunks of your vectors. Another option, not supported in our toolbox but it is in the Radar SDK, is to use DMA inside the LAX graph to transfer chunks of matrices/vector and process them. Check my answer also to your previous question posted here:https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/SER45-LAX-memory/m-p/1878230#M9150

 

Regards,

Paul

0 件の賞賛