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
已解决! 转到解答。
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
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,
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