AUTOSAR Software Component Development with …...Development of AUTOSAR Software Components with...

27
© 2008 The MathWorks, Inc. ® ® Development of AUTOSAR Software Components with Model-Based Design Dr. Joachim Schlosser Application Engineering The MathWorks GmbH

Transcript of AUTOSAR Software Component Development with …...Development of AUTOSAR Software Components with...

Page 1: AUTOSAR Software Component Development with …...Development of AUTOSAR Software Components with Model-Based Design Dr. Joachim Schlosser Application Engineering The MathWorks GmbH

©20

08 T

he M

athW

orks

, Inc

.

® ®

Development of AUTOSAR Software Components with Model-Based Design

Dr. Joachim Schlosser Application Engineering The MathWorks GmbH

Page 2: AUTOSAR Software Component Development with …...Development of AUTOSAR Software Components with Model-Based Design Dr. Joachim Schlosser Application Engineering The MathWorks GmbH

2

® ®

3 things to remember about AUTOSAR, Model-Based Design with Simulink and Real-Time Workshop Embedded Coder

Ease of use: No structural modelchanges. Switch between AUTOSARand other target without modifying the model. Easy workflows for new and legacymodels, keeping it simple for the user.AUTOSAR is seamlessly integrated in Simulink and Real-Time Workshop environment.

Page 3: AUTOSAR Software Component Development with …...Development of AUTOSAR Software Components with Model-Based Design Dr. Joachim Schlosser Application Engineering The MathWorks GmbH

3

® ®

Automotive Open System Architecture

MotivationManagement of E/E* complexity associated with growth in functional scope Flexibility for product modification, upgrade and update Scalability of solutions within and across product lines Improved quality and reliability of E/E systems

GoalThe objective of the partnership is the establishment of an open standard for automotive E/E architecture

*Electric/Electronic

from: www.autosar.org

Page 4: AUTOSAR Software Component Development with …...Development of AUTOSAR Software Components with Model-Based Design Dr. Joachim Schlosser Application Engineering The MathWorks GmbH

4

® ®

Page 5: AUTOSAR Software Component Development with …...Development of AUTOSAR Software Components with Model-Based Design Dr. Joachim Schlosser Application Engineering The MathWorks GmbH

5

® ®

Agenda

Introduction to Model-Based DesignIntroduction to CodegenerationAUTOSAR

OverviewThe MathWorks approach to AUTOSAR

Applying Simulink to AUTOSAR: What‘s New in R2008aCommon Workflows

Page 6: AUTOSAR Software Component Development with …...Development of AUTOSAR Software Components with Model-Based Design Dr. Joachim Schlosser Application Engineering The MathWorks GmbH

6

® ®

©20

08 T

he M

athW

orks

, Inc

.

Introduction to Model-Based Design

Page 7: AUTOSAR Software Component Development with …...Development of AUTOSAR Software Components with Model-Based Design Dr. Joachim Schlosser Application Engineering The MathWorks GmbH

7

® ®

Traditional development processes prevent errors from being caught early in the program

Design

Implement

Mechanical

EmbeddedSoftware

Electrical

ControlDesign

Integrate

System TestingSystem Testing

System

Architecture

Requirements

Specifications

Page 8: AUTOSAR Software Component Development with …...Development of AUTOSAR Software Components with Model-Based Design Dr. Joachim Schlosser Application Engineering The MathWorks GmbH

8

® ®

Model-Based Design enforces continuous testing and verification throughout the design process Design

Implement

System

Architecture

Requirements

SpecificationsEnvironmentEnvironment SystemSystem

Exec

utio

n H

arne

ssEx

ecut

ion

Har

ness

Subsystem ASubsystem A Subsystem BSubsystem B

Component AComponent A Component BComponent B

C, C++

MCU DSP FPGA ASIC

HDL(VHDL, Verilog)

Embedded Software Digital ElectronicsG

enerate

Generate

Integration

Real-TimeSoftware

Prototypes

Continuous V

erification &

Validation

Rapid PrototypingHW-in-the-LoopSW-in-the-Loop

Generate:• Assertions• Test results• Documentation

Perform:• Simulation• Verification• Design Analysis• Traceability

Analysis

Page 9: AUTOSAR Software Component Development with …...Development of AUTOSAR Software Components with Model-Based Design Dr. Joachim Schlosser Application Engineering The MathWorks GmbH

9

® ®

Benefits of Model-Based Design

CostMinimize prototypes and re-workFacilitates design reuse

ScheduleShortens time-to-marketEnhances team communication

PerformanceFosters innovationImproves quality

Page 10: AUTOSAR Software Component Development with …...Development of AUTOSAR Software Components with Model-Based Design Dr. Joachim Schlosser Application Engineering The MathWorks GmbH

10

® ®

©20

08 T

he M

athW

orks

, Inc

.

Introduction to Code Generation

Page 11: AUTOSAR Software Component Development with …...Development of AUTOSAR Software Components with Model-Based Design Dr. Joachim Schlosser Application Engineering The MathWorks GmbH

11

® ®

Core Code Generation Building BlocksReal-Time Workshop®

Generates code from Simulink that is easy to interact and experiment with

Real-Time Workshop® Embedded Coder™

Generates extremely efficient code that can be customized to look and perform like hand code

Embedded IDE Link for <embedded toolchain>Communication with compiler IDE

Target Support Package™ <microprocessor>Makes it easy to deploy generated code on particular microprocessors includingYou can deploy code on any microprocessor using Real-Time Workshop and Real-Time Workshop Embedded Coder because they generate standard C (ANSI/ISO-C).

Page 12: AUTOSAR Software Component Development with …...Development of AUTOSAR Software Components with Model-Based Design Dr. Joachim Schlosser Application Engineering The MathWorks GmbH

12

® ®

EmbeddedDeployment

On-Target Rapid Prototyping Embedded Code Generation• ANSI/ISO-C• Embedded Targets• Links for IDEs

Functional Rapid

Prototyping and HIL

Rapid Prototyping• xPC Target• Real-Time Windows Target• VxWorks Example

Modelingand

Simulation

Simulation Acceleration• Simulink Accelerator• S-Function• GRT/ERT/RSIM

Real-Time Workshop® / Stateflow Coder

SimulinkStateflow®

Real-Time Workshop Embedded Coder

Multiple Domain Code Generation

Page 13: AUTOSAR Software Component Development with …...Development of AUTOSAR Software Components with Model-Based Design Dr. Joachim Schlosser Application Engineering The MathWorks GmbH

13

® ®

©20

08 T

he M

athW

orks

, Inc

.

AUTOSAR

Page 14: AUTOSAR Software Component Development with …...Development of AUTOSAR Software Components with Model-Based Design Dr. Joachim Schlosser Application Engineering The MathWorks GmbH

14

® ®

Core Members

Premium Members

Associate Members

Membership

+ 50 other companies

Page 15: AUTOSAR Software Component Development with …...Development of AUTOSAR Software Components with Model-Based Design Dr. Joachim Schlosser Application Engineering The MathWorks GmbH

15

® ®

Architecture

ECU-Hardware

AUTOSAR Runtime Environment (RTE)

ActuatorSoftware

Component

AUTOSARInterface

ApplicationSoftware

Component

SensorSoftware

Component

ApplicationSoftware

Component

..............

AUTOSARSoftware

Basic SoftwareStandardized

Interface

AUTOSARInterface

AUTOSARInterface

AUTOSARInterface

MicrocontrollerAbstraction

AUTOSARSoftware

Component

Interface

ECUFirmware

StandardSoftware

StandardizedAUTOSARInterface

Services

StandardizedInterface

ECUAbstraction

AUTOSARInterface

StandardizedInterface

ComplexDeviceDrivers

AUTOSARInterface

API 2VFB & RTErelevant

StandardizedInterface

Communication

StandardizedInterface

StandardizedInterface

OperatingSystem

API 1RTErelevant

API 0

StandardizedInterface

API 3 PrivateInterfaces inside Basic Software

possible ECU-Hardware

AUTOSAR Runtime Environment (RTE)

ActuatorSoftware

Component

AUTOSARInterface

ApplicationSoftware

Component

SensorSoftware

Component

ApplicationSoftware

Component

..............

AUTOSARSoftware

Basic SoftwareStandardized

Interface

AUTOSARInterface

AUTOSARInterface

AUTOSARInterface

MicrocontrollerAbstraction

AUTOSARSoftware

Component

Interface

ECUFirmware

StandardSoftware

StandardizedAUTOSARInterface

Services

StandardizedInterface

ECUAbstraction

AUTOSARInterface

StandardizedInterface

ComplexDeviceDrivers

AUTOSARInterface

API 2VFB & RTErelevant

StandardizedInterface

Communication

StandardizedInterface

StandardizedInterface

OperatingSystem

API 1RTErelevant

API 0

StandardizedInterface

API 3 PrivateInterfaces inside Basic Software

possible

Basic Software

Page 16: AUTOSAR Software Component Development with …...Development of AUTOSAR Software Components with Model-Based Design Dr. Joachim Schlosser Application Engineering The MathWorks GmbH

16

® ®

Key Features

Modularity and configurability

Modular software architecture for automotive ECUsConsideration of HW dependent and HW independent SW modulesIntegration of SW modules provided by different suppliersTransferability of functional SW-modules within a particular E/E-systemScalability of the E/E-system across the entire range of vehicle product lines

from: www.autosar.org

Page 17: AUTOSAR Software Component Development with …...Development of AUTOSAR Software Components with Model-Based Design Dr. Joachim Schlosser Application Engineering The MathWorks GmbH

17

® ®

Applying Simulink to AUTOSAR New in R2008a

Simulink to import and exportAUTOSAR Software Component (SW-C) Descriptions, in XML

Software-in-the-Loop supportAutomatic S-Function configuration and generation for routing simulation data using AUTOSAR RTE API calls

Real-Time Workshop® Embedded Coder to generateAUTOSAR SW-C Implementations (runnables) compliant with AUTOSAR Run Time Environment, in C code

Supports:AUTOSAR v2.0 and v2.1

Page 18: AUTOSAR Software Component Development with …...Development of AUTOSAR Software Components with Model-Based Design Dr. Joachim Schlosser Application Engineering The MathWorks GmbH

18

® ®

Mapping between AUTOSAR SW-C Meta Model and Simulink

AUTOSAR SoftwareComponents

Virtual Functional Bus

AU

TOSA

RSW

-C1

AU

TOSA

RSW

-C2

AU

TOSA

RSW

-C3

AU

TOSA

RSW

-Cn...

SW-CDescription

SW-CDescription

SW-CDescription

SW-CDescription

Page 19: AUTOSAR Software Component Development with …...Development of AUTOSAR Software Components with Model-Based Design Dr. Joachim Schlosser Application Engineering The MathWorks GmbH

19

® ®

Mapping between AUTOSAR SW-C Meta Model and Simulink

Ports andInterfaces

Virtual Functional Bus

AU

TOSA

RSW

-C1

AU

TOSA

RSW

-C2

AU

TOSA

RSW

-C3

AU

TOSA

RSW

-Cn...

SW-CDescription

SW-CDescription

SW-CDescription

SW-CDescription

AU

TOSA

RSW

-C1

SW-CDescription

Page 20: AUTOSAR Software Component Development with …...Development of AUTOSAR Software Components with Model-Based Design Dr. Joachim Schlosser Application Engineering The MathWorks GmbH

20

® ®

Common Workflows

Importing AUTOSAR SW Component Descriptions

AU

TOSA

RSW

-C1

SW-CDescription

Import

Page 21: AUTOSAR Software Component Development with …...Development of AUTOSAR Software Components with Model-Based Design Dr. Joachim Schlosser Application Engineering The MathWorks GmbH

21

® ®

Common Workflows

Controller Design

Development of controller behavior

Page 22: AUTOSAR Software Component Development with …...Development of AUTOSAR Software Components with Model-Based Design Dr. Joachim Schlosser Application Engineering The MathWorks GmbH

22

® ®

Common Workflows

Implementing and publishing Software Components by generating AUTOSAR compliant code

AU

TOSA

RSW

-C1

SW-CDescription

Page 23: AUTOSAR Software Component Development with …...Development of AUTOSAR Software Components with Model-Based Design Dr. Joachim Schlosser Application Engineering The MathWorks GmbH

23

® ®

Volkswagen use of Production Code Generation for AUTOSAR

MAC 2007: http://www.mathworks.com/industries/auto/mac2007/proceedings/

Page 24: AUTOSAR Software Component Development with …...Development of AUTOSAR Software Components with Model-Based Design Dr. Joachim Schlosser Application Engineering The MathWorks GmbH

24

® ®

3 things to remember about AUTOSAR, Model-Based Design with Simulink and Real-Time Workshop Embedded Coder

Ease of use: No structural modelchanges. Switch between AUTOSARand other target without modifying the model. Easy workflows for new and legacymodels, keeping it simple for the user.AUTOSAR is seamlessly integrated in Simulink and Real-Time Workshop environment.

Page 25: AUTOSAR Software Component Development with …...Development of AUTOSAR Software Components with Model-Based Design Dr. Joachim Schlosser Application Engineering The MathWorks GmbH

25

® ®

3 things to remember about AUTOSAR, Model-Based Design with Simulink and Real-Time Workshop Embedded Coder

Ease of use: No structural modelchanges. Switch between AUTOSARand other target without modifying the model. Easy workflows for new and legacymodels, keeping it simple for the user.

Page 26: AUTOSAR Software Component Development with …...Development of AUTOSAR Software Components with Model-Based Design Dr. Joachim Schlosser Application Engineering The MathWorks GmbH

26

® ®

3 things to remember about AUTOSAR, Model-Based Design with Simulink and Real-Time Workshop Embedded Coder

Ease of use: No structural modelchanges. Switch between AUTOSARand other target without modifying the model.

Page 27: AUTOSAR Software Component Development with …...Development of AUTOSAR Software Components with Model-Based Design Dr. Joachim Schlosser Application Engineering The MathWorks GmbH

27

® ®

The one thing to remember about AUTOSAR, Model-Based Design with Simulink and Real-Time Workshop Embedded Coder

Ease of use: No structuralmodel changes. Switchbetween AUTOSAR and other target withoutmodifying the model.