+ All Categories
Home > Documents > Implementation and Verification - MathWorks...24 Automated Certification Process Requirements Models...

Implementation and Verification - MathWorks...24 Automated Certification Process Requirements Models...

Date post: 12-Mar-2020
Category:
Upload: others
View: 7 times
Download: 0 times
Share this document with a friend
27
1 © 2014 The MathWorks, Inc. Daniel MARTINS Application Engineer MathWorks [email protected] Implementation and Verification
Transcript
Page 1: Implementation and Verification - MathWorks...24 Automated Certification Process Requirements Models Source Code Object Code MATLAB Simulink Stateflow Embedded Coder Compiler Model

1© 2014 The MathWorks, Inc.

Daniel MARTINS

Application Engineer

MathWorks

[email protected]

Implementation and Verification

Page 2: Implementation and Verification - MathWorks...24 Automated Certification Process Requirements Models Source Code Object Code MATLAB Simulink Stateflow Embedded Coder Compiler Model

2

Agenda

Benefits of Model-Based Design

Verification at Model level

Code generation

Verification at Code level

Certification process

Page 3: Implementation and Verification - MathWorks...24 Automated Certification Process Requirements Models Source Code Object Code MATLAB Simulink Stateflow Embedded Coder Compiler Model

3

Agenda

Benefits of Model-Based Design

Verification at Model level

Code generation

Verification at Code level

Certification process

Page 4: Implementation and Verification - MathWorks...24 Automated Certification Process Requirements Models Source Code Object Code MATLAB Simulink Stateflow Embedded Coder Compiler Model

4

Why do complex systems fail?

Insufficient specification

Design errors

Software coding errors

Mechanical failure

Human errors

Page 5: Implementation and Verification - MathWorks...24 Automated Certification Process Requirements Models Source Code Object Code MATLAB Simulink Stateflow Embedded Coder Compiler Model

5

Benefits of Model-Based Design

Data Modeling

Algorithm Development

Data Analysis

Research

Environments for

Test, Verification &

Validation

Requirements

Continuous V&V

Design

Physical Components

Environment

Algorithms

DSP FPGA ASIC

Embedded Software

Digital Electronics

C, C++ VHDL, Verilog

Implement

Integration

MCU

Page 6: Implementation and Verification - MathWorks...24 Automated Certification Process Requirements Models Source Code Object Code MATLAB Simulink Stateflow Embedded Coder Compiler Model

6

Agenda

Benefits of Model-Based Design

Verification at Model level

Code generation

Verification at Code level

Certification process

Page 7: Implementation and Verification - MathWorks...24 Automated Certification Process Requirements Models Source Code Object Code MATLAB Simulink Stateflow Embedded Coder Compiler Model

7

Is the algorithm model complete?

- Satisfies Modeling Standards?

- Traceability to Requirements ?

- Free of design errors?

- Represents the intended behavior?

- Tested thoroughly?

Page 8: Implementation and Verification - MathWorks...24 Automated Certification Process Requirements Models Source Code Object Code MATLAB Simulink Stateflow Embedded Coder Compiler Model

8

Creating links between textual documents and model objects

Tracing RequirementsModelSimulink Verification and Validation

Page 9: Implementation and Verification - MathWorks...24 Automated Certification Process Requirements Models Source Code Object Code MATLAB Simulink Stateflow Embedded Coder Compiler Model

9

Static analysis of models against a set of checks

– for simulation

– for code generation

– Requirements Consistency

Modeling Standards Checks for:

– MAB Style Guidelines

– DO-178B, IEC 61508, ISO 26262, EN 50128

Modeling Standards Checking OverviewSimulink Verification and Validation

Page 10: Implementation and Verification - MathWorks...24 Automated Certification Process Requirements Models Source Code Object Code MATLAB Simulink Stateflow Embedded Coder Compiler Model

10

Identifying Design Errors EarlySimulink Design Verifier

Automatic identification of hard-to-find design inconsistencies in the model

without running simulation

Integer overflow

Division by zero

Out of bound arrays

Dead logic

Assertion violation

Page 11: Implementation and Verification - MathWorks...24 Automated Certification Process Requirements Models Source Code Object Code MATLAB Simulink Stateflow Embedded Coder Compiler Model

11

Verify the model against the requirementsSimulink Design Verifier

Explicit descriptions of required behavior – functional or safety requirement

Express PropertiesAnalyze model Provide counter example

for falsified property

Page 12: Implementation and Verification - MathWorks...24 Automated Certification Process Requirements Models Source Code Object Code MATLAB Simulink Stateflow Embedded Coder Compiler Model

12

Model Coverage ReportSimulink Verification and Validation

Coverage metrics identifies untested portions of your model

Page 13: Implementation and Verification - MathWorks...24 Automated Certification Process Requirements Models Source Code Object Code MATLAB Simulink Stateflow Embedded Coder Compiler Model

13

Agenda

Benefits of Model-Based Design

Production code generation

Verification of Model, Code and Executable

Code certification

Certification process

Page 14: Implementation and Verification - MathWorks...24 Automated Certification Process Requirements Models Source Code Object Code MATLAB Simulink Stateflow Embedded Coder Compiler Model

14

C/C++ Code generation for Microcontrollers/DSP

Code efficiency

Code integration for C and C++

Code generation from MATLAB

AUTOSAR 4.x

Generated code is smaller than production hand code.

Page 15: Implementation and Verification - MathWorks...24 Automated Certification Process Requirements Models Source Code Object Code MATLAB Simulink Stateflow Embedded Coder Compiler Model

15

HDL Code Generation for ASIC/FPGA

Generates Target-independent HDL Code

– IEEE 1376 compliant VHDL®

– IEEE 1364-2001 compliant Verilog®

Optimization

– Frequency driven timing optimization through automatic pipelining

– Reduced area with multirate delay balancing

– Resource sharing and streaming without over clocking

Support for

– Vivado, ISE, Quartus

– Any Altera and Xilinx boards

– Xilinx Zynq-7000 and Altera SoC platforms

Page 16: Implementation and Verification - MathWorks...24 Automated Certification Process Requirements Models Source Code Object Code MATLAB Simulink Stateflow Embedded Coder Compiler Model

16

Generates IEC 61131-3 structured text:

– Simulink models

– Stateflow charts

– MATLAB code

Support Several IDEs

– 3S-Smart Software Solutions CoDeSys

– B&R Automation Studio

– Beckhoff TwinCAT

– Rockwell Automation RSlogix 5000

– Siemens Step 7

– Rexroth IndraWorks, OMRON Sysmac Studio

Code Generation for PLCs

Page 17: Implementation and Verification - MathWorks...24 Automated Certification Process Requirements Models Source Code Object Code MATLAB Simulink Stateflow Embedded Coder Compiler Model

17

Agenda

Benefits of Model-Based Design

Verification at Model level

Code generation

Verification at Code level

Certification process

Page 18: Implementation and Verification - MathWorks...24 Automated Certification Process Requirements Models Source Code Object Code MATLAB Simulink Stateflow Embedded Coder Compiler Model

18

- Satisfies Coding Standards?

- Represents the intended behavior?

- Free of Run-time errors?

Is the code accurate and complete?

Page 19: Implementation and Verification - MathWorks...24 Automated Certification Process Requirements Models Source Code Object Code MATLAB Simulink Stateflow Embedded Coder Compiler Model

19

MATLAB Distributed

Computing Server

Parallel Computing

Toolbox

MATLAB

Polyspace

Code Prover

Polyspace

Bug Finder

Optional Product stackRequired

• Takes advantage of MATLAB platform

• Check Coding rules : MISRA C:2004,2012, C++ 11

• Identify software defects via static analysis

o 59 checks (memory leak, race condition,

deadlock, …)

• Prove the absence of run-time errors in software

o 25 checks (non initialized pointers, out of

bound arrays, …)

Static code analysis with Polyspace Products

Page 20: Implementation and Verification - MathWorks...24 Automated Certification Process Requirements Models Source Code Object Code MATLAB Simulink Stateflow Embedded Coder Compiler Model

20Production Processor

Execution

• Host/Target

• Nonreal-time

Test the Code on the Production Processor:Simulink with Processor-in-the-loop

Code

Generation

Page 21: Implementation and Verification - MathWorks...24 Automated Certification Process Requirements Models Source Code Object Code MATLAB Simulink Stateflow Embedded Coder Compiler Model

21

MathWorks

Simulink Real-Time

MathWorks

Instrumentation

FPGA-based software

and hardware solutions

Speedgoat I/O modules

and protocol support

Speedgoat tools and

driver library

Speedgoat real-time

target machinesMathWorks

real-time kernel

Test the ECU with a real-time environmentSimulink Real-Time

Page 22: Implementation and Verification - MathWorks...24 Automated Certification Process Requirements Models Source Code Object Code MATLAB Simulink Stateflow Embedded Coder Compiler Model

22

Agenda

Benefits of Model-Based Design

Verification at Model level

Code generation

Verification at Code level

Certification process

Page 23: Implementation and Verification - MathWorks...24 Automated Certification Process Requirements Models Source Code Object Code MATLAB Simulink Stateflow Embedded Coder Compiler Model

23

Development Processes for High-Integrity Applications

High integrity applications development follows standards and guidelines

Standards and Guidelines have objectives for development process activities

– Impose additional constraints on development

– Require creation of additional artifacts

– Require more thorough verification, validation and testing activities

Require evidence that the objectives were met.

Page 24: Implementation and Verification - MathWorks...24 Automated Certification Process Requirements Models Source Code Object Code MATLAB Simulink Stateflow Embedded Coder Compiler Model

24

Automated Certification Process

Requirements

Models

Source Code

Object Code

MATLAB

Simulink

Stateflow

Embedded

Coder

Compiler

Model

Advisor

Polyspace

Bug Finder &

Code Prover

• Requirements

Management

Interface

• System Design

Description

Model/Code

Trace Report

• Processor-in-the-loop

• Code Coverage

Model

Coverage

• SLDV Test Generation

• Processor-in-the-loop

• Code Coverage

Simulink

Code

Inspector

ISO 26262

Iec 62304

EN 50128

Iec 61508

DO 178C

DO 330/331

DO 278

DO 254

Page 25: Implementation and Verification - MathWorks...24 Automated Certification Process Requirements Models Source Code Object Code MATLAB Simulink Stateflow Embedded Coder Compiler Model

25

Key takeaways

Faster development from requirements to code

Better quality through continuous verification

Stronger confidence with the support of international standards

Page 26: Implementation and Verification - MathWorks...24 Automated Certification Process Requirements Models Source Code Object Code MATLAB Simulink Stateflow Embedded Coder Compiler Model

26

Products cited

Model Verification

– Simulink Verification & Validation

– Simulink Design Verifier

Code Generation

– Embedded Coder

– HDL Coder

– PLC Coder

Code Verification

– Polyspace Bug Finder

– Polyspace Code Prover

– Simulink Real-Time

Certification process

– DO Qualification Kit (for DO-178)

– IEC Certification Kit (for ISO 26262

and IEC 61508)

Page 27: Implementation and Verification - MathWorks...24 Automated Certification Process Requirements Models Source Code Object Code MATLAB Simulink Stateflow Embedded Coder Compiler Model

27

Questions?


Recommended