Follow us Press here 1 #LEARN_IN DEPTH #Be_professional_in embedded_system Automotive Embedded Systems part6 (AUTOSAR Application Layer). ENG.KEROLES SHENOUDA https://www.facebook.com/groups/embedded.system.KS/ Follow us Press here 2 #LEARN_IN DEPTH #Be_professional_in embedded_system AUTOSAR APPLICATION LAYER it's time to wake up Learn In Depth https://www.facebook.com/groups/embedded.system.KS/ Follow us Press here 3 #LEARN_IN DEPTH #Be_professional_in embedded_system Use Cases of AUTOSAR https://www.facebook.com/groups/embedded.system.KS/ Follow us Use Case ‘Pedal Management’ view for one ECU Source: www.autosar.org Press here 4 #LEARN_IN DEPTH #Be_professional_in embedded_system https://www.facebook.com/groups/embedded.system.KS/ Follow us Use Case ‘Pedal Management’ view for two ECUs Press here 5 #LEARN_IN DEPTH #Be_professional_in embedded_system Source: www.autosar.org https://www.facebook.com/groups/embedded.system.KS/ Follow us Use case ‘FrontLight Managem ent’ in AUTOSAR Source: www.autosar.org Press here 6 #LEARN_IN DEPTH #Be_professional_in embedded_system https://www.facebook.com/groups/embedded.system.KS/ Follow us Use case ‘Front-Light Management’ in AUTOSAR on different ECUs Source: www.autosar.org Press here 7 #LEARN_IN DEPTH #Be_professional_in embedded_system https://www.facebook.com/groups/embedded.system.KS/ Follow us AUTOSAR Basic Software Modules Source: www.autosar.org Press here 8 #LEARN_IN DEPTH #Be_professional_in embedded_system https://www.facebook.com/groups/embedded.system.KS/ Follow us Press here Example: “NVRAM Manager” ensures the storage and maintenance of non-volatile data and is independent of the design of the ECU 9 #LEARN_IN DEPTH #Be_professional_in embedded_system Source: www.autosar.org https://www.facebook.com/groups/embedded.system.KS/ Follow us Press here AUTOSAR System Design Process 10 #LEARN_IN DEPTH #Be_professional_in embedded_system https://www.facebook.com/groups/embedded.system.KS/ Follow us Press here AUTOSAR System Design Process 11 #LEARN_IN DEPTH #Be_professional_in embedded_system https://www.facebook.com/groups/embedded.system.KS/ Follow us Press here AUTOSAR System Design Process 12 #LEARN_IN DEPTH #Be_professional_in embedded_system https://www.facebook.com/groups/embedded.system.KS/ Follow us Press here AUTOSAR System Design Process 13 #LEARN_IN DEPTH #Be_professional_in embedded_system https://www.facebook.com/groups/embedded.system.KS/ Follow us Press here 14 #LEARN_IN DEPTH #Be_professional_in embedded_system Application Layer https://www.facebook.com/groups/embedded.system.KS/ Follow us Application Layer SWC Press here 15 #LEARN_IN DEPTH #Be_professional_in embedded_system The purpose of the application layer is to provide the actual functionality of the system. This is done through the usage of SWCs, which are components containing software. https://www.facebook.com/groups/embedded.system.KS/ Follow us Press here Intra- and Inter-ECU Communication 16 #LEARN_IN DEPTH #Be_professional_in embedded_system Software components An application consists of one or SWCs more based in the Application layer. In order for SWCs to communicate with each other they use (VFB). the virtual functional bus From a SWC’s point of view all it sees is the VFB and not the hardware dependent BSW and the hardware itself Source: www.autosar.org https://www.facebook.com/groups/embedded.system.KS/ Follow us Press here SWC elements 17 #LEARN_IN DEPTH #Be_professional_in embedded_system Ports PPort provide port Rport require port PRPort provide require port Internal Behavior Runnables RTE Events InterrunnableVaribales Implementation (source or object code) https://www.facebook.com/groups/embedded.system.KS/ Follow us Press here 18 SWC Types #LEARN_IN DEPTH #Be_professional_in embedded_system Application software component is an atomic software component that carries out an application or part of it. It can use ALL AUTOSAR communication mechanisms and services Sensoractuator software component is an atomic SWC that handles the specifics of sensors or actuators. It directly interacts with the ecu-abstraction. Parameter software component Atomic SWC it provides parameter values. They can be fixed data, const or variable. It allows access to fixed data or calibration data They don’t have an internal behavior They only have PPorts of Parameter Interfce type Need to be on the same ECU as the SWCs accessing them since a parameter SWC represents the memory containing the calibration parameter https://www.facebook.com/groups/embedded.system.KS/ Follow us Press here 19 SWC Types #LEARN_IN DEPTH #Be_professional_in embedded_system Service software component provides services specified by AUTOSAR through interfaces specified by AUTOSAR. This component may interact directly with modules from BSW Represents the different BSW Module services in the VFB view Complex driver software component it generalizes the ECUAbstraction component. It can define ports to interact with components in specific ways and can also directly interact with BSW modules Complex device drivers can use BSW services Complex device drivers exist to fulfill certain needs: Implementing a complex application that cannot be otherwise implemented due to the AUTOSAR BSW layered architecture Timing critical applications Non-AUTOSAR applications within AUTOSAR ECU Nvblock software component it allows SWCs to access NV data It represents the Nvmanager from BSW layer https://www.facebook.com/groups/embedded.system.KS/ Follow us Press here SWC Design (create atomic SWC) 20 #LEARN_IN DEPTH #Be_professional_in embedded_system It is the smallest part. It is possible to instantiate more than one instance of this Software Component (i.e. to use an measuring Software Component for the left and for the right door) https://www.facebook.com/groups/embedded.system.KS/ Follow us Press here Internal Behaviour 21 #LEARN_IN DEPTH #Be_professional_in embedded_system The Internal Behaviour is the most complex part of the Software Component Description Each Atomic Software Component is adviced to have only one Internal Behaviour Internal Behavior the Internal Behavior consists of the following main elements Runnable Entities RTEEvents Exclusive Areas RunnableExecution Constraints PerInstanceMemory (PIM) Atomic SWC https://www.facebook.com/groups/embedded.system.KS/ Follow us Meta-model of the Internal Behavior Press here 22 #LEARN_IN DEPTH #Be_professional_in embedded_system https://www.facebook.com/groups/embedded.system.KS/ Follow us Press here Runnable Entities 23 #LEARN_IN DEPTH #Be_professional_in embedded_system Each Atomic Software Component consists of at least one Runnable Entity that executes code. A Runnable Entity serves to structure the Software Component's functionality. Each Runnable Entity can be scheduled or triggered individually and independently from other Runnable Entities. Runnable Each Runnable Entity should be triggered by at least one Event. Runnable Entities are implemented by C-functions Atomic SWC https://www.facebook.com/groups/embedded.system.KS/ Follow us Press here 24 SW Components and Runnables SW-Components atomic components with respect to mapping provided by one supplier Sensor SWC #LEARN_IN DEPTH #Be_professional_in embedded_system Runnables atomic components with respect to execution attached to different OS Tasks runnableA SW-C 1 runnableB RTE BSW runnableC https://www.facebook.com/groups/embedded.system.KS/ Follow us Press here Runnables and Tasks 25 #LEARN_IN DEPTH #Be_professional_in embedded_system SW architecture example: 2 SW components, 6 runnables runnableA SW-C 1 runnableY runnableB runnableX runnableZ runnableC SW-C2 RTE BSW ECU 1 OS runnableX OS OS Schedule and timing dependencies runnableZ runnableZ runnableC runnableB runn ableA runnableY https://www.facebook.com/groups/embedded.system.KS/ Follow us Press here 26 Events #LEARN_IN DEPTH #Be_professional_in embedded_system Events trigger Runnable Entities. These elements will then be referenced within the XML denition of the Runnable Entity. These events can be from different types: Runnable AsynchronousServerCallReturnsEvent: The event is raised when an asynchronous server call is finished. DataSendCompletedEvent: This event is raised when the referenced data element have been sent or an error occurs. event DataReceivedEvent: This event is raised when the referenced data elements are received Atomic SWC https://www.facebook.com/groups/embedded.system.KS/ Follow us Press here 27 Events #LEARN_IN DEPTH #Be_professional_in embedded_system DataReceiveErrorEvent: This event is raised by the RTE when the communication layer detects and notifies an error concerning the reception of the referenced data element. OperationInvokedEvent: The OperationInvokedEvent references the operation invoked by the client. TimingEvent: A TimingEvent references the Runnable Entity that needs to be started in responseto the TimingEvent. ModeSwitchEvent: ModeTypes can be used in order to transmit status information. such that ECUs can then start or disable services. Consequently whenever a Mode is entered or exited a Runnable Entity must be started https://www.facebook.com/groups/embedded.system.KS/ Follow us Press here 28 Example : (TimingEvent ) A TimingEvent #LEARN_IN DEPTH #Be_professional_in embedded_system is the most common applied Trigger Event <TIMING-EVENT> <SHORT-NAME> TimingEvent_10ms </SHORT-NAME> <START-ON-EVENT-REF DEST="RUNNABLE-ENTITY"> RunnableA </START-ON-EVENT-REF> <PERIOD> 0.01 </PERIOD> </TIMING-EVENT> https://www.facebook.com/groups/embedded.system.KS/ Follow us Press here Example : (DataReceivedEvent) 29 #LEARN_IN DEPTH #Be_professional_in embedded_system <DATA-RECEIVED-EVENT> <SHORT-NAME> dre1 </SHORT-NAME> <START-ON-EVENT-REF DEST="RUNNABLE-ENTITY"> RunnableA </START-ON-EVENT-REF> <DATA-IREF> <R-PORT-PROTOTYPE-REF DEST="R-PORT-PROTOTYPE"> port </R-PORT-PROTOTYPE-REF> <DATA-ELEMENT-PROTOTYPE-REF DEST="DATA-ELEMENT-PROTOTYPE"> De1 </DATA-ELEMENT-PROTOTYPE-REF> </DATA-IREF> </DATA-RECEIVED-EVENT> https://www.facebook.com/groups/embedded.system.KS/ Follow us Press here 30 Exclusive Areas #LEARN_IN DEPTH #Be_professional_in embedded_system The RTE provides a mechanism to synchronize the access to Exclusive Areas. Exclusive areas are critical sections and lead to preemption-avoidance if a event Runnable Entity enters or exits it. An Exclusive Area ensures the atomical access to a resource. This can be indicated by using the following two API functions: Runnable A void Rte_Enter_<name> (); void Rte_Exit_<name> (); Exclusive Area This simply is indicated by the following XMLcode <EXCLUSIVE-AREA> <SHORT-NAME> Runnable B name </SHORTNAME> </EXCLUSIVE-AREA> Now, all Runnable Entities within this Internal Behaviour have the ability to use this Exclusive Area Atomic SWC https://www.facebook.com/groups/embedded.system.KS/ Follow us Press here Ports 31 #LEARN_IN DEPTH #Be_professional_in embedded_system These ports are used to connect the SWC to other instances. The most basic type of ports are the sender and receiver ports. These are used to provide means of data transmission between different SWCs, or between the SWC and the RTE. Another common type of port interface is the Client/Server. These ports are used when the SWC needs to use a function (in the application layer these are known as runnables) contained within another SWC or a function of a BSW module. https://www.facebook.com/groups/embedded.system.KS/ Follow us Graphical representation of sender-receiver ports Press here 32 #LEARN_IN DEPTH #Be_professional_in embedded_system https://www.facebook.com/groups/embedded.system.KS/ Follow us Graphical representation of clientserver ports Press here 33 #LEARN_IN DEPTH #Be_professional_in embedded_system https://www.facebook.com/groups/embedded.system.KS/ Follow us Events of the RTE simply called RTEEvents Press here 34 #LEARN_IN DEPTH #Be_professional_in embedded_system https://www.facebook.com/groups/embedded.system.KS/ Follow us Events of the RTE simply called RTEEvents Press here 35 #LEARN_IN DEPTH #Be_professional_in embedded_system https://www.facebook.com/groups/embedded.system.KS/ Follow us event Press here 36 Runnable A Compositions #LEARN_IN DEPTH #Be_professional_in embedded_system Exclusiv e Area Runnable B which Software Components belong together? Atomic SWC How do these Software Components interact with each other? Which elements will be transmitted between them? event event Runnable A Runnable A Exclusiv e Area Exclusiv e Area Runnable B SWC1 Runnable B SWC2 https://www.facebook.com/groups/embedded.system.KS/ Follow us Press here 37 #LEARN_IN DEPTH #Be_professional_in embedded_system AUTOSAR OS https://www.facebook.com/groups/embedded.system.KS/ Follow us Press here 38 ECU manager #LEARN_IN DEPTH #Be_professional_in embedded_system The ECU manager controls the initialization of the OS, as well as the initialization of the MCU-drivers for example the DIO-drivers, CANdrivers, and the Port drivers. the shutdown of the OS as well. https://www.facebook.com/groups/embedded.system.KS/ Follow us Press here 39 #LEARN_IN DEPTH #Be_professional_in embedded_system Prepare your self for the next session (Mapping to OS tasks ) #LEARN_IN_DEPTH https://www.facebook.com/groups/embedded.system.KS/ Follow us Press here 40 References #LEARN_IN DEPTH #Be_professional_in embedded_system https://www.autosar.org Embedded Microcomputer Systems Real Time Interfacing Third Edition Jonathan W. Valvano University of Texas at Austin. MicroC/OS-II the real-time kernel second edition jean j.labrosse. RTOS Concepts http://www.embeddedcraft.org. OSEK/VDX Operating System Specification 2.2.3 AUTOSAR Layered Software Architecture The Trampoline Handbook release 2.0 Trampoline (OSEK/VDX OS) Test Implementation -Version 1.0, Florent PAVIN ; Jean-Luc BECHENNEC https://www.facebook.com/groups/embedded.system.KS/ Follow us Press here 41 References #LEARN_IN DEPTH #Be_professional_in embedded_system Trampoline:an open platform for (small) embedded systems based on OSEK/VDX and AUTOSAR http://trampoline.rts-software.org/ Jean-Luc Béchennec1;2, Sébastien Faucou1;3 1IRCCyN (Institute of Research in Communications and Cybernetics of Nantes) 2CNRS (National Center for Scientific Research) / 3University of Nantes 10th Libre Software Meeting https://www.facebook.com/groups/embedded.system.KS/ Follow us Press here 42 References #LEARN_IN DEPTH #Be_professional_in embedded_system Real Time Systems (RETSY) Jean-Luc Béchennec - Jean-Luc.Bechennec@irccyn.ec-nantes.fr Sébastien Faucou - Sebastien.Faucou@univ-nantes.fr jeudi 12 novembre 15 AUTOSAR Specification of Operating System V5.0.0 R4.0 Rev 3 OSEK - Basics http://taisnotes.blogspot.com.eg/2016/07/osek-basic- task-vs-extended-task.html OSEK OS Session Speaker Deepak V. M.S Ramaiah School of Advanced Studies - Bangalore 1 Introducción a OSEK-OS - El Sistema Operativo del CIAA-Firmware Programación de Sistemas Embebidos MSc. Ing. Mariano Cerdeiro https://www.facebook.com/groups/embedded.system.KS/ Follow us Press here 43 References #LEARN_IN DEPTH #Be_professional_in embedded_system Introduction to AUTOSAR, Stephen Waldron, Vector webinar Wednesday 7th May 2014 https://vector.com/portal/medien/cmc/events/Webinars/2014/Vector_ Webinar_AUTOSAR_Introduction_20140507_EN.pdf Introduction to AUTOSAR, Stephen Waldron, Vector webinar Tuesday 5th May 2015 https://vector.com/portal/medien/cmc/events/Webinars/2015/Vector_ Webinar_AUTOSAR_Introduction_20150505_EN.pdf https://www.facebook.com/groups/embedded.system.KS/ Follow us Press here 44 References #LEARN_IN DEPTH #Be_professional_in embedded_system Automatic Generation of AUTOSAR Software Component Descriptions Study Thesis in Computer Sciences by Christopher Mutschler https://www2.informatik.unierlangen.de/EN/teaching/thesis/download/i2S00428.pdf AutoSAR Overview FESA Workshop at KTH 2010‐04‐12 Prof. Jakob Axelsson http://www.artist- embedded.org/docs/Events/2010/FESA/slides/3_Autosar_Axelsson.pdf https://www.facebook.com/groups/embedded.system.KS/ Follow us Press here 45 References #LEARN_IN DEPTH #Be_professional_in embedded_system AUTOSAR – An open standardized software architecture for the automotive industry Simon Fürst, BMW 1st AUTOSAR Open Conference & 8th AUTOSAR Premium Member Conference October 23rd, 2008, Cobo Center, Detroit, MI, USA http://st.inf.tu- dresden.de/files/teaching/ws08/ase/03_AUTOSAR_Tutorial.pdf Institutionen för systemteknik Department of Electrical Engineering Examensarbete Implementation of CAN Communication Stack in AUTOSAR Examensarbete utfört i Datorteknik vid Tekniska högskolan vid Linköpings universitet Av Johan Alexandersson och Olle Nordin http://liu.diva-portal.org/smash/get/diva2:822343/FULLTEXT01.pdf https://www.facebook.com/groups/embedded.system.KS/ Follow us Press here 46 References #LEARN_IN DEPTH #Be_professional_in embedded_system Applying AUTOSAR in Practice Available Development Tools and Migration Paths Master Thesis, Computer Science Authors: Jesper Melin http://www.idt.mdh.se/utbildning/exjobb/files/TR1171.pdf Freescale AUTOSAR Software Overview.pdf https://www.facebook.com/groups/embedded.system.KS/ Follow us Press here 47 References #LEARN_IN DEPTH #Be_professional_in embedded_system AUTOSAR Method, Vector Webinar 2013-04-17 https://vector.com/portal/medien/cmc/events/Webinars/2013/Vector_Web inar_AUTOSAR_Method_20130417.pdf AUTOSAR Configuration Process - How to handle 1000s of parameters Vector Webinar 2013-04-19 https://vector.com/portal/medien/cmc/events/Webinars/2013/Vector_Web inar_AUTOSAR_Configuration_Process_20130419_EN.pdf AUTOSAR Runtime Environment and Virtual Function Bus, Nico Naumann https://hpi.de/fileadmin/user_upload/fachgebiete/giese/Ausarbeitungen_A UTOSAR0809/NicoNaumann_RTE_VFB.pdf https://www.facebook.com/groups/embedded.system.KS/ Follow us Press here 48 References #LEARN_IN DEPTH #Be_professional_in embedded_system The AUTOSAR Adaptive Platform for Connected and Autonomous Vehicles, Simon Fürst, AUTOSAR Steering Committee 8th Vector Congress 29-Nov-2016, Alte Stuttgarter Reithalle, Stuttgart, Germany https://vector.com/congress/files/presentations/VeCo16_06_29Nov_Re ithalle_Fuerst_BMW.pdf A Review of Embedded Automotive Protocols, Nicolas Navet1, Françoise Simonot-Lion2 April 14, 2008 https://www.realtimeatwork.com/wpcontent/uploads/chapter4_CRC_2008.pdf https://www.facebook.com/groups/embedded.system.KS/ Follow us Press here 49 References #LEARN_IN DEPTH #Be_professional_in embedded_system AUTOSAR Adaptive Platform https://vector.com/conference_india/files/presentations/Day1/3_AUTO SAR%20Adaptive%20Platform.pdf https://www.facebook.com/groups/embedded.system.KS/ Follow us Press here 50 References #LEARN_IN DEPTH #Be_professional_in embedded_system http://www.autosar.org/about/technical-overview/ecu-software architecture/autosar-basic-software/ http://www.autosar.org/standards/classic-platform/ https://automotivetechis.files.wordpress.com/2012/05/communicationsta ck_gosda.pdf https://automotivetechis.files.wordpress.com/2012/05/autosar_ppt.pdf https://automotivetechis.wordpress.com/autosar-concepts/ https://automotivetechis.files.wordpress.com/2012/05/autosar_exp_laye redsoftwarearchitecture.pdf http://www.slideshare.net/FarzadSadeghi1/autosar-software-component https://www.renesas.com/enus/solutions/automotive/technology/autosar/autosar-mcal.html https://github.com/parai/OpenSAR/blob/master/include/Std_Types.h https://www.facebook.com/groups/embedded.system.KS/ Follow us Press here 51 #LEARN_IN DEPTH #Be_professional_in embedded_system https://www.facebook.com/groups/embedded.system.KS/