DATA TRANSFER APPARATUS

Abstract: Data can be transferred across an interface between a computer processor (30) and a computer channel (32) by an associated pair of latches (34, 36 or 40, 38) for each direction of data flow. The integers on each side of the interface are supplied with a respective appropriate clock (C₁ or C₂′). The clocks are dissimilar and non-harmonic, with periods T₁ and T₂ such that T₁/T₂ is a rational number, and are offset by a delay circuit (D) by an amount less than T n /α from the relationship in which simultaneous transitions would occur, α being the highest common factor of T₁ and T₂, and α T n being the synchronisation period of the two clocks.

Description: DATA TRANSFER APPARATUS Introduction The present invention relates to the transfer of data across an interface between parts of associated apparatus with dissimilar non-harmonic clocking rates. For example the parts can be parts of a computer system linked by latches on either side of the interface, and the invention can avoid metastability in the latches. Background of the Invention An error condition may exist at the interface of two systems each of synchronous logic but with dissimilar and asynchronous clocking rates because of what is commonly referred to as the metastable latch problem. In a bistable latch where the coincidental occurrence of two pulses is required to change the state of the latch, an anomalous failure mode may occur when the two actuating pulses do not overlap sufficiently to cause the latch to completely switch from one of its stable states to the other. With such insufficient overlap of the two actuating pulses, the output or outputs of the latch do not go to either one of the stable up or down levels but actually perturbate at or around a third level referred to as the metastable level. The metastable level is exactly half way between the up and down levels, and when metastablility occurs, the latch outputs either momentarily sit at the metastable level before randomly changing to a stable up or down level or alternatively they oscillate around this metastable level. In latches actuated by signals from two different logic systems running under different and asynchronous clocking rates, the metastable latch problem arises because the clock pulse of one of the systems overlaps, captures or samples an insufficient portion of the data signal from the other system. It is particularly difficult to correct metastability in the transfer of data between two asynchronous systems because the phase of the data signals of each of the two systems is continuously changing with respect to the clock pulses of the other system. As far as it is caused by differences in clocking rates the metastable latch problem can be solved with known techniques, by running both interfacing systems, from a single clock or two synchronised clocks, at the same clocking rate or at harmonically related clocking rates. However, using the same clocking rate or a harmonic relationship between the two clocking rates is not always a practical solution in any given situation, since it may not allow either system to run anywhere near its optimum operating rate. What is needed is a relationship between the two clocking rates that would allow each of the interfacing systems to approach its maximum performance level while providing the reliable data transfer across the interface. The solution according to the invention is given in claim 1. Figure 1 is a block diagram of a simple latch along with diagrams of input and output pulses of the latch which illustrate the metastable condition. Figure 2 is a graph illustrating the relationship betwecn a systen clock and a subsystem clock in an nonsynchronously operated computer system. Figure 3 is a graph showing the hatched square in Figure 2 in greater detail to illustrate the manner in which non synchronous clock rates are selected in accordance with the present invention. Figures 4a to 4c show pulse synchronous and associated waveforms showing desirable mutual properties of the clocks obtained by selecting the clocks in accordance with the present invention. Figure 5 is a schematic diagram computer system using the clocking scheme of the present invention, and Figure 6 is a block diagram of the phase lock loop system for generating two clocks in accordance with the present invention. DETAILED DESCRIPTION Referring to Figure 1, the metastable latch condition occurs in the latch 10 when two pulses D1 and Cn, whose coincidental occurrence is necessary for the setting of the state of the latch 10, do not occur with sufficient overlap 12 for the flip flop 14 of the latch to fully switch from one state to another. This causes the latch 10 to drop into what is referred to as the metastable state. In the metastable state, the outputs Q and n of the latch are neither at a stable lip (1) or down (0) level but instead both are at a third level half way between the 0 and 1 levels. lhis third level is undecipherable by other circuits in the system causing an error condition to exist. As can be seen, when the system clock C2 is rising just as a data signal D1 rises, an insufficient amount of the data signal D1 is sampled during the clock pulse C2 to properly activate the flixi flop 14. The flip flop 14 being confused by the signals momentarily drops into the metastable state causing both outputs of the latch to go to a level m half way between the up and down levels of the flip flop. Eventually, the flip flop 14 randomly assumes one of its two stable states which may or may not be the correct stable state. The phasing of the two input pulses, illustrated in Figure 1, can arise for a number of reasons. However, the reason we are concerned with here is the constant changing in the phase between the two pulses C2 and D1, which occurs when these pulses are from different systems of synchronous logic with dissimilar and asynchronous clocking rates. One way of eliminating this cause of metastability, with known techniques, involves making the clocking rates of the two systems the same and providing then from a single pulse source or fron two synchronized sources. Another approach is to operate one clock at a harmonic frequency of the other and again supply them from a single source or two synchronized sources. however, either of these approaches may not be the best solution in a particular situation. The problem with always using the same or nmonicall related clocks can be better understood Ey reference to Figure 2 where the numbers along the ordinate represent possible subsystem clock periods T2, while the nunbers along the abscissa represent possible system periods T1. Assume now that in the system longer discussion, the most e < icient and fastest operation of subsystems is with the period of the subsystem clock set at about 24 nanoseconds, while the roost efficient and fastest operation of the system is witio the period of the system clock set at about 19 nanoseconds. With these constraints,. it is obvious that we can run the system clock at 24 nanoseconds, or in other words the same speed as the subsystem clock, but we could not run the system clock at 12 nanoseconds which would be the first harmonic of the subsystem clock. l1owever, it is possible with the techniques of the present invention to operate the system clock with a period shorter than 24 nanoseconds and longer than 12 nanoseconds without incurring metastability caused by asynchronous operation of the two clocks T1 and t. The hatched out area in Figure 2 defines the concurrence of the acceptable ranges of operation of the two clocks. In accordance with the present invention, the operating periods of the two clocks is selected to be witliin this region of concurrence along one of the lines S radiating out from the zero point on the graph between the fundamental and first harmonic lines. These radiating lines have a slope, EMI5.1 where S is a rational number (i.e., T2 and T1 are integers) and this the Iarqest common &alpha; &alpha; denominator of T1 and T, or EMI5.2 Figure 3 shows the hatched area in Figure 2 in more detail with the ratio T1 / T2 shown at the top of each radiating line S and various values of oC indicated, along each line S. while S is a rational number, there are only a finite number of different pulse phase relationships between C1 and C2 before the relationships repeat themselves. In effect, two pulse trains represented by C1 and C2 precess at the rate of od time units per cycle. For any two periods r ad T2 with an S which is a rational number, the number of such phase relationships, relative to the clock period of interest, Tn , is equal to EMI6.1 As an ex#irple, assume that the period of the channel clock is set to be 25 nanoseconds, then in accordance with the present invention, the period of the processor clock is selected from the graph of Figure 3 to be 20 nanoseconds. By definition,##then would be 5. As shown in Figure 4a, only four different transition positions occur during any period of the clock C1, C2. Similarly, there are only five different positions in which the leading edge transition of clock C1 can occur during any period of clock C2. These Positions occur at 5 nanosecond intervals meaning that there are 5 nanosecond intervals, or "windows" in which the leading edge transition of one clock Pulse will never occur during any given period of the other clock. By delaying one clock by&alpha;/2 time units with respect to the other, we can move these intervals or windows so they will occur at the time of a critical transition. C21 is the waveform for C2, delayed by &alpha;/2 = 2.5 nanoseconds, such that alignment of the two clock critical (in this case, trailing) edges is avoided for all pulse pair combinations. The relationship between clock pulse sectuer.cns repreats every, T/ C= 5 pulses of C1 or T1/#= 4 pulses of C2' anci precession between the pulse trains is at the rate of 04= 5 nanoseconds per cycle. In Figure .h, two closely coupled master-slave flip flops, FF-l and FF-2, are used to transfer data signals (D) from a system clocked by C2' to a system clocked by C1. The flip flops FF1 and FF-2 are of the type shown in Figure 9. 21 and described beginning on page 233 of a book entitled "Introduction to Switching Theory & Logical Design", Second Edition, by Fredrick J. ilill and Gcrald R.. Peterson, published by John Wiley & Son, New York in 1974. These flip-flops are designed for trailing edge actuation between master and slave sections. ridge actuation flip flops such as the master slave flip flop are used to avoid retastability problems with other combinations of critical edges than those aligned in accordance with the resent invention. signal D2 may arrive at FF-1 anytime during a C; cycle and may persist for one or more of the C2 cycles. At the output of FF-1, D2 has been retimed to one of the critical edges of C21 (a', b', etc...) such that transitions of D21 are not coincident with critical edges of C1 (a, b, etc...). Thus, after D' retained in FF-2 by C1, Vo'' is generated at one of the times shown depending on which C1 pulse samples D2'. In the case where C1 edge 'e' performs the sampling, edge 'a' will resample the same D2' signal one C1 cycle later, resulting in the two cycle minimum output pulse shown. Transfers conducted by all other combinations of edge pairs will result in one cycle minimum pulses out, as shown. Figure 4(c) shows corresponding relationships for transfers from a system clocked by C1 to a system clocked by C, Since C2 has a longer period than C1, oversampling of D1' is not possible, but undersampling would occur if a one cycle D11 pulse were to arrive between C1 edges 'e' and 'a'. To prevent missing this event, all D1 pulses must have a minimum width of two cycles. Then D1'' will be two cycles minimum duration except for an input pulse rising with edge 'e. This will not be sampled by C2' until edge 'a' arrives, resulting in the one cycle output pulse shown. In Figure 5, a synchronizer is shown for transferring clocked data bits back and forth between the processor 30 and the channel 32 one bit at a time. The synchronizer is formed of the two sequences of the type discussed in connection with Figure 4 in each direction making a total-of four clocked aster slave flip flops 34 to 40. Each of these flip flops receives a data signal from one or the other of the systems, and a clock pulse from a clock generator 42, which will be described hereinafter. Transmission delays of various amounts are involved in the transmission of the clock pulses and the data registers. These delays must be taken into account to avoid metastability due to these delays. However, sorne compensation on such delays is well known in the prior art. They are disregarded here for simplicity and understanding of the present invention. Assume we have the situation described in Figure 1, where the data signal D1 is being transmitted from system 1 or the processor to system 2 or the channel. I;en the data signal is fed into a first latch 34 along with the clock C1 to set the latch 34 and the clock C1 is used to reset the latch. The trailing edge of the output pulse D' of latch 34 is therefore fixed to coincide with the trailing edge of the clock pulse C1. The output pulse D' is fed to the input of latch 36 along with the clock C21, where the phasing at the inputs is set to be as previously described and shown in Figure 4 by the relationship between curves D1 and C21. In the real systems of course, the window would not actually be a full 5 nanoseconds. Consideration must be given to deviations in the occurrences of the pulses from system to system because of manufacturing tolerances and within each system depending on design and iLplementation options. The clock generator 42 in Figure 5 is shown in more detail in Figure 6. As can be seen, it contains a phase lock loop. The function of the phase lock loop is to provide a phase and frequency relationship between clock pulses C1 and C2 for the processor and channel systems respectively. The phase lock loop consists of four basic components, the voltage controlled oscillator 50, the frequency divider 52, phase frequency comparator 54 and a low pass filter. The input to the phase lock loop is from an oscillator 56 which generates the clock signal C1 for the processor. The frequency of oscillation of the oscillator is set at EMI9.1 The output of the oscillator is divided by T,/ o( in divider 58 before being fed to the phase/frequency corparator 54. The frequency phase comparator 54 compares the output of divider circuit 58 with the output of divider circuit 2 which divides the output of the voltage cotrolld oscillator 50 by T1 /oZ. This is to determine if the voltage controlled oscillator 50 is tracking tte oscillator 56. This is done by comparing the positive transition of circuit 58 to the positive transition of the frequency divider If the refcrence is early, the output of the comparator 54 switches to a down level. If the reference is late, the output goes to a high level. The filter smoothes out the comparator output so that the output frequency of the voltage controlled oscillator only follows long term changes in the reference signal phase. The output of the voltage controlled oscillator is the channel clock C2. Above, we have described one embodiment of the invention. In this embodiment, the two periods T1 and T2 were fairly arbitrarily selected. However, in real applIcations, other considerations could put constraints on the values that can be selected. Generation of the time of day clock requires that the value of the system clock C1 be set at specific values, one of which may or may not be 20 nanoseconds. In any case, it is quite easy to change the system clock C1 from 20 nanoseconds to say 20.94 nanoseconds as required by tile time of day clock, and then select a channel clock of '6.18 nanoseconds instead of 25 nanoseconds and still obtain full advantage of the present invention. Therefore, it should be mlderstood that while a single embodiment of the invention has been tlescribed, many changes in this embodiment can be made without departing from the spirit and scope of the invention, as set forth in the claims attached hereto.

Claims: CLAIMS 1. Data transfer apparatus in which data is transmitted across an interface (Fig. 5) between parts (30, 32) of the apparatus operated under the control of two clocks (C1, C2') with different frequencies, the clocks having two mutually non-harmonic frequencies whose periods T1 and T2 form a ratio EMI11.1 that is a rational number, o( being the highest common factor of T1 and T2, so that there is a limited number of transitions of the pulses of each clock before pulse relationships of the two clocks are repeated, with a period oc Tn, the two clocks being offset by an amount less than Tn from the relationship in which simultaneous transitions would occur. 2. Apparatus as claimed in claim 1 in which the two clocks comprise a first oscillator (56) and a second voltage controlled oscillator (50) operating respectively at f = 1 and f = 1 , the second oscillator 1 Tz T2 being sychronised with the first by phase lock loop circuitry (Fig. 6). 3. Apparatus as claimed in claim 2 in which the two clocks are offset by delay circuitry (D, Fig. 5). 4. Apparatus as claimed in claim 3 in which said delay circuitry (D) is connected to the output of the second oscillator. 5. Apparatus as claimed in any preceding claim in which a pair of latches (38, 40; 34, 36) is provided for each direction of data flow across the interface, each latch of a pair receiving a respective one of the clocks (C1, C21).

Inventors: FLEMMING, DONALD CLYDE
Applicants: INTERNATIONAL BUSINESS MACHINES CORPORATION
Application year: 1981
Main classification: G06F1
IPC codes: H03L7, G06F1