Main Content

Link from Simulink Model Elements

You can establish traceability by creating links from Simulink® model elements, including blocks, subsystems, and annotations, to requirements or other model elements. Use links to trace requirements to the design items that implement them and view model elements with outgoing links. For more information on requirement links, see Create and Store Links.

After you create links from Simulink model elements, you can track changes to the requirements links. For more information, see Track Changes to Requirement Links. To track the requirement implementation status, see Track Requirement Links by Using Implementation Status.

Store Links Internally or Externally

When you create a link from a Simulink model to a requirement, you can store the links internally to the model or as an external SLMX file. Specify where to store the links by using the Requirements Settings dialog. See Specify Requirements Link Storage for Models.

When you store links internally, modifying requirements links modifies your model. The time stamp and version of the model update whenever you modify the requirements links.

When you store links externally, creating or modifying requirements links does not modify your model. By default, you store the externally stored requirements links in an SLMX file. Follow these guidelines when storing model links in an external SLMX file:

  • When sharing models, keep the externally stored link file in the same folder as the model. By default, externally stored links are in a file named model_name~mdl.slmx in the same folder as the model. If you share the model with others, share both the model and SLMX files. Opening the model loads the links file.

  • Do not rename the model outside of Simulink. If you need to re-save the model with a new name or in a different location, in the Simulation tab, click Save As. Re-saving the model automatically re-saves the corresponding SLMX file using the updated model name or location.

  • If you create new requirements links, your model does not indicate that it has unsaved changes because the model file has not changed. You must explicitly save the links. When you close the model, Requirements Toolbox™ prompts you to save the requirements links.

When you make changes to the default storage location, the setting applies to models that do not already contain requirements links. If you open a model that already has requirements links, Requirements Toolbox uses the storage mechanism you specified for that model, regardless of your default storage setting. To change the storage mechanism for models with existing links, see Move Internally Stored Requirements Links to External Storage and Move Externally Stored Requirements Links to the Model File.

Link From Blocks and Subsystems

You can link from blocks and subsystems to requirements or other model elements. When you create a link from a block or subsystem, Requirements Toolbox creates an Implement type link. When you copy a block or subsystem with outgoing links, the links are also copied.

Create Links to Requirements

To create a link to a requirement by using the Requirements Perspective:

  1. In the Apps tab, in the Model, Verification, Validation, and Test section, click Requirements Manager.

  2. In the Requirements Browser, set View to Requirements.

  3. Drag the requirement from the Requirements Browser to the block. Requirements Toolbox creates an Implement type link and the linked block displays the Requirement icon .

The model element is the source item, the requirement is the destination item, and the link points from the block to the requirement. For more information, see Link Objects, Sources, and Destinations.

Alternatively, in the Requirements Browser, select the requirement. Then, right-click the block and select Requirements > Link to Selection in Requirements Browser. For information about creating links, see Create Links.

Create Links to Simulink Model Elements

To create a link to a model element, right-click the link destination item and select Requirements > Select for Linking with Simulink. Then, right-click the source item and select Requirements > Add Link to Selected Object(s). If the Requirements Perspective is open, the source item that has the outgoing link displays the Requirement icon .

Link from Annotations

When you link from annotations, Requirements Toolbox creates a Relate type link.

To create a link from an annotation:

  1. In the Apps tab, in the Model, Verification, Validation, and Test section, click Requirements Manager.

  2. In the Requirements Browser, set View to Requirements.

  3. Drag the requirement from the Requirements Browser to the annotation.

Note

Copying an annotation with links does not copy the requirements links.

View Links in Models

To highlight the outgoing links in a model, in the Apps tab, in the Model, Verification, Validation, and Test section, click Requirements Manager. Then, in the Requirements tab, in the Visualize section, click Highlight Links.

Model with three highlighted subsystem blocks that the requirement icon in the top-right corner

See Also

Apps

Functions

Topics