Is it possible to individually chose the language in which blocks are generated for a Simulink model
2 次查看(过去 30 天)
显示 更早的评论
I have a simulink model with bunch of blocks I want to autocode this system but want to control the language of the source code. For example suppose I have 2 blocks A and B. I want to auto-code in such a way that Block A gets autocoded in C++ and block B gets auto coded in CUDA. Is this functionality supported.
The reason I am trying to do this is I have a model with with some custom blocks that need to be auto coded into CUDA code but this model also has a Nvidia TCP block that is also getting auto-coded into CUDA rather than C++ code. This behaviour is completely breaking my autocode. So if there is a fix to this problem that would be great.
0 个评论
回答(1 个)
prabhat kumar sharma
2025-1-23
Hello Ishan,
I understand that you're looking to generate C++ code for some blocks and CUDA code for others within the same Simulink model. Unfortunately, Simulink doesn't support generating code in multiple languages for different blocks within a single model. Code generation in Simulink is generally language-agnostic at the block level, meaning that the entire model's code is generated in a single language, as specified by the model's configuration settings.
I hope this clarifies your question.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 6DOF 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!