Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
slref.pdf
Скачиваний:
39
Добавлен:
26.03.2015
Размер:
16.01 Mб
Скачать

Simulink® Checks

Check optimization settings

Check for optimizations that can lead to nonoptimal code generation and simulation.

Description

This check reviews the status of optimizations that can improve code efficiency and simulation time.

Results and Recommended Actions

 

Condition

Recommended Action

 

 

The specified optimizations are off.

Select the following optimization check boxes on the

 

 

 

Optimization pane in the Configuration Parameters

 

 

 

dialog box:

 

 

 

“Block reduction”

 

 

 

“Conditional input branch execution”

 

 

 

“Implement logic signals as Boolean data (vs.

 

 

 

double)”

 

 

 

“Remove root level I/O zero initialization”

 

 

 

“Remove internal data zero initialization”

 

 

 

“Use memset to initialize floats and doubles to

 

 

 

0.0”

 

 

 

“Remove code from floating-point to integer

 

 

 

conversions that wraps out-of-range values”

 

 

 

(only if you have a Simulink Coder license)

 

 

 

Select the following optimization check boxes on the

 

 

 

Optimization > Signals and Parameters pane in the

 

 

 

Configuration Parameters dialog box:

 

 

 

“Inline parameters”

 

 

 

“Enable local block outputs”

 

 

 

“Reuse block outputs”

 

 

 

 

 

10-7

10 Model Advisor Checks

Condition

Recommended Action

 

 

 

“Eliminate superfluous local variables

 

(Expression folding)”

 

“Inline invariant signals” (only if you have a

 

Simulink Coder license)

 

Select the following optimization check boxes on the

 

Optimization > Stateflow pane in the Configuration

 

Parameters dialog box:

 

“Use bitsets for storing state configuration”

 

“Use bitsets for storing Boolean data”

“Application lifespan (days)” is

Choose a stop time if this is not intended.

set as infinite. This could lead to

 

expensive 64-bit counter usage.

 

The specified diagnostics, which can

Select none for:

increase the time it takes to simulate

 

your model, are set to warning or

Diagnostics > Solver > Solver data inconsistency

error.

Diagnostics > Data Validity > Array bounds

 

 

exceeded

 

Diagnostics > Data Validity > Simulation range

 

checking

The specified Embedded Coder

If you have a Embedded Coder license, and you are using

parameters are off.

an ERT-based system target file, select the following

 

check boxes:

 

Code Generation > Interface > “Single

 

output/update function”

 

Code Generation > General > “Ignore test point

 

signals”

 

Optimization > “Pass reusable subsystem

 

outputs as”

10-8

Simulink® Checks

Tips

If the system contains Model blocks and the referenced model is in Accelerator mode, simulating the model requires generating and compiling code.

See Also

“Optimization Pane: General”.

10-9

10 Model Advisor Checks

Check for parameter tunability information ignored for referenced models

Checks if parameter tunability information is included in the Model Parameter Configuration dialog box.

Description

Simulink software ignores tunability information specified in the Model Parameter Configuration dialog box. This check identifies those models containing parameter tunability information that Simulink software will ignore if the model is referenced by other models.

Results and Recommended Actions

 

Condition

Recommended Action

 

 

Model contains ignored parameter

Click the links to convert

 

 

tunability information.

to equivalent Simulink

 

 

 

parameter objects in the

 

 

 

MATLAB workspace.

 

See Also

“Parameters”.

10-10

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]