Professional Documents
Culture Documents
Tom Erkkinen
May, 2019
▪ ISO 26262 is functional safety standard for Road Vehicles, consists of:
– Part 1: Vocabulary
– Part 2: Management of functional safety
– Part 3: Concept phase
Rooted in Model-Based Design and states
– Part 4: Product development at the system level
its benefits:
– Part 5: Product development at the hardware level
– Part 6: Product development at the software level The seamless utilization of models facilitates
– Part 7: Production and operation highly consistent and efficient development.
– Part 8: Supporting processes
– Part 9: Automotive Safety Integrity Level (ASIL)-oriented and safety-oriented analyses.
2
Certification Kit
3
ISO 26262-6:2018 notes Simulink and Stateflow as Suitable for
Software Architecture, Design and as basis for Code Generation
Table 2 Software Architecture Design Notations has similar suitability wording for use of Simulink and Stateflow
4
V&V for ISO 26262 Workflow
Code Compilation
Modeling
generation and linking
5
Reference Workflow
Basic tool chain
Simulink Check*
Simulink Test (for PIL)*
Code Compilation
Modeling
generation and linking
*Qualifiable
Simulink / Stateflow / AUTOSAR Blockset Embedded Coder*
6
Reference Workflow
Advanced tool chain
Simulink Check*
Simulink Design Verifier* Simulink Test (for PIL)*
Polyspace*
Code Compilation
Modeling
generation and linking
*Qualifiable
Simulink / Stateflow / AUTOSAR Blockset Embedded Coder*
7
Simulink Requirements
Work with requirements without leaving Simulink
• Author requirements in Simulink • Identify gaps in design or test • Trace to design, code and test
• Drag and drop to create links • Respond to requirement • Understand impact to design
changes
8
Simulink Check
Automate verification and correct models to improve design
Standards &
Edit Time Checking Model Metrics Model Refactoring
Guidelines Checks
• Automate compliance • Find and fix compliance • Analyze complexity, • Find clones and
to standards issues while you design size, reusability modeling patterns
• Customize checks • Avoid rework later • Assess design quality • Refactor to improve
maintainability
Clones
9
Simulink Coverage
Measure test coverage in models and generated code
Model Generated Code Highlighting and
Coverage Coverage Reporting
• Measure test completeness • Find untested generated code • View coverage results on diagrams
• Identify missing tests or • Map results from code to • Manage accumulated coverage
unintended functionality model object results
10
Simulink Test
Develop, manage, and execute simulation-based tests
• Synchronized, simulation • Define inputs and • Author, execute, manage test cases
test environment assessments based on logical, • Review, export, report
temporal conditions
Main Model
Component
under test
Test Harness
Excel input
template and
baseline data
11
Simulink Design Verifier
Use formal methods to identify design errors
Design Error Test Requirements Model
Detection Generation Proving Slicer
• Uncover hard to find • Automate test case • Prove formally design • Simplify models to
dead logic and design generation to complete meets requirements isolate behavior
flaws coverage
12
Qualify tools with IEC Certification Kit and DO Qualification Kit
13
Customer References and Applications
Requirements
Author, manage, and trace requirements
Standards Compliance
Verify compliance with standards and guidelines
Testing
Develop, manage, execute simulation-based tests
Formal Verification
Prove design meets requirements, prove robustness
Coverage Analysis
Measure model and generated code coverage
SIL, PIL
Perform back-to-back testing
15
MathWorks V&V Product Capabilities
Requirements
Simulink Requirements* (New in R2017b)
Standards Compliance
Simulink Check* (New in R2017b)
Testing
Simulink Test
Formal Verification
Simulink Design Verifier
Coverage Analysis
Simulink Coverage* (New in R2017b)
SIL, PIL
Simulink Test
* Customers with Simulink V&V licenses will automatically receive these new products 16
System Composer
17
IEC Certification Kit
18
Your V&V Workflow?
Code Compilation
Modeling
generation and linking
19
Simulink for AUTOSAR
21
AUTOSAR Classic is already on the road
22
AUTOSAR at a System Level
23
Agenda
24
Importing and Exporting AUTOSAR SW-C Descriptions (ARXML files)
25
Introducing AUTOSAR “perspective” in a Simulink model
Quick Property
Help Inspector
Help on View/Edit
configuring AUTOSAR
model for SW-C Properties
AUTOSAR
AUTOSAR ECU
layered architecture Many calls between application software and basic
software
Application Software
Basic Software
27
BSW library Blocks allows user to Simulate Client / Server Calls
Basic Software Library
Rte_IWrite_Runnable_Step_Out1_Out1(Ifl_IntIpoCur_f32_f32
(Rte_IRead_Runnable_Step_In1_In1(), Rte_CData_L_4_single()->Nx,
Rte_CData_L_4_single()->Bp1, Rte_CData_L_4_single()->Table));
29
Agenda
30
Motivation for new AUTOSAR Platforms
▪ Main drivers – Automated driving, Car-2-car/infrastructure applications
31
Expansion of AUTOSAR based on Autonomous Applications
A Adaptive - AUTOSAR
N
A
N
C
N
A N
C
N
C N
N
ARA
RTE
Basic Software Services
Basic Services
ARA
RTE
Basic Software Services
Basic Services
High Performance
Hardware
Hardware/Virtual Machine
Power of Simulation in the Application Layer aligns well with Algorithm Development
34
AUTOSAR Layered Software Architecture
35
Key Concept #1
Everything is a process .. as in “OS process”
OS Process #1 OS Process #2 OS Process #3 OS Process #4
Process life-cycle
Process scheduling management.
37
Key Concept #2
Service-oriented inter-process communication
Linux Machine 1 Linux Machine 2
IPC Network
38
Key Concept #2
Service-oriented communication
▪ Service Interface can contain <<interface example>>
RadarService
– Events (Messages)
• BrakeEvent
– Fields (Data)
• UpdateRate
39
Key Concept #3: Everything is C++
Adaptive Application Adaptive Application Adaptive Application Adaptive Application ASW::XYZ ASW::ABC
Non-PF Service Non-PF Service
User Applications
ara::phm
(local)
ara::per
DDS
IPC
40
Motivation for Simulink to support Adaptive
41
Mapping AUTOSAR AP Concepts to Simulink
Adaptive
Application
RequiredPort
"Radar" : {
// events
"event" : {
“leftLaneDistance"
“leftTurnIndicator“
“leftCarInBlindSpot”
“rightLandDistance”
“rightTurnIndicator”
“rightCarInBlindSpot”
},
// methods
"method" : {
"Calibrate"
"Adjust"
},
// fields
"field" : {
“updateRate"
}
}
42
Mapping AUTOSAR AP Concepts to Simulink
Adaptive
Application
ProvidedPort
"Radar" : {
// events
"event" : {
“leftHazardIndicator”
“rightHazardIndicator"
},
// methods
"method" : {
"Calibrate"
"Adjust"
},
// fields
"field" : {
“updateRate"
}
}
43
Example of Configuring a model for Adaptive Platform
44
Change Target to AUTOSAR Adaptive
45
Enter Code Perspective to start the Configuration process
46
AUTOSAR Quick Start – Set Component
47
Quick Start Complete – Code Mappings setup for AS Port Events
48
Adaptive AUTOSAR Dictionary – Notice the Service Interfaces
49
Generate Code for the Adaptive AUTOSAR Model
50
C++ Adaptive AS Code
ara Functional Cluster API
51
Software Component Description Files Generated
52
Adaptive Standalone Application Code needs a main.cpp
53
Generate Production AUTOSAR Adaptive C++ Code
AUTOSAR support
1. Configure Model
main.cpp <model>.cpp
✓ System Target File
*.hpp *.cpp ✓ AUTOSAR Dictionary
*.arxml 2. Generate C++ code
54
To learn more, please visit AUTOSAR webpage
55