Quasi-synchronous information transfer and phase alignment means for enabling same

Abstract: A quasi-synchronous information (clocking, data, control signals) transfer between a master unit A and at least one neighbor unit B offers the advantage that one transfer can occur every cycle where any interface delays are tolerated. When the master unit A sends its internal clock along with data and/or control signals to its neighbor unit B, the last named unit receives this clock and derives any and all locally required clocks from this clock. This keeps unit B exactly at the same frequency as unit A, although a phase shift occurs. Unit B also sends its internal clock along with data and/or control signals to unit A. When the clock signals arrive back at unit A, they will have exactly the same frequency as the internal clock of unit A but also an additional phase shift. Compensation of the overall phase shift will be done by a phase alignment means to which all signals are sent on their way to unit A.

Description: The invention generally refers to a phase alignment method for quasi-synchronously transferring clocking-, data-, and/or control signals between two or more data processing units. Figs. 1A - C show a block diagram and timing diagrams of how a synchronous and an asynchronous interface work. Since they are widely known, only the important summary points are dealt with in the following: Synchronous Interface (Fig. 1A, B) The clock signals of units A and B have the same frequency and the same phase relationship. One data transfer can occur every cycle via connecting cables 1 and/or 2. Any interface delays must be adjusted to exactly align the internal clocks of both units. For a system involving a cable and interface drivers, this may be a very difficult job to realize. As can be seen from Fig. 1B, a synchronous interface can be used to send data from unit A to unit B or vice versa without waiting to see if unit B or A received each data transfer successfully (correctly). The synchronous interface, however, requires that the sender and receiver be in a "lock-step" with one another which means that the receiver reads the data at the same time the sender sends the data. Fig. 1B shows an example, where a section of six clock cycles 1A ... 6A, 1B ... 6B respectively are used to transfer six data units (bits, bytes, words, etc. depending on the number of parallel lines) D1 ... D6, D10 ... D15 respectively from unit A to unit B and/or vice versa. The clock pulses of the internal clock of unit A and unit B have the same frequency and phase, as can be seen from Fig. 1B. Data unit D1 which is sent during clock cycle 1A of unit's A internal clock via cable 1 will be received at unit B during the next clock cycle 2B of unit's B internal clock. Data unit D10 which is sent from unit B over cable 2 at the same time as data unit D1 will be received at unit A during clock cycle 2A of unit's A internal clock. Asynchronous Interface (Fig. 1A, C) The clock signals of units A and B have different frequencies and different phase relationships. Multiple cycles are required for every data transfer. Any interface delays can exist, within the required limits of propagation delay and skew. For this reason, many external interfaces from box to box are done asynchronously. Using an asynchronous interface, unit A sends data, one transfer at a time and waits to send the next transfer until unit B replies that it received the data correctly. As can be seen from the pulse diagram in lines four and five of Fig. 1C, two more interface lines are necessary for transmitting control signals. In the case of a data transfer from unit A to unit B a control signal from unit A is sent to unit B, meaning new data is on the bus. The other control signal is a reply signal from unit B sent to unit A, meaning unit B read the data. As further can be seen from lines three and eight of the pulse diagram in Fig. 1C, multiple cycles are required for every data transfer. To transfer a data unit D1 from unit A to unit B almost four clock A cycles are necessary until this data unit D1 is completely captured at unit B. When data from unit B have to be transferred asynchronously to unit A then the complete process has to be reversed. As can be seen from the description above, both interfaces have their advantages and disadvantages. The advantage of a synchronous interface is, that one data transfer can occur every cycle. Its disadvantage, however, is that any interface delays must be adjusted to exactly align the internal clocks of both units. An asynchronous interface has the advantage, that any interface delays can exist, within the required limits of propagation delay and skew; its disadvantage, however, is that multiple cycles are required for any data transfer. A different approach which can be regarded as a "quasi" synchronous interface is disclosed in European Patent Application EP-A-0347557, where a dual clocked data bus system is described, which represents a synchronous parallel data bus particulary adapted for use in a data processing system where it is necessary to transfer data over long distances. The physical connection between communicating units includes a plurality of wires adapted to carry the parallel data signals and a wire which carries a clock signal to the remote unit. When data is transmitted from the remote unit to the base unit, the clock signal which originated at the base unit and which was transmitted to the remote unit is turned around and transmitted back to the base unit for use in receiving the data from the remote unit. This system offers the data streaming advantage of synchronous interfaces without having to pay the penalty of asynchronous interfaces. The penalty that has to be paid is an added delay in the time it takes the first message from the base unit to arrive at the remote unit, but not in the overall data throughput. The problem, however, which arises in "quasi" synchronous interfaces is a phase de-alignment of the clock signal which originated at the base unit and which was transmitted to the remote unit and the clock signal which was transmitted back from the remote unit to the base unit. Normally, buffers are used for phase alignment purposes at the base unit into which transmitted data from the remote unit are stored under the control of the clock signals transmitted back from the remote unit and from which data are read under control of clock signals synchronized with the clock signals of the base unit. However, as metastability situations, in some instances, may impair a precise alignment process, this alignment technique cannot be used within systems where high reliability and availability are required. Therefore, it is the object of the present invention to avoid disadvantages arising from metastability situations during the phase alignment process necessary in "quasi" synchronous interfaces. This object is achieved with the method of claim 1 and the arrangement of claim 4. Embodiments of the invention will be described in detail below with reference to the accompanying drawings in which: Fig. 1A to 1C is a schematic representation of known synchronous or asynchronous interfaces and their respective pulse diagrams, Fig. 2A, B is a schematic representation of a known "quasi" synchronous interface and its pulse diagram, Fig. 3A is a block diagram of a known interface shown in Fig. 2A, Fig. 3B is a block diagram of a phase alignment circuitry of the invention used "quasi" synchronous interfaces, Figs.4A to 4D are schematic representations of a phase alignment circuitry shown in Fig. 3B; Fig. 5A, 5B are block diagrams of a "quasi" synchronous interface used for bi-directional data and control signals transfer. In contrast to synchronous and asynchronous prior art interfaces (Figs. 1A - C), Fig. 2 shows how a prior art "quasi-synchronous" interface being used with the advantages of both interface types (synchronous, asynchronous) and without their disadvantages. The basic design is centered around a method of keeping the same frequency for both units, and compensating for the difference in phase using a phase alignment means. Keeping the same frequency allows the units to make one data transfer per cycle, while permitting a phase difference allows them to remove the requirement of making interface delay adjustments to align the units' clocks. To understand the quasi-synchronous interface better, reference is made to Figs. 2A, B. The term "clock" is used to refer to either a single clock or a group of clocks, depending on the implementation of the logic chosen. If a group of clocks is used, then the skew between the individual clocks of the group as they propagate throughout the system must be taken into consideration. However, for the purposes of this example no skew problems of this type are covered since they do not relate to the arrangements described. It is assumed that unit A sends its internal clock along with data and control signals on separate lines 1, 1a to unit B, data and/or control lines on cable 1 and the clock on line 1a (cf. lines 2,3; Fig. 2B). Unit B receives this clock and derives any and all local clocks from this clock. This keeps unit B at the exact same frequency as unit A, although a phase shift does occur. The propagation delay as well as the phase shift can be lumped into one item and are referred to as DELAY A->B (cf. line 4; Fig. 2B). Since unit B's clock is synchronized with the data coming from unit A, it can accept data at a rate of one transfer per cycle (cf. line 5; Fig. 2B). In the opposite direction unit B sends its internal clock along with data and control signals back to unit A via line 2a and cable 2. When this clock arrives at unit A, it will have exactly the same frequency as the clock internal to unit A, however, it will have a phase shift DELAY B->A equal to the phase shift introduced from unit A to unit B, plus the phase shift introduced when sending from unit B to unit A (cf. line 8; Fig. 2B). The entire interface enters unit A through a phase alignment means 3 whose purpose is to compensate for the phase shift of the signals arriving at the phase alignment means 3 from unit B relative to the internal clock of unit A (data and control signals leave the phase alignment means 3 aligned with unit A's internal clock). The internal design of the phase alignment means 3 is not important at this point. Many designs can fulfill the requirement above e.g. a phase alignment buffer. What is important, however, is that both data and control lines from unit B to unit A are treated as part of the data path in the buffer since both are phase shifted and need to be realigned. Another important point is that all phase buffer clocks used on the unit B side of the buffer are derived from the clock received from unit B (there is no clock adjusting or matching involved). In Figs. 2A and 3A the phase alignment means 3 are shown as boxes (circuit arrangements) which are contained in unit A. The phase alignment means 3, however, can also be separate boxes which are connected to the units A and B. Fig. 3A shows that the phase alignment means 3 is split into parts 3a and 3b which are related to different clock domains. Whereas part 3a is related to the internal clock A (internal clock on A-side of the phase alignment means), is part 3b related to internal clock B (internal clock on B-side of the phase alignment means). The clock generation takes place by a clock generator 4 only in unit A. All clock pulses necessary to control unit A or unit B are derived from the (master) clock pulses of clock generator 4. If necessary the clocks are distributed by various clock distributors 8, 9, 11 - 14 within the units A-E to the units internal circuitry. All data AD and control signals AC leaving part 3a of the phase alignment means 3 are aligned with the internal clock of unit A. Another signal IGN which is derived from the phase alignment means 3 is used to characterize signals leaving the phase alignment means as being invalid. This ignore signal IGN will be described in greater detail in connection with Figs. 3B and Figs. 4A-E. The system described above can be defined as a quasi-synchronous interface which has the properties listed below: Units have the same frequency, but different phase. One data transfer can occur every cycle. Any interface delays can be tolerated. Additional logic in the form of a phase alignment buffer must be added to the first unit. An important part of the quasi-synchronous interface is the phase alignment buffer. This section describes one possible implementation of the buffer, however, other implementations are possible and the choice is largely implementation dependent. The buffer chosen to be described here is designed to meet the requirements of an on-chip buffer which has a minimum latency and does not have an interruptible data stream. This means that once the system is initialized and a data stream starts, it is not interrupted under normal circumstances even for one cycle. A defect in the system such as the cable from unit A to unit B becoming disconnected would be an error condition and not a normal circumstance. Referring to Fig. 3B, it can be seen, that both the signals on the data 2 and control 2b lines from unit B to the phase alignment buffer 3 are merged together and treated as data and passed through an input selector 5 into a particular location I-N in the buffer array 6. This location is defined by the contents of a WRITE pointer stored in 15 which acts as an address pointer onto the locations of the buffer array. The WRITE pointer is updated (e.g.incremented) by adder 10 on every clock cycle which comes across the interface from unit B. Its value is passed to the other side 3a using metastability prevention compensation techniques (MS logic) 7 for comparison with a READ pointer. The WRITE pointer wraps back upon itself when it reaches the last address of the array (e.g. modulus 4 array; WRITE = 0-1-2-3-0-1-2-3-0-...). The array has the property of being able to be written with one clock (from B) and read under control of a second different clock (from A). On the read side 3a of the array, buffer locations I-N are read on every clock cycle from the internal clock from unit A. Reading outputs the interface conditions written in by the B side with a given offset of time. The READ pointer stored in 17 chooses the array location to be gated onto the read side data and control lines which are fed into the receive logic of unit A. The READ pointer also wraps around itself when it reaches the last address of the array, just like the WRITE pointer does. Data AD and control AC lines leaving the phase buffer 3 via multiplexer 18 and going to the receive logic of unit A are exactly synchronized both in frequency and phase to unit A's clock because they are read out of the array using unit A's internal clock. When both the READ and WRITE pointers reach the end of the buffer array 6, they wrap around to the first buffer location. Metastability (MS) logic 7 and Read Control Logic 16 are used to determine whether the information stored in the currently indicated buffer is valid or not, and whether to advance the READ pointer or not. Buffer contents becomes invalid if the write side clock stops for any reason (controlled stop, error stop) while the read side clock is still running. This control logic resides on unit A's clock domain. It is broken into two parts. The first part 7 captures a valid copy of the WRITE pointer into the same clock domain as the READ pointer (on unit A's internal clock). The second part 16 uses this copy of the WRITE pointer to decide the validity of the buffer contents and whether to increment the READ pointer. The WRITE pointer must always be ahead of the READ pointer. If both point to the same buffer location, the read output becomes invalid and has to be ignored by the unit A receive logic. For the moment, it is assumed that a valid copy of the WRITE pointer can be obtained on the read side clock domain; this copy is called WRITECOPY WC. The read control logic 16 is used to determine the data validity and advancing of the READ pointer as follows: With this read control logic 16, if the IGNORE line becomes active it means that the write side of the phase buffer did not receive a clock from unit B. This can happen in two situations. The first case is when the system is initializing and the clocks which have left unit A are still propagating through unit B and back into the phase buffer of unit A. Until the first clock reaches the phase buffer WRITE pointer, IGNORE will be active. The second case is when the path from A to B to phase buffer 3 was broken somewhere. In either case the receive logic in unit A should treat both the data and control lines leaving the phase buffer as invalid until the IGNORE line becomes inactive. A detailed description of the buffer pointer synchronization and adjustment (by MS logic 17) will be given in connection with Fig. 4A - D. Figs. 5A, B show how the bidirectional lines 20 must be split on unit A. Unit B sees no difference in its implementation of the bidirectional control logic. However, unit A has a special switch function 23 built in around the normal phase alignment buffer 3. When unit A is in receive mode (switch in position R), the data path 20 is gated such that data coming from the interface from unit B is routed through the phase buffer 3 before entering unit A's receive logic. When unit A is in send mode (switch in position S), the unit A's output path is connected directly to the interface to unit B. Also during send mode, unit A's receive logic should be connected to a NOP value circuitry (NOP = no operation) that will indicate to unit A's receive logic that the interface is sending and not receiving. One can also leave unit A's receive logic connected to the phase buffer, but since it is still running one does not know what is coming out of it. If unit A's receive logic understands that it should discard the information coming into it, then no special value needs to be assigned. When in switching modes, a number of NOP cycles should be performed by unit A's receive logic since the data path through the phase buffer must be reestablished with valid data before normal data processing can start. The number of NOP cycles is implementation dependant. In the Figs. and the above description, data is used to refer to the signals which are bidirectional in nature and control to refer to the signals which are unidirectional. The terms data and control were chosen for the purposes of illustration as this is how a typical bidirectional interface is implemented. Bidirectional signals can also have control functions, likewise unidirectional signals can have data functions. Other implementations of handling bidirectional interfaces are possible; this is only one particular example used for illustration purposes. Reference is made to Fig. 3B, 4A-E for the following description of the phase alignment buffer write and read control. For ease of drawing, the WRITE pointer is designated W. To obtain a stable copy of the WRITE pointer W across the clock boundary on every clock cycle, a series of delays Δ is used to make four different copies F, G, H, J of the contents of the WRITE pointer. The value of Δ should be strictly chosen by the relationship Δ >D max , D max being a maximal drift, caused by changes in temperature, threshold values, edge slope and noise, interference, ground and voltage shifts etc.. Accordingly, Δ should be less than 1/3 clock cycle. Fig.4A shows the WRITE pointer W on the interface clock domain IFD being sent across clock boundary CB to the internal clock domain IND of unit A and being captured in registers F,G,H, and J within MS-LOGIC 7 with a delay Δ between F and G, G and H, H and J. Fig.4B shows the relative positions of the copies of the contents of W in timing diagram format. As can be seen, data arriving at F is exactly aligned with the changes happening in W (not counting physical delays in the implementation of the circuit). Data arriving at G is delayed in time by 1 Δ, at H by 2 Δ, and at J by 3 Δ. The IND clock will latch all four copies at one time, thus the contents of registers F,G,H,J represent the value of W at different times. Fig.4C is the same picture redrawn showing the delays Δ at different capturing points for F,G,H,J even though in reality all four are being latched simultaneously. The relationship between F,G,H,J is fixed due to the delays Δ (J is the oldest copy of W, F is the newest) however the actual contents of each varies based on the alignment between unit A's internal clock and the interface clock. This alignment is covered in the next figure which also brings in the concept of "drift". Fig.4D varies the relationships between the read side clock and the write side clock by moving the point where the write side clock changes data in the WRITE pointer. In the first line, it is shown that the write clock occurs well before the read clock and all four copies of W are equal (J=H=G=F). However, the point where the write clock occurs is shown as a bar with a center point, not just a point. This is due to what is defined as "drift" for the purposes of this description. The "drift" is the amount of change which can be expected in the write clock edge, relative to the very first clock edge received by the phase alignment buffer. Over time, one would not expect the trigger point of the WRITE pointer to remain the same because things such as temperature changes, threshold changes, clock edge slope changes, noise, interference, ground and voltage shifts, etc. can all affect the point of WRITE pointer triggering. One would expect that this time is small, however, it is not negligible and the value of the delays Δ must be chosen to be larger than the maximum possible drift one can expect over the system lifetime. The value of this drift is highly implementation dependant, however for this purposes it is assumed that it is in the 2-3 nanosecond range. Therefore, the value chosen for the delay Δ should be greater than 3 nanoseconds. The value must not be larger than 1/3 the cycle time, however, so that all four copies of the WRITE pointer are valid each cycle. Returning to Fig. 4D, there are 9 possible alignments of the write side clock versus the read side clock. These are as follows. Since the delays between F,G,H,J are larger than the maximum drift range, we know that once the relationship between write side clock and read side clock is known, the relationship between the values of F,G,H,J will also be known and be stable. Therefore, we only need to sample F,G,H,J once after a WRITE clock has happened to know which copy of the WRITE pointer to use as WRITECOPY from then on. A logic function is implemented in Fig. 3B on the read side clock domain to provide a stable copy of the WRITE pointer to the read side clock domain. The reduced function is as follows. During initialization, read pointers R=F=G=H=J. This means that as long as the read side clock is different from F, the value F will be made the WRITECOPY. WRITE has moved when read pointer is not equal to F and the above loop is exited. From now on, WRITECOPY always comes from this copy of W.

Claims: Method of quasi-synchronously transferring clocking, data, and/or control signals between two or more data processing units, where clock pulses of a master unit (UNIT A), are passed together with the data and/or control pulses having the same frequency and phase as said clock pulses from said master unit over a unidirectional synchronous channel (1, 1a) to a neighbor unit (UNIT B), where the transferred clock pulses define the local clock(s), where further the clocking, data, and/or control signals are passed back over a unidirectional channel (2, 2a) from said neighbor unit to said master unit, where said signals occur with the same frequency but with a shift in phase, and where said phase shift is compensated by a phase alignment means (3) through which said unidirectional channel (2, 2a) is connected to said master unit, where said phase alignment means (3) adjusts the data, and/or control signals received from the neighbor unit to exactly the phase of the sending master unit, which signals forming the aligned data and/or control signals (AD, AC) for further usage, and where said received data and/or control signals are applied to a buffer array (6-Fig. 3B), characterized by the following further steps: inputting of said signals into said buffer array is controlled by a write pointer W which is incremented whenever a clock pulse is received from the neighbor unit B, said data and control signals are merged together and stored in said buffer cells indicated by said write pointer, said write pointer is passed as a write copy WC to a read control logic (16) of said buffer via a metastability prevention logic (7) for comparison with a read pointer R which indicates the buffer cells from which the aligned data and/or control signals (AD,AC) are read, where said metastability prevention logic and said read control logic are used to determine whether the information stored in the currently indicated buffer cells is valid or not, and whether to advance the read pointer or not, and when both said write pointer and said read pointer reach the end of said buffer, they wrap around to the first buffer cells (I). Method of claim 1, comprising the following further steps: said metastability prevention logic (7) which is used to obtain a stable write copy WC across the clock boundary between the clock of the master unit and the clock from the neighbor unit on every clock cycle introduces a series of delay Δ, where D max > Δ > 1/3 of a clock cycle and D max being the maximum drift of the clock received from the neighbor unit, for providing at least four different write copies F, G, H, J which will be latched by the pulses of the master unit's clock at one time in respective registers in said metastability logic (7) representing said write pointer at four different times and performing the following function to provide a stable write copy WC to said read control logic (16): During initialization the read pointer R is matching with each of the write copies F, G, H, J, respectively; WC is set equal to F, until R and F are matching, and thereafter WC is set equal to H, if G, H and J are also matching with each other, otherwise it is set equal to F, and from now on WC always comes from this copy of W Method of claim 2, comprising the following further steps: - an ignore signal IGN which indicates that invalid data are received form a neighbor unit (B) is generated by the read control logic (16) by performing the following function: If R and WC are matching, then IGN is activated and R stays the same, else IGN is deactivated, and R is incremented. Arrangement for performing a method of any one of the preceding claims 1 - 3, comprising two or more data processing units, where a master unit (UNIT A) comprises an internal clock, a unidirectional synchronous channel (1, 1a) from said master unit to a neighbor unit (UNIT B) and a unidirectional channel (2, 2a) vice versa, a phase alignment means (3) through which said unidirectional channel (2, 2a) is connected to said master unit comprising a buffer array (6) having a plurality of registers for temporarily storing data and/or control signals coming from the neighbor unit (UNIT B) associated with the phase alignment means, characterized by the registers being connected via an address selector (5) to the second unidirectional channel (2, 2b) or when using a bidirectional channel (20) instead of the two unidirectional ones, being connected via a switch (23) to this bidirectional channel, a buffer array writing circuitry having address advancing means (10, 15) for controlling said address selector, the address advancing means being advanced by the clock pulses of said associated neighbor unit, a buffer array reading circuitry having address advancing means (16, 17, 18) controlled by the master clock pulses of said master unit, and a metastability prevention logic (7) connected between said buffer array writing circuitry and said buffer array reading circuitry for detecting and indicating erroneous data which have to be ignored.

Inventors: RUDOLPH PETER, RUEDINGER JEFFREY JOSEPH, SCHULZE SCHOELLING HERMANN, RUDOLPH, PETER, RUEDINGER, JEFFREY JOSEPH, SCHULZE SCHOELLING, HERMANN, Schulze Schölling, Hermann
Applicants: IBM, INTERNATIONAL BUSINESS MACHINES CORPORATION
Application year: 1991
Main classification: G06F13
IPC codes: G06F12, G06F13, H04L7, G06F1