Overview

Once function specifications and requirements have been defined as demonstrated in Working With Function Requirements, you are ready to work on the design structure and function allocation. In this article, we will analyze and break down the requirements from the function level, define components, establish interfaces and finally allocate components to ECUs. For the purpose of this demonstration, design requirements have been configured in advance and are meant as an example. The model can be customized to meet the needs of your organization's processes. This article assumes some familiarity with SystemWeaver concepts such as Items, Parts and Attributes, and also with the GUI and common operations of the swExplorer.


Design Structure

Below is a sample overview of a design level.

 

Design architecture:  Contains the design functions and the allocated design (A)

Design Function:  A container for design components. A component may only exist in one design function (B)

Logical component:  Describes the logic and interface of a component in the design function using requirements and ports (C)

Requirements:  Describes the properties and functions of a component (D)

Send and Receive interfaces:  Describes the interfaces in the system, i.e., the data that needs to be communicated in the system (E)



Adding Design Functions

Once function specifications and their corresponding requirements have been defined, the design functions can be added in a similar manner as function specifications are created. A new design function is added by right-clicking the Unallocated Design and choosing New > Design Function.


Allocating Function Responsibility to Design Functions

Once the design functions have been created, the function requirements can be allocated onto the design components. You do this by selecting the system architecture top-level item and selecting Function Allocation in the Design menu.

 


The Function Allocation view will display functions on the right and designs on the left. 

  • Specifications that are not yet allocated or mapped are indicated by a Status of Not mapped. (A)
  • Those that are mapped will have a blank, white Status and a value in the To column indicating how many mappings it currently has. (B)
  • Those that are mapped but where there is a version mismatch between function and design have a yellow Status indicating the version # mismatch. (C)



When you select a function specification that is mapped to a design function(s), you will see a green indicator next to the design item(s) to the left:

 

In the above example, Low speed emergency braking is mapped to two design functions - Adaptive cruise and Audio control. This same behavior occurs in the opposite direction, i.e., when you select a design element on the left, indicators appear on the right next to the functions they are associated with. 


In addition, when you select a design function in the view, you are able to quickly find it in the structure tree thanks to a green indicator. In the screenshot below, the Adaptive cruise design feature is selected.



To assign a function specification to a design function, select the function on the right and the design function on the left and click Map. When you map a function to a design function, the function specification appears inside the design function making it easy for designers to refer back to the function specifications in the tree:



A faulty mapping is removed by selecting the Items on the respective sides and clicking Remove Mapping

Version inconsistencies are solved by clicking Fix sec. Version after selecting the relevant Items on both sides.

To map a function to new design function that you create on-the-fly, select the function on the right, select the Unallocated Design on the left, and click Map to new. The New Design function dialog displays where you can define the new design function.


In the below example, the Radio function on the right is being mapped to a design function that does not yet exist via Map to new


Filtering

Since the lists of function and specifications and requirements can become quite long, being able to filter them down to smaller subsets during allocation makes them easier to work with. There are three filtering options in Function Allocation - Match, Not Mapped, and Version mismatch.


Option
Description
Example
Match
Select this option to only view the items mapped to the selected item in focus. In the example, the Low speed emergency braking function is selected and only the design functions that it is mapped to are displaying in the design structure.

Not Mapped
Select this option to only view those functions that are not allocated yet in either structure. In the example, only the functions that have not been allocated to the other structure are displaying.

Version mismatch
Select this option to display only those items that have been mapped, but for which a version inconsistency has appeared in that one of the structures has been updated. For any items with version mismatch, version status information will be highlighted in yellow. In the example, the function list has been filtered and Audio control has been updated from version 2 to 3 whereas the design function is still at version 2. 


Autosar System - Import and Export

When you select an Autosar System in the tree, the Autosar Export and Import options become available. 



Importing an Autosar System

Import an Autosar description by completing these steps: 

  1. Add the Autosar files
  2. Load the files (analyzes the Autosar description)
  3. Import the Autosar description which creates ECUs and components.



Exporting an Autosar System

To export an Autosar System, select where the Autosar xml file shall be stored and click Export.


Working With Software Components

There are different types of components:


Software components:  Describes the logic of a component.

Sensor Actuator Software Components:  Describes the interfaces to the physical world They are a representation of the interface to physical components (sensors, actuators, etc.).


Note: If you prefer to work in a graphical view, there is a alternative view that can be used. It is described in a separate section in this article.


Adding New Components

A new Component is added by right-clicking the design function and choosing New > Functional Component. The New Functional Component dialog will display. Select a Software component or Sensor Actuator Software Component depending on your needs:


Working With Interfaces

Depending on your design requirements, you can create new interfaces or add existing interfaces to your model.


Note: If you prefer to work in a graphical view, there is a alternative view that can be used. It is described in a separate section in this article.


Adding New Interfaces

To create a new interface, right-click the software component and choose New then choose SendPort or ReceivePort depending on your needs. In the new port dialog that displays, you select the Design Signal item type, Name the new interface and click OK


Adding Existing Interfaces

If the interface is already available in the system, you can just copy it by pressing CTRL+C or right-click and choose Copy. Then, paste it to your component by selecting the component and pressing CTRL+V or right-clicking it and choosing New > Paste as > SendPort or ReceivePort.


In the above example, the existing VehicleSpd interface for the VehicleSpeed component is being copied and added as an interface for the MyComponent component.


Tip: As an alternative to the Copy option, you can also select Add and select the existing interface from a list.


Working with Interface Data types

Interfaces can have a data type. The data type can be of any of the following: 


Data Type
Description
Example
Simple
Scalar data type
Int, float, string
Array
A collection of scalar data types
int[2], float[2]
Record (struct)
A collection of different types of primitive data types, array, or records itself
Struct, union



Adding New Data types

A data type is added by right-clicking on a design signal and choosing New > Data type. The New Data type dialog will display. In the Item Type section, select the appropriate data type, enter a Name and click OK


Setting Signal Attributes

Array Data Type

Add the size of the array in the Max number of elements attribute in Overview:


Add the type of the array by right-clicking and select New > DataElement:


Record Data Type

Add the data types that you wish your record to contain by right-clicking and choosing New > DataElement. The record element itself contains no data but its Name.



Datatype view

When you select a data type item, the Datatype view option will appear on the Items ribbon. In this view, you can set the following signal attributes: 

  • Category, e.g., enumeration, linear
  • Unit of the datatype
  • CompuMethod, e.g., limits, translation of enumerations, etc.



Note: Unlike most views, the Datatype view requires you to press a Save button to save your edits.


Category

The Category attribute has the following options: 

  • Identical
  • Linear
  • Scale_Linear
  • Scale_Linear_and_Text_Table
  • Scale_Rat_Func
  • Text_Table
  • Scale_Rational_and_Text_Table


For details of data types in general, see the Autosar standard at https://www.autosar.org/

Unit

The Unit sets the SI unit for the data type. 

Managing Units

The unit types available in the Select Unit dialog are items of the type Unit fetched from the database. It is recommended that there be a dedicated Library work area storage for the available units.

Base Type

The Base Type sets the actual program language type of the data type. 

Managing Base Types

The types available in the SelectBaseType dialog are items of the type SwBaseType fetched from the database. It is recommended that there be a dedicated Library work area storage for the available SwBaseTypes.



Adding new Components and Interfaces – Graphical alternative

Selecting a design function activates the Component graph view option on the Items tab ribbon. This is a graphical view of the design.



To add components, select the component type to the right and drag it onto the graph.



It is also possible to right-click in the graph and select the type of component to create. 



To add new interfaces to components, right-click on the component and select to add either a In port or Out port.



To connect interfaces, select an interface and drag it onto another component.



Finding Unconnected Interfaces in the System

To find unconnected interfaces, select a design function. The Design Function Signal Consistency view option becomes available on the Items tab ribbon. This view shows all unconnected interfaces and the port direction. Selecting an interface in the grid highlights the interface in the tree.



Adding New Design Requirements

As design requirements are identified, they can be added by right-clicking on a Requirement Section and choosing New > Design Requirements.



In the below example for Adaptive cruise control, a component called CruiseControlManager has been identified and requirements such as CC Regulate speed have been created. New requirements are automatically assigned an unique ID.



Establishing Realization Traceability from Design Requirements to Function Requirements

The Design Trace View is used to establish traceability between function Requirements and design Requirements. To access this view, select a design requirement and click on the Design Trace menu option. If you prefer to maintain another view simultaneously, for example Overview, hold down the Shift key while selecting the option. This way, you can read the requirement description, etc. while still having access to the Design Trace view. 


The view shows which function requirements that a selected design requirement realizes. If a component is selected, it will show a summary of the realized function requirements for that component.


Design Trace enables you to add a link to the function by selecting the appropriate design requirement and clicking Add traceability link. In the Open items dialog, select a function requirement to preview it. Then click on Open to add a traceability link to the selected design requirement.



The color displayed before each function requirement indicates its status.


Green
The versions are correct.
Yellow
There is a version mismatch between the function requirement that is realized and the one that is actually in the function specification.
Red
A function requirement that is not in scope for the relevant function specifications is realized.



Removing a realized requirement is done by right-clicking on it and selecting Remove traceability link

An incorrect version is fixed by clicking Sync Version

The Versions option lets you take a look at the different versions of a function requirement before syncing.



Adding New ECUs

An ECU is added by right-clicking on the Autosar System and selecting New > ECUs.



Allocating Components

Allocating components to ECUs is done by using the ECU Allocation view. To access it, select the design architecture item. The option will then display on the Items tab ribbon. Click the ECU Allocation button. The view shows the design functions in gray and the components available for allocation in white. Each available ECU is displayed as a column. The colors in the matrix indicate the allocation and version status.


Red
The component has not been allocated.
Green
The correct version of the component with respect to the design function is allocated onto the ECU.
Yellow
The version of the component on the ECU is of an incorrect version with respect to the design function.



All actions are accessible by right-clicking the cell in the matrix corresponding to the component and ECU selection and selecting the needed option: 

  • Add to ECU: To add a component to the ECU in the selected column or to correct a version mismatch.
  • Remove from ECU: To remove the selected component from the ECU.



What's Next?

Read about Working on the Test Solution.