Is it possible to individually chose the language in which blocks are generated for a Simulink model

1 次查看(过去 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.

回答(1 个)

Asim
Asim 2023-9-30
I understand that in your Simulink model, you want some of your blocks to generate code in C++ while the other blocks to generate code in CUDA. Unfortunately, Simulink does not support generating code in different languages for different blocks within the same model.
The code generation process in Simulink is typically language-agnostic at the block level. Code generation is limited to generating code for the entire model in a single language, and this language is determined by the configuration parameters set for the model.
I hope this information helped in clarifying your query.
Thanks,
Asim Asrar

类别

Help CenterFile Exchange 中查找有关 Simulink Functions 的更多信息

标签

产品


版本

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by