Main Content

本页的翻译已过时。点击此处可查看最新英文版本。

软件在环仿真

在开发计算机上测试生成的代码

软件在环 (SIL) 仿真在主机上编译生成的源代码并将其作为单独的进程执行。通过比较 Normal 模式仿真结果和 SIL 仿真结果,可以测试模型与生成的代码之间是否存在数值等效性。在 SIL 仿真期间,您可以为生成的代码收集代码覆盖率和执行时间指标。

App

SIL/PIL ManagerVerify generated code

主题

SIL 和 PIL 仿真

软件在环 (SIL) 和处理器在环 (PIL) 仿真概述。

Choose a SIL or PIL Approach

Test code generated from top models, referenced models, or subsystems.

Configure and Run SIL Simulation

Set up and run top-model SIL, Model block SIL, and SIL block simulations.

SIL/PIL Manager Verification Workflow

A simplified workflow for verifying generated code.

Simulation Mode Override Behavior in Model Reference Hierarchy

How the simulation mode of the top model or parent model determines the simulation behavior of a model hierarchy.

SIL and PIL Limitations

Modeling and code generation features that are not supported or partially supported by SIL and PIL simulations.

疑难解答

Debug Generated Code During SIL Simulation

Use a debugger to understand the behavior of generated code.

View SIL and PIL Files in Code Generation Report

Produce a code generation report and static code metrics that cover SIL and PIL files.

Numerical Consistency of Model and Generated Code Simulation Results

Determine whether model and generated code simulation results are numerically consistent. Investigate discrepancies.

特色示例