RTA Knowledge Base

Table of Content

Introduction

Scope

This application note describes how to create and configure a new RTA-CAR project, within which you will then create and configure two SWC prototypes, one for transmitting and the other one for receiving.

The sample system presented in this example is composed of two ECUs, both of which use the two aforementioned SWC prototypes. Here is an overview of how the Composition will look after the example configuration has been completed.


Definitions and Abbreviations

BSW: AUTOSAR Basic Software, Hardware independent service layer

RTE: AUTOSAR Run-Time Environment

OS: AUTOSAR Operating System

SWC: Software Component

Toolchain

It is assumed you are using the RTA-CAR 8.0.1 toolchain:

RTA-CAR 8.0.1 toolchain

ISOLAR-ABv 8.0.1
RTA-RTEv 7.3.0
RTA-BSWv 6.0.0
RTA-OSv 6.1.0

Prerequisites

In order to successfully follow this guide, you must have the RTA-CAR toolchain installed, and you must be familiar with the AUTOSAR specifications, terminology and methodology.

Workflow Summary

Here is a summary of the steps that you will be working through in this example.

Step 1. Create a new RTA-CAR Project  (NewProjectFromScratch)

Step 2. Create a new Application Data Type (MyApplicationDataType)

Step 3. Create a new Data Type Mapping Set (MyDataTypeMappingSet), and then use it to map the Application Data Type (MyApplicationDataType) to a uint8 Implementation Data Type.

Step 4. Create a new Sender/Receiver Port Interface (My_SR_Interface) to define the type of data to be exchanged. Add a Variable Data Prototype to the Port Interface, then set the Data Element Name (DE_MyDataElement) and the VDP Type (MyApplicationDataType).

Step 5. Create two new SWC Prototypes for the Transmit and Receive SWCs (MyTransmittingSWC and MyReceivingSWC).

Step 6. Create a PPort (PPortPrototype) for the Transmit SWC prototype, and a RPort (RPortPrototype) for the Receive SWC prototype.

Step 7. Create new Internal Behavior containers [TxSwcInternalBehavior and RxSwcInternalBehavior], set the [MyDataTypeMappingSet] and enable SupportsMultipleInstantiation on each container so that the two SWC prototypes can be used in more than one instance.

Step 8. Create two new Runnable Entities [RE_Tx and RE_Rx] for Transmit and Receive, then set the name of the Function that each Runnable Entity will run.

Step 9. Create two new Data Access Points to allow the [RE_Tx] and [RE-Rx] Runnable Entities to have access to the SWC Ports. This will be a DataSendPoint on the PPort [PPortPrototype_0], and a DataReceivePoint on the RPort [RPortPrototype_0].

Step 10. Create two new Timing Events [MyTransmittingSWC and MyReceivingSWC] for the Transmit and Receive Runnable Entities [RE_Tx and RE_Rx].

Step 11. Create a new Composition [TopLevelComposition] in which to aggregate the two SWC Prototypes [MyTransmittingSWC and MyReceivingSWC] across 2 ECUs, then re-name them accordingly.

Step 12. Manually create the connections between the PPorts and RPorts on the Transmit and Send SWCs.


Step 1. Create a new RTA-CAR Project

Open a new Workspace in ISOLAR-AB.

From the Menu Bar select File --> New --> RTA-CAR Project as shown below.



In the "New RTA-CAR Project" pop-up window:

  • Provide a name for the new project in the Project Name field
  • Un-tick the Use default location option
  • Select the Location for the new project
  • Select the versions of the RTA Tools to be used in the project



  • Click the RTA-OS additional project settings button and configure the OS target variant compiler



  • Click the Finish button



When viewed through the Filesystem Navigator, the newly-created project will look like this:


Step 2. Create an Application Data Type

Application Data Types are the type of data used to provide more abstraction to the ASW. In order to follow this sample workflow, you will need to create new Application Data Types, but be aware that this is not generally mandatory as Base Data Types can also be used in the ASW.

Switch back to the AR Explorer tab, expand the item Software --> Data Types and you'll see that two subcategories of data are already present and populated: "Implementation Data Types" and "Base Types".



We need to create a third category of data type: "Application Data Types". To do so, right click on Software and select Software --> Create Data Type --> Create Application Data Type --> Create Elements | Application Primitive Data Type.



New AR Element Creation Window

For each new AR Element that we create in the project, a "New AR Element Creation" pop-up will appear.



In this window you can select the name of the AR Package in which the new element will be placed, as well as the arxml describing the new element. Make sure that the Create New AR Packages option is ticked in order to create a new arxml file and a new package.

Note: that you can use an existing arxml file and an existing package, but this falls outside of this sample workflow.

Step 3. Create new Data Type Mapping Set (and add Mapping)

We are now going to create a new Data Type Mapping Set, and then create a new Data Type Mapping within the set to map the new Application Data Type that we created in Step 2 to an Implementation Data Type.

Create a new Data Type Mapping Set

To create a new Data Type Mapping set, right click on "Software" and select Software --> Create Data Type --> Create Element | Data Type Mapping Set.

Note: When you come to do this in your own project, you can skip this step if you are not using any Application Data Type in your project.




  • Enter the name of the new DataTypeMappingSet as "MyDataTypeMappingSet"
  • Select the Use Existing AR Packages option
  • Click Finish.



Add a new Data Type Mapping

To add a new Data Type Mapping, open the Data Type Mapping Set that we've just created.



In the Data Type Map tab, click Add. 

Configure the new Data Type Mapping by selecting the desired Application Data Type and Implementation Data Type.



As you can see in the example above, we've mapped the "MyApplicationDataType" (that we created in Step 2) to the "uint8" Implementation Data Type.

Note that the uint8 Implementation Data Type will already be present in your project by default, so there's no need for you to create it.

Step 4. Create a new Sender Receiver Port Interface

Ports connecting SWCs must reference a defined Port Interface, so in this next step we are going to create a new Sender Receiver Port Interface to define the type of data to be exchanged. We are then going to add a Variable Data Prototype to the new Port Interface, and then set the Data Element Name and VDP Type.


Create the Port Interface

To create a Port interface, right click on "Software" and select Software --> Create Interface --> Create Port Interface --> Elements | Sender Receiver Interface.




(Note: When you create your own project, you can create additional AUTOSAR interfaces, such as Client Server Interfaces or Mode Switch Interfaces, in the same way).

In the context of this example workflow, we are going to create the new Port Interface in a new ARPackage called "Interfaces", but in your own project you can decide where to place the Package and which arxml files to use/create for each element.



Add a Variable Data Prototype

Double click on the newly-created Port Interface to open it with the "Data Dictionary Editor".



In the "Sender Receiver Interface" tab, select the Port Interface from the table and then click the Add VariableData Prototype link.



Set the Data Element Name and VDP Type

As shown below, enter the VDP Shortname as DE_MyDataElement, and select the VDP Type Ref as MyApplicationDataType, which we created in Step 2.



Step 5. Create new SWC Prototypes

We are now going to create two SWC Prototypes, one for transmitting and the other for receiving. Our example system is composed of two ECUs, both of which will use these same two SWC Prototypes.

To create an SWC Prototype, right click on "Software" and select Software --> Create Component --> Elements | Application Sw Component Type and place the SWC Prototype in a new ARPackage called "SWCs".



Note: When creating your own projects, we recommend that you use an arxml file for each SWC, as this will make is easier to reuse those SWCs in other projects. This can be done by using a different file name for each Application Sw Component Type that you define.

In the example below we are creating the Transmitting SWC.



And then we repeat the process to create the Receiving SWC.



Once created, both the Transmitting and Receiving SWC can be seen in the Software --> Components section of the AR Explorer.



Step 6. Create new Ports

The SWCs that we created in Step 5 will communicate with each other through ports. The transmitting SWC will have a PPort, while the receiving one will have an RPort.

To create a new port for the transmitting SWC, open it with the Component Editor as shown below (or just double-click on it).



In the "Main" tab, click on the PPorts... link.



In the "Port Creation Dialog" pop-up, select the Port Interface that we created in Step 4, then click OK.



Note in the above example that the AR Element Path is now different because (as recommended in Step 5) we are using separate SWC arxml files.


As shown below, after creating the port, you can then modify its name double-clicking in the "Short Name" column.



The above steps are then repeated for the creation of the RPort of the Receiving SWC.

And this time in the "Main" tab we click on the RPorts... link.



In the "Port Creation Dialog" pop-up, select the Port Interface that we created in Step 4, then click OK.


Step 7. Create new Internal Behavior Containers

In this step we are going to create the Internal Behavior containers for Transmission and Reception, and then (in Step 8) we’ll create the Runnable Entities within those containers for the Transmitting and Receiving SWCs.

To create an Internal Behavior container, right click on the SWC and select New Child --> Internal Behaviors | Swc Internal Behavior.



The new container will be added to the AR explorer as a new child, and you'll be prompted to enter its name, which there's no need to do at this stage.



Just double click on the new container to open it.



As shown below, you can now set the container's properties.

  • Change the Shortname to "TxSwcInternalBehavior"
  • Set SupportsMultipleInstantiation to true (this is because we want to use this SWC prototype in more than one instance)
  • Add MyDataTypeMappingSet (which we created in Step 3 into DataTypeMappings



You then need to repeat the above process to create and configure the receive Internal Behavior container, which you will name as RxSwcInternalBehavior.



Once you've created and configured the Internal Behavior containers, your AR Explorer view should look like this .



Step 8. Create new Runnables

With the Internal Behavior containers now created, you can create the Runnable Entities within them.

To create the transmit Runnable Entity, open the MyTransmittingSWC with the "Component Editor".



Then switch to the Functions tab.



Once you're in the Functions tab, click the Runnables link...



...and then edit/change the Runnable Entity name to "RE_Tx", and the Function name to "RE_Tx_func".



You then need to repeat the above steps to create the receive Runnable, setting the Runnable Entity name to "RE_Rx", and the Function name to "RE_Rx_func".



Step 9. Create new Data Access Points

Runnable Entities require Data Access in order to have access to SWC ports.

To create Data Access for the transmit Runnable, in the "Functions" tab, switch to the "Data Access Points" subtab (on the right-hand side) and click the Access Points... link.



This will display the "Create DataAccessPoint" dialog shown below.

The transmit Runnable will transmit data on the PPort, which means that the Data Access will be a Data Send Point, and so you need to select DataSendPoints, and then click OK.



You then need to repeat the above step to create the Data Access for the receive Runnable.



The receive Runnable will receive data on the RPort, which means that the Data Access will be a Data Read Access, and so this time you need to select DataReadAccess.



This example shows the receive Runnable after the Data Access Point has been added to it.


Step 10. Create new Timing Events

Runnables can only be executed if they are connected to an event, so in this next step we need to create a separate Timing Event for each of the two SWCs.

To create a Timing Event for the Transmitting SWC, switch from the "Functions" tab to the "Events" tab, open the drop down menu next to the green add button, and select TimingEvent.



In the "TimingEvent Creation" dialog, select the transmit Runnable Entity (RE-Tx), which will be the subject of the new Timing Event. 



Change the transmit Timing Event's Name to "TE_TX" and set the Timing Period to 0.1



You then need to repeat the above steps to create the receive Timing Event.



Change the receive Timing Event's Name to "TE_RX" and set the Timing Period to 0.1



Step 11. Create a new Composition

As outlined in the Introduction, the example project created in this sample workflow has two SWC prototypes (which we created back in Step 5), one for transmitting and the other for receiving. Our example system comprises two ECUs, both of which will use both of the SWC prototypes.

The next step it to aggregate the SWCs into a Composition.

Right click on "Software" and select Software --> Create Composition --> Elements | Composition Sw Component Type.



As shown below, place the new Composition in a new ARPackage named "Composition".



Double click on the newly created composition to open it with the "Composition Editor"



Once in the Composition Editor, open the drop down menu next to the green add button and select Component Prototype.



In the "Create Component Prototype" dialog, select both of the ASW SWCs that we created earlier in Step 5, then click OK.



Now repeat the above process to create a second set of Component types.


Note: Adding the same SWC propotypes multiple times will create multiple instances from the SWC prototype. This is necessary in order to have both SWCs on two ECUs.


After you've created the two sets of SWC prototypes, you can edit the SWC names by right-clicking on them and selecting Rename in the AR Explorer.



In the example below, we've added suffixes to the names to reflect the two sample ECUs from the starter kit dbc ("ApplicationECU" and "TestECU").



Step 12. Manually create new Connections

At this point, the four SWCs in the Composition are not yet connected.

Open the Composition, and at the bottom of the page switch from the "Overview" tab to the "Manual Connection Editor" tab.



Once in the Manual Connection Editor, as shown below, in the Source Component dropdown on the left, select the Transmitting SWC for the "Application ECU", and then the PPortPrototype. Then, in the Target Component  dropdown on the right, select the Receiving SWC for the TestECU, then the RPortPrototype.

Then make the connection between the two ports by clicking the connector button in the middle.



You then need to repeat the process by connecting the PPort on the TestECU to the RPort on the ApplicationECU.



Switching back to the Overview tab, we now only see two of the four SWCs. Note also that the Connector Name is now populated.



Now that the Composition has been fully created, you can view an overview by right-clicking on the Composition and selecting Open with --> Composition Overview.




If you've followed all the steps in this workflow, your Composition Overview will look like this.



In your own projects, you can follow the above steps to create your own ASW, and you can optionally repeat the steps to add additional SWCs to your ASW, and the connect them in single/multiple compositions.