You can use Simulink to model your design requirements. For example, you can use verification blocks to specify desired system properties and model the design requirements. The Requirements Management Interface (RMI) allows you to create navigation links between the requirements modeled in Simulink, the associated Simulink objects, and related test cases. This example shows how to use the RMI to create and view links to requirements modeled in Simulink.
Open the Power Window Controller model by typing the command:
Open the verification model, 'Power Window Controller Temporal Property Specification'. This model specifies properties and requirements of the
Consider the following design requirements for the controller:
Requirement 1 (Obstacle Response) - Whenever an obstacle is detected, the controller shall give the down command for one second. This requirement is modeled in Verification Subsystem2.
Requirement 2 (Autodown feature) - If the driver presses the down button for less than 1 second, the controller keeps issuing the down command until the end has been reached, or the driver presses the up button. This requirement is modeled in Verification Subsystem3
See Design Verifier Temporal Properties example for more details.
Right-click on emergencyDown state and select Requirements Traceability > Select for linking with Simulink.
Right-click on Verification Subsystem2 and select Requirements Traceability > Add link to selected object.
Right-click the Verification Subsystem2. The new RMI link appears at the top of Requirements Traceability submenu.
Right-click on Verification Subsystem2. Navigate the new link at the top of the Requirements Traceability submenu. Model opens and
emergencyDown state is highlighted.
You can link to a multiple selection of Simulink objects. Use the
Shift key to select all the following objects as in figure below.
Right-click on this group of objects, select Requirements Traceability > Select for linking with Simulink. Be careful to not lose the selections when you right-click.
Right-click on Verification Subsystem3 and select Requirements Traceability > Link to 4 selected objects.
Right-click on NAND block in
Global Assumptions and select Requirements Traceability > Select for linking with Simulink.
Right-click on this group of objects and select Add link to selected object. Be careful to not lose the selection.
Click on the background of
slvnvdemo_powerwindowController to clear the group selection.
Right-click each input and select Requirements Traceability to display new links. Click the new link, confirm that NAND is highlighted.
To create links for navigation in both directions:
Open Requirements Settings dialog box.
Select the Selection Linking tab.
Enable Modify destination for bidirectional linking.
Now, when you create a link from one Simulink object to another, a corresponding "return" link is also created.
Create RMI links to Simulink objects in the same way as links to external documents:
In the slvnvdemo_powerwindow_vs model window, select Analysis > Requirements Traceability > Highlight Model to highlight all RMI links in the model, including links to Simulink objects.
In the slvnvdemo_powerwindow_vs model window, select Analysis > Requirements Traceability > Generate Report.
In the generated report, click a hyperlink in any requirements table. This navigates to the corresponding object in Simulink diagram.
Close all open models. Do not save changes.
close_system('slvnvdemo_powerwindowController', 0); close_system('slvnvdemo_powerwindow_vs', 0);