Developing AUTOSAR Compliant Embedded Software Senior Application Engineer Sang-Ho Yoon

Similar documents
Verification and Validation of Models for Embedded Software Development Prashant Hegde MathWorks India Pvt. Ltd.

Simulation-based Test Management and Automation Sang-Ho Yoon Senior Application Engineer

Implementation and Verification Daniel MARTINS Application Engineer MathWorks

Simulink 모델과 C/C++ 코드에대한매스웍스의정형검증툴소개 The MathWorks, Inc. 1

Automating Best Practices to Improve Design Quality

정형기법을활용한 AUTOSAR SWC 의구현확인및정적분석

Testing, Validating, and Verifying with Model-Based Design Phil Rottier

Jay Abraham 1 MathWorks, Natick, MA, 01760

Intro to Proving Absence of Errors in C/C++ Code

Model-Based Design for Safety-Critical and Mission-Critical Applications Bill Potter Technical Marketing April 17, 2008

From Design to Production

Leveraging Formal Methods Based Software Verification to Prove Code Quality & Achieve MISRA compliance

Model-Based Design for High Integrity Software Development Mike Anthony Senior Application Engineer The MathWorks, Inc.

Simulink for AUTOSAR: Best Practices

Leveraging Formal Methods for Verifying Models and Embedded Code Prashant Mathapati Application Engineering Group

Increasing Design Confidence Model and Code Verification

Verification, Validation and Test in Model Based Design Manohar Reddy

Model-Based Design for Safety Critical Automotive Applications

Verification and Validation of High-Integrity Systems

Simulink 를이용한 효율적인레거시코드 검증방안

Static Analysis in C/C++ code with Polyspace

Utilisation des Méthodes Formelles Sur le code et sur les modèles

Verification and Test with Model-Based Design

Verification and Validation Introducing Simulink Design Verifier

Increasing Embedded Software Confidence Model and Code Verification. Daniel Martins Application Engineer MathWorks

Guido Sandmann MathWorks GmbH. Michael Seibt Mentor Graphics GmbH ABSTRACT INTRODUCTION - WORKFLOW OVERVIEW

WHITE PAPER. 10 Reasons to Use Static Analysis for Embedded Software Development

Automatización de Métodos y Procesos para Mejorar la Calidad del Diseño

Automated Requirements-Based Testing

Generating Industry Standards Production C Code Using Embedded Coder

2015 The MathWorks, Inc. 1

Simulink Verification and Validation

Better than Hand Generating Highly Optimized Code using Simulink and Embedded Coder

Automating Best Practices to Improve Design Quality

Guidelines for deployment of MathWorks R2010a toolset within a DO-178B-compliant process

Production Code Generation and Verification for Industry Standards Sang-Ho Yoon Senior Application Engineer

What s New with the MATLAB and Simulink Product Families. Marta Wilczkowiak & Coorous Mohtadi Application Engineering Group

Applications of Program analysis in Model-Based Design

SCADE. SCADE Suite Tailored for Critical Applications EMBEDDED SOFTWARE

Formal Verification of Models and Code Prashant Mathapati Application Engineer Polyspace & Model Verification

R2017b Update 6 Release Notes

System Requirements & Platform Availability by Product for R2016b

Architecture-driven development of Climate Control Software LMS Imagine.Lab Embedded Software Designer Siemens DF PL

Experiences with AUTOSAR compliant Autocode generation using TargetLink

Testing Framework with Simulink Test

Workflow for Control System Design and Implementation

Formal Verification of Flight Control Applications along a Model- Based Development Process A Case Study

DRYING CONTROL LOGIC DEVELOPMENT USING MODEL BASED DESIGN

Testen zur Absicherung automatisierter Transformationsschritte im Model-Based Design

Verification, Validation, and Test with Model-Based Design

SystemDesk - EB tresos Studio - TargetLink Workflow Descriptions

Using Model-Based Design in conformance with safety standards

Testing and Validation of Simulink Models with Reactis

Automatic Code Generation Technology Adoption Lessons Learned from Commercial Vehicle Case Studies

Practical approaches for re-architecture with benefits for AUTOSAR or non-autosar implementations Dave Hoadley Principle Pilot Engineer

Implementing MATLAB Algorithms in FPGAs and ASICs By Alexander Schreiber Senior Application Engineer MathWorks

Final Presentation AUTOCOGEQ GMV, 2017 Property of GMV All rights reserved UNCLASSIFIED INFORMATION

MathWorks Products and Prices North America January 2018

Testing TargetLink. Models and C Code with Reactis

Integrated Workflow to Implement Embedded Software and FPGA Designs on the Xilinx Zynq Platform Puneet Kumar Senior Team Lead - SPC

AUTOSAR design flow. Yoon-Jin Kim Application Engineer. July mentor.com/automotive

Simulink to Embedded Hardware Paul Peeling MathWorks

Standardkonforme Absicherung mit Model-Based Design

Reuse MATLAB Functions and Simulink Models in UVM Environments with Automatic SystemVerilog DPI Component Generation

Simulink as Your Enterprise Simulation Platform

ISO Compliant Automatic Requirements-Based Testing for TargetLink

MathWorks Products and Prices International September 2016

MathWorks Products and Prices Euro Academic January 2018

SIMPLIFYING COMPLEX EMBEDDED DEVELOPMENT PROCESSES WITH MBEDDR

By Jason Ghidella, PhD, and Pieter J. Mosterman, PhD. Left Elevator. actuator. hydraulic system 1 left outer. left inner

Model-Based Design for effective HW/SW Co-Design Alexander Schreiber Senior Application Engineer MathWorks, Germany

Testing. ECE/CS 5780/6780: Embedded System Design. Why is testing so hard? Why do testing?

Introducing Simulink Release 2012b for Control System Development Mark Walker MathWorks

AUTOSAR Software Design with PREEvision

MathWorks Products and Prices Euro Academic September 2016

ConfigurationDesk/RTI. Compatibility with Toolboxes and Blocksets Provided by MathWorks

What s New in MATLAB & Simulink. Prashant Rao Technical Manager MathWorks India

ConfigurationDesk/RTI. Compatibility with Toolboxes and Blocksets Provided by MathWorks

Optimization and Implementation of Embedded Signal Processing Algorithms Jonas Rutström Senior Application Engineer

Model-Based Design for Video/Image Processing Applications

2015 The MathWorks, Inc. 1

ConfigurationDesk/RTI. Compatibility with Toolboxes and Blocksets Provided by MathWorks

Accelerating Stateflow With LLVM

What s New in Simulink Release R2016a and R2016b

2015 The MathWorks, Inc. 1

Testing Simulink Models

ConfigurationDesk/RTI. Compatibility with Toolboxes and Blocksets Provided by MathWorks

Advanced AC Motor Control S/W Development Sang-Ho Yoon Senior Application Engineer The MathWorks

What s New in Simulink in R2015b and R2016a

A Model-Based Reference Workflow for the Development of Safety-Related Software

TargetLink AUTOSAR Guidelines

Real-Time Testing in a Modern, Agile Development Workflow

Tools and Methods for Validation and Verification as requested by ISO26262

Entwicklung zuverlässiger Software-Systeme, Stuttgart 30.Juni 2011

ConfigurationDesk/RTI. Compatibility with Toolboxes and Blocksets Provided by MathWorks

ConfigurationDesk/RTI. Compatibility with Toolboxes and Blocksets Provided by MathWorks

Baseline Testing Services. Whitepaper Vx.x

MATLAB/Simulink 기반의프로그래머블 SoC 설계및검증

AUTOSAR Method. Webinar

What s New in MATLAB and Simulink

Transcription:

Developing AUTOSAR Compliant Embedded Software Senior Application Engineer Sang-Ho Yoon 2015 The MathWorks, Inc. 1

Agenda AUTOSAR Compliant Code Generation AUTOSAR Workflows Starting from Software Component Descriptions in ARXML files (Top-Down Approach) Starting from Simulink (Bottom-up Approach) Verification of AUTOSAR ASWC with Model Verification of AUTOSAR ASWC for Generated Code 2

AUTOSAR Compliant Code Generation 2015 The MathWorks, Inc. 3

What is AUTOSAR? AUTOSAR (AUTomotive Open System ARchitecture) is an open and standardized automotive software architecture Partnership consisting of more than 140 companies from the global automotive industry Source: AUTOSAR, status 04.01.2011 4

What is AUTOSAR? 3-layered Architecture Target-independent application development through an RTE and standardized interfaces Software Architecture Definition Behavior Modeling & Code Generation BSW Configuration & RTE Generation 5

MathWorks AUTOSAR Approach No separate AUTOSAR Blockset needed Code-generation through Mapping AUTOSAR Software Component Approach with Simulink Simultaneous generation of C- code and ARXML- Files Simulink for developing behavior Import and Export of SW Component Description Files (ARXML) Consistency between C-code and ARXML SW-C description files 6

Support for AUTOSAR Workflows Export ARXML Import/Update Simulink model Generate Integrate ARXML C Code 7

Getting Started Start with ARXML files containing AUTOSAR Component descriptions (Top-Down approach) Start with an existing Simulink model (Bottom-Up Approach) 8

Starting from Software Component Descriptions in ARXML files Top-Down Approach 2015 The MathWorks, Inc. 9

Top Down Workflow ARXML Import as new Simulink model Update existing Simulink model 10

Importing ARXML Files %Import ARXML Files importerobj = arxml.importer('rtwdemo_autosar_multirunnables.arxml') %Create new model with interfaces model = importerobj.createcomponentasmodel('/pkg/swc/aswc'); 11

Design Controller from Requirement Case Study : Seat Belt Reminder 12

SBR Algorithm Model Functional Requirements SBR Model 14

Tracing Requirements Model Simulink Verification and Validation Creating links between textual documents and model objects 15

Requirements Traceability Report Simulink Verification and Validation Requirements Report provides screenshots of the model and lists all the associated requirements 16

Simulate and Verify Algorithms 17

Import with Internal Behavior %Import ARXML Files importerobj = arxml.importer('rtwdemo_autosar_multirunnables.arxml') %Create new model with interfaces and internal behavior model = importerobj.createcomponentasmodel('/pkg/swc/aswc',... 'CreateInternalBehavior',true); 18

Updating Existing Models from ARXML V1.arxml Updated to V2.arxml 19

Update Existing Models from ARXML %Import ARXML Files importerobj = arxml.importer('rtwdemo_autosar_multirunnables_v2.arxml') %Update existing model importerobj.updatemodel('aswc') 20

How about Legacy Code? Use of Legacy Code Tool for introduction of existing C code on Simulink models External C Function MATLAB code specification 21

Starting from Simulink Bottom-up Approach 2015 The MathWorks, Inc. 22

Overview: Model AUTOSAR Components Application Layer AUTOSAR Software Component 1 AUTOSAR Software Component n Virtual Functional Bus (VFB) 23

Overview: Mapping Simulink to AUTOSAR Application Layer SW-C Description AUTOSAR Software Component 1 AUTOSAR Software Component 2 AUTOSAR Software Component n AUTOSAR SW-C 1 Virtual Functional Bus (VFB) Data Elements of AUTOSAR S/R Ports Implemented with Simulink I/O 24

Mapping Simulink to AUTOSAR Single Periodic Runnable-Entity Implement with Top-level model SW-C Description Runnable1 AUTOSAR SW-C 1 25

Overview: Mapping Multiple Entry points Runnable-Entity Maps to Function-Call Inputs SW-C Description AUTOSAR SW-C 1 Runnable1 Runnable3 Runnable2 26

Step 0: Design and Simulate Algorithms Functional Requirements SBR Model 27

Step 1: Select AUTOSAR Target 28

Step 2: Launch AUTOSAR Configuration >> rtwdemo_autosar_counter 29

Step 3: Map Between Simulink-AUTOSAR with Mapping Editor View/Edit AUTOSAR Properties Perform mapping of Simulink Entities to AUTOSAR in the Simulink Mapping view 30

Editing AUTOSAR Properties Add/Remove AUTOSAR Entities Edit Properties of AUTOSAR Entities Configure ARXML options 31

Mapping Inports to AUTOSAR Receiver Ports 32

Map Outports to AUTOSAR Sender Ports 33

Map Entry Point Functions for a Model 34

Step4: Validate Configuration 35

Step 5: Generate Code Build model Generates both C & ARXML Code uses RTE APIs for Sender Receiver ports 36

Flexibility to specify Packages 37

Verification of AUTOSAR ASWC with Model 2015 The MathWorks, Inc. 50

Test Cases to Signal Builder Test Cases Signal Builder 51

Module Test-Harness Test Cases (Signal Builder) SBR Model (Model Block) Output Check (Assertion Block) SBR Test-Harness 52

Model Coverage Report Simulink Verification and Validation Coverage metrics identifies untested portions of your model 53

Improving Test Suite Simulink Design Verifier Generating tests to reach coverage criteria Test Generation Test generation from model Test inputs that ensure complete coverage 54

How about Coverage for Legacy Code Software Component includes S-Function for Legacy Code External C Function 55

Coverage for C-code S-Functions Design Coverage Model S-Function C code 56

Verification of AUTOSAR ASWC for Generated Code 2015 The MathWorks, Inc. 57

Software-in-the-Loop (SIL) Testing: Verify Production Controller with Software-in-the-loop Execution Host/Host Nonreal-time Code Generation Compiled C Code S-Function (Windows DLL) 58

Processor-in-the-Loop Testing: Verify Production Controller with Processor-in-the-loop Execution Host/Target Nonreal-time Code Generation Production Processor 59

Verification with SIL/PIL Support for PIL with AUTOSAR target Profile code and measure execution time on target 60

Formal Verification of Generated Code with Polyspace Can you prove absence of run-time errors? 2015 The MathWorks, Inc. 61

Runtime Errors Arithmetic errors Found in (code) Overflows, division by zero, bit-shifts, square root of negative numbers Caused by (model) Faulty scaling, changes in or unknown calibrations, untested data ranges coming out of a subsystem into an arithmetic block Memory corruption Found in (code) Out of bound array indexes Pointer arithmetic Caused by (model) Array manipulation in Stafeflow Hand-written look-up table functions Data truncation Found in (code) Overflows Wrap around Caused by (model) Saturations leading to unexpected data flow inside the generated code Coding errors Found in (code) Non initialized data Dead code leading to unreachable transitions or states Caused by (model) Faulty Stateflow programming 62

CATEGORY OF STATIC ANALYSIS OF USING TOOLS Compiler Warnings Code Metrics, and Coding Rules Error Prevention Error Detection Bug Findings (False negative) Formal Methods (No False negative) 64

Polyspace PRODUCTS Error Prevention Compiler Warnings Code Metrics, and Coding Rules Polyspace Bug Finder Polyspace Code Prover Error Detection Bug Findings (False negative) Polyspace Bug Finder Formal Methods (No False negative) Polyspace Code Prover 65

Polyspace Formal Methods based Static Code Analysis Exhaustively verify code Detect and prove absence of runtime errors Precisely determines and propagates variable ranges Languages supported C, C++, and Ada Verify SW robustness Analyze for full range operating conditions OR Specified ranges of parameters and inputs 66

Fixing the Runtime Error in the Design Trace and Fix Using PolySpace Model Link SL May Overflow (establish traceability between PolySpace analysis and model) 67

Formal Verification in Design phase with Simulink Design Verifier Is it possible to verify early in Design phase? Can you prove your design always satisfies requirements? 2015 The MathWorks, Inc. 68

Identifying Design Errors Early Simulink Design Verifier Static Run-Time Error Detection Automatic identification of hard-to-find design inconsistencies in the model without running simulation Supported detecting types of errors Dead logic Integer overflow Division by zero Range violation Assertion violation Out of bound array access 69

Verifying Design Against Requirements Simulink Design Verifier Improve algorithm, or requirements 3 Functional and Non-Functional Requirement 1 Formal Property 2 Algorithm (System) Formal model (System) Formal Methods Engine informal formal 70

Example of Properties Simple True / False Simple logic blocks Truth table Temporal logic Temporal Logic blocks (part of SLDV demo) Example of using basic templates as building blocks for complex property. Imply blocks (part of SLDV blockset) ~A or B Stateflow / Embedded MATLAB Functions 71

Summary Simulink and Embedded Coder provide extensive AUTOSAR capabilities out-of-the-box. Use one AUTOSAR workflow (Top-Down/Bottom-Up) that best support your workflow and AUTOSAR concepts Take advantage of Production Code Generation to accelerate your AUTOSAR projects while reducing risk and improving quality. Various Model-Based Verification methods can also be applied to AUTOSAR ASWC development. 72

Change the world by Accelerating the pace of discovery, innovation, development, and learning in engineering and science 73