Contenuto principale

Analisi Bug Finder in Simulink

Controllare il codice C/C++ importato nei modelli di Simulink®, e da essi generato, per individuare eventuali difetti

Utilizzare Polyspace® dall'Editor di Simulink o la finestra di comando di MATLAB® per identificare potenziali bug, errori di runtime e violazioni degli standard di codifica nel modello di Simulink. Utilizzare Polyspace in due diverse fasi del processo di verifica e validazione.

Prima di generare il codice, individuare e risolvere eventuali problemi che potrebbero essere introdotti dal codice personalizzato del modello. Analizzare il codice personalizzato nel blocco C function, nel blocco C caller e nel blocco S function. Vedere Run Polyspace Analysis on Custom Code in Simulink Models.

Dopo la generazione del codice, analizzare il codice generato per individuare problemi specifici che potrebbero non essere stati rilevati nel modello, come errori dovuti a parti del modello non testate o opzioni di generazione di codice non corrette. Vedere Run Polyspace Analysis on Code Generated with Embedded Coder.

Dopo aver integrato Polyspace e MATLAB, è possibile eseguire un'analisi Polyspace direttamente dall'Editor di Simulink o utilizzare gli script di MATLAB per automatizzare un'analisi Polyspace. Vedere Integrate Polyspace with MATLAB and Simulink e Run Polyspace Analysis by Using MATLAB Scripts. In alternativa, generare file di opzioni dai modelli di Simulink e utilizzarli per eseguire un'analisi Polyspace sul codice generato nella riga di comando del sistema. Vedere Run Polyspace Analysis on Generated Code by Using Packaged Options Files.

Funzioni

polyspacesetupIntegrate Polyspace installation with Simulink
pslinkrunCrossReleaseAnalyze 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 (Da R2021a)
pslinkoptionsCreate an options object to customize Polyspace analysis of generated code or custom code in Simulink model
pslinkrunRun Polyspace analysis on model, system, or S-Function
pslinkfunManage model analysis at the command line
polyspacePackNGoGenerate and package options files to run Polyspace analysis on code generated from Simulink model
polyspaceArtifactGenerate artifacts to run Polyspace analysis on code generated from Simulink model (Da R2024a)

Classi

polyspace.ModelLinkOptionsCreate a project configuration object for running Polyspace analysis on generated code

Proprietà

pslinkoptions PropertiesProperties for the pslinkoptions object
polyspace.ModelLinkOptions PropertiesCustomize Polyspace analysis of generated code with options object properties

Impostazioni modello

espandi tutto

Settings from (C)Settings to use for the Polyspace analysis of C code
Settings from (C++)Settings to use for the Polyspace analysis
Project configurationSet advanced configuration options to customize analysis
InputOption to choose whether to constrain Inport block variables
Tunable parametersOption to specify the assumed value of tunable parameter values during the analysis
OutputOption to verify whether output variables are within expected bounds
Model reference verification depthDepth of model reference hierarchy for Polyspace analysis
Model by model verificationOption to analyze each model or referenced model individually
Ignore model referencesOption to ignore specified model references (Da R2023b)
Model reference input/output range verificationOption to verify that input and output of model references are within specified values (Da R2024a)
Output folderPath and folder name for your analysis results
Make output folder name unique by adding a suffixOption to add a unique suffix to the results folder for every Polyspace run
Open results automatically after verificationOption to open analysis results in Polyspace user interface after analysis completes
Add results to current Simulink projectOption to add your Polyspace results to current Simulink project
Product modeChoice between Polyspace Bug Finder and Polyspace Code Prover (Da R2021b)
Use custom project fileOption to use custom configuration from a Polyspace project (.psprj) file
Enable additional file listOption to add additional supporting code files to analysis
Stub lookup tablesOption to stub autogenerated functions that use lookup tables with linear interpolation
Verify all S-function occurrencesOption to analyze all instances of selected S-Function block
Check configuration before verificationOption to check model and code configurations for errors before code analysis

Argomenti

Impostazione

Analisi del codice generato

Analisi del codice personalizzato

Configurazione avanzata

Come viene analizzato il codice generato