RTA Knowledge Base

!!! IMPORTANT !!!
Choose this workflow only if you are using RTA-RTE before v6.1.0 and RTA-BSW before v12.0.0:

  • RTA-RTE before v6.1.0: user MUST use this workflow because the RTE doesn’t support the ComXf module, so it needs rba_ComXfAdp
  • RTA-BSW equal and after v12.0.0: user MUST choose the workflow without rba_ComXfAdp because the BSW doesn’t have any more that module.

Table of Content

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.

Choose this workflow only if you are using RTA-RTE before v6.1.0 and RTA-BSW before v12.0.0:

  • RTA-RTE before v6.1.0: user MUST use this workflow because the RTE doesn’t support the ComXf module, so it needs rba_ComXfAdp
  • RTA-BSW equal and after v12.0.0: user MUST choose the workflow without rba_ComXfAdp because the BSW doesn’t have any more that module.

Introduction

The concept of E2E protection assumes that safety-related data exchange shall be protected at runtime against the effects of faults within the communication link.  

The E2E Library provides mechanisms for E2E protection, adequate for safety-related communication having requirements up to ASIL D. It only detects such errors for single received data elements and returns this information to the callers (e.g. SWCs), which have to react appropriately.

The algorithms of protection mechanisms are implemented in the E2E Library. The callers of the E2E Library are responsible for the correct usage of the library, in particular for providing correct parameters the E2E Library routines.  

The E2E protection allows the following:

  1. protects the safety-related data elements to be sent over the RTE by attaching control data (e.g. CRC and SC)
  2. verifies the safety-related data elements received from the RTE using this control data
  3. indicates that received safety-related data elements faulty, which then has to be handled by the receiver SWC.

To provide the appropriate solution addressing flexibility and standardization, AUTOSAR specifies a set of flexible E2E profiles that implement an appropriate combination of E2E protection mechanisms. Each specified E2E profile has a fixed behavior, but it has some configuration options by function parameters (e.g. the location of CRC in relation to the data, which are to be protected).

The E2E library could be invoked from:

  1. E2E Transformer (a new, standardized way to invoke E2E, introduced in R4.2.1);
  2. E2E Protection Wrapper;
  3. COM E2E Callout.

In this guide the first approach E2E Transformer is used, the serialization is performed by a transformer above E2E Transformer (COM-based transformer or Some/IP transformer).

Transformer Chain

The E2E and ComBased Transformer are used for the E2E Protection of safety-related data elements. The E2E Protection, with a control data: CRC + SC, is performed on the serialized representation of data elements: D1, D2, D3, D4.

This means when E2E Transformer is used, the serialization needs to be performed by a transformer above E2E Transformer as the COM-based transformer or Some/IP transformer.

So, the Transformer Chain used to protect the safety-related data elements with a control data required the following transformers:

  • Com Based Transformer (ComXf)
  • E2E Profile (E2EXf, E2E library and CRC library)

The format of the safety-related data signal groups depends on the E2E Profile, and it could be composed of:

  • a Signal for the E2E header, CRC + Counter
  • complex data element's sub-elements

Dependency on rba_ComXfAdp

Rba_ComXfAdp (COMBased Transformer Adapter) is an alternative approach to overcome the lack of support on RTE old version (Transformers are supported from RTA-RTE 6.1.0 version).

The Transformer chain will be composed of Rba_ComXfAdp, ComXf and E2EXf.

Rba_ComXfAdp is basically the ComplexDeviceDriver SWC located below RTE, which take over the RTE tasks, which are Buffer Handling and callers of transformers (ComXf/SomeIfXf/E2EXf).

ComXf module

The COMBased Transformer is used, as it is a data transformer of the class “SERIALIZER”, in front of the E2EXf. The E2EXf need a serializer transform in front because the E2E Protection is performed on the serialized representation of data elements.

In a Transformer Chain the COMBasedTransformer is always the 1st transformer on the transmission side and the last one on reception side otherwise an error will occur during the configuration.

  • on sender side: serialization of structured data into linear form based on the I-Pdu network representation (forward transformation)
  • on receiving side: deserialization of the linear data from the I-Pdu back into the original data structure (inverse transformation).

E2EXf module

It takes serialize/linearize data (by ComXf module, into uint8 array), and transform them using E2E Protection mechanism (e.g add CRC, …).

It provides the data structures required by E2E Library (it simplify and encapsulate the complexity of configuring and handling of the E2E Library).

It is responsible for correct invocation of E2E Library and pre/post-processing the data.

Thanks to E2EXf module, the caller of E2E Transformer does not need to know the E2E internals.

E2EXf make uses of the E2E Library and the E2E protection works as follows:

  • On Sender side: add control fields like CRC or counter to the transmitted data.
  • On Receiver side: evaluation of the control fields from the received data. This is done by calculation of control fields (CRC, … on the received data), comparison of calculated control fields with an expected/received content.

Sender and Receiver data path

 

Example Project

This example project has been implemented using the v9.1.1 Standard SK.

Toolchain

The RTA-CAR toolchain used in this example project is:

RTA-CAR 9.1.1 toolchain

ISOLAR-ABv 9.1.2
RTA-RTEv 7.4.3
RTA-BSWv 6.1.1
RTA-OSv 6.1.3

This workflow MUST be used with RTA-BSW before v12.0.0.

Configuration

Two E2E profile:

  • Profile 1: shall provide the following mechanisms:

Control field

Description

Counter

4-bit (explicitly sent)

Timeout monitoring

Timeout is determined by E2E Supervision by means of evaluation of the Counter, by a nonblocking read at the receiver

Data ID

16-bit, unique number, included in the CRC calculation.

CRC

This CRC is provided by CRC Supervision

  • Profile 5: shall provide the following control fields, transmitted at runtime together with the protected data:

Control field

Description

Counter

8-bits (explicitly sent)

CRC

16-bits, polynomial in normal form 0x1021 (Autosar notation), provided by CRC library. (explicitly sent)

Data ID

16-bits, unique system-wide. (implicitly sent)

Workflow

Step 1: Software Configuration

Step 1.a: DataTypes Configuration

Configure DataTypes including ImplementationDataType, ApplicationDataType and DataMapping.

The file containing the configuration explained in the next steps can be find here to be used as example: E2EImplementationDataType.arxml

  • An ImplementationDataType for each uint type (8, 16, 32) on which the Signal Group will refer:
    • SubElements for each data:
      • Category: ‘TYPE_REFERENCE’
      • SwDataDefProps-Conditional: ImplementationDataType: uintX

Example figure for uint type 16, do the same also for uint8 and uint32.

  • An ImplementationDataType for each Signal Groups:
    • Category: ‘Structure’
    • SubElements for each data (Profile_01 is composed of four data, two uint8 and two uint16, Profile_05 is composed of two data, one uint8 and one uint32):
      • Category: ‘TYPE_REFERENCE’
      • SwDataDefProps-Conditional: ImplementationDataType: Base_IDT_uintX

Example figures for:

  • E2E Profile 1 Transmitted Signal Group
  • E2E Profile 1 Received Signal Group
  • E2E Profile 5 Transmitted Signal Group
  • E2E Profile 5 Received Signal Group

Step 1.b: Interface Configuration

The file containing the configuration explained in the next steps can be find here to be used as example: E2EDataInterface.arxml

Configure a SenderRecieverInterface for each SignalGroup (so for: E2E Profile 1 Transmitted Signal Group, E2E Profile 1 Received Signal Group, E2E Profile 5 Transmitted Signal Group, E2E Profile 5 Received Signal Group):

  • Configure a Data Element referencing the ImplementationDataType.

Example figure for E2E Profile 1 Received Signal Group:

Step 1.c: SWC Port Configuration

The file containing the configuration explained in the next steps can be find here to be used as example: E2ESWC.arxml

Configure ports on the relevant SWCs typed by the SenderRecieverInterface. This configuration must result in Inter-ECU communication of the data.

Configure two PPort for:

  • E2E Profile 1 SenderReceiverInterface Transmitted Signal Group 
  • E2E Profile 5 SenderReceiverInterface Transmitted Signal Group

and two RPort for:

  • E2E Profile 1 SenderReceiverInterface Received Signal Group
  • E2E Profile 5 SenderReceiverInterface Received Signal Group

Example figure for E2E Profile 5 Transmitted Signal Group:

Configure DataAccessPoints for all the port/data.

Step 2: System Configuration

Step 2.a: DBC file

Update/create and import a DBC file describing the data being communicated, the data must be composed of:

  1. a Signal for the E2E header, CRC + Counter ( e.g Sig_T\Rx_x_E2EProfile0x_CRC and Sig_T\Rx_x_E2EProfile0x_Counter)
  2. each of the complex data element's sub-elements (e.g. Sig_Tx_0_1_UINT8 Sig_Tx_0_2_UINT8 Sig_Tx_0_3_UINT16 Sig_Tx_0_4_UINT16).

A SignalGroup must aggregate these Signals reported above, example in figure:

An example of dbc file is shown here: System_ComXf.dbc

In this dbc file there are 4 signal groups, two (Tx and Rx) for each E2E profile (Profile01 and Profile 05).

Step 2.b: System Data Mapping

Configure the SystemDataMapping dragging and dropping the SignalGroups and their Signals to the relative port as shown in figure.

Step 2.c: Data Transformation Set

The file containing the configuration explained in the next steps can be find here to be used as example: E2EDataTransformationSet.arxml

Configure DataTransformationSet (System > Signals And Signal Groups > Transformer > DataTransformationSet), including DataTransformation and TransformationTechnologies.

Configure two DataTransformations, one for each E2E Profile:

  • BaseTrans_Profile_01
  • BaseTrans_Profile_05

and four TransformationTechnologies one for each Profile and one for each Transformer (ComXf, E2EXf):

  • E2E Profile_01
  • ComBasedTransformer_AR_431
  • E2E Profile_05
  • ComBasedTransformer

Configure the DataTransformationSet as follow:

  • A 'COMBased' TransformationTechnology:
    • Protocol 'COMBased',
    • TransformerClass 'SERIALIZER'
    • Version '1'.
  • A 'E2E' TransformationTechnology:
    • Protocol 'E2E'
    • TransformerClass 'SAFETY'
    • Version '1.0.0'.
  • The TransformationTechnology should aggregate:
    • BufferProperties:
      • with HeaderLength configured according to the E2E profile being used.
    • EndToEndTransformationDescription:
      • configured according to the E2E profile being used.
    • A ‘Profile_01 DataTransformation (IMPORTANT: the ComBaseTrasformer has to be first element of the TransformerChain as definition (on ISOLAR GUI this means on the top of TransformerChains box) otherwise an error message will appear during the BSW generation)
    • A ‘Profile_05’ DataTransformation (IMPORTANT: the ComBaseTrasformer has to be first element of the TransformerChain as definition (on ISOLAR GUI this means on the top of TransformerChains box) otherwise an error message will appear during the BSW generation)

These figures shown Profile_01 as example to see all the data used for the project look on the file E2EDataTransformationSet.arxml:

Step 2.d: ISignal Groups

The file containing the configuration explained in the next steps can be find here to be used as example: DBC_SysDesc_Can_Network.arxml

Configure all the I Signal Groups including ComBasedSignalGroupTransformations > DataTransformationRefConditional and Transformation ISignal Prop > EndToEndTransformationISignalProps:

  • DataTransformationRefConditional on the SignalGroup:
    • referencing the DataTransformation
  • Configure the EndToEndTransformationISignalProps > EndToEndTransformationISignalPropsVariants on the SignalGroup:
    • specifying the length attributes
    • DataIds
    • referencing the E2E TransformationTechnology

For example, the configuration of ISigGrp_Signal_Group_Rx_0_Profile05 as shown in figure is:

  • DataTransformationRefConditional > DataTransformation: BaseTrans_Profile_01
  • EndToEndTransformationISignalProps > EndToEndTransformationISignalPropsVariants:
    • specifying the length attributes: 64
    • DataIds: 1110
    • referencing the E2E TransformationTechnology: E2E_Profile_01

For the other ISignals Groups is:

ISigGrp_Signal_Group_Rx_0_Profile05:

  • DataTransformationRefConditional > DataTransformation: BaseTrans_Profile_05
  • EndToEndTransformationISignalProps > EndToEndTransformationISignalPropsVariants:
    • specifying the length attributes: 64
    • DataIds: 15
    • referencing the E2E TransformationTechnology: E2E_Profile_05

ISigGrp_Signal_Group_Tx_0_Profile01:

  • DataTransformationRefConditional > DataTransformation: BaseTrans_Profile_01
  • EndToEndTransformationISignalProps > EndToEndTransformationISignalPropsVariants:
    • specifying the length attributes: 64
    • DataIds: 291
    • referencing the E2E TransformationTechnology: E2E_Profile_01

ISigGrp_Signal_Group_Tx_1_Profile05:

  • DataTransformationRefConditional > DataTransformation: BaseTrans_Profile_05
  • EndToEndTransformationISignalProps > EndToEndTransformationISignalPropsVariants:
    • specifying the length attributes: 64
    • DataIds: 30
    • referencing the E2E TransformationTechnology: E2E_Profile_05

Step 2.e: ECU Extract

Generate the updated ECUExtract with right click on System > System Info > System and updated ECUExtract.

Step 3: ECU Configuration

Step 3.a: E2E and CRC libraries

Configure the E2E and CRC libraries:

  • E2E library: Create the BSW Module E2E, under "Other Modules". Ensure the chosen profile is enabled in the E2E configuration, in addition to configuring any profile relevant settings:

  • CRC library: CRC operation is enabled in the BSW Module "Services > CRC”:

Step 3.b: ConfGen

Run ConfGen to generate the E2EXf, ComXf and rba_SysElem modules. Note: rba_SysElem includes all DataTransformations (SystemSignals, ISignals, DataMappings, DataTypes,…) in the form of ECU configuration values for the later BSW code-generation of modules ComXf, SomeIpXf and Rba_Xfrm.

Step 4: BSW Generation

BSW CodeGen must enable:

  • Crc
  • ComXf
  • Rba_Xfrm
  • E2E
  • E2EXf
  • Rba_ComXfAdp

Com/ComGeneral/ComEnableSignalGroupArrayApi and Com/ComConfig/ComSignalGroup/ComSignalGroupArrayAccess should be set to TRUE to enable the API usage rba_ComXfAdp calls ComXf to provide data serialization functionality. It accepts complex data (Sender/Receiver data element) from the RTE and provides the resulting byte array as an ISignalGroup (part of IPdu), which is finally transmitted to the receiver by the COM stack. ISignalGroup should be configured so that the serialized data can be sent via COM module. The uint8-array representation is forwarded to the COM module via the Com_SendSignalGroupArray and received from the COM module via the Com_ReceiveSignalGroupArray.

Step 5: RTE Generation

Step 5.a: Top Level Composition

Add the Rba_ComXfAdp SWC to the TopLevelComposition.

TopLevelComposition Port connection: Connect the ports of the COM Based Transformer Adapter component with the ports of other components in the Composition. 

Step 5.b: ECU Instance

Map the CPT_Rba_ComXfAdp to Target ECU Instance.

Step 5.c: ECU Extract

Generate the ECUExtract with right click on System > System Info > System and updated ECUExtract.

Step 5.d: Ecuc Value Collection

Update the EcucValueCollection (RE mapping) the RE of the rba_ComXfAdp and in this example the RE of the E2E SWC.

Step 5.e: RTE Generator

Generate RTE running RTEGen.