Analyse Bug Finder dans Simulink
Utilisez Polyspace® à partir de l'éditeur Simulink ou de la fenêtre de commande MATLAB® pour identifier les bugs potentiels, les erreurs de run-time et les infractions aux normes de codage dans votre modèle Simulink. Utilisez Polyspace à deux étapes du processus de vérification et de validation.
Avant de générer du code, détectez et traitez les problèmes susceptibles d'être induits par le code personnalisé dans votre modèle. Analysez le code personnalisé dans les blocs C function, C caller et S function. Consultez Run Polyspace Analysis on Custom Code in Simulink Models.
Une fois le code généré, analysez le code généré pour détecter les problèmes spécifiques susceptibles de ne pas être détectés dans le modèle, tels que les erreurs dues à des parties non testées du modèle ou à des options de génération de code incorrectes. Consultez Run Polyspace Analysis on Code Generated with Embedded Coder.
Après avoir intégré Polyspace et MATLAB, vous pouvez exécuter une analyse Polyspace directement à partir de l'éditeur Simulink ou utiliser des scripts MATLAB pour automatiser une analyse Polyspace. Consultez Integrate Polyspace with MATLAB and Simulink et Run Polyspace Analysis by Using MATLAB Scripts. Sinon, générez des fichiers d'options à partir de modèles Simulink et utilisez ces fichiers pour exécuter une analyse Polyspace sur le code généré dans la ligne de commande du système. Consultez Run Polyspace Analysis on Generated Code by Using Packaged Options Files.
Fonctions
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 (depuis 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 (depuis R2024a) |
Classes
polyspace.ModelLinkOptions | Create a project configuration object for running Polyspace analysis on generated code |
Propriétés
| pslinkoptions Properties | Properties for the pslinkoptions object |
| polyspace.ModelLinkOptions Properties | Customize Polyspace analysis of generated code with options object properties |
Paramètres du modèle
Rubriques
Configuration
- 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.
Analyser le code généré
- 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.
Analyser le code personnalisé
- 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.
Configuration avancée
- 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.
Comment le code généré est analysé
- How Polyspace Analysis of Generated Code Works
Polyspace extracts function names from generated code to create amainfunction 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.