Main Content

Graphically Manage Shared Interfaces, Data Types, and Constants

The Architectural Data section of a Simulink® data dictionary enables interfaces, data types, and constants to be authored, managed, and shared between components and compositions modeled in Simulink. The Architectural Data section provides scalability for system-level and multicomponent designs by containing these shared elements in a central location.

You can configure architectural data and apply your changes to a model using this basic workflow:

  1. Create a data dictionary.

  2. Design interface, data types, and constants with the Architectural Data Editor.

  3. Link the data dictionary containing architectural data to a Simulink or architecture model.

  4. Apply architectural data to a model in the Simulink environment.

Create Simulink Data Dictionary and Open Architectural Data Section for Editing

To create a data dictionary from the System Composer architecture model toolstrip, on the Modeling tab, open the Design gallery, and select Save to new dictionary from the Interfaces section.

Design menu on the Modeling tab with the Interfaces section highlighted

Design Data Types, Interfaces, and Constants Using Architectural Data Editor

Once you create your data dictionary, you can add and edit architectural data using the Architectural Data Editor. This tool allows you to author elements shared outside of the context of a particular component or composition and allow multiple team members to define and manage these elements.

Open Architectural Data Editor

To open the Architectural Data Editor from a System Composer architecture model that is already linked to a data dictionary:

  • In the Interface Editor navigate to and select the icon Manage interface, data types and dictionary references in the Architectural Data Editor icon. with tooltip Manage interfaces, data types and dictionary references in the Architectural Data Editor.

To open the editor from outside the context of a model, use one of these methods:

  • In the MATLAB® Current Folder browser, navigate to and double-click the .sldd file to open Model Explorer. Expand the data dictionary file and select Architectural Data, then click Open Architectural Data Editor from the Dialog pane.

  • Use the show function on an Architectural Data object created using Simulink.dictionary.archdata.create or Simulink.dictionary.archdata.open.

  • Enter archdataeditor at the MATLAB command line.

The standalone Architectural Data Editor with an interface selected. The Code Generation section includes the Data scope property Auto.

Add and Configure Data Using Architectural Data Editor

With the Architectural Data Editor, you can create, configure, and manage architectural data.

  • Create — On the toolstrip, in the Create section, add data type definitions, interfaces, and constants. Data types, interfaces, and constants each have a dedicated tab for data management.

  • Configure — In the right panel, use the Details pane to configure your data. The Details pane can also display platform-specific properties.

    For example, when you open a Simulink data dictionary linked to a model that is mapped to a Native platform, the Details pane displays a Code Generation pane. You can then define the Data scope and Header file. For more information on how to determine these settings, see Control File Placement of Custom Data Types (Embedded Coder). To preserve dimensions of bus objects that contain multidimensional bus elements, select the Preserve element dimensions option.

  • Manage — You can filter, sort, and search data on the Interfaces, Data Types, and Constants tabs.

Link Data Dictionary to Model

To link an existing data dictionary from the System Composer architecture model toolstrip, on the Modeling tab, open the Design gallery and select Save to new dictionary from the Interfaces section.

For more information regarding linking dictionaries to System Composer models, see Save, Attach, and Delete Interfaces.

Use Interface Editor to Apply Interfaces to Architecture Model

Alternatively, you can apply the interfaces to your model by using the Interface Editor and Property Inspector. In the architecture model toolstrip, on the Modeling tab, open the Design gallery and select Interface Editor. The editor opens as a pane in the current Simulink Editor window.

Interface Editor opened from a System Composer architecture model.

The primary focus of this model-centric editor is applying interfaces to ports. It displays the available interfaces in the linked data dictionary. By using the Interfaces tab you can:

  • Add data interfaces in the architecture model.

  • Assign an interface to a selected port on the canvas by right-clicking on the interface.

  • Trace between ports and interfaces.

  • Focus on a particular interface by using the Port Interface View.

  • View and configure a selected interface by using the Property Inspector.

You can also define profiles and stereotypes using either the Architectural Data Editor or the Profile Editor. See Define and Style Stereotypes in Profiles for more information regarding related workflows.

See Also

| | | |

Related Topics