Why is there an inefficient loop generated in the initialization function of generated code in Real-Time Workshop 6.0 (R14)?

In generated code, a block's DWork vectors are usually set to zero in the initialization function. The set to zero operations are always done using a for loop even if the widths of the DWork vectors are less than the specified roll threshold.

 채택된 답변

This has been fixed in Real-Time Workshop 6.1 (R14SP1). In Real-Time Workshop 6.1 (R14SP1), the loop is only used when the width of the DWork vector is not less than roll threshold. If you are using a previous version, read the following:
This has been verified as a bug in Real-Time Workshop 6.0 (R14) in the way that it handles generating initialization function code.
There are currently no known workarounds.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Simulink Coder에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by