Main Content

Explore Traceability Information for Units and Components

Explore traceability relationships for design artifacts, requirements, tests, and results in your software units and components by using trace views in the dashboard. A trace view is an interactive diagram that shows a certain preset of traceability information for artifacts in a project. Trace views provide a detailed, tree-like structure of project artifacts and show trace relationships, individual artifact information, and a hierarchical view of trace relationships between the artifacts in a unit or component.

This example shows how to use trace views to see how artifacts trace to units and components in your design and view the traceability information for requirements, tests, and test results in the project. You can access these trace views from any open Dashboard window in the View section of the toolstrip:

  • Design Dependency

  • Requirement to Design

  • Tests and Results

The trace views provide traceability information within the context of software units and components in a project. To find required files for a whole project or to find required products and add-ons, use the Dependency Analyzer. For more information, see Analyze Project Dependencies.

Access Trace Views

  1. Open the project that you want to analyze. For this example, in the MATLAB® Command Window, enter:


  2. Open a dashboard. On the Project tab, click either:

    • Model Testing Dashboard

    • Model Design Dashboard

    When you open a dashboard, the dashboard analyzes the project and collects information about the project artifacts, the artifact structure, and the traceability relationships between artifacts. The dashboard creates a digital thread that stores these attributes and unique identifiers for your project artifacts. The dashboard automatically populates the Artifacts panel with the artifacts that the digital thread traces to the software units and components in your project. For more information on the artifact analysis and tracing that the dashboard performs, see Monitor Artifact Traceability and Detect Outdated Results with Digital Thread.

  3. Select a unit or component in the Project pane. For this example, select cc_LightControl.

    If you do not see the units and components that you expect for your project, see Categorize Models in Hierarchy as Components or Units.

  4. Click Trace View in the Traceability section of the toolstrip.

    Default trace view opened by Trace View button

To navigate and explore the trace view:

  • Zoom in or out by using the scroll wheel on your mouse or by using the Zoom In and Zoom Out buttons in the Navigate section of the toolstrip.

  • Pan vertically and horizontally by holding the space bar and clicking and dragging the mouse.

  • Highlight the connection between artifacts by clicking the arrow between the artifacts. You can click an artifact or arrow to select it. You can also move the artifacts and arrows in the trace view to rearrange the diagram.

  • Open a new trace view tab for the next unit or component listed in the Project panel by clicking Add New in the toolstrip.

  • Reset the diagram to the original layout and zoom level by clicking Restore to Default in the toolstrip.

To view a tooltip with detailed information about an artifact, point to the artifact. You also see an Open Artifact button that you can use to open the artifact directly from the trace view.

By default, the dashboard opens the Design Dependency trace view, but you can use the other trace views to explore the traceability information for your project.

Tooltip for data dictionary file used in software unit. Tooltip shows artifact type, path, and the Open Artifact button.

View Different Trace Views

View different traceability information by using the trace views gallery in the View section of the toolstrip. The gallery shows the names and descriptions of the trace views. Open a different trace view by clicking the name of a trace view in the trace views gallery. If a unit or component does not trace to any of the artifacts supported by the trace view that you select, select a different trace view from the trace views gallery.

Design Dependency Trace View

The Design Dependency trace view shows the library blocks, data dictionaries, model references, and MATLAB files that trace to the selected unit or component.

Trace view showing the subsystem and 3 data dictioanry files that cc_LightControl depends on

For example, the Design Dependency trace view for the example software unit cc_LightControl shows that the unit:

  • Contains the subsystem Enabled Subsystem

  • Requires the three data dictionary files: cc_CruiseControlData.sldd, lib_BaseConfig.slda d, and das_DrivingAssistantSpecData.sldd

You can use the trace view to examine the relationships that the dashboard identifies between design artifacts and to inspect component and unit dependencies. If you point to lib_BaseConfig.sldd in the trace view, the tooltip shows that this data dictionary file belongs to the referenced project lib_CommonLib.

Tooltip showing the name of the project that contains the data dictionary

You can point to the arrow between artifacts to view the relationship type. For example, the unit cc_LightControl requires the data dictionary file cc_CruiseControlData.sldd.

Trace view shows "Requires" when pointing to the arrow between the block diagram for cc_LightControl and a data dictionary file

The unit cc_LightControl contains the subsystem Enabled Subsystem.

Trace view shows "Contains" when pointing to the arrow between the block diagram for cc_LightControl and the subsystem "Enabled Subsystem"

Requirement to Design Trace View

The Requirement to Design trace view shows the functional requirements that trace to the selected unit or component.

Trace view showing links to requirements

For example, the Requirement to Design trace view for the example software component cc_LightControl shows that 3 requirement links trace to 3 functional requirements: Show cruise control light indicator, Show cruise control set indicator light, and Show cruise control light when ignition switch is turned. The trace view shows that the dashboard traced the relationship from the block diagram for the unit, to the requirement link, and then to the functional requirement.

Trace from block diagram to requirement link to functional requirement

You can point to a functional requirement to see where the requirement is in the requirements hierarchy and use the Open Artifact button to open the requirement directly in the Requirements Editor.

Tooltip for functional requirement in the trace view

Tests and Results Trace View

The Tests and Results trace view shows the test cases and test results that trace to the selected unit or component. The trace view shows the Simulink® Test™ files and test suites containing test cases that trace to the current unit or component. If you have test results associated with the test cases, the trace view traces those results to the test case and identifies whether the results are from model tests, software-in-the-loop (SIL) tests, or processor-in-the-loop (PIL) tests.

Trace view showing the Simulink Test case and Simulink test case results, including both model testing results and code testing results, that trace to the example software unit

You can point to a Simulink Test case result and click Open Artifact to open the results directly in Test Manager.

Tooltip for test case results showing Open Artifact button

Troubleshoot Missing Artifacts and Relationships

If you expect an artifact to appear in the trace view for a unit or component and it does not, see Resolve Missing Artifacts, Links, and Results.

Related Topics