This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Execution Time Measurement and Block Profiling

This example shows how to analyze model execution performance in Simulink Desktop Real-Time™. The example is a multirate multi-tasking model that performs a time-intensive operation of matrix multiplication and finding the minimum in the resulting matrix product. This is being done for two different matrix sizes at two different sample rates.

The task-level performance information is returned by the Execution Time block. The first output port shows the total time of execution of each base rate step of the entire model. The second output port shows time of execution of each task.

To further refine the performance analysis, one of the two tasks is instrumented to obtain block-level information. The added Timestamp blocks capture the timestamps of input and output signals of blocks that are to be investigated. By subtracting the timestamps for input and output signals, execution times of the blocks are obtained.

Note: This example must be run in External Mode and requires Simulink Coder™.

Open the model


Close open Scopes

close_system(find_system(gcs ,'BlockType', 'Scope'));

Clean up

close all
bdclose all

See Also