Can i perform SIL test using the simulink test tool for hand written code instead of auto generated one?

4 ビュー (過去 30 日間)
I was ale to perform the SIL for matlab auto generated code. In the same way will i be able to do it for Hand written code?

回答 (1 件)

Altaïr
Altaïr 2025 年 3 月 24 日
According to the documentation, it's possible to perform SIL testing on handwritten code. More information can be found here: https://www.mathworks.com/help/releases/R2022a/sltest/generated-code-tests.html
Custom C or C++ code can be tested by importing it into Simulink using the Code Importer wizard in the Test Manager or via API commands at the MATLAB command line. This allows for unit testing of a subset of the C code or integration testing of the complete C or C++ code. Upon importing the code, the code importer:
  • Converts the C code functions to Simulink C Caller blocks and saves them in a Simulink library
  • Creates an internal harness for each Simulink C Caller block
  • Generates a test file
For unit tests, the code importer also creates a sandbox to isolate the imported functions. For examples on how to import custom C code into Simulink for unit testing, the following pages might be helpful:
These resources should provide more clarity on the process!

カテゴリ

Help Center および File ExchangeResults, Reporting, and Test File Management についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by