| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → IEC Certification Kit |
| Contents | Index |
| Learn more about IEC Certification Kit |
| On this page… |
|---|
Generating Traceability Matrices Limitations |
When you use Model-Based Design and production code generation to develop application software components, you can generate a traceability matrix. The traceability matrix provides traceability among model objects, generated code, and model requirements. You can add comments to the generated traceability matrix. If you change the model and regenerate the traceability matrix, the software retains your comments.
For a given model, the generated traceability matrix can provide information about:
Model objects that are traceable between the model and generated code, such as Simulink blocks, Stateflow® objects, and Embedded MATLAB™ scripts.
Model objects that are untraceable between the model and generated code, such as eliminated and virtual blocks.
Requirements documents that you link to model objects using the Simulink® Verification and Validation™ Requirements Management Interface (RMI).
Generate the traceability matrix using the iec.ExportTraceReport function. The function creates an XLS file that contains the following worksheets:
Report — Traceability information for each model object, including model, generated code, and requirements. Each row in the worksheet pertains to a single occurrence of a model object. The information for a model object is in more than one row if the object:
Appears more than once in the generated code.
Links to more than one requirement.
Model Information — Summary of the model configuration and checksum. The summary includes the model name, version, author, creation date, last saved by, last updated date, checksum, and the selection of Traceability Report Contents parameters.
Code Files — File folders and names of the generated code files.
The iec.ExportTraceReport function that you use to generate traceability matrices has the following limitations:
The iec.ExportTraceReport function does not support generating a traceability matrix for referenced models. When you generate a traceability matrix for a model that contains referenced models, the traceability matrix contains information about the Model block only. The traceability matrix does not contain information about the contents of the referenced model. If your model contains referenced models, generate a traceability matrix for the top-level model and each referenced model separately.
The iec.ExportTraceReport function works with the Microsoft® Windows® platform only.
In most cases, the iec.ExportTraceReport function identifies comments that you add to the traceability matrix. When the function cannot identify comments, the traceability matrix includes the text:
| Row is not unique: comment |
Before generating a traceability matrix for model objects, generated code, and model requirements, perform the following steps:
Optionally, attach requirements documents. For more information, see Managing Model Requirements in the Simulink Verification and Validation documentation.
In the Configuration Parameters dialog box, on the Real-Time Workshop > Report pane, select:
At least one of the following Traceability Report Contents parameters:
Generate code for the model.
To generate a traceability matrix:
Open the model.
Ensure that you have completed the Prerequisites for Generating a Traceability Matrix.
In the MATLAB® Command Window, enter the following command to generate the traceability matrix, where model_name is the name of the model:
iec.ExportTraceReport('model_name')The software generates and opens the traceability matrix.
Review the traceability matrix and add comments in new columns. For more information, see Adding Comments to a Traceability Matrix.
![]() | Supporting Certification-Related Development Activities | Adding Comments to a Traceability Matrix | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |