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개)

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

카테고리

Help CenterFile Exchange에서 Simulink Coder에 대해 자세히 알아보기

태그

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by