After you create an AUTOSAR architecture model, you begin authoring the top level of an AUTOSAR software design. The composition editor provides a view of AUTOSAR software architecture based on the AUTOSAR Virtual Function Bus (VFB). Use the composition editor and the Simulink® Toolstrip Modeling tab to add and connect AUTOSAR compositions and components.
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
Component block. You can use the Property Inspector to
set the component Kind —
Application
,
ComplexDeviceDriver
,
EcuAbstraction
,
SensorAccuator
, or
ServiceProxy
.
Add component require and provide ports. To add each component port, click an edge of a Component block. When port controls appear, select Input for a require port or Output for a provide 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 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:
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.
Add a require (input) port to the left Component block and a provide (output) port to the right Component block.
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.
To add and connect an AUTOSAR software composition nested in an architecture model:
From the Modeling tab or the palette, add a Composition block.
Add composition require and provide ports. To add each composition port, click an edge of the Composition block. When port controls appear, select Input for a require port or Output for a provide port.
Alternatively, open the 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 Composition block to other blocks, connect the block ports with signal lines.
To connect the 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:
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.
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
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 Composition block and begin adding more Component and Composition blocks. For a more detailed design example, see Author AUTOSAR Compositions and Components in Architecture Model.