Abstract:
Processor apparatus for control functions performed in a redundant manner utilizing separate clocks but correcting for mismatch in timing thereof by causing an interrupt of the processing through software to a &#34;hold&#34; status to allow time for any lagging processors to catch up before starting a next frame of processing.

Description:
This application is a continuation, of application Ser. No. 07/931,180, filed Aug. 17, 1992, now abandoned. 
    
    
     BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to processors which utilize a clock source to maintain operation and more particularly to a plurality of processors which need to be locked into a synchronous operation with each other by a clock. The present invention is an improvement over copending application of J. R. Goetz entitled &#34;Interrupt Driven, Separately Clocked, Fault Tolerant Processor Sychronization,&#34; Ser. No. 07/711,638, filed Jun. 6, 1991, no U.S. Pat. No. 5,233,615 and assigned to the assignee of the present invention. 
     2. Description of the Prior Art 
     Some systems require that certain control functions be performed in a redundant manner to prevent faulty operation in the event of a failure in one or more of the redundant control systems. In aircraft operation it is critical that the control thereof never be lost by faulty operation of the control system, and accordingly, two, three and even four parallel control systems, each using separate sensors, information processors and control devices may be employed. The multiple processors receive the same input data and are supposed to produce the same output signals unless something has gone wrong in one of the systems. To determine inconsistencies the outputs are sent to a voter where they are compared, and thus assure that the output data is consistent. This process is often impeded by the clocks in each processor not being exactly synchronized with each other. Although voters are capable of handling minor time differences from each processor, when data is processed at slightly different times in each processor, over a period of time, the difference accumulates so that the output data from one processor will differ more and more with data from another processor until the voter cannot handle the difference and meaningful comparisons become impossible. 
     Some prior art systems utilize a single clock for all of the processors and while this may prevent the problem with synchronism, it produced the problem of the failure of the single clock. Without redundant clocks, the tolerance for failure rate, although small, is still too large for the desired safety requirements. 
     In the above referred to copending application, a counter is employed in each processor to count the clock cycles from the clock and to process the data in each processor according to a predetermined number of clock cycles counted. The predetermined number is chosen so as to be sufficient for the processor to be able to perform the processing of a certain number of tasks. After the predetermined number is counted, the counter sends a signal to a set/reset flip flop which then commands the processor to stop processing data for a short period of time. Subsequently, an interrupt signal from an external source resets the flip flop, and through an interrupt controller in each processor, commands all of the processors to begin processing data again. During this time frame the output from each processor will not be different by an amount more than the voter can handle and, accordingly, the voter receives the exact same data from each processor during each such time frame. 
     One problem with the above referred-to copending application is the fact that the processors require a flip flop to shut them down after each time frame. This is unnecessary hardware which adds to the cost and weight of the system. 
     SUMMARY OF THE INVENTION 
     The present invention allows the use of a separate clock for each processor while assuring that the clocks produce outputs which are close enough in synchronism to provide meaningful comparisons of their outputs without requiring the use of additional hardware for this function. This is accomplished in the present invention by having the output of the counter go to an already existing interrupt controller in the microprocessor to cause an &#34;interrupt&#34; of the processing which, through software, causes the computer to revert to a &#34;hold&#34; status where it continues to operate until the next external interrupt sends it back to the data processing status where it left off. As before, the processors utilizing small slices of time at the end of a predetermined number of counts, referred to herein as a &#34;frame&#34; during which no output data is produced by the processors. This allows time for any lagging processors to catch up with the others before starting on the next frame. Each processor receives and processes exactly the same data in exactly the same frame. Each clock produces a fixed number of cycles for accomplishing each task, and although the frequency of the clocks may differ from one another by as much as 200 parts per million (which could result in an error of 2 microseconds at the end of 10 millisecond frame), the voter can handle this. Thereafter, a small time slice at the end of each frame allows &#34;catching up&#34; and all processors start the next frame at exactly the same time. As a result, the processors are never outside of a tolerable amount of clock mistiming. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 shows a block diagram of a typical microprocessor; 
     FIG. 2 shows a 10 millisecond frame containing three groups of tasks; and, 
     FIG. 3 shows a comparison between the handling of the same frame by a slower and a faster processor. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     In FIG. 1, a microprocessor is shown as a block 10 containing a central processing unit 12 receiving a first input from a memory 14, a second input from an interrupt controller 16, a third input from an internal clock 18 and producing an output to a voter 20. Microprocessor 10 may be one of a number N of microprocessors in a redundant control system. The memory 12 provides the tasks for the CPU to perform, which may be arranged into several different groups called &#34;partitions.&#34; One frame of partitions can be seen in FIG. 2. In FIG. 2, a 10 millisecond time frame is shown containing three partitions, each of which has a small time slice just before it during which the program sets up the processors to handle the processing in the forthcoming partition. Note that each partition is assigned a fixed time (in terms of its own internal clock) sufficient to handle the tasks of that partition and, that subsequent to the last partition, there is a time period identified as the interrupt. Each processor receives the same partitions from its memory and the same internal time to handle them. Assume, however, that clock 18 produces 200,000 cycles per second and that the clock of another processor produced 210,000 cycles per second. Furthermore, defining a &#34;tick&#34; as 1/128 of a cycle, in the 200,000 cycle clock there are 1562.5 ticks per cycle while in the 210,000 cycle clock there are 1640.6 ticks per cycle. In the present invention, the same number of ticks is assigned to each partition processed by the CPU of each processor with results which can be seen in connection with FIG. 3. 
     In FIG. 3, the same frame containing the same three partitions is shown for the slower processor with a 20.0 MHz clock and the faster processor with a 21.0 MHz clock. The frame in each processor starts off after the 100 Hz interrupt with a Kernel (the operating system) which in both processors takes 156 ticks but in processor #1 this takes 1 millisecond, but in processor #2 it takes 0.9 milliseconds. Partition #1 uses 859 ticks in both processors, but this takes 5.5 milliseconds in Processor #1, but 5.2 milliseconds in Processor #2. Partitions #2 and #3 use 234 ticks in each processor, but this takes 1.5 milliseconds in Processor #1 and 1.4 milliseconds in Processor #2. At the end of the three partitions there is a final interrupt time which is different for the two processors. In Processor #1 this is about 78 ticks for about 0.5 milliseconds, while in Processor #2 it is 234 ticks for 1.4 milliseconds. It should be noted that the loading of each partition is an example only, that the clock skew has been greatly exaggerated (actual clock speeds vary by only about 200 parts per million) and that the final interrupt time is larger than necessary. Furthermore, only two of the N processors are shown in FIG. 3. 
     Returning to FIG. 1, an output from CPU 12 is shown connected to a &#34;Time Slice Counter&#34; 50 which operates to count the clock cycles and to provide an output after the correct number of ticks have occurred for the frame. This output is presented to the interrupt controller 16 which then interrupts the operation of the CPU for the required time. An External Interrupt signal is also presented to the interrupt controller to provide the starting interrupts for the CPU. 
     Accordingly, although the processor may produce an output which is in slight time variance from the other processors, the time difference is in the acceptable region and the data never differs because it is not allowed to accumulate to produce uncheckable results. 
     Many changes will occur to those skilled in the art and I do not wish to be limited to the specific disclosures used in connection with the description of the preferred embodiment. I wish only to be limited by the following claims.