Main Content

Add and Connect AUTOSAR Components and Compositions

R2026b

After you create an AUTOSAR architecture model, develop the top-level AUTOSAR Classic or Adaptive software design. The composition editor provides a view of AUTOSAR software architecture based on the AUTOSAR Virtual Function Bus (VFB).

To begin, on the Modeling tab of the Simulink® Toolstrip, in the Platform section, confirm that the architecture model is configured for the expected AUTOSAR Platform. Then starting at the top level of the architecture model, use the composition editor and the Modeling tab to add and connect AUTOSAR software compositions and components.

Alternatively, you can import a software composition from ARXML files. See Import AUTOSAR Classic Composition from ARXML to Architecture.

Add and Connect AUTOSAR Component Blocks

To add and connect AUTOSAR components in an architecture model, from the Modeling tab of the Simulink toolstrip or the palette to the left of the canvas, add a Classic Component block or Adaptive Component block. For Classic Component blocks, you can use the Property Inspector to set the component KindApplication, ComplexDeviceDriver, EcuAbstraction, SensorActuator, or ServiceProxy.

Then, add component required and provided ports to the software component boundaries.

  • To add each component port, click an edge of a Classic Component or Adaptive Component block. When port controls appear, select one of these options:

    • Input for a required data port

    • Output for a provided data port

    • Client for a required function port

    • Server for a provided function port

    Adaptive software component with the action menu for selecting a port type.

  • To connect the component blocks to other blocks, connect the block ports with signal lines.

    Two Adaptive software components Component1 and Component2. The Server port of Component2 is connected to the Client port of Component1.

  • To connect the component blocks to architecture or composition model root ports, drag lines from the component ports to the containing model boundary.

    Releasing the connection creates a root port at the boundary.

    Connecting the receive port of an adaptive software component to the root port.

Configure additional AUTOSAR properties by using the Property Inspector, AUTOSAR Component Designer app, Code Mappings Editor for AUTOSAR Classic software architectures, and the Service Mappings Editor for AUTOSAR Adaptive software architectures.

After you connect Component blocks in an architecture model, the next step is to add Simulink behavior to the AUTOSAR components by creating, importing, or linking models. See Define AUTOSAR Component Behavior by Creating or Linking Models. For more detailed design examples, see Author AUTOSAR Compositions and Components in Architecture Model and Author AUTOSAR Adaptive Compositions with Software Architectures.

If you have a Requirements Toolbox™ license, you can link components in an AUTOSAR architecture model to requirements. See Link AUTOSAR Components to Requirements.

Add and Connect Composition Blocks in AUTOSAR Architecture

To add and connect an AUTOSAR software composition nested in an architecture model:

  • From the Modeling tab of the Simulink Toolstrip or the palette to the left of the canvas, add a Software Composition block.

  • Add composition required ports and provided ports. To add each composition port, click an edge of the Software Composition block. When port controls appear, select one of these options:

    • Input for a required data port

    • Output for a provided data port

    • Client for a required function port

    • Server for a provided function port

    AUTOSAR Software Composition block with client, server, input, and output ports.

    Alternatively, open the Software Composition block. To add each composition port, click the boundary of the composition diagram.

  • To connect the Software Composition block to other blocks, connect the block ports with signal lines.

  • To connect the Software Composition block to architecture or composition model root ports, drag a line from the composition ports to the containing model boundary.

    Connecting the client port of an AUTOSAR Software Composition block with a root port.

    Releasing the connection creates a root port at the boundary.

Use these tools to configure additional AUTOSAR properties for each platform:

For example, to author a simple nested composition:

  1. From the Simulink Start Page, create an AUTOSAR architecture model. (For more information, see Create AUTOSAR Architecture Models.) The model canvas is initially empty.

  2. From the Modeling tab on the of the Simulink Toolstrip or the palette to the left of the canvas, add a Software Composition block and a Classic Component or Adaptive Component block. Place them next to each other, left and right.

    1. Add a provided data port to the left composition block and a required data port to the right component block. Connect the two ports.

    2. Add a required data port to the left composition block and a provided data port to the right component block.

    The provided port of an AUTOSAR Software Composition block is connected to the required port of an AUTOSAR software component.

  3. Connect the unconnected required and provided software composition and component ports to the software architecture model boundary by dragging from each port to the model boundary.

    Software Composition block with its provided port connected to the required port of a Software Component block. The required port of the Software Composition block and the provided port of the Software Component block are each connected to the root software architecture port.

Typically, an AUTOSAR composition contains a set of AUTOSAR components and compositions with a shared purpose. To populate a composition, open the Software Composition block and begin adding more component blocks and Software Composition blocks.

For a more detailed example of authoring AUTOSAR Classic software architectures, see Author AUTOSAR Compositions and Components in Architecture Model.

For a more detailed example of authoring AUTOSAR Adaptive software architectures, see Author AUTOSAR Adaptive Compositions with Software Architectures.

See Also

| |

Topics