Main Content

Add and Connect AUTOSAR Compositions and Components

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

Starting at the top level of the architecture model, use the composition editor and the Simulink® Toolstrip Modeling tab to add and connect AUTOSAR software compositions and components.

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

Add and Connect Component Blocks

To add and connect AUTOSAR software components in an architecture model:

  • For each component required by the design, from the Modeling tab or the palette, add a Software Component block. You can use the Property Inspector to set the component KindApplication, ComplexDeviceDriver, EcuAbstraction, SensorAccuator, or ServiceProxy.

  • Add component require and provide ports. To add each component port, click an edge of a Software Component block. When port controls appear, select Input for a require port or Output for a provide port.

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

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

    When you release the connection, a root port is created at the boundary.

  • Configure additional AUTOSAR properties by using the Property Inspector.

For example, to author a simple design:

  1. Using the Simulink Start Page, create an AUTOSAR architecture model. (For more information, see Create AUTOSAR Architecture Models.) The model canvas initially displays two connected software components.

  2. Add a require (input) port to the left component block and a provide (output) port to the right component block.

  3. Connect the new require and provide ports to architecture model root ports. Drag from each port to the model boundary.

The simple design is complete, but behavior is not yet defined for the AUTOSAR components. 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 a more detailed design example, see Author AUTOSAR Compositions and Components in Architecture Model.

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

Add and Connect Composition Blocks

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

  • From the Modeling tab or the palette, add a Software Composition block.

  • Add composition require and provide ports. To add each composition port, click an edge of the Software Composition block. When port controls appear, select Input for a require port or Output for a provide port.

    Alternatively, open the Software Composition block. To add each composition port, click the boundary of the composition diagram. When port controls appear, select Input for a require port or Output for a provide port.

  • 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 from the composition ports to the containing model boundary.

    When you release the connection, a root port is created at the boundary.

  • Configure additional AUTOSAR properties by using the Property Inspector.

For example, to author a simple nested composition:

  1. Using the Simulink Start Page, create an AUTOSAR architecture model. (For more information, see Create AUTOSAR Architecture Models.) The model canvas initially displays two connected software components.

  2. Remove the left component block and in its place, add a composition block.

    Add a require (input) port and a provide (output) port to the composition block. Also add a provide (output) port to the component block. Connect the composition provide port to the component require port

  3. Connect the unconnected require and provide ports to architecture model root ports. Drag 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 Software Component and Software Composition blocks. For a more detailed design example, see Author AUTOSAR Compositions and Components in Architecture Model.

See Also

|

Related Topics