Products & Services Solutions Academia Support User Community Company

Learn more about Simulink Verification and Validation   

Synchronizing a Simulink Model to a DOORS Surrogate Module

What Is a Surrogate Module?

A surrogate module is a DOORS formal module that is a representation of a Simulink hierarchy. You use standard DOORS capabilities to navigate between the Simulink objects in the surrogate module and requirements in other modules.

What Is Synchronization?

Synchronization creates a DOORS surrogate module. The surrogate module facilitates navigation between the Simulink object and the requirements, as the following diagram illustrates.

When you synchronize a model for the first time, the DOORS software creates the surrogate module that contains a representation of the model, depending on your synchronization settings. (To customize the synchronization, seeCustomizing the Level of Detail in Synchronization.)

If you create new links or remove existing links, you can resynchronize the model. The new or updated surrogate module reflects any changes in the requirements links since the previous synchronization.

Advantages of Synchronization

Synchronizing your Simulink model with a surrogate module offers the following advantages:

Synchronizing a Simulink Model to Create a Surrogate Module

The first time that you synchronize your model with the DOORS software, the surrogate module is created in the DOORS database.

To synchronize the sf_car_doors model with the DOORS software:

  1. Make sure that the DOORS software is running and that the Test Project is open.

  2. Open the sf_car_doors model used in the preceding examples.

  3. In the Model Editor, select View > Model Explorer.

  4. In the Model Explorer, select the Synchronize Requirements with DOORS tool .

    The DOORS settings dialog box opens.

  5. For this exercise, accept all the default synchronization options. For more information about the options, seeCustomizing the Synchronization .

  6. Click Synchronize to create and open a surrogate module for all DOORS requirements that have links to objects in the sf_car_doors model.

    The surrogate module contains a DOORS object that is linked to the transmission subsystem; the only object in the model with a requirement. The red arrow indicates a link from the surrogate module object to the requirement.

  7. Save the surrogate module.

Customizing the Synchronization

DOORS Synchronization Settings

DOORS Settings OptionDescription

DOORS surrogate module path

Names the surrogate module using the Simulink model name.

Copy DOORS surrogate item links to Simulink objects

Copies all links between the surrogate module and the requirements modules into the Simulink model.

    Note   If you delete a requirement link from the model only, and then resynchronize the model, the synchronization restores the link. Delete the requirement links from both the model and the surrogate module so that resynchronization does not restore the link.

Copy Simulink DOORS links to DOORS surrogate items

Copies all links between Simulink objects and requirements to the surrogate module. The surrogate module objects link to the same requirements as their Simulink objects.

Additional synchronization objects

The default setting (None) specifies to synchronize only those Simulink objects that have linked requirements. For more information about the other synchronization options, seeCustomizing the Level of Detail in Synchronization.

Save DOORS surrogate module after synchronization

Saves all changes to the surrogate module and changes the version of the surrogate module in the DOORS database.

Save Simulink model after synchronization (recommended)

Saves all changes to the model. If you use a version control system, selecting this option changes the version of the model.

Resynchronizing a Model with a Different Surrogate Module

To create a surrogate module that has more or less detail about the model hierarchy, resynchronize a model with the same or new surrogate module. In the DOORS settings dialog box, select the DOORS surrogate model module path option to name the different surrogate module in the DOORS database.

Specify a module with either a relative path (starting with ./) or a full path (starting with /). The software appends relative paths to the current DOORS project. Absolute paths must specify a project and a module name.

After you synchronize a model, the RMI automatically updates the DOORS surrogate model module path field with the actual full path and saves the unique module ID with the module.

If you select a new module path or if you have renamed the surrogate module, and you click Synchronize, the Requirements: Surrogate Module Mismatch dialog box opens.

Click Continue to create a new surrogate module with the new path or name.

Customizing the Level of Detail in Synchronization

You can customize the level of detail in a surrogate module so that the module reflects the full or partial Simulink model hierarchy.

In Synchronizing a Simulink Model to Create a Surrogate Module, you synchronized the model with the Additional synchronization objects option set to None. As a result, the surrogate module contains only Simulink objects that have requirement links. Additional synchronization options, described in this section, can increase the level of surrogate detail. However, increasing the level of surrogate detail can slow down synchronization.

The Additional synchronization objects option can have one of the following values. Each subsequent option adds additional Simulink objects to the surrogate module. You choose None to minimize the surrogate size or Complete to create a full representation of your model. The intermediate options provide finer level of detail. The Complete option adds all Simulink objects to the surrogate module, creating a one-to-one mapping of the Simulink model in the surrogate module.

Drop-Down List OptionDescription
None (Recommended)

Maps only Simulink objects that have requirements links and their parent objects to the surrogate module.

Minimal - Nonempty unmasked subsystems and Stateflow charts

Adds all nonempty Stateflow charts and unmasked Simulink subsystems to the surrogate module.

Moderate - Unmasked subsystems, Stateflow charts, and superstates

Adds Stateflow superstates to the surrogate module.

Average – Nontrivial Simulink blocks, Stateflow charts and states

Adds all Stateflow charts and states and Simulink blocks, except for trivial blocks such as ports, bus objects, and data-type converters, to the surrogate module.

Extensive - All unmasked blocks, subsystems, states and transitions

Adds all unmasked blocks, subsystems, states, and transitions to the surrogate module.

Complete - All blocks, subsystems, states and transitions

Copies all blocks, subsystems, states, and transitions to the surrogate module.

Resynchronizing to Include All Simulink Objects

To include all Simulink objects in the DOORS surrogate module:

  1. Open the sf_car_doors model.

  2. In the Model Editor, select Tools > Requirements > Synchronize with DOORS.

    The DOORS settings dialog box opens.

  3. To resynchronize with the same surrogate module, make sure that the DOORS surrogate module path option reads /Test Project/sf_car_doors, which is the surrogate module that you created in Synchronizing a Simulink Model to Create a Surrogate Module.

  4. To update the surrogate module to include all objects in your model, from the drop-down list under Additional synchronization objects, select Complete - All blocks, subsystems, states and transitions.

  5. Click Synchronize.

    You see the DOORS surrogate module for the sf_car_doors model. All Simulink objects and all Stateflow objects are now mapped in the surrogate module.

  6. Save the surrogate module.

Detailed Information About Surrogate Modules

Notice the following about the surrogate module in the preceding graphic:

Updating the Surrogate Module to Reflect Model Changes

The RMI does not display a warning message if you change your model after synchronization. If you want the surrogate module to reflect changes to the Simulink model, resynchronize your model.

In the next example, you add a new block to the sf_car_doors model, and later delete it, resynchronizing after both steps:

  1. In the sf_car_doors model, make a copy of the vehicle mph (yellow) & throttle % Scope block.

  2. Select Tools > Requirements > Synchronize with DOORS.

  3. In the DOORS settings dialog box, leave the Additional synchronization objects option set to Complete - All blocks, subsystems, states, and transitions, and click Synchronize.

    The software updates the surrogate module with the new block.

  4. In the sf_car_doors model, delete the newly added Scope block and resynchronize.

    The block that you delete appears at the bottom of the list of objects in the surrogate module, and its entry in the Block Deleted column reads True.

  5. Right-click the object and select Delete to delete this entry from the surrogate module.

  6. Save the surrogate module.

  7. Save the sf_car_doors model.

Navigating Using the Surrogate Module

Navigating Between Requirements and the Surrogate Module in the DOORS Database

The requirements in the formal module and the surrogate module are both in the DOORS database. You can review the requirements and the Simulink objects in the surrogate module without starting the Simulink software. When you synchronize your model, the DOORS software creates links between the surrogate module objects and the requirements in the DOORS database.

To navigate from the surrogate module transmission object to the requirement in the formal module:

  1. In the surrogate module object for the transmission subsystem, right-click the right-facing red arrow.

  2. Select the requirement name.

    The My Requirements module opens, scrolled to the Transmission Requirements object.

To navigate from the requirement in the My Requirements module to the surrogate module:

  1. In the Transmission Requirements object in the My Requirements module, right-click the left-facing orange arrow.

  2. Select the object name.

    The surrogate module for sf_car_doors opens, scrolled to the object associated with the transmission subsystem.

Two-Way Navigation Using the Surrogate Module

If you synchronize your model, you can navigate between Simulink objects and DOORS requirements using the surrogate module as an intermediary.

Navigating from a Simulink Object to a Requirement.   To navigate from the transmission subsystem in the sf_car_doors model to the linked requirement in the My Requirements formal module:

  1. In the sf_car_doors model, right-click the transmission subsystem and select Requirements > 1. "DOORS Surrogate Item".

    The surrogate module opens, scrolled to the object associated with the transmission subsystem.

  2. To display the individual requirement, in the surrogate module, right-click the right-facing red arrow and select the requirement.

    The My Requirements module opens, scrolled to the Transmission Requirements requirement.

Navigating from a Requirement to the Model.   To navigate from the Transmission Requirements object module to the transmission subsystem in the sf_car_doors model:

  1. In the My Requirements module, in the Transmission Requirements object, right-click the left-facing orange arrow.

  2. In the surrogate module, select the path to the linked object: /Test Project/sf_car_doors > 2. transmission.

    The surrogate module opens, scrolled to the Transmission Requirements.

  3. In the surrogate module, select the transmission object.

  4. Select MATLAB > Select item.

    The sf_car_doors model opens as follows:

    • For a Simulink object, the Model Editor opens with that block or subsystem, and all its parent blocks, highlighted.

    • For a Stateflow object, the diagram containing the selected object opens with the object highlighted.

  


Related Products & Applications

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