测试模型组件
管理组件测试数据,在 SIL 或 PIL 仿真中执行测试套件,配置 Model Verification 模块,生成选项文件以进行 Polyspace® 分析
在模型中分析和仿真引用模型、子系统或原子子图。将子系统或引用模型提取到框架模型中,从而将其隔离以进行测试。根据您为模块指派的设定,在仿真期间监视模型中的时域信号。构造信号验证,并根据仿真输入组有选择地应用它们。生成并打包选项文件。该选项文件可用于使用 Polyspace 分析从 Simulink® 模型生成的代码。当生成代码的 Polyspace 分析与 Simulink 分开执行时,打包的选项文件非常有用。例如,在分布式工作流中,Polyspace 分析可能在没有 Simulink 的环境中执行。通过使用打包的选项文件,生成代码特定于模型的上下文会得到保留。
模块
Assertion | 检查信号是否为零 |
Check Discrete Gradient | Check that absolute value of difference between successive samples of discrete signal is less than specified value |
Check Dynamic Gap | Check that gap of possibly varying width occurs in range of signal's amplitudes |
Check Dynamic Lower Bound | Check that one signal is always less than another signal |
Check Dynamic Range | Check that signal falls inside range of amplitudes that varies from time step to time step |
Check Dynamic Upper Bound | Check that one signal is always greater than another signal |
Check Input Resolution | Check that input signal has specified resolution |
Check Static Gap | Check that gap exists in signal's range of amplitudes |
Check Static Lower Bound | Check that signal is greater than (or optionally equal to) static lower bound |
Check Static Range | Check that signal falls inside fixed range of amplitudes |
Check Static Upper Bound | Check that signal is less than (or optionally equal to) static upper bound |
函数
polyspacePackNGo | Generate and package options files to run Polyspace analysis on code generated from Simulink model (自 R2020b 起) |
polyspaceArtifact | Generate artifacts to run Polyspace analysis on code generated from Simulink model (自 R2024a 起) |
pslinkoptions | Create an options object to customize configuration of a Simulink model, generated code or a S-Function block. Use the object to specify configuration options for these Simulink objects in a Polyspace run from the MATLAB command line |
主题
- Component Verification
Strategies for verifying functional units of your model, in isolation or in a larger system.
- Run Polyspace Analysis on Generated Code by Using Packaged Options Files
Generate Polyspace options files from a Simulink model, and use these options files to analyze generated code by using Polyspace.
- Analyze Code Generated as Standalone Code in a Distributed Workflow
Tutorial showing Polyspace analysis of standalone generated code by using packaged options files in a distributed workflow.