2013 12 17 jaeyoungetri re kr 1 2

  • Slides: 53
Download presentation
2013. 12. 17 대경권연구센터 김재영 jaeyoung@etri. re. kr

2013. 12. 17 대경권연구센터 김재영 jaeyoung@etri. re. kr

1 자동차 산업 동향 2 OSEK/VDX OIL 3 OSEK/VDX OS 4 AUTOSAR 표준 5

1 자동차 산업 동향 2 OSEK/VDX OIL 3 OSEK/VDX OS 4 AUTOSAR 표준 5 ETRI 개발 결과물 6 ETRI 대경센터 소개

OSEK/VDX 개요 정의 OSEK/VDX 이란? § OSEK/VDX은 OSEK과 VDX 프로젝트의 Joint Project - OSEK

OSEK/VDX 개요 정의 OSEK/VDX 이란? § OSEK/VDX은 OSEK과 VDX 프로젝트의 Joint Project - OSEK : 1993년 독일에서 BMW, Bosch, Daimler. Chrysler, Opel, Siemens 등의 자동차 제조 협력업체와 Karlsruhe 대학의 IIIT로 공동으로 참여하여 차량용 분산 제어 장치의 공개 아키텍처에 대한 산업표준화를 개발하는 것을 목표로 한 프로젝트 VDX : OSEK과 유사한 목적으로 추진된 프랑스의 자동차 제조회사인 PSA 와 Renault가 참여한 VDX-approach(Vehicle Distributed e. Xcutive)라는 프로젝트 - * OSEK : Open systems and the corresponding interfaces for automotive electronics * VDX : Vehicle Distributed e. Xecutive“ 7

OSEK/VDX 개요 국제 표준 – 단체 표준 ISO-17356 -1 ISO-17356 -2 OSEK Glossary (located

OSEK/VDX 개요 국제 표준 – 단체 표준 ISO-17356 -1 ISO-17356 -2 OSEK Glossary (located in OSEK Binding 1. 4. 1, part of ISO 17356 -1, which consists of a ISO-style introduction and the glossary) OSEK Binding Specification (base: OSEK Binding 1. 4. 1, ISO 17356 -2 with exception of the glossary) Binding Specification 1. 4. 2와 기술적으로 동일 ISO-17356 -3 ISO-17356 -4 ISO-17356 -5 ISO-17356 -6 OSEK OS (base: OSEK OS 2. 2. 1, ISO 17356 -3) OS 2. 2. 2와 기술적으로 동일 OSEK COM (base: OSEK COM 3. 0. 2, ISO 17356 -4) COM 3. 0. 3와 기술적으로 동일 OSEK NM (base: OSEK NM 2. 5. 2, 17356 -5) NM 2. 5. 3와 기술적으로 동일 OSEK OIL (base: OIL 2. 4. 1, ISO 17356 -6) OIL 2. 5와 기술적으로 동일

OSEK/VDX OIL 객 체 Object CPU Description the CPU on which the application runs

OSEK/VDX OIL 객 체 Object CPU Description the CPU on which the application runs under the control of OSEK sub-systems. OS the OSEK OS that runs on the CPU. No standard references are defined in OIL from OSEK OS to other OIL objects. APPMODE defines different modes of operation for the application. No standard attributes are defined for the APPMODE object. ISR interrupt service routines supported by the OS. RESOURCE a resource that can be occupied by a task. TASK a task handled by the OS. COUNTER a counter represents hardware/software tick source for alarms. EVENT an event tasks may react on. ALARM an alarm is based on a counter and can either activate a task, set an event or activate an alarm-callback routine. COM the communication subsystem. The COM object has standard attributes to define general properties for OSEK COM. MESSAGE a message is defined in OSEK COM and defines the supplierspecific attributes of a mechanism for data exchange between different entities (entities being tasks or ISRs) and with other CPUs. NETWORKMESSAGE a network message is defined in OSEK COM and defines the OEM-specific attributes of a mechanism for data exchange between different entities (entities being tasks or ISRs) and with other CPUs. IPDU an IPDU is defined in OSEK COM. IPDUs carry messages used in external communication. NM the network management subsystem.

OSEK/VDX OIL Implementation Defintion IMPLEMENTATION Test { OS { BOOLEAN [TRUE, FALSE] STARTUPHOOK; BOOLEAN

OSEK/VDX OIL Implementation Defintion IMPLEMENTATION Test { OS { BOOLEAN [TRUE, FALSE] STARTUPHOOK; BOOLEAN [TRUE, FALSE] ERRORHOOK; BOOLEAN [TRUE, FALSE] SHUTDOWNHOOK; BOOLEAN [TRUE, FALSE] PRETASKHOOK; BOOLEAN [TRUE, FALSE] POSTTASKHOOK; ENUM [BCC 1, BCC 2, ECC 1, ECC 2] CC = BCC 1; } ; TASK { BOOLEAN [ TRUE { APPMODE_TYPE APPMODE[]; }, FALSE ] AUTOSTART; UINT 32 PRIORITY; ENUM [ NON, FULL ] SCHEDULE; EVENT_TYPE EVENT[ ]; RESOURCE_TYPE RESOURCE[ ]; MESSAGE_TYPE MESSAGE[ ]; UINT 32 STACKSIZE = 256; } ; IMPLEMENTATION { ISR { } ; UINT 32 [1, 2] CATEGORY = 1; RESOURCE_TYPE RESOURCE[]; UINT 32 PRIORITY = 64; UINT 32 STACKSIZE = 256; } ; COUNTER { UINT 32 MAXALLOWEDVALUE; UINT 32 MINCYCLE; UINT 32 TICKSPERBASE; } ; 객체 : OS, APPMODE, TASK, ISR, COUNTER, ALARM, EVENT, RESOURCE 등

OSEK/VDX OIL Application Definition CPU cpu { ISR TC 7001_Cat 1_ISR 1 { OS

OSEK/VDX OIL Application Definition CPU cpu { ISR TC 7001_Cat 1_ISR 1 { OS testos { CATEGORY = 1; STATUS = EXTENDED; IRQNUM = VEC_CCU 60_0; ERRORHOOK = TRUE; PRIORITY = 64; STARTUPHOOK = TRUE; INTERRUPTLEVEL = 7; SHUTDOWNHOOK = TRUE; }; RESOURCE Std. Resource 1 { TASK TC 7001_Task 1 { RESOURCEPROPERTY = AUTOSTART = FALSE; STANDARD; PRIORITY = 1; }; ACTIVATION = 1; COUNTER TC 7001_Counter 1 STACKSIZE = 400; { RESOURCE = Std. Resource 1; MAXALLOWEDVALUE = 10; } }; MINCYCLE = 1; TICKSPERBASE = 1; SECONDSPERTICK = 0. 1; TIMECONSTANTS = FALSE; }; };

OSEK/VDX OS Processing Levels 3 processing level § Interrupt level § Logical level for

OSEK/VDX OS Processing Levels 3 processing level § Interrupt level § Logical level for scheduler § Task level 2020 -11 -10 16

OSEK/VDX OS Conformance Classes 응용 소프트웨어의 다양한 요구사항과 구체적인 특성기반 운영체제의 다양한 기능에 의해

OSEK/VDX OS Conformance Classes 응용 소프트웨어의 다양한 요구사항과 구체적인 특성기반 운영체제의 다양한 기능에 의해 정의 Conformance Class는 실행 중에는 변경 불가능 Conformance Class 는 BCC 1, BCC 2, ECC 1, ECC 2로 구분 Conformance Class 구분하는 속성들 § Multiple requesting of task activation § Task types § Number of tasks per priority 2020 -11 -10 17

OSEK/VDX OS Conformance Classes OSEK OS Conformance Class : BCC 1, BCC 2, ECC

OSEK/VDX OS Conformance Classes OSEK OS Conformance Class : BCC 1, BCC 2, ECC 1, ECC 2 § Basic task & extended task => BCC & ECC § Priority 당 task 수, task당 activation 수 => 1 & 2 2020 -11 -10 18

OSEK/VDX OS - Task Basic Task(BT) 2020 -11 -10 20

OSEK/VDX OS - Task Basic Task(BT) 2020 -11 -10 20

OSEK/VDX OS - Task Extended Task(ET) 2020 -11 -10 21

OSEK/VDX OS - Task Extended Task(ET) 2020 -11 -10 21

OSEK/VDX OS - Task API 상태 천이 Status. Type Activate. Task ( Task. Type

OSEK/VDX OS - Task API 상태 천이 Status. Type Activate. Task ( Task. Type <Task. ID> ) Suspended -> Ready Status. Type Chain. Task ( Task. Type <Task. ID> ) Status. Type Terminate. Task ( void ) Running -> Suspended Status. Type Get. Task. ID ( Task. Ref. Type <Task. ID> ) Status. Type Get. Task. State ( Task. Type <Task. ID>, Task. State. Ref. Type <State> ) 2020 -11 -10 22

OSEK/VDX OS - ISR 인터럽트 구조 23

OSEK/VDX OS - ISR 인터럽트 구조 23

OSEK/VDX OS - ISR 인터럽트 처리 void Enable. All. Interrupts ( void ) void

OSEK/VDX OS - ISR 인터럽트 처리 void Enable. All. Interrupts ( void ) void Disable. All. Interrupts ( void ) void Resume. All. Interrupts ( void ) void Suspend. All. Interrupts ( void ) void Resume. OSInterrupts ( void ) void Suspend. OSInterrupts ( void ) ISR 내부에서는 rescheduling 발생 안됨 모든 인터럽트 루틴이 끝나면 rescheduling 수행 모든 Cat 1 인터럽트는 Cat 2보다 우선순위가 같거나 큼 24

OSEK/VDX OS - Alarm 구조 특징 § Relative alarm § Absolute alarm § Single/cyclic

OSEK/VDX OS - Alarm 구조 특징 § Relative alarm § Absolute alarm § Single/cyclic alarm § 1 counter에 1 이상의 alarm 정의 가능 § 시스템 실행 전 counter/alarm 정적 정의 Alarm expires § alarm-callback routine is called § A task is activated § An event is set for this task 25

OSEK/VDX OS - Alarm 구조 API Status. Type Get. Alarm. Base ( Alarm. Type

OSEK/VDX OS - Alarm 구조 API Status. Type Get. Alarm. Base ( Alarm. Type <Alarm. ID>, Alarm. Base. Ref. Type <Info> ) Status. Type Get. Alarm ( Alarm. Type <Alarm. ID> Tick. Ref. Type <Tick>) Status. Type Set. Rel. Alarm ( Alarm. Type <Alarm. ID>, Tick. Type <increment>, Tick. Type <cycle> ) Status. Type Set. Abs. Alarm ( Alarm. Type <Alarm. ID>, Tick. Type <start>, Tick. Type <cycle> ) Status. Type Cancel. Alarm ( Alarm. Type <Alarm. ID> ) 26

OSEK/VDX OS - 스케줄링 모드 Full-preemptive scheduling Non-preemptive scheduling Mixed-preemptive scheduling 실행되는 태스크의 선점

OSEK/VDX OS - 스케줄링 모드 Full-preemptive scheduling Non-preemptive scheduling Mixed-preemptive scheduling 실행되는 태스크의 선점 특성에 따라 정의 28

OSEK/VDX OS - Event 개요 특징 § 동기화 수단으로 사용 § Extended Task에만 가능

OSEK/VDX OS - Event 개요 특징 § 동기화 수단으로 사용 § Extended Task에만 가능 § 상태 천이는 waiting state § 각 Event는 Extended Task에 소속되고 관리됨 § Extended Task가 Activating되면 OS가 Event를 Clear § Any task or Cat. 2 ISR Event setting 가능 § Event가 발생되면 해당 태스크는 ready 상태로 변경 29

OSEK/VDX OS - Event Extended Task 동기화 30

OSEK/VDX OS - Event Extended Task 동기화 30

OSEK/VDX OS - Event API Status. Type Set. Event ( Task. Type <Task. ID>

OSEK/VDX OS - Event API Status. Type Set. Event ( Task. Type <Task. ID> Event. Mask. Type <Mask> ) Status. Type Clear. Event ( Event. Mask. Type <Mask> ) Status. Type Get. Event ( Task. Type <Task. ID> Event. Mask. Ref. Type <Event> ) Status. Type Wait. Event ( Event. Mask. Type <Mask> ) 31

OSEK/VDX OS - Resource 개요 특징 § 공유 자원에 대한 여러 태스크들의 동시 접근

OSEK/VDX OS - Resource 개요 특징 § 공유 자원에 대한 여러 태스크들의 동시 접근 관리에 사용 § Resource 종류는 Standard resource와 Internal resource § Internal resource 시스템 API로 사용할 수 없음 - 동작은 Standard resource와 동일 - 하나의 internal resource만이 시스템 생성시에 태스크에 할당될 수 있음 § 자동으로 생성되는 resource인 RES_SCHEDULER § RES_SCHEDULER도 인터럽트 실행에는 영향없음 - API § Status. Type Get. Resource ( Resource. Type <Res. ID> ) § Status. Type Release. Resource ( Resource. Type <Res. ID> ) 32

OSEK/VDX OS - Resource 발생 가능 문제 Priority Inversion Deadlock 33

OSEK/VDX OS - Resource 발생 가능 문제 Priority Inversion Deadlock 33

OSEK/VDX OS - Resource Priority Ceiling Protocol 34

OSEK/VDX OS - Resource Priority Ceiling Protocol 34

OSEK/VDX OS – Hook 처리 2 단계 에러 처리 2단계 에러 검사 § Standard

OSEK/VDX OS – Hook 처리 2 단계 에러 처리 2단계 에러 검사 § Standard status Return : "E_OK" or “Too many task activations” § extended status - return : "E_OK“, “Too many task activations”, "Task is invalid" or "Task still occupies resources", etc - 예제 § Activate. Task 호출된 경우(표준에서 정의) - Standard : E_OK or E_OS_LIMIT Extended : E_OS_ID 36

OSEK/VDX OS – Start. Up & Shutdown 시스템 시동 절차 37

OSEK/VDX OS – Start. Up & Shutdown 시스템 시동 절차 37

OSEK/VDX OS – Start. Up & Shutdown Task Switching 절차 및 API § void

OSEK/VDX OS – Start. Up & Shutdown Task Switching 절차 및 API § void Start. OS ( App. Mode. Type <Mode> ) § void Shutdown. OS ( Status. Type <Error> ) § App. Mode. Type Get. Active. Application. Mode ( void ) 38

OSEK/VDX – APIs 39

OSEK/VDX – APIs 39

AUTOSAR 표준 동향(1/2) 일자 진행 상황 2002. 8 BMW, Bosch, Continental, Daimler. Chrysler and

AUTOSAR 표준 동향(1/2) 일자 진행 상황 2002. 8 BMW, Bosch, Continental, Daimler. Chrysler and Volkswagen의 Initial Discussion 2003. 6 BMW Group, Daimler. Chrysler, Volkswagen, Bosch, Continental, Siemens VDO 결성 2003. 11 Ford Motor 추가 코어 멤버 참여 2003. 12 Toyota, Peugeot 코어 멤버 참여 2004. 10 AUTOSAR 개념 정립(10월), GM 코어맴버 참여(11월) 2005. 6 Release 1. 0 배포(33개 SW 컴포넌트) 2006. 5 Release 2. 0 배포(45개 컴포넌트 완성) 2006. 12 Release 2. 1 배포(51개 SW 컴포넌트 2008년 Rev-018완성) 2007. 12 Release 3. 0 배포(53개 SW 컴포넌트 2008 -02 Rev-002완성) - 42 -

AUTOSAR 개념 - 44 -

AUTOSAR 개념 - 44 -

AUTOSAR Layered Architecture(1/2) AUTOSAR Software Component Interface ECU Firmware Standard Software Application Software Component

AUTOSAR Layered Architecture(1/2) AUTOSAR Software Component Interface ECU Firmware Standard Software Application Software Component Actuator Software Component Sensor Software Component AUTOSAR Interface Standardized Inteface Operating System API 0 API 3 Private Interfaces inside Basic Software possible . . . AUTOSAR Interface AUTOSAR Runtime Environment (RTE) API 2 VFB & RTE relevant API 1 RTE relevant AUTOSAR Software Application Software Component Standardized AUTOSAR Interface Standardized Interface AUTOSAR Interface Services Communication ECU Abstraction Standardized Interface Basic Software ECU-Hardware - 45 - Standardized Interface Microcontroller Abstraction AUTOSAR Interface Complex Device Drivers

AUTOSAR Layered Architecture(2/2) - 46 -

AUTOSAR Layered Architecture(2/2) - 46 -

AUTOSAR Detailed Structure - 47 -

AUTOSAR Detailed Structure - 47 -

AUTOSAR Methodology - 48 -

AUTOSAR Methodology - 48 -

ETRI 개발 결과물 - OSEK/VDX 운영체제 규 격 § Implemented based on OSEK OS

ETRI 개발 결과물 - OSEK/VDX 운영체제 규 격 § Implemented based on OSEK OS 2. 2. 3, OSEK COM 3. 0. 3, OIL 2. 5 § OSEK/VDX OS, COM의 Conformance Class(BCC 1, BCC 2, ECC 1, ECC 2, CCCA, CCCB, CCC 0, CCC 1) § Supports Realtime Preemptable Scheduler based on priority § Runtime Stack Monitoring 기술 50