1、 2009. Vector Informatik GmbH. All rights reserved. Any distribution or copying is subject to prior written approval by Vector.V1.2.4 2009-03-16基础知识 2009. Vector Informatik GmbH. All rights reserved. Any distribution or copying is subject to prior written approval by Vector.Slide: 2大纲 综述和目标AUTOSAR入门
2、 (introduction)AUTOSAR方法论 (methodology)AUTOSAR实时环境 (RTE)AUTOSAR基础软件 (BSW)Vector AUTOSAR实现从 CANbedded到 AUTOSAR 2009. Vector Informatik GmbH. All rights reserved. Any distribution or copying is subject to prior written approval by Vector.Slide: 3综述和目标 电子系统的 复杂性 不断增长 软件代码 量急速上升 生命周期差别 : 整车的生命周期往往长于 ECU
3、的生命周期 嵌入式系统不支持 硬件抽象 有限的软件 模块化 重用性 差 : 当硬件(处理器型号)更换后,软件往往要推倒重写 五花八门的 硬件平台行业现状 2009. Vector Informatik GmbH. All rights reserved. Any distribution or copying is subject to prior written approval by Vector.Slide: 4综述和目标NetworkManagementTransport ProtocolCommunicationControl LayerUniversalMeasure-mentAn
4、d Calibration ProtocolCAN DriverCAN BusInteraction LayerDiagnostics LayerApplicationISO/OSEKCAN ControllerTransceiverVector此前的解决方案ISO/OSEKISOISO/OSEKASAMHISISO/OSEK 2009. Vector Informatik GmbH. All rights reserved. Any distribution or copying is subject to prior written approval by Vector.Slide: 5综
5、述和目标AUTOSAR成员 2009. Vector Informatik GmbH. All rights reserved. Any distribution or copying is subject to prior written approval by Vector.Slide: 6综述和目标Slogan:“Cooperate on standards compete on implementation”AUTOSAR 口号HardwareSoftwareHardwareSoftware 2009. Vector Informatik GmbH. All rights reserv
6、ed. Any distribution or copying is subject to prior written approval by Vector.Slide: 7综述和目标AUTOmotive Open System ARchitecture 标准化 软件接口 交换格式 方法论 将汽车系统的基础软件标准化为一个跨 OEM的 “标准栈 ” 集成 不同供应商生产的功能模块 适用 于不同的车辆及不同的车型目标 2009. Vector Informatik GmbH. All rights reserved. Any distribution or copying is subject
7、to prior written approval by Vector.Slide: 8综述和目标 适用于 整个产品生命周期 从软件中把硬件 抽象 出来,对于不同硬件平台具有更大的灵活性 更多的 配置 而非实现 标准化 AUTOSAR的 代码配置 /建模 工具 通过对 BSW的标准化提高了代码质量 竞争力只体现于对 OEM的特殊功能要求的实现 在整个汽车生命周期中,软件可以不断更新或升级 重用性可以覆盖整个网络节点,甚至跨不同 OEM目标 2009. Vector Informatik GmbH. All rights reserved. Any distribution or copying
8、 is subject to prior written approval by Vector.Slide: 9综述和目标Function LibrarySeat Adjustment ASeat Adjustment BLightingSeat HeatingAir ConditioningVehicle ACode GenerationVehicle BHardware TopologyDistributed SystemSoftware ConfigurationAUTOSAR 目标 软件功能模块在不同车型之间被 重用 2009. Vector Informatik GmbH. All
9、rights reserved. Any distribution or copying is subject to prior written approval by Vector.Slide: 10综述和目标AUTOSAR 解决方案SystemDescriptionGenerators/EditorsConfiguration DataStandardized Application interfaceStandardized basic softwareArchitectureProcessSW+HWDescription 2009. Vector Informatik GmbH. Al
10、l rights reserved. Any distribution or copying is subject to prior written approval by Vector.Slide: 11综述和目标AUTOSAR 项目阶段Source: http:/www.autosar.org 2009. Vector Informatik GmbH. All rights reserved. Any distribution or copying is subject to prior written approval by Vector.Slide: 12大纲综述和目标AUTOSAR入
11、门 (introduction)AUTOSAR方法论 (methodology)AUTOSAR实时环境 (RTE)AUTOSAR基础软件 (BSW)Vector AUTOSAR实现从 CANbedded到 AUTOSAR 2009. Vector Informatik GmbH. All rights reserved. Any distribution or copying is subject to prior written approval by Vector.Slide: 13AUTOSAR入门车灯控制系统的软件功能组件示意图LightSwitchRight DoorDoor Con
12、tactDimmerLeft Door 2009. Vector Informatik GmbH. All rights reserved. Any distribution or copying is subject to prior written approval by Vector.Slide: 14DoorContactAUTOSAR入门Virtual Function BusRightDoor软件功能组件通信Dimmer LightLeftDoorSwitch 2009. Vector Informatik GmbH. All rights reserved. Any distri
13、bution or copying is subject to prior written approval by Vector.Slide: 15Roof ECURTEBSWControllerFront ECUControllerBSWAUTOSAR入门SwitchLeftDoorDimmer LightRTE分布式软件组件BusDoorContactRightDoor 2009. Vector Informatik GmbH. All rights reserved. Any distribution or copying is subject to prior written appr
14、oval by Vector.Slide: 16AUTOSAR入门 Atomic component (最小的逻辑单元,无法再分 ) Application 实现算法 Sensor/actuator 为 Application提供 I/O量 与 ECU绑定 (不像 Application那样能在各 ECU上自由映射 ) Composition - 数个 SWC的逻辑集合软件组件 (SWC)的分类Light ControlComposition ComponentLightActuator ComponentSwitchSensor ComponentDimmerAppl. ComponentD
15、oor ContactAppl. Component 2009. Vector Informatik GmbH. All rights reserved. Any distribution or copying is subject to prior written approval by Vector.Slide: 17AUTOSAR入门 SWC 的组成之一 : Ports 和其他 SWC的通信端口 通信内容 : Data elements (S/R) 与 operations (C/S)端口 (Ports )Software componentClient/Server(Client)Cl
16、ient/Server(Server)Sender/Receiver(Receiver)Sender/Receiver(Sender) 2009. Vector Informatik GmbH. All rights reserved. Any distribution or copying is subject to prior written approval by Vector.Slide: 18AUTOSAR入门Roof ECULightRTEMicrocontrollerBusAUTOSAR BSWData element:Light_DimmData element:DoorOpe
17、nSignal:DoorLeft_Open 传输数据 一个 port可以包含多种 data element 如果一个 data element要通过总线传输, 那么它必须与一个signal对应起来 DE既可以是简单的数据类型(integer, float), 也可以是复杂类型 (array, record) 通信方式 : 1:n or n:1“mapping”发送 -接收端口 (Sender-Receiver)Dimmer 2009. Vector Informatik GmbH. All rights reserved. Any distribution or copying is subj
18、ect to prior written approval by Vector.Slide: 19AUTOSAR入门SWC 3SWC 1SWC 2 Example: Rte_Call_Door_State() 提供 Operation服务 通信方式 : 1:1 or n:1 (与 S/R对应) 同步或异步 一个 C/S port包含多种 operations Operations可以被单个调用客户端 -服务器端口 (Client-Server) 2009. Vector Informatik GmbH. All rights reserved. Any distribution or copy
19、ing is subject to prior written approval by Vector.Slide: 20AUTOSAR入门 SWC 的组成之二 : Runnable entities (简称 Runnables) 包含实际实现的函数(具体的逻辑算法或者操作) Runables由 RTE周期性、或事件触发调用(如,当接收到数据 )可运行实体 (Runnables)Door LeftRunnable 1SA_Door_Left/ triggered every 500 msecvoid SA_Door_Left()Std_ReturnType status;boolean Door
20、Open;.status=Rte_Write_(DoorOpen); 2009. Vector Informatik GmbH. All rights reserved. Any distribution or copying is subject to prior written approval by Vector.Slide: 21AUTOSAR入门架构体系RoofLightDimmerRTEAUTOSAR BSWMicrocontrollerComplexDeviceDriversMicrocontroller Abstraction LayerECU Abstraction Laye
21、rService Layer 80个 BSW被抽象划分为 3个层面 2009. Vector Informatik GmbH. All rights reserved. Any distribution or copying is subject to prior written approval by Vector.Slide: 22AUTOSAR入门微控制器抽象层 (Microcontroller Abstraction Layer)ComplexDeviceDriversMicrocontroller Abstraction LayerECU Abstraction LayerServi
22、ce LayerMicrocontrollerRTEApplication Layer 目的 : 使上层软件与微处理器型号无关 功能 : 包含 MCU中内部外设的驱动 包含使用 MCU内存映射的外部设备的驱动 2009. Vector Informatik GmbH. All rights reserved. Any distribution or copying is subject to prior written approval by Vector.Slide: 23AUTOSAR入门ECU抽象层 (ECU Abstraction Layer)ComplexDeviceDriversM
23、icrocontroller Abstraction LayerECU Abstraction LayerService LayerMicrocontrollerRTEApplication Layer 目的 : 使上层软件与 ECU硬件设计无关 功能 : 包含 ECU板上外部设备的驱动 内部设备与外部设备的接口 (I/O) 2009. Vector Informatik GmbH. All rights reserved. Any distribution or copying is subject to prior written approval by Vector.Slide: 24A
24、UTOSAR入门服务层 (Service Layer)ComplexDeviceDriversMicrocontroller Abstraction LayerECU Abstraction LayerService LayerMicrocontrollerRTEApplication Layer 目的 : 提供给应用程序可用的服务 功能 : 诊断 , 非易失性内存管理 , 操作系统 , 通信 内存和 ECU管理 2009. Vector Informatik GmbH. All rights reserved. Any distribution or copying is subject t
25、o prior written approval by Vector.Slide: 25AUTOSAR入门复杂设备驱动 (Complex Device Drivers)ComplexDeviceDriversMicrocontroller Abstraction LayerECU Abstraction LayerService LayerMicrocontrollerRTEApplication Layer 目的 : 提供复杂传感器和执行器的驱动 功能 : 重要的应用模块可以直接访问硬件资源 例如 : 喷油量控制 , 胎压监测 2009. Vector Informatik GmbH. Al
26、l rights reserved. Any distribution or copying is subject to prior written approval by Vector.Slide: 26AUTOSAR入门运行时环境 (RTE)RTEApplication LayerComplexDriversMicrocontroller Abstraction LayerECU Abstraction LayerService LayerMicrocontroller 目的 : 使 SWC与 ECU的映射无关 功能 : 提供通信服务的中间层 (ECU内部 /间通信 ) 2009. Vec
27、tor Informatik GmbH. All rights reserved. Any distribution or copying is subject to prior written approval by Vector.Slide: 27AUTOSAR入门传感器 -执行器组件 从传感器到应用程序的过程Right Door SensorECUElectronicsMicrocontrollerPeripheryDoor ContactApplicationRightDoorECUAbstractionMCALDriver1 2 3456Rte_Read_DoorRight_IsOp
28、en(state) Rte_Read_Door_state() ADC_get()U 0 - 5VI 0 - 200mADoor Status幻灯片 27GD35 Hier sieht man 2 Ebenena) Hardware Ebene mit Bauteilen und Elektronikb) Software Ebene mit Treibern und ApplikationssoftwareElmar Gschwind, 2006-8-14 2009. Vector Informatik GmbH. All rights reserved. Any distribution
29、or copying is subject to prior written approval by Vector.Slide: 28大纲综述和目标AUTOSAR入门 (introduction)AUTOSAR方法论 (methodology)AUTOSAR实时环境 (RTE)AUTOSAR基础软件 (BSW)Vector AUTOSAR实现从 CANbedded到 AUTOSAR 2009. Vector Informatik GmbH. All rights reserved. Any distribution or copying is subject to prior written approval by Vector.Slide: 29AUTOSAR 方法论AUTOSAR方法论 ? 方法论就像菜谱,告诉我们做菜要用那些配料,需要哪些步骤 一本好菜谱包含: Who, what, when, how and for which purposeOEM SupplierMotivationToolsDataIntegrationMigration