stateflow autocode generation and deployment in embedded ...€¦ · stateflow autocode generation...

15
Strictly Private and Confidential Stateflow autocode generation and deployment in embedded application Manoj E S 08/04/2014

Upload: tranngoc

Post on 03-May-2018

286 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Stateflow autocode generation and deployment in embedded ...€¦ · Stateflow autocode generation and deployment in embedded application Manoj E S 08/04/2014 . ... Stateflow in automotive

Strictly Private and Confidential

Stateflow autocode generation and

deployment in embedded application

Manoj E S 08/04/2014

Page 2: Stateflow autocode generation and deployment in embedded ...€¦ · Stateflow autocode generation and deployment in embedded application Manoj E S 08/04/2014 . ... Stateflow in automotive

Agenda

About Visteon

Automotive HMI trends & challenges

Need for visual authoring tools

Stateflow in automotive HMI

Usecase study results

Page 2

Page 3: Stateflow autocode generation and deployment in embedded ...€¦ · Stateflow autocode generation and deployment in embedded application Manoj E S 08/04/2014 . ... Stateflow in automotive

Product Portfolio

Page 3

• Heating, ventilation

and air conditioning

(HVAC)

• Compressors

• Powertrain cooling

• Fluid transport

• Electric vehicle and

hybrid thermal systems

• Audio & infotainment

Audio head units

Infotainment

Audio components

• Information and

controls

Instrument clusters

Displays

Climate controls

Decorative control

panels

Electronics Interiors

• Cockpit modules

• Instrument panels

• Door panels and trim

• Floor consoles

Page 4: Stateflow autocode generation and deployment in embedded ...€¦ · Stateflow autocode generation and deployment in embedded application Manoj E S 08/04/2014 . ... Stateflow in automotive

Page 4

A Strong and Growing Customer Base

Page 5: Stateflow autocode generation and deployment in embedded ...€¦ · Stateflow autocode generation and deployment in embedded application Manoj E S 08/04/2014 . ... Stateflow in automotive

Page 5

Driving Electronics Technology

Advanced Instrument Clusters

• Third generation reconfigurable clusters

• Leading 3-D graphics

• Superior display resolution

Next Generation Technologies

• Consumer electronics-driven user interaction

• OEM styling freedom

• Optimized viewability

Open Architecture Infotainment

• Contextual, intuitive HMI

• Car-to-Cloud connectivity

• “SmartScreen” smartphone integration

Page 6: Stateflow autocode generation and deployment in embedded ...€¦ · Stateflow autocode generation and deployment in embedded application Manoj E S 08/04/2014 . ... Stateflow in automotive

Develo

pm

ent tim

e

HMI Content in automotive

Page 6

Automobile OEM desire to bring Consumer Electronics features has resulted in

more HMI content in automotive entertainment and driver information systems

– Exponential growth of HMI content

– Development time has almost halved

Time

HM

I C

on

ten

t

2000 2014

Develo

pm

ent tim

e

Page 7: Stateflow autocode generation and deployment in embedded ...€¦ · Stateflow autocode generation and deployment in embedded application Manoj E S 08/04/2014 . ... Stateflow in automotive

Containing the challenge

In order to contain the growing HMI content and reduced development timeline, it

is necessary to adopt tool chains in to development cycle

Page 7

Requirements Analysis

Requirements

Modeling

Code Generation

Subsystem

Testing

Validation Requirements

Analysis

Page 8: Stateflow autocode generation and deployment in embedded ...€¦ · Stateflow autocode generation and deployment in embedded application Manoj E S 08/04/2014 . ... Stateflow in automotive

Software Architecture

Page 8

HMI Architecture adapted for

– Use of tool chains

– PC based development

– Seamless integration in to target hardware

HMI

HMI Model

HMI Control

HMI View

HMI Model

Data

HMI Logic

Data

HMI Graphic

Data

Abstracts Device

& Network Defines Graphic

appearance

Defines HMI Behavior

Page 9: Stateflow autocode generation and deployment in embedded ...€¦ · Stateflow autocode generation and deployment in embedded application Manoj E S 08/04/2014 . ... Stateflow in automotive

Significance of visual authoring tools

With the increased use of TFT displays in the

automobile, HMI has become a brand identity

and a differentiating factor for OEMs

OEMs want to closely monitor the development

of HMI

– Through periodic reviews with PC

executables

– Continuously make changes to optimize user

interface and to keep up with market trends

Conventional development methods cannot

support this quick turn around

Hence it is important to utilize visual authoring

tools in HMI design

– Remove hardware dependency / Develop in

PC

– Quickly incorporate changes, provide

executable to OEMs

HMI Team

HMI

Designer

Lead

Artist

Team

HMI Software

Lead

Gra

ph

ic a

sse

ts

PC

Dem

o / A

pp

lica

tion

Con

stra

ints

Graphic Studio

1-2 Week Cycle

Page 10: Stateflow autocode generation and deployment in embedded ...€¦ · Stateflow autocode generation and deployment in embedded application Manoj E S 08/04/2014 . ... Stateflow in automotive

HMI and State Machine

Simulink/Stateflow provides an easy to

use interface to,

– Model the behavior aspect of HMI

software (using Stateflow)

– Connecting behavior model with third

party graphics display generation

blocks and test input panels (using

Simulink)

– Simulate HMI functioning in PC with

in Simulink

– Generate PC executable with help of

Simulink Coder

– Generate code for embedded target

with Embedded coder

Page 10

HMI follows a state machine principle

– In the current state, information is either presented to user or a user

response is expected

– The next state is determined in response to a user action or a system

event

Page 11: Stateflow autocode generation and deployment in embedded ...€¦ · Stateflow autocode generation and deployment in embedded application Manoj E S 08/04/2014 . ... Stateflow in automotive

Modeling the HMI with Simulink/Stateflow

Page 11

Graphical

Test Input

Panel

HMI

behavior

model

Simulink/Stateflow allows to model the HMI and simulate and test in a PC

environment

Custom Code

Framework

Page 12: Stateflow autocode generation and deployment in embedded ...€¦ · Stateflow autocode generation and deployment in embedded application Manoj E S 08/04/2014 . ... Stateflow in automotive

PC Simulation / Autocode Generation

Page 12

Graphic

Resource

Source

Code

Stateflow®

State Diagram Design

PC Simulation

Auto code Generation

Cross Compile & Download

Custom

Code

Target Hardware

Simulink

Coder

Ui

Framework

Page 13: Stateflow autocode generation and deployment in embedded ...€¦ · Stateflow autocode generation and deployment in embedded application Manoj E S 08/04/2014 . ... Stateflow in automotive

Practical Use case Study

Implement a system check menu for

an instrument cluster

Each system check item follows the

same state behavior

Rather than modelling each item

individually, create state machine

model for generic system check item

The properties of the individual

system check items has been formed

as a C data structure array and

included as custom C code

Resulted in ~4KBytes ROM

requirement which is comparable with

manual implementation ~3.8Kbytes

Page 13

Source

Code

Stateflow®

State Diagram Design

Auto code Generation

Embedded Coder

Custom Code

Page 14: Stateflow autocode generation and deployment in embedded ...€¦ · Stateflow autocode generation and deployment in embedded application Manoj E S 08/04/2014 . ... Stateflow in automotive

Simulink vs Manual Coding

It is beyond doubt that Simulink modelling can bring down cost and time w.r.t

software engineering

The biggest question – “is it a viable option when it comes to feasibility in terms

embedded target resource (ROM/RAM) requirement?”

Our experience is that the design strategy has a great dependency on the

embedded target resource requirement, be it Manual coding or Simulink

modelling

Once the right approach is chosen for a design problem, we can get comparable

results with Simulink modelling

Our own experience is that using Stateflow along with custom C code is the most

efficient way to extract the benefits of both worlds

Page 14

Visual Authoring & Autocode : Development time can be reduced by 75%

Page 15: Stateflow autocode generation and deployment in embedded ...€¦ · Stateflow autocode generation and deployment in embedded application Manoj E S 08/04/2014 . ... Stateflow in automotive

Page 15

www.visteon.com