Specification of Operating System (OS)¶
| 属性 | 值 |
|---|---|
| 平台 | CP |
| 类别 | SWS — 软件模块规范(Software Specification) |
| UID | 034 |
| 规范版本 | R25-11 |
本地文件¶
- 规范 PDF:
F:\Work\Standards\01_Sources\CP_SWS_OS_034\AUTOSAR_CP_SWS_OS.pdf - ARXML 模型:
F:\Work\Standards\01_Sources\CP_SWS_OS_034\AUTOSAR_CP_SWS_OS.arxml - 纯文本全文:
F:\Work\Standards\01_Sources\CP_SWS_OS_034\zzgen\CP_SWS_OS.complete.txt
文档简介¶
This document describes the essential requirements on the AUTOSAR Operating System to satisfy the top-level requirements presented in the AUTOSAR SRS .
In general, operating systems can be split up in different groups according to their characteristics, e.g. statically configured vs. dynamically managed. To classify the AUTOSAR OS, here are the basic features of the OS
- is configured and scaled statically
- is amenable to reasoning of real-time performance
- provides a priority-based scheduling policy
- provides protective functions (memory, timing etc.) at run-time
- is hostable on low-end controllers and without external resources
This feature set defines the type of OS commonly used in the current generation of automotive ECUs, except for Telematic/Infotainment systems. It is assumed that Telematic/Infotainment systems will continue to use proprietary OSs under the AUTOSAR framework (e.g. Windows CE, VxWorks, QNX, etc.). In the case where AUTOSAR components are needed to run on these proprietary OSs, the interfaces defined in this document should be provided as an Operating System Abstraction Layer (OSAL).
This document uses the industry standard (ISO 17356-3) as the basis for the AUTOSAR OS. The reader should be familiar with this standard before reading this document.
This document describes extensions to, and restrictions of .
模块依赖¶
- It is assumed that the operating system may use timer units directly to drive counters.
- If the user needs to drive scheduling directly from global time, then a global time interrupt is required.
- If the user needs to synchronize the processing of a ScheduleTable to a global time, the operating system needs to be told the global time using the SyncScheduleTable service.
- The IOC described in this document provides communication between OS-Applications. The IOC generation is based on configuration information which is generated by the RTE generator. On the other hand the RTE uses functions generated by the IOC to transmit data.
- The Operating System depends on the definition of partitions and cores in the virtual module EcuC if OS-Applications are used.
章节详细内容¶
1. 简介与功能概述¶
原文标题:Introduction and functional overview
This document describes the essential requirements on the AUTOSAR Operating System to satisfy the top-level requirements presented in the AUTOSAR SRS .
In general, operating systems can be split up in different groups according to their characteristics, e.g. statically configured vs. dynamically managed. To classify the AUTOSAR OS, here are the basic features of the OS
- is configured and scaled statically
- is amenable to reasoning of real-time performance
- provides a priority-based scheduling policy
- provides protective functions (memory, timing etc.) at run-time
- is hostable on low-end controllers and without external resources
This feature set defines the type of OS commonly used in the current generation of automotive ECUs, except for Telematic/Infotainment systems. It is assumed that Telematic/Infotainment systems will continue to use proprietary OSs under the AUTOSAR framework (e.g. Windows CE, VxWorks, QNX, etc.). In the case where AUTOSAR components are needed to run on these proprietary OSs, the interfaces defined in this document should be provided as an Operating System Abstraction Layer (OSAL).
……本章内容较长已节选,完整内容见「本地文件」中的纯文本全文。
2. 缩略语¶
原文标题:Acronyms and Abbreviations
The glossary below includes acronyms and abbreviations relevant to the AUTOSAR Operating System module that are not included in the .
| Abbreviation | Description |
|---|---|
| AR | AUTOSAR |
| IOC | Inter OS-Application communicator |
| LE | A locatable entity is a distinct piece of software that has the same effect regardless of which core it is located. |
| MC | Multi-Core |
| NMI | Non maskable interrupt |
| RTOS | Real Time Operating System |
| SLA | Software Layered Architecture |
| SWC | Software Component |
| SWFRT | Software FreeRunningTimer |
3. 术语表 of Terms¶
原文标题:Glossary of Terms
| Term | Definition | < |
|---|---|---|
| Access Right | An indication that an object (e.g. Task, ISR, hook function) of an OS-Application has the permission of access or manipulation with respect to memory, OS services or (set of) OS objects. | < |
| Cardinality | The number of items in a set. | < |
| Counter | An operating system object that registers a count in ticks. There are two types of counters: | < |
| ^ | Hardware Counter | A Counter that is advanced by hardware (e.g. timer). The count value is maintained by the peripheral "in hardware". |
| ^ | Software Counter | A Counter which is incremented by making the IncrementCounter API call (see ). The count value is maintained by the operating system "in software". |
| Deadline | The time at which a Task/Category 2 ISR must reach a certain point during its execution defined by system design relative to the stimulus that triggered activation. See figure | < |
| Delay | The number of ticks between two adjacent expiry points on a ScheduleTable. |
A pair of expiry points X and Y are said to be adjacent when:
- There is no expiry point Z such that X.Offset < Z.Offset < Y.Offset.
……本章内容较长已节选,完整内容见「本地文件」中的纯文本全文。
4. 相关文档¶
原文标题:Related documentation
5. 输入文档与相关标准规范¶
原文标题:Input documents & related standards and norms
6. 相关规范¶
原文标题:Related specification
AUTOSAR provides a General Specification on Basic Software Modules , which is also valid for AUTOSAR Operating System.
Thus, the specification shall be considered as additional and required specification for AUTOSAR Operating System.
All OSEK OS related types, defines and functions can be found in .
7. 约束与假设¶
原文标题:Constraints and assumptions
8. Existing Standards¶
This document makes the following assumptions about the referenced related standards and norms:
- provides a sufficiently flexible scheduling policy to schedule AUTOSAR systems.
- is a mature specification and implementations are used in millions of ECUs worldwide.
- does not provide enough support for isolating multi-source software components at runtime.
- does not provide enough runtime support for demonstrating the absence of some classes of fault propagation in a safety-case.
9. Terminology¶
The specification uses the following operators when requirements specify multiple terms:
- NOT : negation of a single term e.g. NOT Weekend
- AND : conjunction of two terms e.g. Weekend AND Saturday
- OR : disjunction of two terms e.g. Monday OR Tuesday
A requirement comprising multiple terms is evaluated left to right. The precedence rules are:
- Highest Precedence NOT
- Lowest Precedence AND OR
The expression NOT X AND Y means (NOT X) AND (Y)
Where operators of the same precedence are used in the same sentence, commas are used to disambiguate. The expression X AND Y, OR Z means (X AND Y) OR Z.
10. Interaction with the RTE¶
The configuration of an AUTOSAR system maps the runnables of a software component to (one or more) Tasks that are scheduled by the operating system. All runnables in a Task share the same protection boundary. In AUTOSAR, a software component must not include an interrupt handler. A software component is therefore implemented as runnables executing within the body of a Task, or set of Tasks, only.
Runnables get access to hardware-sourced data through the AUTOSAR RTE. The RTE provides the runtime interface between runnables and the basic software modules. The basic software modules also comprise a number of Tasks and ISRs that are scheduled by the operating system.
It is assumed that the software component templates and the description of the basic software modules provide sufficient information about the required runtime behavior to be able to specify the attributes of Tasks required to configure the OS.
11. Operating 系统抽象 Layer (OSAL)¶
原文标题:Operating System Abstraction Layer (OSAL)
Systems that do not use the OS defined in AUTOSAR can provide a platform for the execution of AUTOSAR software components using an Operating System Abstraction Layer. The interface to the OSAL is exactly that defined for the AUTOSAR OS.
12. Multi-Core Hardware assumptions¶
There are currently several existing and suggested HW-architectures for Multi-Core microprocessors. There is considerable variation in the features offered by these architectures. Therefore this section attempts to capture a common set of architectural features required for Multi-Core.
Hardware assumptions shall remain assumptions and shall not become official AUTOSAR requirements.
13. CPU 核 features¶
原文标题:CPU Core features
More than one core on the same piece of silicon.¶
The HW offers a method that can be used by the SW to identify a core.¶
The hardware supports atomic read and atomic write operations for a fixed word length depending on the hardware.¶
The hardware supports some atomic Test-And-Set functionality or similar functionalities that can be used to build a critical section shared between cores. Additional atomic operations may exist.¶
The cores may have the same instruction set; at least a common basic instruction set is available on all cores. Core specific add-ons may exist, but they are not considered.¶
The cores have the same data representation. For example, the same size of integer, same byte and bit order, etc.¶
If per-core caches exist, AUTOSAR requires support for RAM - cache coherency in HW or in SW. In software means that the cache-controller can be programmed by the SW in a way that it invalidates cache lines or excludes certain memory regions from caching.¶
In case of an exception (such as an illegal memory reference or divide by zero) the exception occurs on the core that introduced the exception.¶
……本章内容较长已节选,完整内容见「本地文件」中的纯文本全文。
14. 存储 features¶
原文标题:Memory features
- Shared RAM is available to all cores; at least all cores can share a substantial part of the memory.
- Flash shall be shared between all cores at least. However, performance can be improved if Flash/RAM can be partitioned so that there are separate pathways from cores to Flash.
- A single address space is assumed, at least in the shared parts of the memory address space.
- The AUTOSAR Multi-Core architecture shall be capable to run on systems that do and do not support memory protection. If memory protection exists, all cores are covered by a hardware-based memory protection.
15. Multi-Core 限制¶
原文标题:Multi-Core Limitations
- In AUTOSAR R4.0, it is not supported to activate additional cores under control of AUTOSAR after the Operating System was started.
- The scheduling algorithm does not assign Tasks dynamically to cores.
- The AUTOSAR OS Resource algorithm is not supported across cores. Resources can be used locally, between Tasks that are bound to the same core but not between Tasks/ISRs which are bound to different cores.
16. 限制¶
原文标题:Limitations
17. Hardware¶
The core AUTOSAR operating system assumes free access to hardware resources, which are managed by the OS itself. This includes, but is not limited to, the following hardware:
- interrupt control registers
- processor status words
- stack pointer(s)
Specific (extended) features of the core operating system extend the requirements on hardware resource. The following list outlines the features that have requirements on the hardware. Systems that do not use these OS features do not have these hardware requirements.
- Memory Protection: A hardware memory protection unit is required. All memory accesses that have the consequence of writing (e.g. reads that have the side effect of writing to a memory location) shall be treated as writes.
- Time Protection: Timer Hardware for monitoring execution times and arrival rates.
- Privileged and non-privileged modes on the MCU: to protect the OS against internal corruption caused by writes to OS controlled registers. This mode must not allow OS-Applications to circumvent protection (e.g. write registers which govern memory protection, write to processor status word etc.).
……本章内容较长已节选,完整内容见「本地文件」中的纯文本全文。
18. Programming Language¶
The API of the operating system is defined as C function calls or macros. If other languages are used, they must adapt to the C interface.
19. Miscellaneous¶
The operating system does not provide services for dynamic memory management.
20. 适用的车型领域¶
原文标题:Applicability to car domains
The operating system has the same design constraints regarding size and scalability under which was designed. The immediate domain of applicability is therefore currently body, chassis and power train ECUs. However, there is no reason that the OS cannot be used to implement ECUs for infotainment applications.
21. 对其他模块的依赖¶
原文标题:Dependencies to other modules
- It is assumed that the operating system may use timer units directly to drive counters.
- If the user needs to drive scheduling directly from global time, then a global time interrupt is required.
- If the user needs to synchronize the processing of a ScheduleTable to a global time, the operating system needs to be told the global time using the SyncScheduleTable service.
- The IOC described in this document provides communication between OS-Applications. The IOC generation is based on configuration information which is generated by the RTE generator. On the other hand the RTE uses functions generated by the IOC to transmit data.
- The Operating System depends on the definition of partitions and cores in the virtual module EcuC if OS-Applications are used.
22. 文件结构¶
原文标题:File structure
23. 代码文件结构¶
原文标题:Code file structure
The code file structure of the Operating System module is not fixed, besides the requirements in the .
24. 头文件结构¶
原文标题:Header file structure
The IOC generator generates an additional header file Ioc.h. Users of the Ioc.h shall include the Ioc.h file. If an implementation of the IOC requires additional header files, it is free to include them. The header files are self-contained, that means they will include all other header files, which they require.
25. ARTI 文件结构¶
原文标题:ARTI File Structure
To support ARTI based debugging and tracing, all source files of the OS module with ARTI hook macros shall include an "Os_Arti.h" file. This file (along with the corresponding Arti.h and Arti.c file) will be provided by the ARTI hook implementer, i.e. the tracing tool. When building the final executable, the linker will pull in the compiled Arti.c file, too.
The usage of the ARTI hook macros is configurable. If the OS is configured to not use ARTI, the inclusion of "Os_Arti.h" may be omitted, and the ARTI hooks macros may be expanded to empty macros (nothing).
26. 需求追踪¶
原文标题:Requirements Tracing
The following tables reference the requirements specified in and and links to the fulfillment of these. Please note that if column "Satisfied by" is empty for a specific requirement this means that this requirement is not fulfilled by this document.
| Requirement | Description | Satisfied by |
|---|---|---|
| ARTI Hooks shall be implemented with minimal intrusion | ||
| ARTI Hooks shall follow a fixed format | ||
| The ARTI template shall support core specific ARTI additions | ||
| The ARTI template shall support a parameter for the current application | ||
| The ARTI template shall support a parameter for the current task | ||
| The ARTI template shall support a parameter for the last error | ||
| The ARTI template shall support OS specific ARTI additions | ||
| The ARTI template shall support task specific ARTI additions | ||
| The ARTI description shall include a core class definition. | ||
| The ARTI description for a core class shall include a "current task" reference to the interpret the parameter value | ||
| The ARTI description shall include instance definitions for all cores of the ECU. |
……本章内容较长已节选,完整内容见「本地文件」中的纯文本全文。
27. 功能规范¶
原文标题:Functional specification
28. 核 OS¶
原文标题:Core OS
29. Background & Rationale¶
The OSEK/VDX Operating System is widely used in the automotive industry and has been proven in use in all classes of ECUs found in modern vehicles. The concepts that OSEK OS has introduced are widely understood and the automotive industry has many years of collective experience in engineering OSEK OS based systems.
OSEK OS is an event-triggered operating system. This provides high flexibility in the design and maintenance of AUTOSAR based systems. Event triggering gives freedom for the selection of the events to drive scheduling at runtime, for example angular rotation, local time source, global time source, error occurrence etc.
For these reasons the core functionality of the AUTOSAR OS shall be based upon the OSEK OS. In particular OSEK OS provides the following features to support concepts in AUTOSAR:
- fixed priority-based scheduling
- facilities for handling interrupts
- only interrupts with higher priority than Tasks
- some protection against incorrect use of OS services
- a startup interface through StartOS and the StartupHook
- a shutdown interface through ShutdownOS and the ShutdownHook
OSEK OS provides many features in addition to these.
……本章内容较长已节选,完整内容见「本地文件」中的纯文本全文。
30. 需求¶
原文标题:Requirements
Upstream requirements: , , ⌈ The Operating System module shall provide an API that is backward compatible with the OSEK OS API . ⌋
31. Restrictions on OSEK OS¶
It is too inefficient to achieve timing and memory protection for alarm callbacks. They are therefore not allowed in specific scalability classes ()
Upstream requirements: ⌈ The Operating System module shall only allow Alarm Callbacks in Scalability Class 1. ⌋
OSEK OS is required to provide functionality to handle inter-task (internal) communication according to the OSEK COM specification when internal communication only is required in the system. In AUTOSAR, internal communication is provided by the AUTOSAR RTE or by AUTOSAR COM at least one of which will be present for all AUTOSAR ECUs.
AUTOSAR OS, when used in an AUTOSAR system, therefore does not need to support internal communication.
An OSEK OS must implement internal communication if the symbol LOCALMESSAGESONLY is defined. AUTOSAR OS can deprecate the need to implement OSEK COM functionality and maintain compatibility with OSEK suite of specifications by ensuring that AUTOSAR OS always exists in an environment where LOCALMESSAGESONLY is undefined.
OSEK OS has one special Resource called RES_SCHEDULER. This Resource has 2 specific aspects:
It is always present in the system, even if it is not configured.¶
……本章内容较长已节选,完整内容见「本地文件」中的纯文本全文。
32. Undefined 行为 in OSEK OS¶
原文标题:Undefined Behaviour in OSEK OS
There are a number of cases where the behaviour of OSEK OS is undefined. These cases represent a barrier to portability. AUTOSAR OS tightens the OSEK OS specification by defining the required behaviour.
Upstream requirements: ⌈ If in a call to SetRelAlarm the parameter "increment" is set to zero, the service shall return E_OS_VALUE in standard and extended status . ⌋
Upstream requirements: ⌈ The first call to StartOS (for starting the Operating System) shall not return. ⌋
Upstream requirements: ⌈ If ShutdownOS is called and ShutdownHook returns then the Operating System module shall disable all interrupts and enter an endless loop. ⌋
33. Extensions to OSEK OS¶
Upstream requirements: ⌈ The Operating System module shall provide the services DisableAllInterrupts, EnableAllInterrupts, SuspendAllInterrupts, ResumeAllInterrupts prior to calling StartOS and after calling ShutdownOS. ⌋
It is assumed that the static variables of the functions mentioned in are initialized.
Upstream requirements: ⌈ The Operating System module shall provide the ability to increment a software Counter as an alternative action on alarm expiry. ⌋
The Operating System module provides API service IncrementCounter (see ) to increment a software Counter.
Upstream requirements: ⌈ The Operating System module shall allow to automatically start preconfigured absolute alarms during the start of the Operating System. ⌋
is an extension to OSEK OS which allows this only for relative alarms.
Upstream requirements:
⌈
The Operating System API shall check in extended mode all pointer arguments for a NULL_PTR and return E_OS_ILLEGAL_ADDRESS in this case unless NULL_PTR is explicitly allowed as a valid pointer address value in the API parameter specification.
⌋
34. 软件 Free Running Timer¶
原文标题:Software Free Running Timer
Due to the fact that the number of timers is often very limited, some functionality and configuration is added to extend the reuse of timers. E.g. this allows timer measurements.
Upstream requirements: ⌈ The Operating System module shall handle all the initialization and configuration of timers used directly by the Operating System module and not handled by the GPT driver. ⌋
The Operating System module provides API service GetCounterValue (see ) to read the current count value of a Counter (returning either the hardware timer ticks if Counter is driven by hardware or the software ticks when user drives Counter).
The Operating System module provides API service GetElapsedValue (see ) to get the number of ticks between the current tick value and a previously read tick value.
⌈ The Operating System module shall adjust the read out values of hardware timers (which drive counters) in such that the lowest value is zero and consecutive reads return an increasing count value until the timer wraps at its modulus. ⌋
35. ScheduleTables¶
36. Background & Rationale¶
It is possible to implement a statically defined Task activation mechanism using an OSEK Counter and a series of auto started alarms. In the simple case, this can be achieved by specifying that the Alarms are not modified once started. Run-time modifications can only be made if relative synchronization between alarms can be guaranteed. This typically means modifying the alarms while associated Counter tick interrupts are disabled.
ScheduleTables address the synchronization issue by providing an encapsulation of a statically defined set of expiry points. Each expiry point defines:
- one or more actions that must occur when it is processed where an action is the activation of a Task or the setting of an event.
- An offset in ticks from the start of the ScheduleTable
Each ScheduleTable has a duration in ticks. The duration is measured from zero and defines the modulus of the ScheduleTable.
At runtime, the Operating System module will iterate over the ScheduleTable, processing each expiry point in turn. The iteration is driven by an OSEK Counter. It therefore follows that the properties of the Counter have an impact on what is possible to configure on the ScheduleTable.
37. 需求¶
原文标题:Requirements
38. 结构 of a ScheduleTable¶
原文标题:Structure of a ScheduleTable
Upstream requirements: ⌈ A ScheduleTable shall have at least one expiry point. ⌋
Upstream requirements: ⌈ An expiry point shall contain a (possibly empty) set of Tasks to activate. ⌋
Upstream requirements: ⌈ An expiry point shall contain a (possibly empty) set of Events to set. ⌋
Replenish of execution budget by expiry point Upstream requirements: ⌈ An expiry point shall contain a (possibly empty) set of Taskss to replenish their execution budget. The replenishment is allowed only for tasks with OsTaskTimingProtectionDeferrableServer=TRUE and is done by means of BudgetReplenish (see ) ⌋
Note: For details about the background of see .
Upstream requirements: ⌈ An expiry point shall contain an offset in ticks from the start of the ScheduleTable. ⌋
39. Constraints on Expiry Points¶
There is no use case for an empty expiry point, so each one must define at least one action.
Upstream requirements: ⌈ An expiry point shall activate at least one Task OR set at least one event OR replenish a Tasks execution budget. ⌋
The OS needs to know the order in which expiry points are processed. It is therefore necessary to ensure that the expiry points on a ScheduleTable can be totally ordered. This is guaranteed by forcing each expiry point on a ScheduleTable to have a unique offset.
Upstream requirements: ⌈ Each expiry point on a given ScheduleTable shall have a unique offset. ⌋
Iteration over expiry points on a ScheduleTable is driven by an OSEK Counter. The characteristics of the Counter - OsCounterMinCycle and OsCounterMaxAllowedValue - place constraints on expiry point offsets.
Upstream requirements: ⌈ The Initial Offset shall be zero OR in the range OsCounterMinCycle .. OsCounterMaxAllowedValue of the underlying Counter. ⌋
Similarly, constraints apply to the delays between of adjacent expiry points and the delay to the logical end of the ScheduleTable.
……本章内容较长已节选,完整内容见「本地文件」中的纯文本全文。
40. Processing ScheduleTables¶
Upstream requirements: ⌈ The Operating System module shall process each expiry point on a ScheduleTable from the Initial Expiry Point to the Final Expiry Point in order of increasing offset. ⌋
Upstream requirements: ⌈ The Operating System module shall permit multiple ScheduleTables to be processed concurrently. ⌋
Upstream requirements: ⌈ A ScheduleTable of the Operating System module shall be driven by exactly one Counter. ⌋
Upstream requirements: ⌈ The Operating System module shall be able to process at least one ScheduleTable per Counter at any given time. ⌋
Upstream requirements: ⌈ The Operating System module shall make use of ticks so that one tick on the Counter corresponds to one tick on the ScheduleTable. ⌋
It is possible to activate a Task and set (one or more unique) Events for the same Task at the same expiry point. The ordering of Task activations and event settings performed from the expiry point could lead to different implementations exhibiting different behaviour (for example, activating a suspended Task and then setting and event on the Task would succeed but if the ordering was reversed then the event setting would fail).
……本章内容较长已节选,完整内容见「本地文件」中的纯文本全文。
41. Repeated ScheduleTable Processing¶
A ScheduleTable may or may not repeat after the final expiry point is processed. This allows two types of behaviour:
single-shot - the ScheduleTable processes each expiry point in sequence and then stops at the end. This is useful for triggering a phased sequence of actions in response to some trigger¶
repeating - the ScheduleTable processes each expiry point in turn, after processing the final expiry point, it loops back to the initial expire point. This is useful for building applications that perform repeated processing or system which need to synchronize processing to a driver source.¶
A repeating ScheduleTable means that each expiry point is repeated at a period equal to the ScheduleTable duration.
Upstream requirements: ⌈ The ScheduleTable shall be configurable as either single-shot or repeating. ⌋
Upstream requirements: ⌈ If the ScheduleTable is single-shot, the Operating System module shall stop the processing of the ScheduleTable Final Delay ticks after the Final Expiry Point is processed. ⌋
Upstream requirements: ⌈ If the ScheduleTable is single-shot, the Operating System module shall allow a Final Delay between 0 ..
……本章内容较长已节选,完整内容见「本地文件」中的纯文本全文。
42. Controlling ScheduleTable Processing¶
The application is responsible for starting and stopping the processing of a ScheduleTable.
The Operating System module provides the service StartScheduleTableAbs (see ) to start the processing of a ScheduleTable at an absolute value "Start" on the underlying Counter. (The Initial Expiry Point has to be processed when the value of the underlying Counter equals Start + InitialOffset).
The Operating System module provides the service StartScheduleTableRel (see ) to start the processing of a ScheduleTable at "Offset" relative to the "Now" value on the underlying Counter (The Initial Expiry Point shall be processed when the value of the underlying Counter equals Now + Offset + InitialOffset).
The figure below illustrates the two different methods for a ScheduleTable driven by a Counter with a modulus of 65536 (i.e. an OsCounterMaxAllowedValue = 65535).
The Operating System module provides the service StopScheduleTable (see ) to cancel the processing of a ScheduleTable immediately at any point while the ScheduleTable is running.
……本章内容较长已节选,完整内容见「本地文件」中的纯文本全文。
43. ScheduleTable 同步¶
原文标题:ScheduleTable Synchronization
44. Background & Rationale¶
The absolute time at which the Initial Expiry Point on a ScheduleTable is processed is under user control. However, if the ScheduleTable repeats then it is not guaranteed that the absolute count value at which the initial expiry point was first processed is the same count value at which it is subsequently processed. This is because the duration of the ScheduleTable need not be equal to the Counter modulus.
In many cases it may be important that ScheduleTable expiry points are processed at specific absolute values of the underlying Counter. This is called synchronization. Typical use-cases include:
- Synchronization of expiry points to degrees of angular rotation for motor management
- Synchronizing the computation to a global (network) time base. Note that in AUTOSAR, the Operating System does not provide a global (network) time source because
……本章内容较长已节选,完整内容见「本地文件」中的纯文本全文。
45. 需求¶
原文标题:Requirements
Upstream requirements: ⌈ The Operating System module shall provide the ability to synchronize the processing of ScheduleTable to known Counter values. ⌋
46. Implicit 同步¶
原文标题:Implicit Synchronization
The Operating System module does not need to provide any additional support for implicit synchronization of ScheduleTables. However, it is necessary to constrain configuration and runtime control of the ScheduleTable so that ticks on the configured ScheduleTable can be aligned with ticks on the Counter. This requires the range of the ScheduleTable to be identical to the range of the Counter (the equality of tick resolution of each is guaranteed by the requirements on the ScheduleTable / Counter interaction):
Upstream requirements: ⌈ A ScheduleTable of the Operating System module that is implicitly synchronized shall have a Duration equal to OsCounterMaxAllowedValue + 1 of its associated OSEK OS Counter. ⌋
To synchronize the processing of the ScheduleTable it must be started at a known counter value. The implication of this is that a ScheduleTable requiring implicit synchronization must only be started at an absolute counter value and cannot be started at a relative count value.
Upstream requirements: ⌈ The Operating System module shall prevent a ScheduleTable that is implicitly synchronized from being started at a relative count value. ⌋
……本章内容较长已节选,完整内容见「本地文件」中的纯文本全文。
其余 352 章(内容从略,见纯文本全文)¶
- Explicit 同步
- 启动
- Providing a 同步 Count
- Specifying 同步 Bounds
- Performing 同步
- Stack Monitoring Facilities
- Background & Rationale
- 需求
- OS-Application
- Background & Rationale
- 需求
- Protection Facilities
- 存储 Protection
- Background & Rationale
- 需求
- 时序 Protection
- Background & Rationale
- Deferrable Server
- 需求
- Implementation Notes
- 服务 Protection
- Background & Rationale
- Invalid Object Parameter or Out of Range Value
- Background & Rationale
- 需求
- 服务 Calls Made from Wrong Context
- Background & Rationale
- 需求
- 服务 with Undefined 行为
- Background & Rationale
- 需求
- 服务 Restrictions for Non-Trusted OS-Applications
- Background & Rationale
- 需求
- 服务 Calls on Objects in Different OS-Applications
- Background
- 需求
- Protecting the Hardware used by the OS
- Background & Rationale
- 需求
- Implementation Notes
- Providing Trustedfunctions
- Background & Rationale
- 需求
- Protection 错误处理
- Background & Rationale
- 需求
- Operating 系统 for Multi-Core
- Background & Rationale
- 需求
- 调度
- 需求
- Locatable entities (LE)
- 需求
- Multi-Core start-up concept
- 需求
- 核 under 控制 of the AUTOSAR OS
- 需求
- Multi-Core 关机 concept
- Synchronized 关机 concept
- Individual 关机 concept
- fatal internal 错误的关机 in case
- OS 服务 functionality (概述)
- GetTaskID
- Interrupt disabling
- 需求
- Task activation
- 需求
- Task Chaining
- 需求
- Event setting
- 需求
- Activating additional 核
- Start of the OS
- 需求
- Task termination
- 需求
- Termination of OS-Applications
- 需求
- 关机 of the OS
- 需求
- Waiting for Events
- 需求
- Calling trusted functions
- 需求
- Invoking reschedule
- 需求
- Resource 处理
- The CoreID
- 需求
- Counters, background & rationale
- Multi-Core restrictions on Counters
- 需求
- 同步 of Counters
- Alarms
- 需求
- ScheduleTables
- 需求
- The spinlock mechanism
- 需求
- Offline checks
- 需求
- Auto start Objects
- 需求
- Inter-OS-Application Communicator (IOC)
- Background & Rationale
- IOC - 通用目的
- IOC functionality
- Communication
- 通知
- IOC 接口
- IOC internal 结构
- IOC 配置 and generation
- IOC 集成示例
- 示例 1 - 1:1 sender/receiver communication without 通知
- 示例 2 - N:1 client/server communication with receiver 通知 by RTE
- 系统 Scalability
- Background & Rationale
- 需求
- Hook Functions
- Background & Rationale
- 需求
- Hardware peripheral access
- Background & Rationale
- 需求
- Interrupt source API
- Background & Rationale
- 需求
- 错误分类
- ARTI Debug Information
- OS ARTI Objects
- ARTI Hook Macros
- Class AR_CP_OS_APPLICATION
- Class AR_CP_OS_TASK
- Class AR_CP_OS_CAT2ISR
- Class AR_CP_OS_SERVICECALLS
- Class AR_CP_OS_SPINLOCK
- Class AR_CP_OS_HOOK
- API 规范
- Constants
- 类型 StatusType的错误 codes
- Macros
- 类型定义
- ApplicationType (for OS-Applications)
- ApplicationStateType
- ApplicationStateRefType
- TrustedFunctionIndexType
- TrustedFunctionParameterRefType
- AccessType
- ObjectAccessType
- ObjectTypeType
- MemoryStartAddressType
- MemorySizeType
- ISRType
- ScheduleTableType
- ScheduleTableStatusType
- ScheduleTableStatusRefType
- ProtectionReturnType
- RestartType
- PhysicalTimeType
- CoreIdType
- SpinlockIdType
- TryToGetSpinlockType
- AreaIdType
- CounterType
- 功能定义
- GetApplicationID
- GetCurrentApplicationID
- GetISRID
- CallTrustedFunction
- CheckISRMemoryAccess
- CheckTaskMemoryAccess
- CheckObjectAccess
- CheckObjectOwnership
- StartScheduleTableRel
- StartScheduleTableAbs
- StopScheduleTable
- NextScheduleTable
- StartScheduleTableSynchron
- SyncScheduleTable
- SetScheduleTableAsync
- GetScheduleTableStatus
- IncrementCounter
- GetCounterValue
- GetElapsedValue
- TerminateApplication
- GetApplicationState
- GetNumberOfActivatedCores
- GetCoreID
- StartCore
- GetSpinlock
- ReleaseSpinlock
- TryToGetSpinlock
- ShutdownAllCores
- ReadPeripheral8, ReadPeripheral16, ReadPeripheral32
- WritePeripheral8, WritePeripheral16, WritePeripheral32
- ModifyPeripheral8, ModifyPeripheral16, ModifyPeripheral32
- EnableInterruptSource
- DisableInterruptSource
- ClearPendingInterrupt
- ActivateTaskAsyn
- SetEventAsyn
- isOsStarted
- BudgetReplenish
- IOC
- Imported 类型
- 类型定义
- Constants
- 功能定义
- IocInit
- IocSend/IocWrite
- IocSendGroup/IocWriteGroup
- IocReceive/IocRead
- IocReceiveGroup/IocReadGroup
- IocEmptyQueue
- Expected 接口
- Mandatory 接口
- Optional 接口
- Callout 接口
- ProtectionHook
- Application specific StartupHook
- Application specific ErrorHook
- Application specific ShutdownHook
- ReceiverPullCB
- 服务接口
- 时序图
- Sequence chart for calling trusted functions
- Sequence chart for usage of ErrorHook
- Sequence chart for ProtectionHook
- Sequence chart for StartupHook
- Sequence chart for ShutdownHook
- Sequence diagrams of Sender Receiver communication over the IOC
- Last-is-best communication
- Queued communication without pull callback
- Queued communication with pull callback
- 配置规范
- How to read this chapter
- Rules for paramters
- Containers and 配置 parameters
- Os
- OsAlarmSetEvent
- OsAlarm
- OsAlarmAction
- OsAlarmActivateTask
- OsAlarmAutostart
- OsAlarmCallback
- OsAlarmIncrementCounter
- OsApplication
- OsApplicationHooks
- OsApplicationTrustedFunction
- OsAppMode
- OsCounter
- OsEvent
- OsDriver
- OsHooks
- OsIsr
- OsIsrResourceLock
- OsIsrTimingProtection
- OsOS
- OsPeripheralArea
- OsResource
- OsScheduleTable
- OsScheduleTableAutostart
- OsScheduleTableEventSetting
- OsScheduleTableExpiryPoint
- OsScheduleTableTaskActivation
- OsScheduleTblAdjustableExpPoint
- OsScheduleTableTaskReplenish
- OsScheduleTableSync
- OsSpinlock
- OsTask
- OsTaskAutostart
- OsTaskResourceLock
- OsTaskTimingProtection
- OsTimeConstant
- Containers and 配置 parameter extensions of the IOC
- OsIoc
- OsIocCommunication
- OsIocSenderProperties
- OsIocReceiverProperties
- OsIocDataProperties
- Containers and 配置 parameters for ARTI
- ArtiHardware
- ArtiHardwareCoreClass
- ArtiHardwareCoreInstance
- ArtiOs
- ArtiOsAlarmClass
- ArtiOsAlarmInstance
- ArtiOsClass
- ArtiOsContextClass
- ArtiOsContextInstance
- ArtiOsInstance
- ArtiOsIsrClass
- ArtiOsIsrInstance
- ArtiOsResourceClass
- ArtiOsResourceInstance
- ArtiOsScheduleTableClass
- ArtiOsScheduleTableInstance
- ArtiOsSpinlockClass
- ArtiOsSpinlockInstance
- ArtiOsStackClass
- ArtiOsStackInstance
- ArtiOsTaskClass
- ArtiOsTaskInstance
- 发布信息
- Generation of the OS
- Read in 配置
- Consistency check
- Generating operating 系统
- Application Notes
- Hooks
- Providing Trusted Functions
- 软件 Components and OS-Applications
- Global Time 同步
- Working with FlexRay
- Migration from OIL to XML
- Debug 支持
- 集成 hints for peripheral protection
- Termination of OS-Applications
- Outlook on 存储 Protection 配置
- 配置 Approach
- 附录
- 不适用需求
- History of Constraints and 规范 Items
- Differences between R25-11 and R26-11
- Added 规范 Items in R26-11
- Changed 规范 Items in R26-11
- Deleted 规范 Items in R26-11
- Added Constraints in R26-11
- Changed Constraints in R26-11
- Deleted Constraints in R26-11
- Differences between R24-11 and R25-11
- Added 规范 Items in R25-11
- Changed 规范 Items in R25-11
- Deleted 规范 Items in R25-11
- Added Constraints in R25-11
- Changed Constraints in R25-11
- Deleted Constraints in R25-11
- Differences between R23-11 and R24-11
- Added 规范 Items in R24-11
- Changed 规范 Items in R24-11
- Deleted 规范 Items in R24-11
- Added Constraints in R24-11
- Changed Constraints in R24-11
- Deleted Constraints in R24-11
- Differences between R22-11 and R23-11
- Added 规范 Items in R23-11
- Changed 规范 Items in R23-11
- Deleted 规范 Items in R23-11
- Added Constraints in R23-11
- Changed Constraints in R23-11
- Deleted Constraints in R23-11