The invention relates to a method for the transparent replication of a software component of a software system, particularly as defined in the AUTOSAR standard, in a computer system comprising two or more processing units, said processing units being interconnected via one or more communication channels for the exchange of data.
AUTOSAR is an automotive industry standard in which interfaces and interactions of software components are specified in the form of XML descriptions (XML=Extendable Markup Language). AUTOSAR allows architecture-centric modeling of complex software systems. This means that code for transmitting data is generated, while a functionality (algorithms) is manually implemented or generated by computer-aided tools. For all the inputs and outputs, I/O (input/output) functions known as RTE calls are provided. Building blocks for modeling functionalities are termed components and compositions. Compositions comprise a plurality of components which are interconnected via communication links. Components and compositions are interconnected via so called ports. Ports constitute communications interfaces in order to exchange data between individual components and to enable function calls between the components. Depending on the design of the computer system, the software components in safety-critical applications must be adapted to the particular hardware architecture. Alternatively, special hardware can be used for transparent replication.
According to various embodiments, a method for the transparent replication of a software component of a software system, in particular as defined by the AUTOSAR standard, can be specified which allows the unmodified use of AUTOSAR software components in safety-critical applications requiring in particular a multi-channel data processing system.
According to an embodiment, in a method for the transparent replication of a software component of a software system, in particular as defined by the AUTOSAR standard, in a data processing system comprising two or more processing units, the processing units are interconnected via one or more communication channels for the exchange of data, and each of the processing units comprises a runtime environment in which runtime environments to be replicated for the processing units are provided with a synchronization and voting functionality.
According to a further embodiment, a virtual communication channel can be provided between the replicated runtime environments. According to a further embodiment, to implement a functionality of the software component a number of components can be interconnected virtually, irrespective of the assignment of the components to the runtime environments to be replicated. According to a further embodiment, the components of a functionality can be interconnected for exchanging data across communications interfaces comprising send and receive ports, data being fed to the receive ports on an event-driven basis or by polling. According to a further embodiment, reception of data at one of the receive ports may trigger the initiation of code sequences which are executed on the redundant processing units. According to a further embodiment, the code sequences can use a runtime environment code for communicating with other components or for invoking services. According to a further embodiment, the code sequences may use the runtime environment or environments as middleware in order to exchange data with other components or to make remote procedure calls. According to a further embodiment, the components can be duplicated on redundant processing units and the signal processing steps are synchronized by the runtime environments of the redundant processing units. According to a further embodiment, runtime environment calls can be performed synchronously. According to a further embodiment, synchronization may take place via the communication channel between the runtime environments to be replicated. According to a further embodiment, all the signals can be fed to input ports of compositions, comprising a plurality of communicatively interconnected components, and simultaneously to the input ports of the redundant compositions. According to a further embodiment, prior to the outputting of a signal all the output ports can be compared with the result of the redundant component and combined into a common result. According to a further embodiment, at the time of runtime environment generation it may be determined which of the processing units has been assigned which components and which of the processing units has been assigned the associated redundant components, from which information the runtime environments determine physical synchronization paths for all the synchronization points and generate corresponding runtime environment code.
The invention will now be explained in greater detail with reference to the accompanying drawings in which:
In the method according to various embodiments for the transparent replication of a software component of a software system in a data processing system comprising two or more processing units, the processing units are interconnected via one or more communication channels for exchanging data. Each of the processing units comprises a runtime environment. Particular processing unit runtime environments to be replicated are provided with a synchronization and voting functionality.
The method according to various embodiments allows precise synchronization of applications between parallel runtime environments, said method requiring no time synchronization.
The method according to various embodiments uses an extension of the runtime environments RTE. The AUTOSAR runtime environment is a tool-generated middleware which permits, among other things, locally transparent communication between software components. In order to provide replication transparency, the runtime environment is extended to include a synchronization and voting functionality, a virtual communication channel being created between the replicated runtime environments. Communication between different software components can take place in different ways: In the case of a sender/receiver system it can be “queued” or “unqueued”. In the case of a client/server system it can be synchronous or asynchronous. Communication within a software component can take place using so-called “interrunnable variables” or “exclusive areas”. Communication with services of the processing unit (so-called ECU=Electronic Control Unit) can be implemented as “communication with services” or as “communication with IO abstraction”. The internal behavior of the software components includes the following possibilities: “invocation of runnable entities”, blocking and unblocking of runnables at “wait points”, “reception of RTE events”, “per-instance memory” and “initialization/finalization”. A precise description of communication via the virtual communication channel can be found in the document “Specification of the AUTOSAR Runtime Environment, Version 2.0.0” of the Autosar partnership.
To implement a functionality of the software component, a number of components are interconnected virtually, independently of the assignment of the components to the runtime environments to be replicated.
The components of a functionality are interconnected for exchanging data across communications interfaces comprising send and receive ports, data being fed to the receive ports in an event-driven manner or by polling.
The reception of data triggers at one of the receive ports the initiation of code sequences which are executed on the redundant processing units. The code sequences can use a runtime environment code for communicating with other components or for invoking services. This means that a software functionality can be represented by a sequence of code sequence calls. Code sequences are also known as runnable entities. Code sequences use the runtime environment as middleware in order to exchange data from other components or to make what are known as remote procedure calls.
According to another embodiment, the components are duplicated on redundant processing units. The signal processing steps are synchronized by the runtime environments of the redundant processing units. The transparent runtime environment concept therefore consists in redundancy being ensured by the runtime environment itself.
Synchronization takes place via the communication channel between the runtime environments to be replicated.
Synchronization can be carried out via the bus or a so-called dual-port RAM. This is also termed the synchronization channel.
According to another embodiment, all the signals present at the input ports of compositions are simultaneously fed to the input ports of the redundant compositions, each of the components comprising a plurality of communicatively interconnected components.
In another embodiment, all the output ports are compared with the result of the redundant component prior to the outputting of a signal and combined into a common event. This describes the output functionality in the runtime environment, which is also known as voting. For each output port subject to voting, it must be clearly established which action or actions must be carried out in the case of success and in the case of failure. In the event of success, both sub-results of the redundant component coincide, e.g. within defined tolerances. In the event of failure, the sub-results determined by the redundant components are different. Port accesses or other I/O functions which are not brought out must be time-synchronized, without carrying out voting.
At the time of runtime environment generation it is determined which of the processing units has been assigned which components and which of the processing units has been assigned the associated redundant components, from which information the runtime environments generate physical synchronization paths for all the synchronization points and generate corresponding runtime environment code. The term physical synchronization path denotes the connection between a processing unit and its redundant partner processing unit. This can be a point-to-point connection or a bus, such as e.g. a CAN bus, FlexRay bus, etc.
The processing units VEA, VEB are assigned a software component SWC1. The software component SWC1 comprises two instances SWC1A and SWC1B, the former being assigned to the processing unit VEA and the latter to the processing unit VEB. The instances SWC1a, SWC1b of the software component SWC constitute redundant functionalities which are executed on the runtime environments RTE of the processing units VEA and VEB.
The processing unit VEC is assigned a software component SWC2. The software component SWC2 is connected to the software component SWC1 via a communication connection KV. For this purpose the software component SWC2 has a port PR which is designated the required port. Similarly, the software component SWC1 has a port PP designated the provided port. In the schematic drawing, communication connection KV does not represent a physical connection, but merely a virtual connection for representing the functionalities. Data is actually exchanged via one of the communication channels KK1 or KK2.
The runtime environments RTE of the processing units VEA and VEB are extended compared to a standard AUTOSAR runtime environment. The AUTOSAR runtime environment is generally a tool-generated middleware which permits, among other things, locally transparent communication between software components. To implement additional replication transparency, the runtime environments RTE of the processing units VEA and VEB are extended to include synchronization and voting functionality (SyncF, VoteF). Also marked between the runtime environments RTE of the processing units VEA and VEB is a virtual communication channel SYNC which is termed a synchronization path. The communication channel is a prerequisite for implementing replication transparency. To implement replication transparency, the following characteristics of the runtime environment must be extended accordingly: Communication between different software components. Communication within a software component. Communication with services of the processing unit and the internal behavior of the software component.
Modeling of replication transparency will now be described with reference to
At receive ports PE, data can be fed to the components on an event-driven basis or by polling of the further processing. In each case the reception of data causes a so-called runnable entity re1, re2, re3, re4, re5, re6 to be initiated, in the context of which processing of the data takes place. Runnable entities are code sequences which can be executed on one or different processing units. The latter use the runtime environment as middleware in order to exchange data from other components or to make so-called RPC (Remote Procedure calls). Denoted by SEN in
RTE calls RTEC offer the only possibility of exchanging data with other components or services. The implementation of the code sequences via runnable entities consists of manually implementable code which can use the generated runtime environment code for communication with other components or for invoking services. This means that a software functionality can be represented by a sequence of runnable entity calls (re1-re2-re3-re4-re5-re6). This is shown in
The transparent replication of AUTOSAR software components allows any number of software components (composition) to be executed redundantly. A composition has input and output ports which are brought out. In AUTOSAR these are termed “delegation ports”. Ports which are interconnected internally are known as “assembly ports” in AUTOSAR. Delegation ports represent the behavior with respect to the outside world and must be particularly taken into account for redundancy considerations. All the signals and input ports, the so-called “required ports”, must be fed simultaneously to the input ports of the redundant components. Prior to the outputting of a signal, all the output ports, the “provided ports”, must be compared with the result of the partner component and combined to form a common result. This process is termed selection functionality or voting. For each output port subject to voting it must be clearly established which action or actions must be carried out in the case of success and in the case of failure. In the event of success, both sub-results, i.e. results which have been determined by the systems X and X′, coincide within defined tolerances. In the event of failure, the sub-results determined by the systems X and X′ are different. Port accesses or other RTE calls which are not brought out must be time-synchronized, without executing voting or a selection functionality.
Synchronization will be explained in detail with reference to
Replication can take place, for example, on symmetric microcontrollers which are interconnected by a direct communication channel with low latency times (e.g. dual-ported RAM). Replication can also take place on diversity microcontrollers which are interconnected by a direct communication channel with direct latency times (e.g. dual-ported RAM). Replication is possible in a network of control devices connected by CAN bus or FlexRay bus. Replication is also possible on a microcontroller, replicated code being executed in a time-offset manner.
Number | Date | Country | Kind |
---|---|---|---|
10 2007 033 885.8 | Jul 2007 | DE | national |
This application is a U.S. National Stage Application of International Application No. PCT/EP2008/056960 filed Jun. 5, 2008, which designates the United States of America, and claims priority to German Application No. 10 2007 033 885.8 filed Jul. 20, 2007, the contents of which are hereby incorporated by reference in their entirety.
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/EP08/56960 | 6/5/2008 | WO | 00 | 1/20/2010 |