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.

回答(1 个)

prabhat kumar sharma
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.

标签

产品


版本

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by