The present invention relates a method and a device for comparing output data of at least two execution units of a microprocessor.
Transient errors, triggered by alpha particles or cosmic radiation, are an increasing problem for integrated circuits. Due to declining structure widths, decreasing voltages and higher clock frequencies, there is an increased probability that a voltage spike, caused by an alpha particle or by cosmic radiation, will falsify a logic value in an integrated circuit. The effect can be a false calculation result. In safety-related systems, such errors must therefore be detected reliably.
In safety-related systems, such as an ABS control system in a motor vehicle, in which malfunctions of the electronic equipment must be detected with certainty, redundancies for error detection are normally provided particularly in the corresponding control devices of such systems. Thus, for example, in conventional ABS systems, the complete microcontroller is duplicated in each instance, all ABS functions being calculated redundantly and checked for consistency. If a discrepancy appears in the results, the ABS system is switched off.
Such processor units having at least two integrated execution units are also referred to as dual-core architectures or multi-core architectures. The different execution units (cores) execute the same program segment redundantly and in a clock-synchronized manner; the results of the two execution units are compared, and an error will then be detected in the comparison for consistency.
Processors are equipped with caches to accelerate access to instructions and data. This is necessary in light of the ever-increasing volume of data, on the one hand, and in light of the increasing complexity of data processing using processors that operate at faster and faster speeds, on the other hand. A cache may be used to avoid to some extent the slow access to a large (main) memory, and the processor consequently does not have to wait for data to be provided. Both caches exclusively for instructions and caches exclusively for data are conventional, but also “unified caches,” in which both data and instructions are stored in the same cache. Systems having multiple levels (hierarchy levels) of caches are also conventional. Such multi-level caches are used to perform an optimal adjustment of the speeds between the processor and the (main) memory by using graduated memory sizes and various addressing strategies of the caches on the different levels.
Caches are also used to avoid conflicts in accessing the system bus or memory bus in a multiprocessor system. In a multiprocessor system it is common to equip every processor with a cache, or in the case of multi-level caches with correspondingly more caches.
In one conventional arrangement of caches in a switchable dual-core system, each of the two cores has one permanently assigned cache that the core accesses in the performance mode. In the compare mode, both cores access their respective cache. In addition to the fact that in the compare mode a datum is stored multiple times in the cache (separately for each execution unit), in particular the time required for a change from the performance mode to the compare mode is considerable.
During this change, the state of the caches must be adapted. Only this ensures that in the compare mode a case in which one of the execution units involved in the comparison has a cache miss (requested datum is not stored in the cache and must be reloaded) and another a cache hit (requested datum is stored in the cache and does not need to be reloaded) does not arise.
Example embodiments of the present invention, in a multiprocessor system, avoid the disadvantages of conventional methods when using caches in a switchable multiprocessor system. A disadvantage in this context is that in conventional arrangements of caches, the caches must be synchronized in a costly way when a switchover from a performance mode to a compare mode occurs.
For the switchover option between different modes of a multiprocessor system, such as the performance and the compare mode, it is advantageous if not every execution unit has its own cache, since in particular during the switchover to the compare mode a time-consuming adaptation of the cache would have to be carried out. This may be avoided to a great extent in the provided structures.
In addition, it is advantageous if the sizes of the different caches for the different modes (compare or performance) can be adjusted to the requirements of the modes. Furthermore, it may be advantageous that in some modes the cache is dispensed with altogether, in particular if the bus access itself is not significantly slower than a cache access.
A method for controlling memory access in a computer system having at least two execution units is described, a buffer, in particular a cache being provided for each execution unit, and furthermore a switchover device and a comparison device being provided, the system switching between a performance mode and a compare mode, wherein in the performance mode each execution unit accesses the buffer assigned to it and in the compare mode both execution units access one buffer.
A method is described, wherein the buffer that is accessed by both execution units in the compare mode corresponds to the buffer of one execution unit.
A method is described, wherein at least one additional buffer, in particular an additional cache, is provided, and in the compare mode both execution units access this additional buffer.
A method is described, wherein at least one additional buffer is provided and the buffer that is accessed by both execution units in the compare mode is made up of the additional buffer and a buffer of an execution unit.
A method is described, wherein in the compare mode only read access is permitted to the memory assigned to an execution unit.
A method is described, wherein in the compare mode the comparison device compares information for consistency and in the event of deviation, an error is detected, and where an error occurs, an access to the buffer is prevented.
A method is described, wherein in the compare mode the comparison device compares information for consistency and in the event of deviation, an error is detected, and where an error occurs, information in the buffer is invalidated or blocked.
A method is described, wherein in the compare mode the comparison device compares information for consistency and in the event of deviation an error is detected, and where an error occurs, the computer system is started anew or restarted.
A method is described, wherein in the compare mode the comparison device compares information for consistency and in the event of deviation an error is detected, and where an error occurs, at least one execution unit is started anew or restarted.
A device for controlling a memory access in a computer system having at least two execution units is advantageously included, a buffer, in particular a cache being provided for each execution unit, and furthermore a switchover device and a comparison device being provided, the system switching between a performance mode and a compare mode, wherein a device is included that is designed such that in the performance mode each execution unit accesses the buffer assigned to it and in the compare mode both execution units access one buffer.
A device is advantageously included, wherein the buffer that is accessed by both execution units in the compare mode corresponds to the buffer of one execution unit.
A device is advantageously included wherein at least one additional buffer, in particular an additional cache, is provided, and in the compare mode both execution units access this additional buffer.
A device is advantageously included, wherein at least one additional buffer is provided and the buffer that is accessed by both execution units in the compare mode is made up of the additional buffer and a buffer of an execution unit.
A device is advantageously included, wherein the device is designed such that in the compare mode only read access is permitted to the memory assigned to an execution unit.
A device is advantageously included, wherein the comparison device is designed such that it compares information for consistency in the compare mode and, in the event of a deviation, detects an error, and when an error occurs, prevents access to the buffer.
A device is advantageously included, wherein the comparison device is designed such that it compares information for consistency in the compare mode and, in the event of a deviation, detects an error, and when an error occurs, invalidates or blocks information in the buffer.
A device is advantageously included, wherein the comparison device is located between at least one execution unit and the buffers.
A device is advantageously included, wherein the buffers are located between at least one execution unit and the comparison device.
A device is advantageously included, wherein the switchover device and the comparison device are implemented as a switchover and comparator unit.
Other features and aspects of example embodiments are described below with reference to the appended Figures.
In the following, an execution unit may denote both a processor/core/CPU, as well as an FPU (floating point unit), a DSP (digital signal processor), a co-processor or an ALU (arithmetic logical unit).
In some multiprocessor systems a cache is used only to avoid conflicts in the system bus and/or memory bus. If only one execution unit existed, then in this case no cache would be necessary since the memory is fast enough to serve the read requests of one execution unit.
In the compare mode, switch C132 is closed and switch C131 open. Both execution units jointly access bus C10 via cache C120. A comparator unit C160 compares the output signals of both execution units and generates an error signal in the event of differences. Optionally, comparator unit C160 may be connected to bus interface unit C150 (not shown here) and prevent a write access if the output signals of the two cores differ. In the performance mode, unit C160 is deactivated. The deactivation of the comparator unit may be achieved in different manners: Either a comparison by unit C160 is not carried out; no signals for comparison are applied to unit C160; or although the comparison takes place, the result is ignored.
An example embodiment of the present invention is shown in
In an additional variant of the multiprocessor system, caches are also used only for avoiding conflicts in access to the memory bus.
Furthermore, it is advantageous if units C240a and C240b listen in on bus C10 (“bus snooping”) (via C250a and C250b respectively) to see whether execution unit C210a via C250a or C210b via C250b modifies a datum in the memory that is also located in the cache of the other. If this is the case, the relevant datum in the affected cache must be replaced by the new datum or be marked as invalid.
In the compare mode, switches C232 and C233 are closed and switches C231 and C234 are open. Both execution units jointly access bus C10 via a cache C260. The caches (C240a, C240b) are not used. A comparator unit C220 compares the output signals of both execution units and generates an error signal in the event of differences. Optionally, comparator unit C220 may be connected to a bus interface unit C260 (not shown here) and prevent a write access if the output signals of the two execution units differ. In the performance mode, unit C220 is deactivated. The deactivation may be implemented in different manners, which have already been described.
The previously described variants according to
An additional example embodiment of the present invention is shown in
In the compare mode, switch C330 is closed and switch C332 open in switchover unit C331. Now both execution units access bus C10 via cache C340a and bus interface C350a. Unit C340a itself is in turn made up of two separate cache memories or cache areas C341, C342 that are used for the caching. In the performance mode, only memory/area C341 is used, while in compare mode memory/area C342 is used for caching in addition to memory/area C341. In the compare mode, a comparator unit C320 compares the output signals of both execution units and generates an error signal in the event of differences. Optionally, here too comparator unit C320 may be connected to bus interface units C350a (not shown here) and prevent a write access if the output signals of the two cores differ in the compare mode. In the performance mode, compare unit C320 is deactivated, as was already described for comparator unit C160, shown in
In an additional example embodiment, unit C340a may be constructed such that in the compare mode memory C341 and C342 are in fact used in conjunction as well, but only contents from memory C342 may be removed and replaced by other contents in the compare mode.
All example embodiments in the refinement of
An additional possible example embodiment of the present invention is shown in
In the performance mode, a switch C432 is open and a switch C431 is closed in unit C430. In this configuration, execution unit C410a accesses bus C10 via cache C440a and bus interface C450a, and execution unit C410b via cache C440b and bus interface C450b.
In the compare mode, switch C432 is closed and switch C431 open in switchover unit C430. Now both execution units access bus C10 via cache C440a and bus interface C450a. The unit C440a itself is in turn made up of two separate cache memories or areas C441, C442 that are used for the caching. In the performance mode, only memory/area C441 is used, while in the compare mode memory/area C442 is used for caching. The sum of the sizes of both memories/areas C441+C442 is constant, but the ratio between the sizes of C441 and C442 is controlled by a unit C443. Through this unit C443, it is possible to modify the ratio during operation.
In the compare mode, a comparator unit C420 compares the output signals of both execution units and generates an error signal in the event of differences. Optionally, here too the comparator unit C420 can be connected to the bus interface units C450a (not shown here) and prevent a write access if the output signals of the two execution units differ in the compare mode. In the performance mode, unit C420 is deactivated, as was described for comparator unit C160 from
Unit C440a may now be executed as follows while maintaining the function of unit C443:
All example embodiments in the refinement of
In the performance mode, memory accesses by the execution units are always cached by the memory pair that is assigned to the execution unit. In the process, only one of the two cache memories is used (here C531 for C510a, and C534 for C510b). If memory accesses by the execution unit cannot be served from the cache memory, the necessary bus accesses to C10 are always done via the bus interface assigned to the execution unit (here C550a for C510a, and C550b for C510b). In the performance mode, simultaneous accesses by execution units may also be served simultaneously via unit C530, unless a bus conflict occurs due to the simultaneous access to C10.
In the compare mode, the memory accesses by the execution units are served by the cache memories that are not used in the performance mode (here C533 and 536). Any bus interface may be used for a bus access. In the compare mode, a comparator unit C520 compares the output signals of all execution units and generates an error signal in the event of differences. Optionally, here too comparator unit C520 may be connected to bus interface units C550a, C550b (not shown here) and prevent a write access if the output signals of the two cores differ in the compare mode. In the performance mode, unit C520 is deactivated. It may be deactivated accordingly as in the comparator unit C160 from
In an additional example embodiment, unit C530 may be structured such that in the compare mode all cache memories (here C531, C533, C534, C536) are used, but only the cache memory contents that are not used in the performance mode are discarded and replaced.
For all implementations shown here by way of example, the switchover and comparator unit is always situated between the execution units and their associated caches. If a cache is used in the compare mode, this cache must be safeguarded by ECC or parity so that errors are detected in this instance also. Additionally, it is advantageous if a “write-through” strategy is used for the caches, and the consistency of the content of the caches is maintained through “bus snooping.”
Number | Date | Country | Kind |
---|---|---|---|
102005037247.3 | Aug 2005 | DE | national |
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/EP06/64700 | 7/26/2006 | WO | 00 | 4/29/2010 |