Add and Connect AUTOSAR Components and Compositions
R2026bAfter 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 Kind —
Application,
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

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

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.

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

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.

Releasing the connection creates a root port at the boundary.
Use these tools to configure additional AUTOSAR properties for each platform:
AUTOSAR Classic software architectures — Property Inspector, AUTOSAR Component Designer app, Code Mappings Editor
AUTOSAR Adaptive software architectures — Property Inspector, AUTOSAR Component Designer app, Service Mappings Editor
For example, to author a simple nested composition:
From the Simulink Start Page, create an AUTOSAR architecture model. (For more information, see Create AUTOSAR Architecture Models.) The model canvas is initially empty.
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.
Add a provided data port to the left composition block and a required data port to the right component block. Connect the two ports.
Add a required data port to the left composition block and a provided data port to the right component block.

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.

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
Classic Component | Adaptive Component | Software Composition
Topics
- Import AUTOSAR Classic Composition from ARXML to Architecture
- Import AUTOSAR Adaptive Composition from ARXML to Architecture
- Define AUTOSAR Component Behavior by Creating or Linking Models
- Create Profiles, Stereotypes, and Views for AUTOSAR Architecture Analysis
- Link AUTOSAR Components to Requirements
- Author AUTOSAR Compositions and Components in Architecture Model
- Author AUTOSAR Adaptive Compositions with Software Architectures
- Configure AUTOSAR Architecture Model Programmatically