Displaying the System Requirements in a Diagram

About the System Requirements Block

You can list all the requirements for a model or a subsystem directly on the Simulink® diagram. You do this by adding the System Requirements block from the Simulink® Verification and Validation™ library to the diagram. You can place this block anywhere in a diagram. It is not connected to other Simulink blocks.

Once you place the System Requirements block in a Simulink diagram, it automatically lists the requirements associated with the model or subsystem depicted in the current diagram. It does not list requirements associated with individual blocks in the diagram.

Adding the System Requirements Block

In Adding Requirement Links to an Object, you added requirement links to the Engine block of the model my_sf_car. You can list these requirements in the block diagram of the Engine subsystem as follows:

  1. Open the model my_sf_car.

  2. Double-click on the Engine block. The Engine subsystem diagram opens, as shown.

  3. Click the Library Browser tool .

    The Simulink Library Browser opens.

  4. In the left pane of the Simulink Library Browser, select Simulink Verification and Validation.

    The Simulink Verification and Validation library opens in the right pane of the Simulink Library Browser. It contains one block, System Requirements.

  5. Select the System Requirements block in the right pane of the Simulink Library Browser and drag it to an empty space in the Engine diagram.

    The block is automatically populated with the system requirements for the Engine diagram, as shown.

  6. Each of the listed requirements is an active link to the actual requirements document. For example, to access the document for the second requirement link, double-click Requirement 2.

    The document requirements.doc opens in its editor, the Microsoft® Word software, scrolled to the highlighted first occurrence of the text "Secondary Requirements," as shown.

Once the System Requirements block is placed in a diagram, it automatically updates the listing as you add, modify, or delete requirements for the model or subsystem.

Renaming the System Requirements Block

By default, the list of the system requirements in a diagram appears under a heading System Requirements. You can change the heading by renaming the System Requirements block in the diagram, as follows:

  1. Right-click the System Requirements block in the my_sf_car/Engine diagram.

  2. From the resulting pop-up menu, select Mask Parameters. The Block Parameters dialog box opens, as shown.

  3. Type Engine Requirements in the Block Title field and click OK.

    The requirements heading in the diagram is updated as shown.

Changing Fonts for the System Requirements Block

The System Requirements block is implemented using a set of empty subsystems. Because of this, occasionally the appearance is not refreshed correctly, for example, when you make a change to the font style or size. You can easily fix this problem by double-clicking the top label for the block, which causes the entire block display to refresh.

Use the following procedure to change the font used in the block.

  1. Right-click the System Requirements block in the my_sf_car/Engine diagram.

  2. From the resulting pop-up menu, select Format > Font. The Set Font dialog box opens.

  3. Under Size, select 14, then click OK. The block display partially refreshes, as shown.

  4. To refresh the entire block display, double-click the top label, System Requirements. The block diagram now looks as shown below.

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS