Sunteți pe pagina 1din 55
Functional Safety and Verification Tom Erkkinen May, 2019 © 2019 The MathWorks, Inc. 1
Functional Safety and Verification Tom Erkkinen May, 2019 © 2019 The MathWorks, Inc. 1

Functional Safety and Verification

Tom Erkkinen May, 2019

© 2019 The MathWorks, Inc.

1

Introduction ▪ IEC 61508 is functional safety standard for Industrial Automation, umbrella for industry-specific
Introduction ▪ IEC 61508 is functional safety standard for Industrial Automation, umbrella for industry-specific

Introduction

IEC 61508 is functional safety standard for Industrial Automation, umbrella for

industry-specific adaptions:

EN 50128 - Rail

IEC 62304 - Medical

IEC 61511 - Process Control

ISO 26262 - Automotive

– IEC 61511 - Process Control – ISO 26262 - Automotive Supported by IEC Certification Kit

Supported by IEC Certification Kit (for ISO 26262 and IEC 61508)

ISO 26262 is functional safety standard for Road Vehicles, consists of:

Part 1: Vocabulary

Part 2: Management of functional safety

Part 3: Concept phase

Part 4: Product development at the system level

Part 5: Product development at the hardware level

Rooted in Model-Based Design and states its benefits:

The seamless utilization of models facilitates

highly consistent and efficient development.

facilitates highly consistent and efficient development. – Part 6: Product development at the software level –
facilitates highly consistent and efficient development. – Part 6: Product development at the software level –

Part 6: Product development at the software level

Part 7: Production and operation

Part 8: Supporting processes

Part 9: Automotive Safety Integrity Level (ASIL)-oriented and safety-oriented analyses.

Certification Kit 3
Certification Kit 3
Certification Kit
Certification Kit
ISO 26262-6:2018 notes Simulink and Stateflow as Suitable for Software Architecture, Design and as basis
ISO 26262-6:2018 notes Simulink and Stateflow as Suitable for Software Architecture, Design and as basis

ISO 26262-6:2018 notes Simulink and Stateflow as Suitable for Software Architecture, Design and as basis for Code Generation

Architecture, Design and as basis for Code Generation Table 2 Software Architecture Design Notations has similar

Table 2 Software Architecture Design Notations has similar suitability wording for use of Simulink and Stateflow

V&V for ISO 26262 Workflow ▪ Shift left V&V (Focus on model) ▪ Model becomes
V&V for ISO 26262 Workflow ▪ Shift left V&V (Focus on model) ▪ Model becomes

V&V for ISO 26262 Workflow

Shift left V&V (Focus on model)

Model becomes the Truth

Automate implement and verification

Module and integration

testing at the model

level

Back-to-Back

Prevention of unintended functionality Reviews and static analysis at code level
Prevention of
unintended functionality
Reviews and static
analysis at code
level
Reviews and static analysis at the model level
Reviews and static analysis at
the model level

Testing

Executable Model used for production code generation Generated Object code specification code Code Compilation
Executable
Model used for
production
code generation
Generated
Object code
specification
code
Code
Compilation
Modeling
generation
and linking
Generated Object code specification code Code Compilation Modeling generation and linking Textual requirements 5

Textual

requirements

Reference Workflow Basic tool chain Simulink Requirements* Simulink Test and Simulink Coverage (for MIL)* IEC
Reference Workflow Basic tool chain Simulink Requirements* Simulink Test and Simulink Coverage (for MIL)* IEC

Reference Workflow

Basic tool chain

Reference Workflow Basic tool chain Simulink Requirements* Simulink Test and Simulink Coverage (for MIL)* IEC Cert

Simulink Requirements* Simulink Test and Simulink Coverage (for MIL)*

Requirements* Simulink Test and Simulink Coverage (for MIL)* IEC Cert Kit (for trace) Simulink Test and

IEC Cert Kit (for trace) Simulink Test and Simulink Coverage (for SIL)*

(for trace) Simulink Test and Simulink Coverage (for SIL)* Simulink Check* Simulink Test (for PIL)* Textual
(for trace) Simulink Test and Simulink Coverage (for SIL)* Simulink Check* Simulink Test (for PIL)* Textual
(for trace) Simulink Test and Simulink Coverage (for SIL)* Simulink Check* Simulink Test (for PIL)* Textual

Simulink Check*

Simulink Test (for PIL)* Textual Executable Model used for production Generated Object code requirements
Simulink Test (for PIL)*
Textual
Executable
Model used for
production
Generated
Object code
requirements
specification
code
code generation
Code
Compilation
Modeling
generation
and linking
Code Compilation Modeling generation and linking Simulink / Stateflow / AUTOSAR Blockset E m b e

Simulink / Stateflow / AUTOSAR Blockset

generation and linking Simulink / Stateflow / AUTOSAR Blockset E m b e d d e

Embedded Coder*

*Qualifiable

6

Reference Workflow Advanced tool chain IEC Cert Kit (for trace) Simulink Test and Simulink Coverage
Reference Workflow Advanced tool chain IEC Cert Kit (for trace) Simulink Test and Simulink Coverage

Reference Workflow

Advanced tool chain

Reference Workflow Advanced tool chain IEC Cert Kit (for trace) Simulink Test and Simulink Coverage (for
Reference Workflow Advanced tool chain IEC Cert Kit (for trace) Simulink Test and Simulink Coverage (for

IEC Cert Kit (for trace) Simulink Test and Simulink Coverage (for SIL)*

Simulink Requirements Simulink Test and Simulink Coverage (for MIL)*

Simulink Check* Simulink Design Verifier* Simulink Test (for PIL)* Textual Executable Model used for production
Simulink Check*
Simulink Design Verifier*
Simulink Test (for PIL)*
Textual
Executable
Model used for
production
Generated
Object code
requirements
specification
code
code generation
Code
Compilation
Modeling
generation
and linking
Code Compilation Modeling generation and linking Simulink / Stateflow / AUTOSAR Blockset Embedded Coder*

Simulink / Stateflow / AUTOSAR Blockset

Modeling generation and linking Simulink / Stateflow / AUTOSAR Blockset Embedded Coder* Polyspace* *Qualifiable 7

Embedded Coder*

Polyspace*

*Qualifiable

7

Simulink Requirements Work with requirements without leaving Simulink Requirements Capture • Author requirements in
Simulink Requirements Work with requirements without leaving Simulink Requirements Capture • Author requirements in

Simulink Requirements Work with requirements without leaving Simulink

Requirements

Capture

Author requirements in Simulink

Drag and drop to create links

requirements in Simulink • Drag and drop to create links Manage and Analyze Requirements • Identify

Manage and Analyze Requirements

Identify gaps in design or test

Respond to requirement changes

gaps in design or test • Respond to requirement changes Requirements Traceability • Trace to design,

Requirements

Traceability

Trace to design, code and test

Understand impact to design

requirement changes Requirements Traceability • Trace to design, code and test • Understand impact to design

8

Simulink Check Automate verification and correct models to improve design Standards & Guidelines Checks •
Simulink Check Automate verification and correct models to improve design Standards & Guidelines Checks •

Simulink Check Automate verification and correct models to improve design

Standards & Guidelines Checks

Automate compliance

to standards

Customize checks

Edit Time Checking

Find and fix compliance

issues while you design

Avoid rework later

compliance issues while you design • Avoid rework later Model Metrics • Analyze complexity, size, reusability

Model Metrics

Analyze complexity,

size, reusability

Model Refactoring

Find clones and modeling patterns

Assess design quality

Refactor to improve maintainability

• Find clones and modeling patterns • Assess design quality • Refactor to improve maintainability Clones
Clones
Clones
• Find clones and modeling patterns • Assess design quality • Refactor to improve maintainability Clones
Simulink Coverage Measure test coverage in models and generated code Model Coverage • Measure test
Simulink Coverage Measure test coverage in models and generated code Model Coverage • Measure test

Simulink Coverage Measure test coverage in models and generated code

Model

Coverage

Measure test completeness

Identify missing tests or

unintended functionality

Generated Code Coverage

Find untested generated code

Map results from code to model object

generated code • Map results from code to model object Highlighting and Reporting • View coverage

Highlighting and Reporting

View coverage results on diagrams

Manage accumulated coverage

results

model object Highlighting and Reporting • View coverage results on diagrams • Manage accumulated coverage results
Simulink Test Develop, manage, and execute simulation-based tests Test Harnesses • Synchronized, simulation test
Simulink Test Develop, manage, and execute simulation-based tests Test Harnesses • Synchronized, simulation test

Simulink Test Develop, manage, and execute simulation-based tests

Test

Harnesses

Synchronized, simulation test environment

Main Model Component under test Test Harness
Main Model
Component
under test
Test Harness

Test Sequence Block

Define inputs and assessments based on logical, temporal conditions

inputs and assessments based on logical, temporal conditions Test Manager • Author, execute, manage test cases

Test

Manager

Author, execute, manage test cases

Review, export, report

Excel input template and baseline data 11
Excel input
template and
baseline data
11
Simulink Design Verifier Use formal methods to identify design errors Design Error Test Requirements Model
Simulink Design Verifier Use formal methods to identify design errors Design Error Test Requirements Model

Simulink Design Verifier

Use formal methods to identify design errors

Design Error

Test

Requirements

Model

Detection

Generation

Proving

Slicer

Uncover hard to find dead logic and design flaws

Automate test case

generation to complete

coverage

Prove formally design

meets requirements

to complete coverage • Prove formally design meets requirements • Simplify models to isolate behavior 12

Simplify models to isolate behavior

to complete coverage • Prove formally design meets requirements • Simplify models to isolate behavior 12
Qualify tools with IEC Certification Kit and DO Qualification Kit ▪ Qualify code generation and
Qualify tools with IEC Certification Kit and DO Qualification Kit ▪ Qualify code generation and

Qualify tools with IEC Certification Kit and DO Qualification Kit

Qualify code generation and verification products

Includes documentation, test cases and procedures

▪ Includes documentation, test cases and procedures BAE Systems Delivers DO-178B Level A Flight Software on

BAE Systems Delivers DO-178B Level A Flight Software on Schedule with Model-Based Design

BAE Systems Delivers DO-178B Level A Flight Software on Schedule with Model-Based Design
Customer References and Applications Airbus Helicopters Accelerates Development of DO-178B Certified Software with
Customer References and Applications Airbus Helicopters Accelerates Development of DO-178B Certified Software with

Customer References and Applications

Customer References and Applications Airbus Helicopters Accelerates Development of DO-178B Certified Software with
Customer References and Applications Airbus Helicopters Accelerates Development of DO-178B Certified Software with
Customer References and Applications Airbus Helicopters Accelerates Development of DO-178B Certified Software with

Airbus Helicopters Accelerates Development of DO-178B Certified Software with Model-Based Design Software testing time cut by two-thirds

LS Automotive Reduces Development Time for Automotive Component Software with Model-Based Design Specification errors detected early

Continental Develops Electronically Controlled Air Suspension for Heavy-

Duty Trucks Verification time cut by up to 50 percent

MathWorks V&V Solution Summary Requirements Author, manage, and trace requirements Standards Compliance Verify
MathWorks V&V Solution Summary Requirements Author, manage, and trace requirements Standards Compliance Verify

MathWorks V&V Solution Summary

Requirements

Author, manage, and trace requirements

Standards Compliance

Verify compliance with standards and guidelines

Testing

Develop, manage, execute simulation-based tests

Formal Verification

Prove design meets requirements, prove robustness

Coverage Analysis

Static Code Analysis

SIL, PIL

Measure model and generated code coverage

Check bugs, MISRA compliance, prove code

Perform back-to-back testing

MathWorks V&V Product Capabilities Requirements Simulink Requirements* (New in R2017b) Standards Compliance
MathWorks V&V Product Capabilities Requirements Simulink Requirements* (New in R2017b) Standards Compliance

MathWorks V&V Product Capabilities

Requirements

Simulink Requirements* (New in R2017b)

Standards Compliance

Simulink Check* (New in R2017b)

Testing

Simulink Test

Formal Verification

Simulink Design Verifier

Coverage Analysis

Static Code Analysis

SIL, PIL

Simulink Coverage* (New in R2017b)

Polyspace Bug Finder, Polyspace Code Prover

Simulink Test

* Customers with Simulink V&V licenses will automatically receive these new products

16

System Composer System Composer for architecture modeling Support for Simulink Requirements: ▪ Entering Requirements
System Composer System Composer for architecture modeling Support for Simulink Requirements: ▪ Entering Requirements

System Composer

System Composer for architecture modeling

Support for Simulink Requirements:

Entering Requirements Perspective in Architecture Editor

Components in Archtecture Editor can be linked with requirements

Requirements browser, Property Inspector, Requirements annotation, drag-n-drop linking are available in the Architecture Editor

browser, Property Inspector, Requirements annotation, drag-n-drop linking are available in the Architecture Editor 17
browser, Property Inspector, Requirements annotation, drag-n-drop linking are available in the Architecture Editor 17
IEC Certification Kit R2018a, A-SPICE Level 2 Assessment R2018b, Compliant with 2 n d Edition
IEC Certification Kit R2018a, A-SPICE Level 2 Assessment R2018b, Compliant with 2 n d Edition

IEC Certification Kit

R2018a, A-SPICE Level 2 Assessment

R2018b, Compliant with 2 nd Edition

MathWorks development processes are A-SPICE Level 2.
MathWorks development processes are A-SPICE
Level 2.
Assessed by TÜV SÜD 18
Assessed by TÜV SÜD
18

Assessed by Continental Automotive

R2019a, SOTIF Guidance

Your V&V Workflow? Module and integration testing at the model l e v e l
Your V&V Workflow? Module and integration testing at the model l e v e l

Your V&V Workflow?

Module and integration

testing at the model

level

Testing Prevention of unintended functionality Reviews and static analysis at code level
Testing
Prevention of
unintended functionality
Reviews and static
analysis at code
level

Back-to-Back

Reviews and static analysis at the model level
Reviews and static analysis at
the model level
Executable Model used for production code generation Generated Object code specification code Code Compilation
Executable
Model used for
production
code generation
Generated
Object code
specification
code
Code
Compilation
Modeling
generation
and linking
Object code specification code Code Compilation Modeling generation and linking Textual requirements 19

Textual

requirements

Simulink for AUTOSAR © 2019 The MathWorks, Inc. 20
Simulink for AUTOSAR © 2019 The MathWorks, Inc. 20

Simulink for AUTOSAR

Simulink for AUTOSAR © 2019 The MathWorks, Inc. 20

© 2019 The MathWorks, Inc.

20

Agenda ▪ AUTOSAR is already on the road ▪ Simulink for AUTOSAR ▪ Simulink for
Agenda ▪ AUTOSAR is already on the road ▪ Simulink for AUTOSAR ▪ Simulink for

Agenda

AUTOSAR is already on the road

Simulink for AUTOSAR

Simulink for Adaptive Platform

AUTOSAR Classic is already on the road ▪ BMW - Model-Based Software Development: An OEM's
AUTOSAR Classic is already on the road ▪ BMW - Model-Based Software Development: An OEM's

AUTOSAR Classic is already on the road

BMW - Model-Based Software Development: An

OEM's Perspective

FCA Global Powertrain Controls - Leveraging MBD, auto-code generation and AUTOSAR to

architect and implement an Engine Control

Application for series production

LG Chem - Developing AUTOSAR and ISO 26262

Compliant Software for a Hybrid Vehicle Battery

Management System with Model-Based Design

John Deere - Vertical AUTOSAR System

Development at John Deere

Management System with Model-Based Design ▪ John Deere - Vertical AUTOSAR System Development at John Deere
AUTOSAR at a System Level 23
AUTOSAR at a System Level 23

AUTOSAR at a System Level

AUTOSAR at a System Level 23

23

Agenda ▪ AUTOSAR is already on the road ▪ Simulink for AUTOSAR – Importing and
Agenda ▪ AUTOSAR is already on the road ▪ Simulink for AUTOSAR – Importing and

Agenda

AUTOSAR is already on the road

Simulink for AUTOSAR

Importing and exporting AUTOSAR descriptions artifacts (ARXML files)

AUTOSAR Coder Dictionary

Simulation of AUTOSAR ECU software

Blocks for AUTOSAR Library routines

Simulink for Adaptive Platform

Importing and Exporting AUTOSAR SW-C Descriptions (ARXML files) 25
Importing and Exporting AUTOSAR SW-C Descriptions (ARXML files) 25

Importing and Exporting AUTOSAR SW-C Descriptions (ARXML files)

Importing and Exporting AUTOSAR SW-C Descriptions (ARXML files) 25

25

Introducing AUTOSAR “perspective” in a Simulink model Quick Help Help on configuring model for AUTOSAR
Introducing AUTOSAR “perspective” in a Simulink model Quick Help Help on configuring model for AUTOSAR

Introducing AUTOSAR “perspective” in a Simulink model

Quick

Help

Help on

configuring

model for

AUTOSAR

model Quick Help Help on configuring model for AUTOSAR Property Inspector View/Edit AUTOSAR SW-C Properties Code

Property

Inspector

View/Edit

AUTOSAR

SW-C Properties

Code Mappings Spreadsheet

View/Edit all blocks and elements configured for AUTOSAR

Functional simulation of AUTOSAR basic software is critical for AUTOSAR ECU development AUTOSAR ECU layered
Functional simulation of AUTOSAR basic software is critical for AUTOSAR ECU development AUTOSAR ECU layered

Functional simulation of AUTOSAR basic software is critical for AUTOSAR ECU development

AUTOSAR ECU

layered architecture

Application Software RTE Basic Software
Application Software
RTE
Basic Software

Many calls between application software and basic

software

Basic software functionality is highly dynamic

Simulation of basic software reduces development time and improves software quality

BSW library Blocks allows user to Simulate Client / Server Calls Detailed Specifications of Diagnostic
BSW library Blocks allows user to Simulate Client / Server Calls Detailed Specifications of Diagnostic

BSW library Blocks allows user to Simulate Client / Server Calls

library Blocks allows user to Simulate Client / Server Calls Detailed Specifications of Diagnostic Event Manager

Detailed Specifications of

Diagnostic Event Manager

BSW AUTOSAR Specs

Encapsulated in

Diagnostic Event Manager BSW AUTOSAR Specs Encapsulated in Basic Software Library Client Block Resides in SWC
Diagnostic Event Manager BSW AUTOSAR Specs Encapsulated in Basic Software Library Client Block Resides in SWC

Basic Software Library

BSW AUTOSAR Specs Encapsulated in Basic Software Library Client Block Resides in SWC Application Server Block

Client Block Resides

in SWC Application

in Basic Software Library Client Block Resides in SWC Application Server Block Resides in Simulation Test

Server Block Resides in Simulation Test Harness

in Basic Software Library Client Block Resides in SWC Application Server Block Resides in Simulation Test

28

AUTOSAR Library Routines Rte_IWrite_Runnable_Step_Out1_Out1(Ifl_IntIpoCur_f32_f32 (Rte_IRead_Runnable_Step_In1_In1(),
AUTOSAR Library Routines Rte_IWrite_Runnable_Step_Out1_Out1(Ifl_IntIpoCur_f32_f32 (Rte_IRead_Runnable_Step_In1_In1(),

AUTOSAR Library Routines

AUTOSAR Library Routines Rte_IWrite_Runnable_Step_Out1_Out1(Ifl_IntIpoCur_f32_f32 (Rte_IRead_Runnable_Step_In1_In1(),
AUTOSAR Library Routines Rte_IWrite_Runnable_Step_Out1_Out1(Ifl_IntIpoCur_f32_f32 (Rte_IRead_Runnable_Step_In1_In1(),
AUTOSAR Library Routines Rte_IWrite_Runnable_Step_Out1_Out1(Ifl_IntIpoCur_f32_f32 (Rte_IRead_Runnable_Step_In1_In1(),

Rte_IWrite_Runnable_Step_Out1_Out1(Ifl_IntIpoCur_f32_f32

(Rte_IRead_Runnable_Step_In1_In1(), Rte_CData_L_4_single()->Nx, Rte_CData_L_4_single()->Bp1, Rte_CData_L_4_single()->Table));

Agenda ▪ AUTOSAR is already on the road ▪ Simulink for AUTOSAR ▪ Simulink for
Agenda ▪ AUTOSAR is already on the road ▪ Simulink for AUTOSAR ▪ Simulink for

Agenda

AUTOSAR is already on the road

Simulink for AUTOSAR

Simulink for Adaptive Platform

Motivation for New AUTOSAR Platforms

A closer look at the Adaptive layers

Mapping Adaptive platform to Simulink

Code Generation for Adaptive components

Motivation for new AUTOSAR Platforms ▪ Main drivers – Automated driving, Car-2-car/infrastructure applications 31
Motivation for new AUTOSAR Platforms ▪ Main drivers – Automated driving, Car-2-car/infrastructure applications 31

Motivation for new AUTOSAR Platforms

Main drivers Automated driving, Car-2-car/infrastructure applications

Motivation for new AUTOSAR Platforms ▪ Main drivers – Automated driving, Car-2-car/infrastructure applications 31
Expansion of AUTOSAR based on Autonomous Applications ▪ In 2016 work started on creating these
Expansion of AUTOSAR based on Autonomous Applications ▪ In 2016 work started on creating these

Expansion of AUTOSAR based on Autonomous Applications

In 2016 work started on creating these additional AUTOSAR Platforms

March of 2017 is the first published release of

AUTOSAR Adaptive

Platform

March of 2017 is the first published release of AUTOSAR Adaptive Platform From AUTOSAR.org – AUTOSAR

From AUTOSAR.org AUTOSAR Introduction

AUTOSAR Platforms N A N C N A N C N N C N N
AUTOSAR Platforms N A N C N A N C N N C N N
AUTOSAR Platforms N A N C N A N C N N C N
AUTOSAR Platforms
N
A
N
C
N
A N C
N
N
C
N
N C A
N
C
A

Non - AUTOSAR

Classic - AUTOSAR

Adaptive - AUTOSAR

Non- AUTOSAR

Software

Classic - AUTOSAR Adaptive - AUTOSAR Non- AUTOSAR Software Hardware Classic AUTOSAR Application Software RTE Basic
Classic - AUTOSAR Adaptive - AUTOSAR Non- AUTOSAR Software Hardware Classic AUTOSAR Application Software RTE Basic

Hardware

Classic AUTOSAR

Application Software

RTE

Basic Software

Hardware

Adaptive AUTOSAR

Adaptive Application Software

ARA

Hardware Adaptive AUTOSAR Adaptive Application Software ARA Services Basic Services High Performance
Services Basic Services
Services Basic Services

Services

Basic Services

High Performance Hardware/Virtual Machine

33

Either AUTOSAR Platform benefits from Design in Simulink Classic AUTOSAR Application Software RTE Basic Software
Either AUTOSAR Platform benefits from Design in Simulink Classic AUTOSAR Application Software RTE Basic Software

Either AUTOSAR Platform benefits from Design in Simulink

Classic AUTOSAR

Application Software

RTE

Basic Software

Hardware

AUTOSAR Application Software RTE Basic Software Hardware Adaptive AUTOSAR Adaptive Application Software ARA Services

Adaptive AUTOSAR

Adaptive Application Software

ARA

Services Basic Services
Services Basic Services

Services

Basic Services

High Performance Hardware/Virtual Machine

Power of Simulation in the Application Layer aligns well with Algorithm Development

AUTOSAR Layered Software Architecture Adaptive Application (SW-C) Adaptive Application (SW-C) Adaptive
AUTOSAR Layered Software Architecture Adaptive Application (SW-C) Adaptive Application (SW-C) Adaptive

AUTOSAR Layered Software Architecture

Adaptive

Application

(SW-C)

Adaptive

Application

(SW-C)

Adaptive

Application

(SW-C)

Adaptive

Application

(SW-C)

AUTOSAR Run-time for Adaptive (ARA)

API

OS

API

Execution

API

Communication

Adaptive AUTOSAR Foundation

Service

S/W CM

Service

Diagnostics

Adaptive AUTOSAR Services

High Performance Hardware/Virtual Machine

Components
Components
Run-time
Run-time
Basic Services
Basic
Services
Hardware
Hardware
Key Concept #1 Everything is a process as in “OS process” OS Process #1 OS
Key Concept #1 Everything is a process as in “OS process” OS Process #1 OS

Key Concept #1 Everything is a process

as in “OS process”

OS Process #1 OS Process #2 OS Process #3 OS Process #4 Adaptive Adaptive Adaptive
OS Process #1
OS Process #2
OS Process #3
OS Process #4
Adaptive
Adaptive
Adaptive
Adaptive
Application
Application
Application
Application
(SW-C)
(SW-C)
(SW-C)
(SW-C)
AUTOSAR Run-time for Adaptive (ARA)
API Provides multi-process OS capability (POSIX Compliant)
API
Provides
multi-process
OS
capability
(POSIX
Compliant)

API

Execution

API

Communication

Notes: Each OS Process

- Corresponds to main() in C/C++ code

- Has own memory space & namespace

- Can be single or multi-threaded

36

Key Concept #1 Everything is a process as in “OS process” OS Process #1 OS
Key Concept #1 Everything is a process as in “OS process” OS Process #1 OS

Key Concept #1 Everything is a process

as in “OS process”

OS Process #1 OS Process #2 OS Process #3 OS Process #4 Adaptive Adaptive Adaptive
OS Process #1
OS Process #2
OS Process #3
OS Process #4
Adaptive
Adaptive
Adaptive
Adaptive
Application
Application
Application
Application
(SW-C)
(SW-C)
(SW-C)
(SW-C)
AUTOSAR Run-time for Adaptive (ARA)
API API API Execution Provides Communication multi-process OS Inter-Process capability (POSIX Compliant)
API
API
API
Execution
Provides
Communication
multi-process
OS
Inter-Process
capability
(POSIX
Compliant)
Communication
Process life-cycle
management.
Process scheduling
Key Concept #2 Service-oriented inter-process communication Linux Machine 1 IPC IPC Process Process Process Linux
Key Concept #2 Service-oriented inter-process communication Linux Machine 1 IPC IPC Process Process Process Linux

Key Concept #2 Service-oriented inter-process communication

Linux Machine 1 IPC IPC Process Process Process
Linux Machine 1
IPC
IPC
Process
Process
Process
Linux Machine 2 IPC IPC Process Process Process
Linux Machine 2
IPC
IPC
Process
Process
Process

IPC

Network

Key Concept #2 Service-oriented communication ▪ Service Interface can contain – Methods (Functions) – Events
Key Concept #2 Service-oriented communication ▪ Service Interface can contain – Methods (Functions) – Events

Key Concept #2 Service-oriented communication

Service Interface can contain

Methods (Functions)

Events (Messages)

Fields (Data)

<<interface example>> RadarService

result = Calibrate(config)

[success, out_pos] = Adjust(in_pos)

BrakeEvent

UpdateRate

Key Concept #3: Everything is C++ Adaptive Application Adaptive Application Adaptive Application Adaptive Application
Key Concept #3: Everything is C++ Adaptive Application Adaptive Application Adaptive Application Adaptive Application

Key Concept #3: Everything is C++

Adaptive Application Adaptive Application Adaptive Application Adaptive Application ASW::XYZ ASW::ABC Non-PF Service
Adaptive Application
Adaptive Application
Adaptive Application
Adaptive Application
ASW::XYZ
ASW::ABC
Non-PF Service
Non-PF Service
User Applications
AUTOSAR Run-time for Adaptive (ARA)
*
ara::rest
ara::tsync
ara::sm service
ara::diag service
ara::com
RESTful
Time Synchronization
State
Diagnostics
Communication Mgnt.
Management
ara::per
ara::phm
Persistency
Platform Health Mgnt.
ara::s2s service
ara::nm service
Signal to Service Mapping
Network
Management
ara::core
ara::exec
ara::iam
ara::log
Core Types
Execution Mgnt.
Identity Access Mgnt.
Logging & Tracing
POSIX PSE51 / C++ STL
ara::crypto
ara::ucm service
Operating System
Cryptography
Update and Configuration Management
SOME/IP
IPC
(local)
DDS

High Performance Hardware/Virtual Machine

Motivation for Simulink to support Adaptive ▪ Simulink is heavily used for AUTOSAR Classic ▪
Motivation for Simulink to support Adaptive ▪ Simulink is heavily used for AUTOSAR Classic ▪

Motivation for Simulink to support Adaptive

Simulink is heavily used for AUTOSAR Classic

Customers have requested Simulink support for Adaptive platform

Simulink supports service oriented modelling

Embedded Coder generates C and C++ code

MathWorks participates in the AUTOSAR standard

development, including both Classic and Adaptive

platforms

C++ code ▪ MathWorks participates in the AUTOSAR standard development, including both Classic and Adaptive platforms
C++ code ▪ MathWorks participates in the AUTOSAR standard development, including both Classic and Adaptive platforms
C++ code ▪ MathWorks participates in the AUTOSAR standard development, including both Classic and Adaptive platforms
Mapping AUTOSAR AP Concepts to Simulink Adaptive Application RequiredPort "Radar" : { // events
Mapping AUTOSAR AP Concepts to Simulink Adaptive Application RequiredPort "Radar" : { // events

Mapping AUTOSAR AP Concepts to Simulink

Mapping AUTOSAR AP Concepts to Simulink Adaptive Application RequiredPort "Radar" : { // events
Adaptive Application RequiredPort
Adaptive
Application
RequiredPort

"Radar" : { // events

"event" : { leftLaneDistance"

leftTurnIndicator

leftCarInBlindSpot

rightLandDistance

rightTurnIndicator

rightCarInBlindSpot

}, // methods "method" : { "Calibrate" "Adjust"

}, // fields "field" : { updateRate"

}

}

: { "Calibrate" "Adjust" }, // fields "field" : { “ updateRate" } } 42

42

Mapping AUTOSAR AP Concepts to Simulink Adaptive Application ProvidedPort "Radar" : { // events
Mapping AUTOSAR AP Concepts to Simulink Adaptive Application ProvidedPort "Radar" : { // events

Mapping AUTOSAR AP Concepts to Simulink

Mapping AUTOSAR AP Concepts to Simulink Adaptive Application ProvidedPort "Radar" : { // events
Adaptive Application ProvidedPort
Adaptive
Application
ProvidedPort

"Radar" : { // events

"event" : { leftHazardIndicator

rightHazardIndicator"

},

// methods "method" : { "Calibrate" "Adjust"

}, // fields "field" : { updateRate"

}

}

: { "Calibrate" "Adjust" }, // fields "field" : { “ updateRate" } } 43
Example of Configuring a model for Adaptive Platform 44
Example of Configuring a model for Adaptive Platform 44

Example of Configuring a model for Adaptive Platform

Example of Configuring a model for Adaptive Platform 44

44

Change Target to AUTOSAR Adaptive 45
Change Target to AUTOSAR Adaptive 45

Change Target to AUTOSAR Adaptive

Change Target to AUTOSAR Adaptive 45
Enter Code Perspective to start the Configuration process 46
Enter Code Perspective to start the Configuration process 46

Enter Code Perspective to start the Configuration process

Enter Code Perspective to start the Configuration process 46

46

AUTOSAR Quick Start – Set Component 47

AUTOSAR Quick Start Set Component

AUTOSAR Quick Start – Set Component 47
AUTOSAR Quick Start – Set Component 47

47

Quick Start Complete – Code Mappings setup for AS Port Events 48
Quick Start Complete – Code Mappings setup for AS Port Events 48

Quick Start Complete Code Mappings setup for AS Port Events

Quick Start Complete – Code Mappings setup for AS Port Events 48

48

Adaptive AUTOSAR Dictionary – Notice the Service Interfaces 49
Adaptive AUTOSAR Dictionary – Notice the Service Interfaces 49

Adaptive AUTOSAR Dictionary Notice the Service Interfaces

Adaptive AUTOSAR Dictionary – Notice the Service Interfaces 49

49

Generate Code for the Adaptive AUTOSAR Model 50

Generate Code for the Adaptive AUTOSAR Model

Generate Code for the Adaptive AUTOSAR Model 50
Generate Code for the Adaptive AUTOSAR Model 50

50

C++ Adaptive AS Code ara Functional Cluster API 51
C++ Adaptive AS Code ara Functional Cluster API 51

C++ Adaptive AS Code ara Functional Cluster API

51
51
Software Component Description Files Generated 52
Software Component Description Files Generated 52

Software Component Description Files Generated

Software Component Description Files Generated 52
Adaptive Standalone Application Code needs a main.cpp 53
Adaptive Standalone Application Code needs a main.cpp 53

Adaptive Standalone Application Code needs a main.cpp

Adaptive Standalone Application Code needs a main.cpp 53

53

Generate Production AUTOSAR Adaptive C++ Code main.cpp <model>.cpp *.hpp *.cpp *.arxml AUTOSAR support 1.
Generate Production AUTOSAR Adaptive C++ Code main.cpp <model>.cpp *.hpp *.cpp *.arxml AUTOSAR support 1.

Generate Production AUTOSAR Adaptive C++ Code

main.cpp <model>.cpp *.hpp *.cpp *.arxml
main.cpp
<model>.cpp
*.hpp
*.cpp
*.arxml

AUTOSAR support

1. Configure Model

System Target File

AUTOSAR Dictionary

2. Generate C++ code

To learn more, please visit AUTOSAR webpage 55
To learn more, please visit AUTOSAR webpage 55

To learn more, please visit AUTOSAR webpage

To learn more, please visit AUTOSAR webpage 55