An Automotive Case Study ERTSS 2016

Similar documents
Operating Systems. VII. Synchronization

Che-Wei Chang Department of Computer Science and Information Engineering, Chang Gung University

Administrivia. Course Objectives. Overview. Lecture Notes Week markem/cs333/ 2. Staff. 3. Prerequisites. 4. Grading. 1. Theory and application

Compiling Techniques

ECEN 651: Microprogrammed Control of Digital Systems Department of Electrical and Computer Engineering Texas A&M University

Synchronous Modelling of Complex Systems

Special Nodes for Interface

The conceptual view. by Gerrit Muller University of Southeast Norway-NISE

Reconfigurable Model for RISC Processors

NCU EE -- DSP VLSI Design. Tsung-Han Tsai 1

EECS 579: Logic and Fault Simulation. Simulation

High Performance Computing

A Formal Model of Clock Domain Crossing and Automated Verification of Time-Triggered Hardware

Lecture 05: High-Level Design with SysML. An Introduction to SysML. Where are we? What is a model? The Unified Modeling Language (UML)

Abstractions and Decision Procedures for Effective Software Model Checking

OHW2013 workshop. An open source PCIe device virtualization framework

Robust Programs with Filtered Iterators

Formal Verification of Systems-on-Chip

Parallel Polynomial Evaluation

Announcements. Project #1 grades were returned on Monday. Midterm #1. Project #2. Requests for re-grades due by Tuesday

CSE370: Introduction to Digital Design

Real Time Operating Systems

ArcGIS Deployment Pattern. Azlina Mahad

CMP 338: Third Class

Developing software that drives machines. Klaas Gadeyne

Ranking Verification Counterexamples: An Invariant guided approach

A Parallel Implementation of the. Yuan-Jye Jason Wu y. September 2, Abstract. The GTH algorithm is a very accurate direct method for nding

Multicore Semantics and Programming

Embedded Systems Design: Optimization Challenges. Paul Pop Embedded Systems Lab (ESLAB) Linköping University, Sweden

A heuristic algorithm for the Aircraft Landing Problem

Testability. Shaahin Hessabi. Sharif University of Technology. Adapted from the presentation prepared by book authors.

The Montana Toolset: Formal Analysis of AADL Specifications

Finite-State Model Checking

Design of Embedded Systems: Models, Validation and Synthesis (EE 249) Lecture 9

Quantitative Safety Analysis of Non-Deterministic System Architectures

GPU Acceleration of Cutoff Pair Potentials for Molecular Modeling Applications

Outline. policies for the first part. with some potential answers... MCS 260 Lecture 10.0 Introduction to Computer Science Jan Verschelde, 9 July 2014

Marwan Burelle. Parallel and Concurrent Programming. Introduction and Foundation

Branch Prediction based attacks using Hardware performance Counters IIT Kharagpur

Engineered System Design and Integration A semantic domain for modeling cyber-physical systems

CS 700: Quantitative Methods & Experimental Design in Computer Science

Formal Verification of Systems-on-Chip Industrial Practices

Digital Systems. Validation, verification. R. Pacalet January 4, 2018

ECE 407 Computer Aided Design for Electronic Systems. Simulation. Instructor: Maria K. Michael. Overview

Dynamic Semantics. Dynamic Semantics. Operational Semantics Axiomatic Semantics Denotational Semantic. Operational Semantics

Synchronous Reactive Systems

Software Verification

Worst-Case Execution Time Analysis. LS 12, TU Dortmund

Pour obtenir le grade de. DOCTEUR DE L UNIVERSITÉ DE GRENOBLE Spécialité : Informatique. Jean-François KEMPF

ECE290 Fall 2012 Lecture 22. Dr. Zbigniew Kalbarczyk

Computer Architecture

Worst-Case Execution Time Analysis. LS 12, TU Dortmund

Runtime Model Predictive Verification on Embedded Platforms 1

Chapter 3. Digital Design and Computer Architecture, 2 nd Edition. David Money Harris and Sarah L. Harris. Chapter 3 <1>

- Why aren t there more quantum algorithms? - Quantum Programming Languages. By : Amanda Cieslak and Ahmana Tarin

A Quantum Chemistry Domain-Specific Language for Heterogeneous Clusters

Real-Time Software Transactional Memory: Contention Managers, Time Bounds, and Implementations

ab initio Electronic Structure Calculations

c 2010 Deepti Kumar Chivukula

Traffic Simulation Toolbox User s Manual

CSE 380 Computer Operating Systems

TDDI04, K. Arvidsson, IDA, Linköpings universitet CPU Scheduling. Overview: CPU Scheduling. [SGG7] Chapter 5. Basic Concepts.

OBEUS. (Object-Based Environment for Urban Simulation) Shareware Version. Itzhak Benenson 1,2, Slava Birfur 1, Vlad Kharbash 1

ArcGIS Enterprise: What s New. Philip Heede Shannon Kalisky Melanie Summers Sam Williamson

N-Synchronous Kahn Networks A Relaxed Model of Synchrony for Real-Time Systems

Embedded Systems 14. Overview of embedded systems design

CHAPTER 5 - PROCESS SCHEDULING

Antonio Falabella. 3 rd nternational Summer School on INtelligent Signal Processing for FrontIEr Research and Industry, September 2015, Hamburg

Formal Methods in Software Engineering

Embedded Systems 23 BF - ES

Comp 11 Lectures. Mike Shah. July 26, Tufts University. Mike Shah (Tufts University) Comp 11 Lectures July 26, / 40

Scheduling of Concurrent Reactive Objects for Embedded Real-Time Systems

Behavioral Simulations in MapReduce

NEC PerforCache. Influence on M-Series Disk Array Behavior and Performance. Version 1.0

Modeling the Effects of AUTOSAR Overhead on Automotive Application Software Timing and Schedulability

Seamless Model Driven Development and Tool Support for Embedded Software-Intensive Systems

A New Kind of Language for Complex Engineering Systems:

GENERALIZATION IN THE NEW GENERATION OF GIS. Dan Lee ESRI, Inc. 380 New York Street Redlands, CA USA Fax:

Chapter 3. Chapter 3 :: Topics. Introduction. Sequential Circuits

ArcGIS Enterprise: What s New. Philip Heede Shannon Kalisky Melanie Summers Shreyas Shinde

Cactus Tools for Petascale Computing

MAGMA MIC 1.0: Linear Algebra Library for Intel Xeon Phi Coprocessors

Effective Entropy for Memory Randomization Defenses

Real Time Operating Systems

Semantic Equivalences and the. Verification of Infinite-State Systems 1 c 2004 Richard Mayr

Parallel PIPS-SBB Multi-level parallelism for 2-stage SMIPS. Lluís-Miquel Munguia, Geoffrey M. Oxberry, Deepak Rajan, Yuji Shinano

Your Virtual Workforce. On Demand. Worldwide. COMPANY PRESENTATION. clickworker GmbH 2017

Towards a Mechanised Denotational Semantics for Modelica

Welcome to MCS 572. content and organization expectations of the course. definition and classification

Introduction to Portal for ArcGIS

Monotonic Abstraction in Parameterized Verification

Introduction to ArcGIS Server Development

LOGIC CIRCUITS. Basic Experiment and Design of Electronics

AUTUMN BREAK HOLIDAY HOME WORK CLASS XI BUSINESS STUDIES

Clojure Concurrency Constructs, Part Two. CSCI 5828: Foundations of Software Engineering Lecture 13 10/07/2014

Analysis of a Boost Converter Circuit Using Linear Hybrid Automata

2 k Factorial Designs Raj Jain

PERFORMANCE METRICS. Mahdi Nazm Bojnordi. CS/ECE 6810: Computer Architecture. Assistant Professor School of Computing University of Utah

Embedded Systems Development

INF2270 Spring Philipp Häfliger. Lecture 8: Superscalar CPUs, Course Summary/Repetition (1/2)

Transcription:

Institut Mines-Telecom Virtual Yet Precise Prototyping: An Automotive Case Study Paris Sorbonne University Daniela Genius, Ludovic Apvrille daniela.genius@lip6.fr ludovic.apvrille@telecom-paristech.fr ERTSS 2016

Context Model-oriented Design of Complex Embedded Systems Nowadays current practice in software development for embedded systems Hardware aspects less frequently designed using this kind of approach Models of software components are generally tested/executed on the local host, then integrated on target once available Even if several virtual prototyping platforms are available before the target is available, they require to re-model software elements in a different input format from the one used in models or programming languages 2/26 Jan.29, 2016 Institut Mines-Telecom, Paris Sorbonne Universites Virtual Yet Precise Prototyping

Virtual Prototyping Related Work MARTE [Vidal et al. DATE 2009] AADL [IFIP-WADL 2004, Ben Youssef et al. ETSS 2014] Arcadia/Capella [Polarsys 2008, https://www.polarsys.org/capella/arcadia.html] [ERTSS 2012] Aims at fully integrated way to model critical software components and candidate hardware architectures Joint use of both AVATAR and SocLib was not well integrated: description of the hardware execution environment only in textual form outside of SysML models 3/26 Jan.29, 2016 Institut Mines-Telecom, Paris Sorbonne Universites Virtual Yet Precise Prototyping

Overview of the Contribution: Method 1. Model refinement 2. Selection of OS, setting of options (scheduling algorithm,... ) 3. Selection of a hardware platform and of task allocation scheme 4. Code generation (press-button approach) 5. Manual code improvement 6. Code compilation and linkage with OS 7. Simulation platform boots the OS and executes the code 8. Execution analysis: sequence diagram or debugger (e.g. gdb) 4/26 Jan.29, 2016 Institut Mines-Telecom, Paris Sorbonne Universites Virtual Yet Precise Prototyping

Overview of the Contribution: Tooling 5/26 Jan.29, 2016 Institut Mines-Telecom, Paris Sorbonne Universites Virtual Yet Precise Prototyping

AVATAR Model-oriented solution for the analysis and design of embedded software SysML diagrams describe the software aspects of the system, its safety and security properties Fully supported by the free software TTool Edit AVATAR models Simulation Formal verification Like in most UML approaches, simulation and formal verification rely on a purely timed functional model, without considering any hardware target (CPU, bus, etc.) 6/26 Jan.29, 2016 Institut Mines-Telecom, Paris Sorbonne Universites Virtual Yet Precise Prototyping

SoCLib and MutekH Hardware platform simulator: SoCLib Virtual prototyping of complex Systems-on-Chip Supports several models of processors, buses, memories Example of CPUs: MIPS, ARM, SPARC, Nios2, PowerPC Two sets of simulation models: TLM = Transaction Level Modeling CABA = Cycle Accurate Bit Accurate Embedded Operating System: MutekH Natively handles heterogeneous multiprocessor platforms POSIX thread support Note: any Operating System supporting POSIX threading that can be compiled for SoCLib could be used 7/26 Jan.29, 2016 Institut Mines-Telecom, Paris Sorbonne Universites Virtual Yet Precise Prototyping

Case Study: An Automotive Application Automotive embedded system Made upon a hundred of Electronic Control Units (ECUs) Interconnection with CAN / FlexRay / MOST Automatic Braking Application Taken from Intelligent Transport System applications and from the EVITA european project 1. Obstacle is detected by a car 2. Information is broadcasted to neighborhood cars 3. A car receiving such an information may decide to make an automatic emergency braking w.r.t.: Vehicle dynamics, vehicle position,... Plausibility check 8/26 Jan.29, 2016 Institut Mines-Telecom, Paris Sorbonne Universites Virtual Yet Precise Prototyping

Active Braking Use Case 9/26 Jan.29, 2016 Institut Mines-Telecom, Paris Sorbonne Universites Virtual Yet Precise Prototyping

Deployment Diagram SysML representation of hardware components, their interconnection, tasks and channels Platforms can be modified in a matter of minutes A valid platform must contain at least one CPU, one memory bank and one terminal for observing the progress By choice, and to be discussed, some details (interrupt controller, simulation aides) are currently transparent to the user 10/26 Jan.29, 2016 Institut Mines-Telecom, Paris Sorbonne Universites Virtual Yet Precise Prototyping

Deployment Diagrams AVATAR specification Deployment Diagram 11/26 Jan.29, 2016 Institut Mines-Telecom, Paris Sorbonne Universites Virtual Yet Precise Prototyping

Deployment Diagram for the Case Study 12/26 Jan.29, 2016 Institut Mines-Telecom, Paris Sorbonne Universites Virtual Yet Precise Prototyping

New Tool Chain Generate fully executable SoCLib specification for MPSoC from Deployment Diagram and software component diagrams block0.c Block Diagram and State Machine SyntaxChecker AVATARSpecification... AVATAR2SOCLIB blockn.c main.c libavatar AVATARDDSpecification LdscriptGenerator ldscript Deployment Diagram DDSyntaxChecker deployinfo.h TopcellGenerator top.cc crosscompiler Application Binary loader SoCLib-cc SoCLib Executable 13/26 Jan.29, 2016 Institut Mines-Telecom, Paris Sorbonne Universites Virtual Yet Precise Prototyping

Model Transformation 1. Libavatar Runtime for SoCLib, implements the AVATAR operators 2. DDSyntaxChecker checks the syntax of the deployment diagrams and identifies their elements 3. AVATAR2SOCLIB translates AVATAR blocks (i.e., software components) into C POSIX tasks and generates the main program 4. TopcellGenerator generates a SystemC top cell for cycle accurate bit accurate simulation 5. LdscriptGenerator generates the linker script, taking into account the mapping specified in the deployment diagram 14/26 Jan.29, 2016 Institut Mines-Telecom, Paris Sorbonne Universites Virtual Yet Precise Prototyping

The AVATAR Runtime Library of functions which capture the semantics of the AVATAR operators that appear in the code of the tasks (delay, asyncread, etc.) and implements them using C/POSIX primitives Focuses on channels; interconnect latencies and cache effects make them difficult to implement efficiently on a MPSoC platform SoClib provides an efficient implementation of asynchronous channels as sowtware objects stored in on-chip memory, based on the Kahn model In order to run on a SoCLib platform, instead of the local workstation, the runtime had to be adapted 15/26 Jan.29, 2016 Institut Mines-Telecom, Paris Sorbonne Universites Virtual Yet Precise Prototyping

Prototyping: Top Cell Generation SystemC instanciation of components, netlist, table associating memory segments, charging of code Some components are transparent to the user (interrupts, simulation infrastructure) 16/26 Jan.29, 2016 Institut Mines-Telecom, Paris Sorbonne Universites Virtual Yet Precise Prototyping

Linker Script Generation Handling the mapping of channels is rather difficult since it is related to the main program, the top cell and the linker script (ldscript) File which defines the memory layout; Associates each entry section to an output section, which receives its address in memory Mapping information from Deployment Diagram is used to generate a file to be included by the ldscript generator d a t a l d r. l o a d f i l e ( s t d : : s t r i n g ( k e r n e l p ) + ";. data ;. channel0 ;.... channel14 ;. cpudata ;. contextdata " ) ; 17/26 Jan.29, 2016 Institut Mines-Telecom, Paris Sorbonne Universites Virtual Yet Precise Prototyping

Code Generation Difficulties Implementing AVATAR channels with existing paradigm for SoCLib (software channel mapped to shared memory) Co-existence of synchronous and asynchronous channels Central request management required for synchronous channels 18/26 Jan.29, 2016 Institut Mines-Telecom, Paris Sorbonne Universites Virtual Yet Precise Prototyping

Extract from generated code for the DrivingPowerReductionStrategy block (1) #i n c l u d e " DrivingPowerReductionStrategy.h" s t a t i c u i n t 3 2 t getreducepowerorder ;... v o i d mainfunc DrivingPowerReductionStrategy ( t r u c t mwmr s channels DrivingPowerReduc t i o n S t r a t e g y [ ] ) { st r uc t mwmr s DangerAvoidanceStrategy reducepower DrivingPowerReductionStrategy get ReducePowerOrder= channels DrivingPowerReductionStrategy [ 0 ] ; i n t v a l u e = 0 ; i n t minreducepowertime = 1 0 ; i n t maxreducepowertime = 2 0 ; i n t c u r r e n t S t a t e = STATE START STATE ;... p t h r e a d c o n d i n i t (& mycond, NULL ) ; f i l l L i s t O f R e q u e s t s (& l i s t, myname, & mycond, & mainmutex ) ; 19/26 Jan.29, 2016 Institut Mines-Telecom, Paris Sorbonne Universites Virtual Yet Precise Prototyping

Extract from generated code for the DrivingPowerReductionStrategy block (2) w h i l e ( c u r r e n t S t a t e!= STATE STOP STATE ) { s w i t c h ( c u r r e n t S t a t e ) { case STATE START STATE : c u r r e n t S t a t e = STATE WaitForReducePowerOrder ; break ; case STATE WaitForReducePowerOrder : p a r a m s 0 [ 0 ] = &v a l u e ; makenewrequest(& r e q 0, 853, RECEIVE SYNC REQUEST, 0, 0, 0, 1, p a r a m s 0 ) ; req0. syncchannel = & DangerAvoidanceStrategy reducepower\ DrivingPowerReductionStrategy getreducepowerorder ; returnrequest = executeonerequest (& l i s t, & req0 ) ; c l e a r L i s t O f R e q u e s t s (& l i s t ) ; D r i v i n g P o w e r R e d u c t i o n S t r a t e g y a p p l y R e d u c e P o w e r ( v a l u e ) ; c u r r e n t S t a t e = STATE WaitForReducePowerToBePerformed ; break ; case STATE WaitForReducePowerToBePerformed : waitfor ( minreducepowertime, maxreducepowertime ) ; DrivingPowerReductionStrategy reducepowerdone ( ) ; c u r r e n t S t a t e = STATE WaitForReducePowerOrder ; break ; } } r e t u r n NULL ; } 20/26 Jan.29, 2016 Institut Mines-Telecom, Paris Sorbonne Universites Virtual Yet Precise Prototyping

Code Generation: Declaration of Channels s y n c c h a n n e l D a n g e r A v o i d a n c e S t r a t e g y r e d u c e P o w e r DrivingPowerReductionStrategy getreducepowerorder ; u i n t 3 2 t c o n s t DangerAvoidanceStrategy reducepower D r i v i n g P o w e r R e d u c t i o n S t r a t e g y g e t R e d u c e P o w e r O r d e r l o c k= LOCKSADDR+0x0 ; s tr uc t mwmr status s D a n g e r A v o i d a n c e S t r a t e g y r e d u c e P o w e r D r i v i n g P o w e r R e d u c t i o n S t r a t e g y g e t R e d u c e P o w e r O r d e r s t a t u s = MWMR STATUS INITIALIZER (1, 1 ) ; u i n t 8 t DangerAvoidanceStrategy reducepower DrivingPowerReductionStrategy getreducepowerorder data [ 3 2 2 ] ; s tr uc t mwmr s DangerAvoidanceStrategy reducepower D r i v i n g P o w e r R e d u c t i o n S t r a t e g y g e t R e d u c e P o w e r O r d e r = MWMR INITIALIZER ( 1, 1, D a n g e r A v o i d a n c e S t r a t e g y r e d u c e P o w e r D r i v i n g P o w e r R e d u c t i o n S t r a t e g y getreducepowerorder data,& DangerAvoidanceStrategy reducepower DrivingPowerReductionStrategy getreducepowerorder status, " DangerAvoidanceStrategy_reducePower DrivingPowerReductionStrategy_getReducePowerOrder ", D a n g e r A v o i d a n c e S t r a t e g y r e d u c e P o w e r D r i v i n g P o w e r R e d u c t i o n S t r a t e g y getreducepowerorder lock ) ; 21/26 Jan.29, 2016 Institut Mines-Telecom, Paris Sorbonne Universites Virtual Yet Precise Prototyping

Code Generation: Extract from Main Program i n t main ( i n t argc, char a r g v [ ] ) {... s tr uc t mwmr s channels array DrivingPowerReductionStrategy [ 1 ] ; channels array DrivingPowerReductionStrategy [ 0 ] =&D a n g e r A v o i d a n c e S t r a t e g y r e d u c e P o w e r D r i v i n g P o w e r R e d u c t i o n S t r a t e g y getreducepowerorder ; p t r =m a l l o c ( s i z e o f ( p t h r e a d t ) ) ; t h r e a d D r i v i n g P o w e r R e d u c t i o n S t r a t e g y= ( p t h r e a d t ) p t r ; a t t r t = m a l l o c ( s i z e o f ( p t h r e a d a t t r t ) ) ; a t t r t >cpucount = 2 ; debugmsg ( " Starting tasks " ) ; pthread create (& thread DrivingPowerReductionStrategy, NULL, mainfunc DrivingPowerReductionStrategy, ( v o i d ) channels array DrivingPowerReductionStrategy ) ; 22/26 Jan.29, 2016 Institut Mines-Telecom, Paris Sorbonne Universites Virtual Yet Precise Prototyping

Using TTool/SoCLib 23/26 Jan.29, 2016 Institut Mines-Telecom, Paris Sorbonne Universites Virtual Yet Precise Prototyping

Using TTool/SoCLib 24/26 Jan.29, 2016 Institut Mines-Telecom, Paris Sorbonne Universites Virtual Yet Precise Prototyping

Limitations Currently Overcome Variations of the interconnect (bus, CAN, etc.) Central manager handling synchronous and asynchronous channels Mid and longer term Simulation speed Currently PowerPCs only: crosscompilers Clustered interconnect 25/26 Jan.29, 2016 Institut Mines-Telecom, Paris Sorbonne Universites Virtual Yet Precise Prototyping

Future Work Extensions Integration of application specific co-processors Animation and performance evaluation with Lip6 tools Feedback of results for Design Space Exploration Long term : Design Space Exploration METROPOLIS SPADE SESAME ARTEMIS To try/download TTool: 26/26 Jan.29, 2016 Institut Mines-Telecom, Paris Sorbonne Universites Virtual Yet Precise Prototyping