Análisis de Bug Finder en Simulink
Utilice Polyspace® desde el editor de Simulink o desde la ventana de comandos de MATLAB® para identificar bugs potenciales, errores en tiempo de ejecución e infracciones de los estándares de codificación en el modelo de Simulink. Utilice Polyspace en dos pasos distintos del proceso de verificación y validación.
Antes de generar código, detecte y aborde los problemas que el código personalizado del modelo pueda introducir. Analice el código personalizado en el bloque C function, el bloque C caller y el bloque S function. Consulte Run Polyspace Analysis on Custom Code in Simulink Models.
Después de generar código, analice el código generado para detectar problemas específicos del código que podrían no haberse detectado en el modelo, como errores derivados de partes no probadas del modelo o de opciones incorrectas de generación de código. Consulte Run Polyspace Analysis on Code Generated with Embedded Coder.
Después de integrar Polyspace y MATLAB, puede ejecutar un análisis de Polyspace directamente desde el editor de Simulink o utilizar scripts de MATLAB para automatizar un análisis de Polyspace. Consulte Integrate Polyspace with MATLAB and Simulink y Run Polyspace Analysis by Using MATLAB Scripts. De forma alternativa, genere archivos de opciones a partir de modelos de Simulink y utilice estos archivos de opciones para ejecutar un análisis de Polyspace en el código generado en la línea de comandos del sistema. Consulte Run Polyspace Analysis on Generated Code by Using Packaged Options Files.
Funciones
polyspacesetup | Integrate Polyspace installation with Simulink |
pslinkrunCrossRelease | 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 (Desde R2021a) |
pslinkoptions | Create an options object to customize Polyspace analysis of generated code or custom code in Simulink model |
pslinkrun | Run Polyspace analysis on model, system, or S-Function |
pslinkfun | Manage model analysis at the command line |
polyspacePackNGo | Generate and package options files to run Polyspace analysis on code generated from Simulink model |
polyspaceArtifact | Generate artifacts to run Polyspace analysis on code generated from Simulink model (Desde R2024a) |
Clases
polyspace.ModelLinkOptions | Create a project configuration object for running Polyspace analysis on generated code |
Propiedades
pslinkoptions Properties | Properties for the pslinkoptions object |
polyspace.ModelLinkOptions Properties | Customize Polyspace analysis of generated code with options object properties |
Ajustes de modelos
Temas
Configuración
- Integrate Polyspace with MATLAB and Simulink
Integrate Polyspace with MATLAB and Simulink to identify potential bugs, run-time errors, and coding standard violations in your model and code. - Polyspace Support of MATLAB and Simulink from Different Releases
Check how Polyspace supports your release of MATLAB or Simulink. - Fix Issues When Integrating Polyspace with MATLAB and Simulink
Troubleshoot why Polyspace fails to integrate with MATLAB and Simulink.
Analizar código generado
- Run Polyspace Analysis on Code Generated with Embedded Coder
Check code generated with Embedded Coder® for bugs, run-time errors or coding rule violations.
- Benefits of Using Polyspace Static Analysis Tools with Generated Code
Learn how Polyspace can make verifying C/C++ code generated by Embedded Coder and MATLAB Coder easier and more precise. - Address Polyspace Results by Annotating Simulink Blocks
Justify Polyspace results by directly annotating blocks in your Simulink model. - Run Polyspace on Code Generated by Using Previous Releases of Simulink
Analyze C/C++ code generated by using previous releases of Simulink with newer releases of Polyspace. - Run Polyspace Analysis on Code Generated with TargetLink
Check code generated from Simulink models for bugs, run-time errors or coding rule violations. - 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 (Simulink)
Tutorial showing Polyspace analysis of standalone generated code by using packaged options files in a distributed workflow.
Analizar código personalizado
- Run Polyspace Analysis on Custom Code in Simulink Models
Analyze manually written C/C++ code to detect issues that might introduce run-time errors or bugs in the simulation. - Run Polyspace Analysis on S-Function Code
Tutorial showing Polyspace analysis of S-function code from within Simulink. - Run Polyspace Analysis on Custom Code in C Caller Blocks and Stateflow Charts
Tutorial showing Polyspace analysis of custom code in Simulink model. - Run Polyspace Analysis on Custom Code in C Function Block
Tutorial showing Polyspace analysis of custom code in C Function block in Simulink.
Configuración avanzada
- Recommended Model Configuration Parameters for Polyspace Analysis
For better Polyspace results, set the recommended parameters before generating code. - Configure Polyspace Options in Simulink
Configure advanced Polyspace analysis options such as code metric calculations or compiler options. - Reduce Polyspace Analysis Time by Ignoring Specific Referenced Models
Ignore specific model in the reference hierarchy to decrease the time required for a Polyspace analysis.
Cómo se analiza el código generado
- How Polyspace Analysis of Generated Code Works
Polyspace extracts function names from generated code to create amain
function for the analysis. - Default Polyspace Configuration for Analyzing Code Generated by Embedded Coder
Learn the options that Polyspace sets by default when analyzing code generated by Embedded Coder.
- Polyspace Bug Finder Defects Checkers Enabled by Default for Generated Code
Look up list of Bug Finder checkers that are enabled by default when analyzing generated code. - Default Polyspace Options for Code Generated with TargetLink
Some Polyspace options such as macro definitions and paths to include folders are set by default.