AUTOSAR VFB & RTE Introduction •
•
•
•
In order to achieve a high degree of transparency against the the und underl erlying ying har hardar are infra nfras struc tructu turre! the the AUTO AUTOSA SAR R standard introduces to architectural concepts that facilitate infrastructure independent softare develop"ent# –
The Virtual Function Function Bus $VFB%
–
The Runti"e Infrastructure $RTE% $RTE%
The AUTOSAR softare architecture follos several astra astracti ction on princi principle ples s for otain otaining ing 'e(ii 'e(iili lity ty agains againstt the underlying infrastructure) Any piece of softare ithin an AUTOSAR infrastructure can e seen as an independent independent co"ponent co"ponent hile each AUTOSAR application is a set of interconnected AUTOSAR co"ponents The di*erent layers of astraction allo the application designer to disregard several aspects of the physical syste" on hich the application ill later e deployed on! li+e# –
Type of "icrocontroller
–
Type of E,U hardare
–
-hysical location of interconnected co"ponents
–
.etor+ing technology / uses
–
Instantiation of co"ponents / .u"er of instances
Virtual Function Bus $VFB% •
•
•
•
•
The virtual function us can e descried as a syste" "odeling and co""unication concept 0ogic 0ogical al entity entity that facili facilitate tates s the concep conceptt of reloca relocatai tailit lity y ithin the AUTOSAR softare architecture -rovides a virtual infrastructure that is independent fro" any actual underlying infrastructure -rovi ovides des all all serv servic ices es re1ui e1uirred for for a virt virtua uall in inte tera ract ctio ion n eteen AUTOSAR co"ponents Sepa Separa rate tes s the the do"a do"ain in of appl applic icat atio ion n deve develo lop" p"en entt and and "odeling fro" the infrastructure
Runti"e Environ"ent $RTE% $RTE% •
•
•
The runti"e environ"ent provides an actual representation of the virtual concepts of the VFB for one speci2c E,U Each E,U has its on custo"i3ed RTE i"ple"entation hich is generated during the E,U ,on2guration process of the AUTOSAR "ethodology The E,U "apping! i)e) the infor"ation aout hich co"ponent ill e deployed on hich E,U! is part of the input of this con2guration process
RTE •
•
•
•
4epending on the location of each co"ponent! the for"erly virtual interaction can then e "apped to real interaction i"ple"entation ,o"ponents that are "apped onto one E,U ill co""unicate through Intra E,U56echanis"s! li+e function calls hile Inter5E,U co""unication ill e reali3ed using! e)g) a co""unication us infrastructure Since the RTE source code is usually generated! it can e tailored y the generator to i"ple"ent e(actly the co""unication paths re1uired y its connected AUTOSAR co"ponents RTE can e seen as a static i"ple"entation of speciali3ed co""unication topologies
VFB to RTE 6apping here the Virtual ,o""unication Topology is "apped to Three 4i*erent E,Us
,o"parison of VFB and RTE ith Focus on Selected ,o""on ,oncepts
Generation of RTE Generation of RTE
•
•
•
The RTE is generated in order to ensure that it 2ts a given E,U and syste" con2guration) This "eans that an RTE i"ple"entation alays provides only the functionality that is needed for a given con2guration! and nothing "ore) The generation process is divided into to phases 5 ,ontract phase 5 7eneration phase
Contract phase: •
•
•
•
This phase is E,U5independent) It provides the contract eteen a given AS8 co"ponent and the RTE! that is! the A-I that the AS8 co"ponent can e coded against) The input for this phase is the description of an AS8 co"ponent ith all its ports and runnale entities) The result is an AS8 co"ponent5speci2c header 2le that can e included y the corresponding source code 2le) The set of alloed A-I functions depends on the ports of the given AS8 co"ponent) For e(a"ple! if an AS8 co"ponent has a send5port p ith a data ele"ent d! the contract phase ill generate the A-I function Rte_Send_p_d)
Generation phase: •
•
In this phase the concrete code generation for a given E,U is perfor"ed) Input for this phase is the E,U con2guration description! hich includes especially the "apping of runnale entities to OS tas+s or the co""unication "atri()
•
Together ith the AS8 co"ponent header 2les created during the contract phase and all necessary BS8code! the generated code can then e co"piled to an e(ecutale 2le for the given E,U)
Runnales •
•
•
•
•
•
Since AUTOSAR softare co"ponents have no direct access to the underlying hardare or the operating syste"! the i"ple"entation of the ato"ic softare co"ponents cannot re'ect artifacts li+e Threads or -rocesses Instead! each piece of functionality that has to e e(ecuted during runti"e of the softare co"ponent is rapped into a so5called Runnale The VFB5Speci2cation de2nes a runnale as a Se1uence of instructions that can e started y the Run5Ti"e Environ"ent Each runnale that a co"ponent provides can e invo+ed y the RTE and is e(ecuted ithin the conte(t of the underlying operating syste" An ato"ic softare co"ponent can consist of an aritrary nu"er of runnales of hich each "ight have its on e(ecution se"antics 4uring the process of E,U con2guration! a "apping eteen operating syste" tas+s and e(isting runnales is created that is later used y the RTE to de2ne and perfor" scheduling and e(ecution of the runnales according to their speci2cation
,ategories of Runnales •
Type 9 Runnales
–
–
–
•
,onsists of a set of instructions that can e deter"ined to ter"inate ithin a 2nite ti"e Bloc+ing RTE calls that contain 8ait-oints cannot e contained in a type 9 runnale Runnales that ful2l these constraints are usually "apped to asic operating syste" tas+s
Type : Runnales –
–
,ontains at least one ait point that causes the runnale to ter"inate only upon the appearance of an e(ternal event $e)g) the receive of a data value% Such runnales are "apped y the RTE to e(tended operating syste" tas+s that support the state 8aiting
-seudo5code I"ple"entation of a Runnale Body void SeatHeating_Runnable_run1 () !!! RTE_Read_"n#ort_$alue (!!!)% && do so'ething RTE_rite_ut#ort_$alue (!!!)% !!! *
Integration5 Relationship eteen OS!RTE and VFB
•
•
The concept of runnales a*ects several aspects of AUTOSAR! li+e the operating syste"! the runti"e environ"ent as ell as the virtual function us Each of the" deals ith runnales di*erently! depending on their vie on the overall syste"
OS Vie •
•
•
An AUTOSAR5,o"pliant Operating Syste" $e)g) OSE; OS% does not +no aout the concepts of runnales at all Instead! the operating syste" usually "aintains a list of schedulale entities that are under "anage"ent of a scheduling algorith" Since runnale entities ill e integrated y the RTE into operating syste" tas+s! they ill e e(ecuted anyti"e the corresponding OS tas+ is scheduled
RTE Vie •
•
•
•
The runti"e environ"ent "aps runnales that can e e(ecuted together into one OS tas+ This tas+ is then structured and controlled using RTE glue code that ill control the correct e(ecution of the runnales ithin the OS tas+ The o(es colored in red denote single runnales The corresponding control 'o that triggers the e(ecution of such a runnale as ell as the glue code $yello o(% is under control of the RTE
VFB Vie •
•
On the level ti"e of the runnale as e(ecuted are
of the virtual function us $i)e) during design application%! the integration conte(t of the ell as the environ"ent in hich it ill e not of concern
Instead! anything e(cept the se1uence of single instructions ithin the function ody and the constraints on invocation for the runnale are disregarded
6,A0! -artial .etor+ing and <9=>= Overvie Introduction to 6,A0
0oest softare layer of AUTOSAR Basic Softare ,ontains internal drivers Accesses internal peripherals of "icrocontroller directly Accesses "e"ory "apped e(ternal devices 6a+e higher softare layers independent of "icrocontroller
6anages the "icrocontroller peripherals and provides the upper layer ith "icrocontroller I"ple"ents noti2cation "echanis"s to support independent values the distriution of co""ands! responses and infor"ation to di*erent processes
Input re1uired for i"ple"entation of 6,A0
AUTOSAR Softare Speci2cation $S8S%
4atasheet of 6icrocontroller $User 6anual%
6odule 7roups In 6,A0 The ?, Astraction 0ayer consists of the folloing "odule groups#
Co''unication
+rivers
4rivers for E,U onoard co""unication $e)g) ,A.%
$e)g)
S-I%
and
vehicle
"& +rivers
4rivers for analog and digital I/O $e)g) A4,! -86! 4IO%
,e'or- +rivers
4rivers for on5chip "e"ory devices $e)g) internal Flash! internal EE-RO6% and "e"ory "apped e(ternal "e"ory devices $e)g) e(ternal Flash%
,icrocontroller +rivers
4rivers for internal peripherals $e)g) 8atchdog! 7eneral -urpose Ti"er% Functions ith direct ?, access $e)g) ,ore test%
"& +rivers The
A4, driver "odule initiali3es and controls the internal Analog to 4igital ,onverter unit of the "icrocontroller
The 4igital Input and Output driver "odule provides services for reading fro" and riting to the 4IO ,hannels! 4IO -orts and 4IO ,hannel 7roups
The
-86 driver "odule provides functions for initiali3ation and control of the "icrocontroller internal -86 unit
The
I,U 4river controls the input capture unit of the "icrocontroller
-ort 4river initiali3es the hole port structure of the "icrocontroller
Co''unication +rivers
The
,o""unication drivers perfor"s the hardare access and o*ers a hardare independent A-I to the upper layer
,e'or- +rivers
6e"ory driver "odule provides the interface for erasing! riting and reading the "e"ory
,icrocontroller +rivers The
7-T driver allos generating continuous ti"er noti2cations
one5shot
or
The
8atchdog driver "odule provides services for initiali3ation! changing the operation "ode and triggering the atchdog
The
6,U driver "odule provides services for asic "icrocontroller initiali3ation! poer don functionality! reset and "icrocontroller speci2c functions re1uired fro" other 0o 0evel 4river "odules
Initiali3ation Order –
–
The se1uence in hich the 6,A0 "odules initiali3ation and A-Is to e invo+ed are very i"portant for the proper operation of individual "odules) The order to e folloed is as follos#
–
6,U Initiali3ation
–
847 Initiali3ation
–
-ORT Initiali3ation
–
Individual "odule initiali3ation $A4,! -86! 7-T@%
–
–
–
o is 6,A0 di*erent fro" ,o"ple( 4rivers ,o"ple( 4rivers are Application custo"er speci2c re1uire"ents
speci2c!
usually
6,A0 "odules ill have standard de2ned functionality y AUTOSAR
Energy 6anage"ent Introduction •
•
The goal of eCcient energy "anage"ent in AUTOSAR is to provide "echanis"s for poer saving! especially hile bus co''unication is active $e)g) charging or cla"p 9D active%! AUTOSAR R>): and R))> support only -artial .etor+ing)
#artial 2et3or4ing
Allos for turning o* netor+ co""unication across "ultiple E,Us in case their provided functions are not re1uired under certain conditions) Other E,Us can continue to co""unicate on the sa"e us channel)
Uses .6 "essages to co""unicate the re1uest/release infor"ation of a partial netor+ cluster eteen the participating E,Us
#artial 2et3or4 Cluster (#2C) •
#2C is a group of syste" signals necessary to support one or "ore vehicle functions that are distriuted across "ultiple E,Us in the vehicle netor+) This represents the syste" vie of "apping a group of uses to one or "ore VF,s)
Energy 6anage"ent G -artial .etor+ing E(a"ple scenario of a partial netor+ going to sleep
1 EC. / 1 EC. 0 EC. C EC. +
#h-sical C/2 0us #artial 2et3or4 Cluster 1 #artial 2et3or4 Cluster
"nitial situation:
E,Us HA and HB are "e"ers of -artial .etor+ ,luster $-.,% 9) E,Us HB! H, and H4 are "e"ers of -., :)
All functions of the E,Us are organi3ed either in -., 9 or -., :)
Both -.,s are active)
-., : is only re1uested y E,U H,)
The function re1uiring -., : on E,U H, is ter"inated! therefore E,U H, can release -., :)
This is 3hat happens:
E,U H, stops re1uesting -., : to e active)
E,Us H, and H4 are no longer participating in any -., and can e shutdon)
E,U HB ceases trans"ission and reception of all signals associated ith -., :)
E,U HB still participates in -., 9) That "eans it re"ains aa+e and continues to trans"it and receive all signals associated ith -., 9)
E,U HA is not a*ected at all)
-artial .etor+ing Restrictions
-artial .etor+ing $-.% is currently supported on ,A. and Fle(Ray uses)
0I. and ,A. slave uses $i)e) ,A. uses ithout netor+ "anage"ent% can e activatedJ using -. ut no a+e5up or co""unication of -. infor"ation are supported on those uses
To
a+e5up a -. E,U! a special transceiver 8 is re1uired as speci2ed in ISO 99K=K5D)
A VF, can e "apped to any nu"er of -.,s $including 3ero%
The standard a+e5up ithout special transceiver 8 +non fro" previous AUTOSAR releases is still supported)
The concept of -. considers a VF, ith only E,U5 internal co""unication y "apping it to the internal channel type in ,o"6 as there is no us co""unication and no physical -.,
Restrictions for ,A.
<9=>= and -. e(clude each other! due to address clai"ing and <9=>= start5up ehavior
<9=>= need to register 2rst their address in the netor+ efore they are alloed to start co""unication after a a+e5up)
A <9=>= us not using address clai"ing can hoever e activated using -. as a ,A. slave us as descried aove
Restrictions on Fle(Ray
Fle(Ray is only supported for re1uesting and releasing -.,s)
Fle(Ray nodes cannot e shut don since there is no 8 availale hich supports -.)
,haracteristics of <9=>= •
igher5layer protocol ased on ,ontroller Area .etor+ $,A.%
•
-rovides serial data co""unication eteen Electronic ,ontrol Units $E,Us% in any +ind of heavy duty vehicle)
•
E(tended ,A. identi2er $:= it%
•
Bit rate :D +it/s
•
-eer5to5peer and roadcast co""unication
•
•
•
Transport protocols for up to 9LKD data ytes .etor+ "anage"ent 4e2nition of para"eter groups for co""ercial vehicles and others
•
6anufacturer speci2c para"eter groups are supported
•
4iagnostics features
•
6a(i"u" > nodes $E,Us% in a netor+
<9=>= Applications <9=>= -rotocol is used in "any applications! fe of the" are follos#
as •
•
Agricultural and Forestry O*5Road 6achinery ,ontrol and ,o""unication .etor+ ) 6arine Stern 4rive and Inoard Spar+5Ignition Engine On5 Board 4iagnostics
•
O*5Board 4iagnostic ,onnector
•
Industrial 7enerator Sets
•
Truc+ and Bus Applications
SAE <9=>= 5 6essage For"at
SAE <9=>= 5 6essage For"at A -ara"eter 7roup .u"er $-7.% is a part of the :=5it identi2er sent ith every "essage)
•
•
The -7. is a co"ination of
5 the Reserved it $alays %! 5 the data page it $currently only ! 9 is reserved for future use%! 5 the -4U $-rotocol 4ata Unit% For"at $-F%! 5 -4U Speci2c $-S%) •
•
-4U For"at M (F de2nes -eer5to5-eer "essage) -4U Speci2c ill e a 4estination Address -4U For"at N (F identi2es "essage as roadcast) -4U Speci2c ill e a 7roup E(tension
E(a"ple <9=>= -7. <9=>= 8heel Speed Infor"ation •
-7.#
PD:9D$(FEBF%
•
-riority#
P $default%
•
0ength#
K
•
•
•
•
•
•
•
•
•
TQ Rate# 9 "s Bytes 95:# Byte ># =D Byte #
Front a(le speed
=
Relative! front a(le 9! left Relative! front a(le 9! right
Byte D# =L
Relative! rear a(le 9! left
Byte P# =K
Relative! rear a(le 9! right
Byte L# ==
Relative! rear a(le :! left
Byte K# =9
Relative! rear a(le :! right
Benefits of Autosar:
S-.
=P
•
The methodology used for mapping AUTOSAR concepts on existing has serious drawbacks. Drawbacks of AUTOSAR:
•f both the existing concept and the newly introduced AUTOSAR concept carry the same information! there is a risk of inconsistency. There is also a risk of confusion o"er which concepts to use! but this is easily resol"ed by making the old concept abstract thereby forcing the use of the new concept • #onflicting inheritance. $"en if indi"idual concepts map perfectly on each other! they can be parts of inheritance structures "iolating AUTOSAR. On behalf of multiplied information and the risk of inconsistency the problem can theoretically be resol"ed with multiple inheritances. n practise the problems cannot be resol"ed% System&ea"er does not support multiple inheritances. The final part of the implementation of the prototype meta model in an existing meta model is more of a demonstration piece% the implementation is what usually is called 'ugly hack( n order to implement a fully working AUTOSAR meta model the usual
customisation of the System&ea"er is necessary! not only with respect of the customers needs but also with respect to AUTOSAR)s re*uirements.