Clear Filters
Clear Filters

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

1 view (last 30 days)
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.

Answers (1)

Asim
Asim on 30 Sep 2023
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

Categories

Find more on Simulink Functions in Help Center and File Exchange

Tags

Products


Release

R2022a

Community Treasure Hunt

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

Start Hunting!