Patent Publication Number: US-4546269-A

Title: Method and apparatus for optimally tuning clock signals for digital computers

Description:
BACKGROUND 
     The invention relates to methods and apparatus for providing clock signals to the various clock using locations of a digital computer. 
     In the past, in synchronous computers, the object of the clock circuitry has been to clock all the clock-using locations at the same instant in time, known as &#34;T o  &#34;, as nearly as possible. Each clock-using location has a clocking window within which the clock signal can arrive and still enable the associated logic circuit to function. Optimally, the clocking point will be centered in the clocking window of the circuit. However, due to various factors, such as normal process variations in the manufacture of semiconductor devices and printed circuit boards and design inacuracies, T o  may be at the center of the clocking window or may be near to one or the other of the extremities of the window. If T o  is near to one of the window extremities, a transient of one sort or another within the circuit can move the clock pulse outside of the clocking window and cause the logic device associated with the clocked input to fail. 
     SUMMARY 
     The method and apparatus of the present invention overcome the shortcomings of the prior art by going beyond the standard industry practice of attempting to clock each clock-using location at T o . Instead, a delay circuit under the control of a microprocessor is interposed between the clock source and each clock-using location. The delay circuit is varied earlier and later in time than T o  in accordance with the control program of the microprocessor to determine the clocking window for each clock input. The microprocessor then sets the delay circuitry for each clock input to cause the clock pulse to strike at the center of the clocking window for the clock input during the normal operating mode of the computer. The center of the clocking window is the optimal clocking point for the clock input and associated logic circuit. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 shows a schematic diagram of the invention. 
     FIG. 2 shows a flow chart for the control program for microprocessor 40. 
     FIG. 3 shows a schematic diagram of the invention including a more detailed schematic diagram of one way in which the delay circuitry 30 could be implemented. 
     FIG. 4 is a schematic diagram showing the manner in which the phase generator processes the incoming clock signals into eight clock phases. 
     FIG. 5 shows a schematic diagram of one way in which the fractional period delay circuiry 80 can be implemented. 
    
    
     DESCRIPTION OF THE PRESENTLY PREFERRED EMBODIMENT OF THE INVENTION 
     The method and apparatus comprising the present invention can be described in the simplest form with reference to FIG. 1. The computer 10 (figuratively shown) has a logic circuit 20 (also figuratively shown). The circuit 20 has a clock input 22. Computer 10 includes a clock signal generator (not shown) which supplies a clock signal to a delay circuit 30 by means of a clock signal input line 14. Delay circuit 30 is interposed between the clock signal generator and the clock input 22 to the logic circuit 20. Note that only one clocked logic circuit of the computer is shown for simplicity in explanation, but as will be better explained later on, the invention is applicable to all of the clocked logic circuits of the computer. 
     A microprocessor 40 controls the period of time which the delay circuit 30 delays the clock signal before allowing it to arrive at the clock input 22. The microprocessor 40 varies the period of time that the clock signal is delayed between an earliest clocking point in which the signal is delayed for the minimum period of time while still enabling logic circuit 20 to operate, and the latest clocking point in which the signal is delayed for the maximum period of time while still enabling logic circuit 20 to operate. 
     The control program for microprocessor 40 is shown in FIG. 2. The program initially sets the delay circuit 30 for each clock-using input at an initial clocking point (corresponding to T o  in the prior devices) which is between the earliest clocking point and the latest clocking point for each clock input. The program then ensures that the system is running since the system must be running while the clock inputs are being optimized. If the system is not running it must go through manual checkout to determine the problem. Assuming that the system is running, the processor initiates a first search mode for the selected clock-using location by successively incrementing the amount of delay interposed by delay circuit 30 at each successive pass until the system fails. Once the failure occurs the current delay value is stored as the late clocking failure limit value. Note that in FIG. 1, an error signal is provided from the computer 10 to the microprocessor 40 at an input 42 to indicate the failure of logic circuit 20. Once the late clocking failure limit value is determined and stored, the microprocessor initiates a second search mode, starting with the late clocking failure limit and successively reducing the amount of delay interposed by delay circuit 30 at each pass until the system fails again. This failure point indicates the early clocking failure limit value and is also stored. Again, the failure is indicated to microprocessor 40 from computer 10 at the input 42. Having determined the early clocking failure limit and late clocking failure limit, the microprocessor 40 has defined the clocking window for clock input 22 and the associated logic circuit 20. Clock pulses which are timed to fall within this clocking window enable the circuit 20 to operate satisfactorily, while clock pulses which fall outside of the clocking window cause the circuit 20 to fail. Having determined the late and early clocking failure limits, the microcomputer 40 calculates the optimal clocking point which is centered in the clocking window. Microprocessor 40 thereupon sets delay circuitry 30 to this optimal clocking point for the normal operating mode of the computer. Assuming that each clock-using location is equipped with a delay circuit 30, microprocessor 40 progresses to the next clock-using location in the program and repeats the above procedure to determine the optimal clocking point for that location. The delay circuitry 30 for the location is then set to the optimal clocking point before the program moves to the next location. Once all of the clock-using locations have been optimized in this way, the program terminates. 
     Having described the invention in general with reference to FIGS. 1 and 2, reference is now made to FIG. 3, wherein one manner of implementing delay circuitry 30 is shown. 
     The clock signal input 14 from computer 10 provides the clock signal to a phase generator 50, which generates a plurality of phases from the input clock signal 14. Such phase generators are well known in the art. Reference is made, for example, to U.S. Pat. No. 4,290,022, which is hereby incorporated by reference. In the present embodiment, eight clock phases, 54a-54h, are generated by phase generator 50. Each of the phases is 360°/8=45° out of phase with respect to the next. Thus, assuming that the first phase 54a is in phase, or 0° out of phase; phase 54b would be 45° out of phase with respect to phase 54a; phase 54c would be 90° out of phase with respect to phase 54a; phase 54d would be 135° out of phase with respect to phase 54a, and so on, culminating with the last phase 54h, which would be 315° out of phase with the first phase 54a. 
     With reference to FIG. 4, if we assume the master clock signal supplied by the clock signal generator has a frequency of 10 9  Hz, the signal would have a period of 1 nanosecond. Assuming, as shown in FIG. 4, that phase generator 50 utilizes seven÷2 frequency dividers, 58a-58h, to generate the eight clock phases, the 10 9  Hz master clock signal frequency would be effectively divided by eight so that each clock phase would have a frequency of 125 Mhz and a period of 8 nanoseconds. Consequently, each of the eight phases 54a-54h would be spaced 1 nanoseconds apart. Therefore, by means of the phase generator 50 we can produce 1 nanosecond resolution between the eight clock phases 54a-54h. 
     The eight phases 54a-54h are input to a phase selector 60, in FIG. 3, which is a conventional device having three digital inputs 62, 64, 66 to select one of the eight phases 54a-54h. In the present embodiment, a digital input of 0-0-0 will select the phase 54a; 0-0-1 will select phase 54b; 0-1-0 will select phase 54c, and so on, concluding with digital input 1-1-1 which will select phase 54h. 
     The three bits 62, 64 and 66 are provided by the upper three bits of a six bit register 70, which is loaded via an input 74 by microprocessor 40 under the control of its control program. 
     The selected phase from among the phases 54a-54h is then provided to a fractional period delay circuit 80 via output 82 of phase selector 60. Fractional period delay circuit 80 is designed to provide selectable fractional delays at increments of 1/8 nanosecond of from 0 nanoseconds to 7/8 nanoseconds as determined by the three lower bits 84-86-88 of register 70. One way of implementing the circuitry 80 is shown in FIG. 5. 
     As shown in FIG. 5, the three bits 84-86-88 are input to a digital to analog converter 90 which converts the three bits of data into a representative voltage at its output 92 which drives one input of a comparator 94. The range of voltage generated by the digital to analog converter 90 from the bits 0-0-0 to the bits 1-1-1 corresponds to the 1 nanosecond range of a ramp generator 96. Ramp generator 96 has an output 98 which drives the other input of comparator 94. The arrival of a clock signal at input 82 from phase selector 60 initiates ramp generator 96 and once the voltage of ramp generator 96 at its output 98 equals the output 92 of the digital analog converter 94, output 100 of comparator 94 goes high to enable AND gate 102 to allow the clock signal to pass to the clock input 22. 
     The data 0-0-0 at inputs 84, 86, 88 produce a 0 nanosecond delay; 0-0-1 produces a 1/8 nanosecond delay; 0-1-0 produces a 1/4 nanosecond delay; 0-1-1 produces a 3/8 nanosecond delay, etc., concluding with 1-1-1 which produces a 7/8 nanosecond delay. 
     Hence, in addition to the 1 nanosecond resolution given by the 8 phases of phase generator 50 and phase selector 60, we, in addition, now achieve a 1/8 nanosecond resolution using the fractional period delay circuitry 80 of FIG. 5. Fractional period delay circuitry 80 selectively provides fractional periods of the 1 nanosecond timing increment between the phases starting with minimum fractional period of 0 nanoseconds, corresponding to the 0-0-0 data, concluding with the maximum fractional period of 7/8 nanoseconds corresponding to the 1-1-1 data. 
     The six bits which are loaded into the six bit register 70 by microprocessor 40 under the direction of its control program thus first choose between the 1 nanosecond increments of the eight phases at phase selector 60, and then choose among the eight 1/8 nanosecond separated fractional delay periods provided by fractional delay circuit 80. 
     Consequently, using the embodiment shown in FIG. 4, delay circuitry 30 can produce at 1/8 nanosecond increments any delay ranging from the minimum delay period (i.e., where the first phase 54a and the minimum fractional period are chosen) to the maximum delay (i.e., where the last phase 54h and the maximum fractional period are chosen). In the present embodiment, therefore, the minimum delay period is 0 nanoseconds, corresponding to the data 0-0-0, 0-0-0 and the maximum delay period of 77/8 nanoseconds, corresponding to the data 1-1-1, 1-1-1. Hence, the earliest clocking point corresponds to 0 nanoseconds delay and the latest clocking point corresponds to 77/8 nanoseconds delay in this embodiment of delay circuitry 30. 
     According to the method of the invention described generally above with reference to FIG. 2, microprocessor 40 loads a first six bit digital word into shift register 70 which represents the initial clocking point, T o , which is located between the earliest clocking point and the latest clocking point. Microprocessor 40 then initiates the first search mode wherein at each pass the clocking point is moved later and later in time, at 1/8 nanosecond intervals, by incrementing the six bit digital control word until the system fails, to indicate the late clocking failure limit. The six bit word corresponding to this late clocking failure limit is stored. Microprocessor 40 then starts from this six bit word representing the late clocking failure limit and at each subsequent pass decrements the six bit word to move the clocking point earlier and earlier in time at 1/8 nanosecond increments until the system fails again, to indicate the early clocking failure limit. The six bit word repesenting the early clocking failure limit is stored. Microprocessor 40 then determines the six bit word representing the optimal clocking point which is centered in the clocking window defined by the early clocking failure limit and the late clocking failure limit. Microprocessor 40 loads this six bit word, representing the optimal clocking point, into delay circuitry 30 for the normal operating mode of the computer. 
     Assuming that each clock-using location in the computer has an associated delay circuit 30, the microprocessor then moves to the next clock-using location in its control program and repeats the above procedure to determine the six bit optimal clocking point for that particular clock-using location. This six bit word is then loaded into the delay circuitry 30 for the particular clock-using location and the computer moves on to the next clock-using location, and so on. The procedure is repeated until the optimal clocking point has been determined for each clock-using location and the six bit word representative thereof has been loaded into the delay circuitry 30 for each clock-using location. Now that the method and apparatus of the present invention have optimized the clocking of all clock-using locations, the computer is ready to commence its normal mode of operation. 
     While the present embodiment utilizes a six bit word to provide resolution of 1/8 nanosecond, obviously a higher frequency clock signal and a word having a greater number of bits could be used to provide even greater resolution. 
     Moreover, obviously, various other methods could be employed to interpose variable delay between the clock source and the clock-using locations and the invention is not intended to be limited to the particular embodiment disclosed. 
     The delay circuitry 30 for each clock input could be provided on a separate board or could even be designed right onto the chip to be clocked itself. In either case, transmission line length is made less of a factor and a convenient length for the transmission lines can be chosen to greatly simplify circuit design. 
     In addition to optimizing the performance of the computer, other benefits and advantages are also realized. Where a particular clock-using logic circuit fails, the microprocessor and associated delay circuitry can be used to re-tune the clock signal to the optimal clocking point for the replacement circuit. Whereas in the past such re-tuning, if even possible, had to be done in the field using imprecise methods; using the present invention, the clock can be re-tuned merely by using a microprocessor and re-tuning control program to achieve a degree of timing precision equal to that which is provided by the manufacturer. 
     Another important advantage resides in the fact that each computer system of a particular model is slightly different from the next. Consequently, clocking each clock-using location of each separate computer at T o  is certain to result in a less than optimal performance. The invention, by permitting the individualized optimal clocking of each clock-using location within each separate computer, provides for far greater precision in clocking, and thereby, optimizes computer performance. 
     Having described the presently preferred embodiment of the method and apparatus of the present invention, it will be obvious to those skilled in the art that many variations and modifications could be made, and accordingly, the invention is intended to be limited only by the scope of the appended claims.