Main Content

What is AUTOSAR?

AUTOSAR (AUTomotive Open System ARchitecture) is a worldwide development partnership of vehicle manufacturers, suppliers, and other companies from the electronics, semiconductor, and software industries. The AUTOSAR standard is designed to enable software standardization, reuse, and interoperability.

The AUTOSAR standard provides two platforms to support the current and future generations of automotive Electronic Control Units (ECUs):

  • The Classic platform supports traditional internal applications such as powertrain, chassis, body, and interior electronics.

  • The Adaptive platform supports service-based applications such as automated driving, Car-to-X, software updates over-the-air (OTA), and vehicles as part of the Internet of Things (IoT).

AUTOSAR Classic, Adaptive, and non-AUTOSAR ECUs can interoperate within a single car.

The exchange of information within a vehicle is shown. Categorized by AUTOSAR Classic, AUTOSAR Adaptive, and non-AUTOSAR components. A table of the differences between AUTOSAR Classic and AUTOSAR Adaptive is shown below the vehicle.

For an overview of the AUTOSAR Standard, see AUTOSAR Standard.

AUTOSAR Classic and Adaptive Platforms

The AUTOSAR standard defines Classic and Adaptive platforms for automotive applications. When you consider which platform to use for designing and implementing an AUTOSAR software component, consider these characteristics:

CharacteristicClassic PlatformAdaptive Platform
Use casesEmbedded systemsHigh performance computing, communication with external resources, and flexible deployment
Programming languageCC++
Operating systemBareboardPOSIX
Real-time requirementsHardSoft
Computing powerLowHigh
CommunicationSignal-basedEvent-based, service-oriented
Safety and securitySupportedSupported
Dynamic updatingNot availableIncremental deployment and run-time configuration changes
Level of standardizationHigh-detailed specificationsLow-APIs and semantics
Agile developmentNoYes

The AUTOSAR Classic Platform architecture has three layers on top of the microcontroller hardware:

  • Application Software provides application implementations in self-contained units called software components (SW-C or SWC). Building SWCs generates platform-compliant AUTOSAR XML (ARXML) descriptions and C code implementation modules.

  • Runtime Environment (RTE) provides communication between the application software and Basic Software (BSW). SWCs communicate with other components and BSW modules exclusively via the RTE, which allows SWCs to be independent of any specific ECU and other SWCs.

  • BSW provides ECU abstraction, microcontroller abstraction, and services, including memory and diagnostics.

This modularity helps manage the complexity of automotive systems, provides flexibility to update the product, and makes the architecture scalable across product lines. From AUTOSAR classic SWCs, you generate ARXML descriptions and algorithmic C code for testing and integration into the AUTOSAR RTE. The AUTOSAR Adaptive platform architecture has layers similar to the Classic platform, but is a service-oriented architecture (SOA), which provides a foundation to handle highly compute-intensive applications. The Adaptive platform supports Portable Operating System Interface (POSIX) standards. SWCs are deployed as Operating System processes that are independent applications. From AUTOSAR Adaptive SWCs, you generate ARXML descriptions and algorithmic C++ code for testing and integration in the AUTOSAR RTE. For testing, you can build and run a Linux application executable.

Developing AUTOSAR Systems in Simulink

MathWorks® is an AUTOSAR Premium Member and actively participates in the development of the standard, with a focus on applying Model-Based Design to an AUTOSAR development process for automotive ECUs.

Simulink® natively supports the AUTOSAR standard. To develop AUTOSAR software in Simulink:

  • Use Simulink and AUTOSAR Blockset to design and simulate AUTOSAR Classic and Adaptive systems.

  • Optionally, use System Composer™ to author hierarchies of AUTOSAR software compositions and components.

  • Use Embedded Coder® to generate ARXML descriptions and production C or C++ algorithmic code for testing and AUTOSAR RTE integration.

Simulink, AUTOSAR Blockset, and Embedded Coder support round-trip integration with AUTOSAR architectures, as illustrated below:

Round-trip workflow for AUTOSAR software development.

  1. You can use an AUTOSAR Authoring Tool or Simulink to create and export an ARXML file. This ARXML file is used to develop AUTOSAR SWCs.

  2. The SWCs are then imported to Simulink to generate a model, or update an existing model. At this point C code can be generated and the model can undergo SIL/PIL testing.

  3. If you made changes to the model, you can also export an updated ARXML file. This file can be used to inform updates to the SWCs and the future ARXML versions created by the AUTOSAR Authoring Tool or Simulink.

AUTOSAR Blockset is qualified for use with the ISO 26262 standard. Optionally, use of the IEC Certification Kit to qualify generated AUTOSAR code for ISO 26262. For more information regarding qualifying generated code with the ISO 26262 standard using the IEC Certification Kit see this example Highway Lane Following: A Model-Based Design Example for ISO 26262:2018 (IEC Certification Kit).

Modeling AUTOSAR Behavior with AUTOSAR Blockset

The behavior of AUTOSAR systems is defined by AUTOSAR SWCs. AUTOSAR SWCs are reusable building blocks of AUTOSAR software. An AUTOSAR SWC encapsulates one or more algorithms and communicates with its environment through well-defined ports.

For example, a throttle application might include AUTOSAR SWCs that represent throttle and acceleration pedal sensors, a throttle position monitor, a controller, and an actuator. An AUTOSAR SWC connects to an AUTOSAR RTE for communicating with other SWCs and software in the BSW layer of the AUTOSAR software architecture. You can reuse and relocate SWCs between ECUs. In Simulink, AUTOSAR SWCs are represented using Simulink model components, such as models, subsystems, and Simulink Function blocks.

AUTOSAR compositions are AUTOSAR SWCs that combine groups of SWCs that have related functionality. A composition is a system abstraction that facilitates scalability and helps to manage complexity when designing the logical representation of a software application. This figure shows an AUTOSAR throttle position control composition that contains sensor, monitor, controller, and actuator components.AUTOSAR Throttle Position Control Composition

AUTOSAR Blockset supports AUTOSAR SWC modeling for the AUTOSAR Classic and Adaptive platforms. To develop an AUTOSAR SWC in Simulink, create a Simulink model that represents the AUTOSAR SWC. Initiate the model creation in one of these ways:

  • Import an existing ARXML component description into the Simulink environment as a model. You can import a component description by using the arxml.importer function.

  • Modify an existing Simulink model into a representation of the AUTOSAR SWC.

  • Starting from an AUTOSAR Blockset model template, create a Simulink model.

For more information, see Component Creation (Classic platform) or Component Creation (Adaptive platform).

After creating an initial model design, you can then refine the AUTOSAR model configuration. Use the AUTOSAR Blockset Component Designer application to define the AUTOSAR properties and map Simulink elements to AUTOSAR Blockset elements and properties. Add algorithmic content to the component model. Iteratively simulate and refine the component implementation.

AUTOSAR Component Designer App is open an displays the top-level view of the autosar_swc model. The Code Mappings - AUTOSAR SW Component toolbar is visible at the bottom of the pane, with the Inports tab selected.

If you have multiple related component models, you can simulate them together. Aggregate and connect the components in a composition model or test harness. For AUTOSAR Classic applications, AUTOSAR Blockset provides blocks for calling and simulating BSW, including Diagnostic and NVRAM services. With these blocks, you can simulate the behavior of related components, AUTOSAR ECU software, and BSW together.

The top level of autosar_bsw_simulation model is shown.

With System Composer, you can author AUTOSAR software compositions, components, and their interfaces in an architecture mode. For calling and simulating BSW services, you can add the BSW blocks.

The top level of the autosar_tpc_composition model is shown.

With Embedded Coder, from AUTOSAR component models, you can generate ARXML descriptions and production of C or C++ algorithmic code for testing and AUTOSAR RTE integration. Here is a sample of C++ code generated for an AUTOSAR Adaptive application using the example model autosar_LaneGuidance.

The Code Generation Report for the autosar_LaneGuidance is open viewing the model initialize function for the autosar_LaneGuidance.cpp file.

Related Topics