Simulink for AUTOSAR: Best Practices

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

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

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

Generating Industry Standards Production C Code Using Embedded Coder

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

Model-Based Design for Safety Critical Automotive Applications

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

DRYING CONTROL LOGIC DEVELOPMENT USING MODEL BASED DESIGN

Using Model-Based Design in conformance with safety standards

Standardkonforme Absicherung mit Model-Based Design

Automating Best Practices to Improve Design Quality

Model-Based Design: Generating Embedded Code for Prototyping or Production

From Design to Production

Simulink as Your Enterprise Simulation Platform

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

Team-Based Collaboration in Simulink Chris Fillyaw Application Engineer Detroit, MI

AUTOSAR Software Design with PREEvision

Implementation and Verification Daniel MARTINS Application Engineer MathWorks

Ein Modell - viele Zielsysteme

Designing and Analysing Power Electronics Systems Using Simscape and SimPowerSystems

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

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

AVS: A Test Suite for Automatically Generated Code

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

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

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

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

What s New in Simulink in R2015b and R2016a

Increasing Design Confidence Model and Code Verification

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

SCADE. SCADE Suite Tailored for Critical Applications EMBEDDED SOFTWARE

Hardware-Software Co-Design and Prototyping on SoC FPGAs Puneet Kumar Prateek Sikka Application Engineering Team

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

Model-Based Design for Video/Image Processing Applications

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

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

AUTOSAR: from concept to code.

AUTOSAR Method. Webinar

Experiences with AUTOSAR compliant Autocode generation using TargetLink

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

Verification and Validation of High-Integrity Systems

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

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

Codegenerierung für Embedded Systeme leicht gemacht So geht s!

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

SystemDesk - EB tresos Studio - TargetLink Workflow Descriptions

Verification, Validation, and Test with Model-Based Design

Development and Deployment of ECU based Control Systems through MBD. Imperative role of Model based design in System Engineering

2015 The MathWorks, Inc. 1

ISO meets AUTOSAR - First Lessons Learned Dr. Günther Heling

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

What s New in MATLAB and Simulink

Connecting MATLAB & Simulink with your SystemVerilog Workflow for Functional Verification

Accelerating FPGA/ASIC Design and Verification

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

Production Code Generation Introduction and New Technologies

Collaboration in Teams: Simulink Projects Demonstration

Verification and Test with Model-Based Design

What s New In Simulink: Fraser Macmillen

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

Hardware Implementation and Verification by Model-Based Design Workflow - Communication Models to FPGA-based Radio

Dynamic Architectural Simulation Model of YellowCar in MATLAB/Simulink Using AUTOSAR System

Extending Model-Based Design for HW/SW Design and Verification in MPSoCs Jim Tung MathWorks Fellow

Software integration challenge multi-core experience from real world projects

What s New in MATLAB and Simulink

Introducing Simulink R2012b for Signal Processing & Communications Graham Reith Senior Team Leader, UK Application Engineering

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

GAIO. Solution. Corporate Profile / Product Catalog. Contact Information

Model-Based Design for Altera FPGAs Using HDL Code Generation The MathWorks, Inc. 1

Real and Virtual Development with SystemDesk

What s New in MATLAB and Simulink The MathWorks, Inc. 1

Automating Best Practices to Improve Design Quality

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

Reducing the cost of FPGA/ASIC Verification with MATLAB and Simulink

Verification, Validation and Test in Model Based Design Manohar Reddy

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

Master Class: Target Optimized Code Generation Shobhit Shanker Senior Application Engineer-Code Generation & Verification

Optimize DSP Designs and Code using Fixed-Point Designer

MathWorks Products and Prices North America January 2018

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

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

FULL VIRTUALIZATION OF RENAULT'S ENGINE MANAGEMENT SOFTWARE APPLICATION TO SYSTEM DEVELOPMENT

Design and Verify Embedded Signal Processing Systems Using MATLAB and Simulink

Team-Based Collaboration in Simulink

What s New in MATLAB and Simulink

What's new in MATLAB and Simulink for Model-Based Design

Effective Team Collaboration with Simulink

Workflow for Control System Design and Implementation

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

2015 The MathWorks, Inc. 1

Addressing Fixed Point Design Challenges

Agenda. > AUTOSAR Overview. AUTOSAR Solution. AUTOSAR on the way

MATLAB/Simulink in der Mechatronik So einfach geht s!

Virtual Hardware ECU How to Significantly Increase Your Testing Throughput!

Automated Requirements-Based Testing

Accelerate FPGA Prototyping with

Design and Verification of FPGA Applications

Making the Most of your MATLAB Models to Improve Verification

Designing and Prototyping Digital Systems on SoC FPGA The MathWorks, Inc. 1

Reducing Design Errors in Complex State Machines using Model-Based Design

Transcription:

Simulink for AUTOSAR: Best Practices 李智慧高级技术咨询顾问 2015 The MathWorks, Inc. 1

What is AUTOSAR? AUTomotive Open System ARchitecture Objective: Establish an open standard for automotive E/E architecture Partnership Consisting of more than 180 companies from the global automotive industry Latest update: http://www.autosar.org/partners/current-partners/ 2

Agenda Simulink for AUTOSAR - Introduction Workflows Capabilities Simulink for AUTOSAR User Stories Production Code Generation with Embedded Coder Simulink for AUTOSAR Best Practices Best Practices for using Simulink for AUTOSAR Summary & Conclusions 3

Simulink & Stateflow for Behavior Modeling, Embedded Coder for Production Code Software Architecture Definition Behavior Modeling & Code Generation BSW Configuration & RTE Generation 4

Workflows 1. Top-Down, 2. Bottom-Up, 3. Mixed 3. Mixed Roundtrip Engineering 1. Start in AAT 2. Start in Simulink Integration Build 5

Capabilities Simulation Code Generation Configuration 6

Agenda Simulink for AUTOSAR - Introduction Workflows Capabilities Simulink for AUTOSAR User Stories Production Code Generation with Embedded Coder Simulink for AUTOSAR Best Practices Best Practices for using Simulink for AUTOSAR Summary & Conclusions 7

Long-term Successful Collaboration with Volkswagen 2007 2012 from a Proof of Concept project to series production across brands 8

More User Stories 9

Agenda Simulink for AUTOSAR - Introduction Workflows Capabilities Simulink for AUTOSAR User Stories Production Code Generation with Embedded Coder Simulink for AUTOSAR Best Practices Best Practices for using Simulink for AUTOSAR Summary & Conclusions 10

#1 Decide strategy for migrating existing Simulink models to AUTOSAR Clean sheet start Start with existing Simulink models Maintain one model for AUTOSAR and non-autosar SW-C Description AUTOSAR SW-C 1 11

#2 Use one AUTOSAR workflow Select top-down or bottom-up approach Round-trip works best with one clear owner of data Select tools that best support your workflow and AUTOSAR concepts Select simplest approach for applying AUTOSAR configuration to your Simulink model 12

#3 Decide data management Will Simulink or AUTOSAR tools manage data? Will projects or teams define and manage data? How will change management be handled? 13

#4 Establish modeling standards For Simulink and AUTOSAR Base it on your workflow and data management SW-C Description AUTOSAR SW-C 1 Runnable1 Runnable3 Runnable2 Use Simulink Model Advisor to enforce modeling style early in model development 14

#5 Simulate before you generate code Take advantage of early verification through simulation Make sure SWC implementation is correct early Simulate multiple SWC s together in Simulink before code integration Use SIL and PIL to verify the generated code at the unit level before RTE generation RESEARCH REQUIREMENTS DESIGN Environmental Models Mechanical Electrical Control Algorithms Supervisory Logic IMPLEMENTATION C, C++ MCU DSP RTE Generation & INTEGRATION TEST & VERIFICATION 15

#6 Plan ahead for ISO 26262 Determine how AUTOSAR process will address safety-standards Products supported for ISO 26262 tool qualification include: Embedded Coder Simulink V&V Simulink Design Verifier PolySpace Artifacts certified by TÜV SÜD Requires use of V&V workflow ISO 26262 Advisory Service available 16

#7 Use Simulink to migrate legacy code to AUTOSAR Reuse of Legacy Code Integration for simulation, production code generation Can generate AUTOSAR RTE API access points void Runnable_Runnable1(void) { real32_t rtb_tmpsignalconversionatin1out; real32_t rtb_unitdelay; real32_t rtb_sldemo_sfun_filterv1; rtb_tmpsignalconversionatin1out = Rte_IRead_Runnable_Runnable1_Fast_in_Fast_in(); rtb_unitdelay = Component_DWork.UnitDelay_DSTATE; rtb_sldemo_sfun_filterv1 = filterv1( (real32_t)rtb_tmpsignalconversionatin1out, (real32_t)rtb_unitdelay, (real32_t)component_p.sldemo_sfun_filterv1_p1); Rte_IrvIWrite_Runnable_Runnable1_a(rtb_sldemo_sfun_filterV1); Component_DWork.UnitDelay_DSTATE = rtb_sldemo_sfun_filterv1; } 17

#8 Automate, automate, automate Use API s for workflow automation! Manual process is difficult due to: The complexity of the standard, naming conventions Iterative work cycles with AUTOSAR Complex code APIs and XML file definitions %% Setup AUTOSAR Configuration programmatically Use documented MATLAB APIs to configure SWCs in Simulink model = 'rtwdemo_autosar_counter'; % Modify AUTOSAR Properties autosarprops = autosar.api.getautosarproperties(model); set(autosarprops, 'Input', 'IsService', true); set(autosarprops, 'XmlOptions', 'ArxmlFilePackaging','SingleFile'); 18

#9 Use production code generation Hand coding AUTOSAR is painful (Code and description) void Runnable_simple_alg_Step(void) { real_t rtb_gain; real_t rtb_delay; real_t rtb_delay1; real_t rtb_tmpsignalconversionatfast_i; if (simple_alg_m->timing.taskcounters.tid[1] == 0) { Rte_Receive_Fast_in_Fast_in(&rtb_TmpSignalConversionAtFast_i); rtb_delay = simple_alg_dwork.delay_dstate; rtb_delay1 = simple_alg_dwork.delay1_dstate; rtb_gain = simple_alg_dwork.delay2_dstate; rtb_gain = (((rtb_tmpsignalconversionatfast_i + simple_alg_dwork.delay_dstate) + simple_alg_dwork.delay1_dstate) + rtb_gain) * simple_alg_p.gain_gain; if (simple_alg_m->timing.taskcounters.tid[2] == 0) { simple_alg_b.ratetransition = rtb_gain; } simple_alg_dwork.delay_dstate = rtb_tmpsignalconversionatfast_i; simple_alg_dwork.delay1_dstate = rtb_delay; simple_alg_dwork.delay2_dstate = rtb_delay1; } if (simple_alg_m->timing.taskcounters.tid[2] == 0) { Rte_IWrite_Runnable_simple_alg_Step_Out1_Out1(simple_alg_B.RateTransition + Rte_IRead_Runnable_simple_alg_Step_Slow_in_Slow_in()); } rate_scheduler(); } <RUNNABLE-ENTITY UUID="aef16585-a355-494f-accd-1a548ca22e27"> <SHORT-NAME>Runnable_simple_alg_Step</SHORT-NAME> <MINIMUM-START-INTERVAL>0</MINIMUM-START-INTERVAL> <CAN-BE-INVOKED-CONCURRENTLY>false</CAN-BE-INVOKED-CONCURRENTLY> <DATA-READ-ACCESSS> <VARIABLE-ACCESS> <SHORT-NAME>IN_Slow_in_Slow_in</SHORT-NAME> </RUNNABLE-ENTITY> <SENDER-RECEIVER-INTERFACE> <SHORT-NAME>Out1</SHORT-NAME> <IS-SERVICE>false</IS-SERVICE> <DATA-ELEMENTS> <VARIABLE-DATA-PROTOTYPE> <SHORT-NAME>Out1</SHORT-NAME> </VARIABLE-DATA-PROTOTYPE> </DATA-ELEMENTS> </SENDER-RECEIVER-INTERFACE> 19

#10 Actively plan for migration Tools and standards are changing rapidly Account for: New versions of AUTOSAR New versions of Simulink Consider: How often to upgrade What will drive upgrade R2013b R2014a R2014b R2015a IMPORTANT NEW CAPABILITIES R2015b R2011a Source: AUTOSAR, 6th Open Conference 11.13.2013 *R4.2.1 has been released in 2014 MATLAB 2015b supports this revision 20

Best practices for using Simulink with AUTOSAR Decide strategy for migrating existing Simulink models to AUTOSAR Use one AUTOSAR workflow Decide data management Establish modeling standard Simulate before code generation Plan ahead for ISO 26262 Use Simulink to migrate legacy code to AUTOSAR Automate, automate, automate Use production code generation Actively plan for migration 21

Agenda Simulink for AUTOSAR - Introduction Workflows Capabilities Simulink for AUTOSAR User Stories Production Code Generation with Embedded Coder Simulink for AUTOSAR Best Practices Best Practices for using Simulink for AUTOSAR Summary & Conclusions 22

Summary Simulink and Embedded Coder provide extensive AUTOSAR capabilities out-of-the-box, along with API s for workflow automation Leading automotive companies are successfully deploying AUTOSAR for production by leveraging MathWorks tools and industry experience Take advantage of best practices for deploying AUTOSAR with Production Code Generation to accelerate your projects while reducing risk and improving quality 23

Thank you for your attention! Accelerating the pace of engineering and science http://www.mathworks.com/products/ http://www.mathworks.com/services/consulting/ http://www.mathworks.com/solutions/automotive/ 24