AUTOSAR Software Component Development with

31 downloads 0 Views 3MB Size Report
AUTOSAR, Model-Based Design with Simulink and Real-Time Workshop Embedded Coder. ▫ Ease of use: No structural ... Documentation. Perform: • Simulation.
®

®

© 2008 The MathWorks, Inc.

Development of AUTOSAR Software Components with Model-Based Design

Dr. Joachim Schlosser Application Engineering The MathWorks GmbH

®

®

3 things to remember about AUTOSAR, Model-Based Design with Simulink and Real-Time Workshop Embedded Coder ƒ Ease of use: No structural model

changes. Switch between AUTOSAR and other target without modifying the model. ƒ Easy workflows for new and legacy models, keeping it simple for the user. ƒ AUTOSAR is seamlessly integrated in Simulink and Real-Time Workshop environment. 2

®

®

Automotive Open System Architecture

ƒ Motivation ƒ Management 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

ƒ Goal

from: www.autosar.org

ƒ The objective of the partnership is the establishment of an open standard

for automotive E/E architecture

*Electric/Electronic

3

®

®

4

®

®

Agenda ƒ Introduction to Model-Based Design ƒ Introduction to Codegeneration ƒ AUTOSAR ƒ Overview

ƒ The MathWorks approach to AUTOSAR ƒ Applying Simulink to AUTOSAR: What‘s New in R2008a

ƒ Common Workflows

5

®

®

© 2008 The MathWorks, Inc.

Introduction to Model-Based Design

6

®

®

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

Requirements

Design

Specifications

Architecture Mechanical

Integrate

Control Design

Electrical

Embedded Software

System SystemTesting Testing

Implement

7

®

®

Architecture

Environment Environment

System System

Subsystem SubsystemBB

Real-Time Software Prototypes

Component ComponentBB

Generate

Generate

Component ComponentAA

Embedded Software

Digital Electronics

C, C++

HDL (VHDL, Verilog)

MCU

DSP

FPGA

Integration

Implement

Specifications

Continuous Verification & Validation

Subsystem SubsystemAA

Execution Execution Harness Harness

Model-Based Design enforces continuous testing and verification throughout the design Requirements System Design process Generate: • Assertions • Test results • Documentation Perform: • Simulation • Verification • Design Analysis • Traceability Analysis

ASIC

Rapid Prototyping HW-in-the-Loop SW-in-the-Loop

8

®

®

Benefits of Model-Based Design ƒ Cost ƒ Minimize prototypes and re-work ƒ Facilitates design reuse

ƒ Schedule ƒ Shortens time-to-market ƒ Enhances team communication

ƒ Performance ƒ Fosters innovation ƒ Improves quality

9

®

®

© 2008 The MathWorks, Inc.

Introduction to Code Generation

10

®

®

Core Code Generation Building Blocks Real-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 ƒ Communication with compiler IDE Target Support Package™ ƒ Makes it easy to deploy generated code on particular microprocessors including You can deploy code on any microprocessor using Real-Time Workshop and Real-Time Workshop Embedded Coder because they generate standard C (ANSI/ISO-C). 11

®

®

Multiple Domain Code Generation Simulink Stateflow®

Real-Time Workshop® / Stateflow Coder Real-Time Workshop Embedded Coder

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

Functional Rapid Prototyping and HIL Rapid Prototyping • xPC Target • Real-Time Windows Target • VxWorks Example

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

12

© 2008 The MathWorks, Inc.

® ®

AUTOSAR

13

®

®

Membership Core Members

Premium Members + 50 other companies

Associate Members

14

®

®

Architecture AUTOSAR Software Component

Interface

ECU Firmware Standard Software

API 0 API 3 Private Interfaces inside Basic Software possible

Actuator Software Component

Sensor Software Component

AUTOSAR Interface

AUTOSAR Interface

AUTOSAR Interface

AUTOSAR Software

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

Application Software Component AUTOSAR Interface

AUTOSAR Runtime Environment (RTE) Standardized Interface

Operating System

Standardized Interface

API 2 VFB & RTE relevant API 1 RTE relevant

Application Software Component

Standardized AUTOSAR Interface

Standardized Interface

Services

Communication

AUTOSAR Interface

AUTOSAR Interface

ECU Abstraction Standardized Interface

BasicStandardized Software Interface

Standardized Interface

Basic Software

Standardized Interface

Complex Device Drivers

Microcontroller Abstraction

ECU-Hardware 15

®

®

Key Features ƒ Modularity and configurability ƒ Modular software architecture for automotive ECUs ƒ Consideration of HW dependent and HW independent SW

modules ƒ Integration of SW modules provided by different suppliers ƒ Transferability of functional SW-modules within a particular E/Esystem ƒ Scalability of the E/E-system across the entire range of vehicle product lines from: www.autosar.org

16

®

®

Applying Simulink to AUTOSAR New in R2008a ƒ Simulink to import and export ƒ AUTOSAR Software Component (SW-C) Descriptions, in XML

ƒ Software-in-the-Loop support ƒ Automatic S-Function configuration and generation for routing

simulation data using AUTOSAR RTE API calls

ƒ Real-Time Workshop® Embedded Coder to generate ƒ AUTOSAR SW-C Implementations (runnables) compliant with

AUTOSAR Run Time Environment, in C code

ƒ Supports: ƒ AUTOSAR v2.0 and v2.1

17

®

®

Mapping between AUTOSAR SW-C Meta Model and Simulink ...

AUTOSAR SW-C n

AUTOSAR SW-C 3

AUTOSAR SW-C 2

AUTOSAR SW-C 1

ƒ AUTOSAR Software Components

SW-C Description

SW-C SW-C SW-C Description Description Description

Virtual Functional Bus

18

®

®

Mapping between AUTOSAR SW-C Meta Model and Simulink ...

AUTOSAR SW-C n

AUTOSAR SW-C 3

AUTOSAR SW-C 2

AUTOSAR SW-C 1

ƒ Ports and Interfaces

SW-C Description

SW-C SW-C SW-C Description Description Description

Virtual Functional Bus

19

®

®

Common Workflows ƒ Importing AUTOSAR SW Component Descriptions SW-C Description AUTOSAR SW-C 1

Import

20

®

®

Common Workflows ƒ Development of controller behavior

Controller Design

21

®

®

Common Workflows ƒ Implementing and publishing Software Components by generating AUTOSAR compliant code

SW-C Description AUTOSAR SW-C 1

22

®

®

Volkswagen use of Production Code Generation for AUTOSAR

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

®

®

3 things to remember about AUTOSAR, Model-Based Design with Simulink and Real-Time Workshop Embedded Coder ƒ Ease of use: No structural model

changes. Switch between AUTOSAR and other target without modifying the model. ƒ Easy workflows for new and legacy models, keeping it simple for the user. ƒ AUTOSAR is seamlessly integrated in Simulink and Real-Time Workshop environment. 24

®

®

3 things to remember about AUTOSAR, Model-Based Design with Simulink and Real-Time Workshop Embedded Coder ƒ Ease of use: No structural model

changes. Switch between AUTOSAR and other target without modifying the model. ƒ Easy workflows for new and legacy models, keeping it simple for the user.

25

®

®

3 things to remember about AUTOSAR, Model-Based Design with Simulink and Real-Time Workshop Embedded Coder ƒ Ease of use: No structural model

changes. Switch between AUTOSAR and other target without modifying the model.

26

®

®

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

ƒ Ease of use: No structural model changes. Switch between AUTOSAR and other target without modifying the model. 27