main content

在 simulink 中进行 code prover 分析 -凯发k8网页登录

验证导入到 simulink® 模型中的代码以及从中生成的代码

使用 polyspace® 标识 simulink 模型中潜在的 bug、运行时错误以及编码标准违规。在验证和确认过程的两个不同步骤中使用 polyspace。

在生成代码之前,请检测并解决模型中的自定义代码可能引入的问题。c function 块、c caller 块和 s function 块中包含自定义代码。请参阅。

在生成代码后,分析生成的代码,找出模型中可能没有发现的特定于代码的问题,例如,由于模型的未测试部分或不正确的代码生成选项而导致的错误。请参阅。

在集成 polyspace 和 matlab® 后,您可以直接从 simulink 工具条运行 polyspace 分析,也可以使用 matlab 脚本自动执行 polyspace 分析。请参阅和。另外,还可以从 simulink 模型生成选项文件,并在系统命令行中使用这些选项文件对生成的代码运行 polyspace 分析。请参阅。

函数

integrate polyspace installation with simulink
analyze c/c code generated by r2020b or newer embedded coder versions by using a different version of polyspace that is more recent than the simulink version
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
run polyspace analysis on model, system, or s-function
manage model analysis at the command line
generate and package options files to run polyspace analysis on code generated from simulink model

create a project configuration object for running polyspace analysis on generated code

属性

properties for the pslinkoptions object
customize polyspace analysis of generated code with options object properties

模型设置

主题

设置


  • integrate polyspace with matlab and simulink to identify potential bugs, run-time errors, and coding standard violations in your model and code.

  • check how polyspace supports your release of matlab or simulink.

  • troubleshoot why polyspace fails to integrate with matlab and simulink.

分析生成的代码


  • 检查通过 embedded coder® 生成的代码是否存在 bug、运行时错误或编码违规情况。


  • justify polyspace results by directly annotating blocks in your simulink model.

  • analyze c/c code generated by using previous releases of simulink with newer releases of polyspace.

  • check code generated from simulink models for bugs, run-time errors or coding rule violations.

  • generate polyspace options files from a simulink model, and use these options files to analyze generated code by using polyspace.
  • (simulink)
    tutorial showing polyspace analysis of standalone generated code by using packaged options files in a distributed workflow.

分析自定义代码


  • analyze manually written c/c code to detect issues that might introduce run-time errors or bugs in the simulation.

  • tutorial showing polyspace analysis of s-function code from within simulink.

  • tutorial showing polyspace analysis of custom code in simulink model.

  • tutorial showing polyspace analysis of custom code in c function block in simulink.

高级配置


  • for better polyspace results, set the recommended parameters before generating code.

  • configure advanced polyspace analysis options such as code metric calculations or compiler options.

如何分析生成的代码


  • polyspace extracts function names from generated code to create a main function for the analysis.

  • some polyspace options such as macro definitions and paths to include folders are set by default.


  • some polyspace options such as macro definitions and paths to include folders are set by default.

相关信息


网站地图