The present invention is based on a method and a device for switching between at least two operating modes of a microprocessor having at least two execution units for executing program segments.
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 are normally provided for error detection, particularly in the corresponding control devices of such systems. Thus, for example, in known 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 are also known as dual-core or multi-core architectures. The different cores execute the same program segment redundantly and synchronously; the results of both cores are compared. An error is detected when the two results are compared for consistency. In the following, this configuration is called compare mode.
Dual-core or multi-core architectures are also used in other applications to increase output, i.e., for performance enhancement. Both cores execute different program segments, whereby a performance improvement can be achieved relative to the compare mode or a single-core system. This configuration is called output mode or performance mode. In a special form having identical cores, this system is also called a symmetrical multiprocessor system (SMP).
These systems are extended in that software is used to switch between these two modes by accessing a special address and through specialized hardware devices. In the compare mode, the output signals of the cores are compared to each other. In the performance mode, the two cores operate as a symmetrical multiprocessor system (SMP) and execute different programs, program segments, or instructions.
In the microprocessors described in the related art, the internal states (register, pipeline, etc.) of the execution units must be adapted before switching over from the performance mode to the compare mode. For an execution unit having many registers, this may require a relatively large amount of computing time and prolong a mode change from the performance mode to the compare mode. The usual method for adapting the states of the execution units involves setting all registers in the execution units to the value zero or flagging their content as invalid.
The object of this invention is to shorten this change from the performance mode to the compare mode. Compared to the related art, the exemplary embodiments described here have the advantage that they enable a faster switchover from the performance mode to the compare mode since the registers of the execution units may be, depending on the mode in which they are involved, initialized quickly by using the method according to the present invention.
A method for establishing an initial state in a computer system having at least two execution units is advantageously described, a switchover between a performance mode and a compare mode being performed, and during the switchover from the performance mode to the compare mode, an initial state for the compare mode being generated, wherein memories or memory areas that are potentially to be adapted for the initial state are provided with an identifier that indicates whether or not the data and/or instructions in these memories or memory areas must be modified for the initial state. In the initial state, at least one memory or memory area assigned to the respective execution unit is advantageously occupied by at least one specifiable value if the identifier indicates this.
The generated initial state of the first execution unit is advantageously copied into a memory area, and the second execution unit takes over this initial state from this memory area if the identifier indicates this. The generated initial state of the first execution unit is advantageously taken over by the second execution unit via a special communication channel to at least one memory or memory area if the identifier indicates this. An initial memory or initial memory area is advantageously provided, and in it is specified which memories or memory areas must be modified for the initial state. A register or register record is advantageously provided, and in it is specified which memories or memory areas must be modified for the initial state. An initial memory or initial memory area is advantageously provided, and in it is specified which memories or memory areas do not have to be modified for the initial state. A register or register record is advantageously provided, and in it is specified which memories or memory areas do not have to be modified for the initial state. A device for establishing an initial state in a computer system having at least two execution units is advantageously included, a switchover between a performance mode and a compare mode being performed, and during the switchover from the performance mode to the compare mode, an initial state for the compare mode being generated, wherein at least one memory or memory area that is assigned to an execution unit is included that is designed such that it, provided it is potentially to be adjusted for the initial state, may be provided with an identifier that indicates whether the data and/or instructions in these memories of memory areas have to be modified for the initial state or not.
The memory or memory area is advantageously at least one register. An initial memory or initial memory area is advantageously included that is designed such that in it is specified which memories or memory areas have to be modified for the initial state. A register or register record is advantageously included that is designed such that in it is specified which memories or memory areas must be modified for the initial state. An initial memory or initial memory area is advantageously included that is designed such that in it is specified which memories or memory areas do not have to be modified for the initial state. A register or register record is advantageously included that is designed such that in it is specified which memories or memory areas do not have to be modified for the initial state.
Other advantages and advantageous embodiments are derived from the features described herein and of the specification, including the drawings.
Some units in the drawings have the same number but are additionally labeled with a or b. If the number is used to reference without an additional a or b, then one of the existing units is intended but not a special instance. If only a particular instance of a unit is referenced, the identifier a or b is always put after the number.
In the following, a processor, a core, a CPU as well as an FPU (floating point unit), a DSP (digital signal processor), a coprocessor or an ALU (arithmetic logical unit), may all in this context be denoted as execution unit.
In
This comparison may occur in a manner that maintains clock accuracy or at a fixed clock pulse offset, which means that in every pulse the output signals of at least two execution units C100a, C100b are compared by unit C120. If a difference exists between the compared signals, then unit C120 generates an error signal. In addition, the input signals of execution units C100a and C100b may also optionally be compared. If processor system C1000 is in the performance mode, comparator unit C120 is not active and no error signal is generated in the event of differences in the output signals of the execution units. The deactivation of the comparator unit can be achieved in different ways:
A comparison is not carried out by unit C120.
No signals for comparison are applied to unit C120.
Unit C120 performs a comparison, but the result is ignored.
When changing from the performance mode to the compare mode, it must be ensured that the internal state of the two execution units C100a and C100b is identical when the compare mode begins, that is, the time at which comparator C120 is activated. In the following, we call the state at the beginning of the compare mode, starting from which the calculations begin in the compare mode, the “initial state.”The states in the execution units must be identical so that in the error-free case the signals compared by C120 do not contain differences at any time in the compare mode. As a rule, differing states of the execution units in the compare mode will result in the generation of a differing output signal. The comparator would detect these differing output signals as errors, even though identical input signals exist and no error to be detected occurred during processing.
One way to achieve the same state in both execution units at the beginning of the compare mode is to flag all internal registers in the execution units as invalid. This possibility of flagging does not exist for all internal registers, however. These must then be set to a defined value that is identical in both execution units.
In a first specific embodiment, illustrated in
If the system changes from the performance mode to the compare mode, these registers from C101 and C102 must be identical, as already mentioned, in both execution units C100.
This condition for register group C101, C102 does not necessarily have to apply from the time of switching over from the performance mode to the compare mode, but at the latest during the first read access to two identical registers in execution units C100 after the switchover to the compare mode. A usual method is to assign in a timely manner before or after switching over to the compare mode a fixed value to all registers from group C102. Irrespective of this, in the event of a switchover to the compare mode, registers from group C101 are flagged as invalid.
If an execution unit C100 is structured like in
In a second specific embodiment, shown in
This copying of the internal state may be performed by using directly a connection C300 between the two execution units, over which connection the internal state is copied. Alternatively, the state may be copied from a first, temporally earlier execution unit to a (high-speed connected) buffer C200 from which a second, temporally subsequent execution unit takes over the state into the internal registers.
An additional specific embodiment, shown in
In an additional specific embodiment, partial states are flagged that, in the event of a switchover to the compare mode, do not need to be adapted between the execution units. It is not always necessary to adapt all registers of the execution units in the event of a switchover from the performance mode to the compare mode. To avoid mistakenly detecting an error in the compare mode, only the registers of an execution unit that are actually used in the compare mode must be adapted with the registers of a second execution unit. This is the case or may be considered as an additional condition in software development especially in architectures that provide a large number of registers in the execution units. The number of registers that are used in a compare mode may be determined in any case. Now if not all registers are used, it is not necessary to adapt all registers, but rather only the used registers. For this reason, the present exemplary embodiment provides additional bits in every register. These bits may contain code that indicates whether or not the content of this register is to be adapted with the relevant registers of the other execution units when switching over from a performance mode to a compare mode. Alternatively, a special register may exist whose content defines which register of an execution unit must be adapted with the relevant registers of the other execution units. The adaptation itself may occur independently of the flags via the known methods or the methods presented here.
Number | Date | Country | Kind |
---|---|---|---|
102005037226.0 | Aug 2005 | DE | national |
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/EP2006/064607 | 7/25/2006 | WO | 00 | 3/11/2009 |