Abstract:
A network node for receiving a packet of data written from the network and providing the packet to the network. The packet of data includes first data received from the network in response to a first clock signal and second data provided to the network in response to a second clock signal. The node is adapted to compensate for a drift between the first clock signal and the second clock signal. The node includes a first counter that receives the first clock signal and produces a write-point signal in response to the first clock signal. The node also includes a plurality of registers arranged in a wrap-around configuration, with a first one of the registers coupled to be selected by the write-point signal to receive the first data from the network. A second counter receives the second clock signal and produces a read-point signal in response to the second clock signal, with a further register being selected by the read-point signal to provide the second data to the network. A comparison block receives the read-point signal and the write-point signal and compares the read-point signal and the write-point signal to detect the drift between the first clock signal and the second clock signal, and generates an output signal representing the drift. A control block receives the output signal from the comparison block and generates a signal to the second counter to adjust the read-point signal to compensate for the drift between the first and the second clock signals.

Description:
This is a Division of my U.S. Ser. No. 08/680,409 filed Jul. 15, 1996, now U.S. Pat. No. 5,652,758, which, in turn, is a Division of my U.S. Ser. No. 08/029,864 filed Mar. 11, 1993, now U.S. Pat. No. 5,537,418, and this case claims priority from these. 
    
    
     FIELD OF INVENTION 
     This invention relates to information processing node-rings and particularly to a circular FIFO array therein to resynchronize data-transmit clocks. 
     BACKGROUND, FEATURES 
     Workers in the arts of making and using information-processing networks are well aware of today&#39;s challenge of balancing cost-effective hardware against evolving transmission speeds. This is what this invention addresses. 
     For instance, today&#39;s users are more and more asking for equipment which is simpler, yet less expensive. 
     In considering the design of our next-generation Server, we at first favored &#34;distributed (ring-) architecture&#34; with interconnect based on the IEEE P1596 SCI standard. (SCI: scaleable coherent interconnect; assume &#34;Server&#34; is a collection of &#34;nodes&#34; with supplemental circuitry; i.e., CPUs distributed in rings to affect a single, unified system; a &#34;ringlet&#34; is a min-size ring.) 
     This standard provides that when data is transferred between nodes, the transfer will be synchronous with a &#34;transmit clock&#34; signal (C T ) which is transmitted with the data and typically generated by its own oscillator (O 1 ). But in each node, incoming data would have to be resynchronized to a &#34;local clock&#34; (C L ) which is specified to have the same frequency as the &#34;transmit clock&#34; signal (C T ) arriving with the data, but has its own local oscillator O L . However, due to oscillator variation and thermal changes, the transmit clock (C T ) can be expected to drift with respect to the local clock (C L ). Thus, anytime data is transferred between systems, resynchronization will be necessary; e.g., when data is transferred along each link between nodes it must be synchronized (with the local clock). 
     SCI Nodes, Ringlets: 
     As workers know, each node in a SCI RING, or Ringlet, can typically comprise I/O devices, memory and processors. In fact, each node is usually capable of operating as an independent server. However, it is often desirable to have a single unitary system which includes more processors than is practical to place on a single bus--thus, a multi-node server. And, with processor speeds increasing faster than bus speeds, the number of processors per bus is actually decreasing. 
     SCI is an attempt to solve this problem by creating an interface that can transparently connect multiple servers (multiple nodes) and make them appear to be a single system whose processing power is the sum of the connected system&#39;s processing power. It does this by providing a physical connection for passing data, as well as a logical cache coherence protocol. Because all the processors in the whole system are &#34;coherent&#34; (i.e., are directly linked to all data sites--as opposed to the more usual, non-coherent string of processors in a distributed-architecture system, where a processor in a given node must transmit a &#34;special message&#34; in order to access other nodes--thus SCI has direct-access to all, there are no &#34;local copies&#34;) and share a single memory space, each processor is able to access any part of memory or I/O devices across the entire system as though they were local. 
     This standard SCI approach seems more complex and difficult to implement than it needs to be. My invention is less so, while addressing the same need. 
     &#34;Delay-line Method&#34;: 
     The SCI standard approach to this situation is to feed each of the incoming data bits, plus a flag bit, through separate tapped delay lines: a &#34;Delay-line Method&#34;. Using this approach, it is possible to compare the phases of the incoming (transmit) -clock and the local clock, and then choose the appropriate tap to sample the data with respect to (e.g., in sync with) the local clock, thereby always assuring that the data is &#34;valid&#34; when sampled. 
     As the two clocks change phase with respect to one another, and the selected tap is adjusted, eventually, the selected tap will be either the first or the last tap of the delay line, depending on whether the incoming or local clock is faster. At this point there will be no further room for adjustment and the tap will have to be switched from the end-tap to one of the center-taps where the data is also valid with respect to (in sync with) the local clock. This will make the system either fail to sample a data bit or to sample the same bit twice, depending upon which clock is faster. But, since data is sent in packets, if one skips, or resamples, data only between packets, no harm results. 
     Problems: 
     This method of synchronization places strict demands on the ASIC technology used to implement it. CMOS is disfavored because it tends to have a high spread between the best- and worst-case gate delays over varying conditions of temperature, voltage and process; thus, the preferred implementation of this &#34;Delay-line&#34; method is with an ECL gate array though this is expensive. Also, a large number of gates is needed. The method requires 17 tapped delay lines, each of which must have a total delay of at least 2 clock periods under best-case conditions (temperature, voltage and process), and each delay line requires 16 or more stages, or taps, each requiring several gates. Laying-out and routing these delay lines also places additional constraints on the gate array architecture. 
     In spite of these constraints and expense, there are workers today who propose offering parts designed to this standard and using this Delay-line method. 
     This invention addresses this problem, teaching the use of a &#34;circular FIFO array&#34;. 
     An object hereof is to address at least some of the foregoing problems and to provide at least some of the mentioned, and other, advantages. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     These and other features and advantages of the present invention will be appreciated by workers as they become better understood by reference to the following detailed description of the present preferred embodiments which should be considered in conjunction with the accompanying drawing: 
     FIGS. 1 (1A, 1B, 1C, and 1D) is a block diagram of my preferred embodiment; 
     FIG. 2 is a block diagram of a related circular register array. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
     Following are details of a preferred &#34;circular FIFO&#34; clock-resynchronizing embodiment and related environment in which such an embodiment can be advantageously employed. The methods and means discussed herein, will generally be understood as constructed and operating as presently known in the art, except where otherwise specified; likewise all materials, methods, devices and apparatus described herein will be understood as implemented by known expedients according to present good practice. 
     Server Node--Interconnect/synchronization via circular FIFO 
     As an alternative to this IEEE standard, I designed a &#34;circular FIFO&#34; scheme for node to node synchronization; I call it &#34;circular FIFO because, rather than using tapped delay lines, this method uses a circular FIFO to synchronize the data. (By circular FIFO I mean a first-in, first-out register array characterized by registers arrayed in a &#34;circle&#34; to be filled in circular sequence; e.g., as very schematically indicated by, the six registers R-0, R-1 through R-5 in FIG. 2. Have, when R-0 is full, the bit stream goes to R-1 next, then to R-2 etc., to begin anew at R-0 when R-5 overflows. As noted below, one should avoid reading-out from a register adjacent to one that is being written-to; and preferably, read-out from an &#34;opposing&#34; register; e.g., from R-3 when R-0 is written-to). The scheme can best be understood by tracing FIG. 1, a block diagram of the related circuit (here, assume that a collection of &#34;nodes&#34;, or CPUs, with supplemental circuitry, can function as a &#34;server&#34;, with the nodes being arrayed in one, or more, rings to function as a single unitary server system). 
     The purpose of this circuit is to receive data packets of signals INDATA&lt;16:0&gt;which are pre-synchronized to an input clock, ECLK (or transmit-clock, which is also transmitted as OUTDATA&lt;17&gt;). A salient feature of this design is found in combined blocks &#34;ASYNC-COUNT&#34;, &#34;SYNC-COUNT&#34;, &#34;COMPARE&#34;, and &#34;MUX-REG&#34; in FIG. 1. I will first explain how the method works and then how these blocks contribute to the operation. 
     Operation theory, in general: 
     Block 11 (MUX-REG plus MUX-OUT) contains six 16-bit-wide registers into which the incoming data bits (called &#34;symbols&#34; in SCI) are written. These registers are schematically depicted in FIG. 2, and arrayed, circularly, in two groups of three: This is the &#34;circular FIFO&#34; array that characterizes my subject method. The symbols are written into this array of registers sequentially, in a circular fashion, (0,1,2,3,4,5, then 0,1 etc.) on each incoming clock. If the data is then read-out of the register that &#34;opposes&#34; the register currently being written-into, it will have been stable for three clocks and will remain stable for another three clocks. That is, if the data is currently being written-into register n, then it can be safely read from register n+3 (for a &#34;Mod6&#34; or 6-total registers), or, alternatively, from n+4 when n+2 is being written-to. 
     The data is read by selecting the appropriate output of the multiplexer capable of selecting any of the 6 registers and then clocking this data into another register (e.g., MUX-OUT) using the outgoing clock--to thereby achieve synchronization. Here, I prefer to divide the incoming clock signals into ECLK and OCLK (i.e., even or odd signals generated 180° apart by the incoming clock). Here, the local clock signal is SCLK, generated by an oscillator at this node. On each ECLK or OCLK, the &#34;next&#34; register will be written-into, and on each SCLK, the &#34;next&#34; register will be read-out--so that the data being read will always be valid (assuming the two clocks are exactly the same frequency, which usually isn&#39;t the case). 
     Here (FIG. 1), the incoming clock signal is separated from a bit-packet (e.g., input as signals DIN in FIG. 1) and as aforementioned, preferably split into two related clock-signals 180° out of phase, i.e., ECLK and OCLK (or &#34;even&#34; and &#34;odd&#34;, generated by &#34;incoming clock&#34; which has its own external oscillator). It is more usual to transfer data in sync with the rising edge of a clock pulse; but here, we prefer to use both the rising-edge, or leading edge (e.g., via ECLK) and the falling edge, or trailing edge (e.g., via OCLK). 
     These clock signals are fed to ASNC COUNT block 13 where ECLK is used to &#34;point&#34; to (select) the &#34;even-registers&#34; of the circular FIFO in MUX REG (i.e., to R-0, R-2, R-4; see FIG. 2) and OCLK is used to &#34;point to&#34; the &#34;odd-registers&#34; (R-1, R-3, R-5; see FIG. 2), as known in the art. Thus, this &#34;circular FIFO&#34; in MUX REG is best viewed as two sets of three registers. 
     Allowed drift between the incoming (ECLK, OCLK) and outgoing (version of SCLK) clocks, will eventually cause the read point to catch up to the write point in the FIFO,--or, alternatively, the read point will lag behind and the write point will catch up. 
     Either way, data will be corrupted. Since the data is sent in packets, or groups of symbols, the only really important requirement is that data be preserved within its packet--and such &#34;drift&#34; be compensated for only between packets. 
     Therefore, if one sets the read-point opposite the write-point in the FIFO at the beginning of a packet, and if the clocks don&#39;t drift too fast, the entire packet can be written to the FIFO, and then quickly read-out, before either clock leads or lags enough to corrupt data. Then, if, between packets, the read and write positions drift, one can reset the read position without losing data. That is, moving the read pointer can cause a symbol to either be skipped or read twice, depending on the direction of the adjustment; however, so long as this occurs between packets, it causes no harm. 
     How FIG. 1 works: 
     The following will explain how my circuit implements the described &#34;circular FIFO&#34; method. Here, there are two clock signals received with the data, ECLK and OCLK (off transmit-clock, with each packet) which are 180 degrees out of phase with one another. [Actually, there is only one transmit clock signal sent between nodes, but because the data transitions on both rising and falling edges of the clock signal, it is preferred to use one normal and one inverting input buffer to generate the two clock signals.] The outgoing clock (off SCLK) is twice the frequency of the incoming clock; thus the data which is transferred on both edges of the incoming clock is transferred on only the rising edge of the outgoing clock, until the clock is output, then it is divided down to the same frequency as the input clock. 
     Each of the input clocks, ECLK and OCLK, is used to clock a simple state machine [e.g., collection of Flip-Flops, counters, registers etc.: ASYNC COUNT 13 in FIG. 1]. Each of these state machines follows the following pattern: 001,010, 100, 001, etc. [a state machine will store data and shift it responsive to some clock signal, as known in the art; this ASYNC COUNT may &#34;enable&#34;, or point to, one of the six registers in MUX REG to be written-into; e.g., one of &#34;even registers&#34; R-0, R-2, R-4, as in FIG. 2, off the rising-edge of ECLK, or one of &#34;odd-registers&#34; R-1, R-3, R-5 off the falling edge of OCLK; thus, ASYNC COUNT may include a shifting six-bit shift register to control this point function as known in the art]. 
     The six registers in the MUX-REG block 11 can be divided into two groups of three. One is associated with OCLK and its state machine (in ASYNC COUNT), and the other is associated with ECLK and its state machine. What each of these state machines (in ASYN COUNT) is used for is to select which one of the three registers in MUX REG to which data (e.g., DIN) will be written, on the next transition of ECLK or OCLK. In essence, MUX-REG 11 is composed of two separate, three-register FIFOs. One is written-to on every edge of ECLK, and the register written-to is the one indicated by the three-bit state machine associated with ECLK. The other is written-to on OCLK according the state machine incremented by OCLK. 
     If the 6 registers are taken together, the effect is that of writing data into a six register FIFO (the &#34;circular FIFO&#34;) with a clock rate equal to twice that of ECLK/OCLK. This is necessary because the data changes on both edges of the clock. ASYNC-COUNT block 13 contains these two three-bit counters whose outputs are fed to MUX-REG 11 along with the data to determine which register to load. 
     Block SYNC-COUNT 15 contains a state machine/counter that determines which of the six registers in MUX-REG 11 will be read next. This state machine follows the pattern 000001, 000010, 000100, 001000, 010000, 100000, then 000001, etc. Block SYNC COUNT also has inputs from a Control Block 17 which can cause the count to skip a state or remain in the same state. 
     The block COMPARE 19 is critical for this circuit. The two counters in ASYNC-COUNT 13, taken together and interleaved, can be taken as a single state machine with the following sequence 000011, 000110, 001100, 011000, 110000, 100001, then 000011, etc. COMPARE takes this as input combined with the output of SYNC-COUNT 15. These two counters have each been designed to have a single field of shifting &#34;one bits&#34;. This allows the compare function to combinationally compare these two registers and to indicate whether the read-point and write point in the FIFO (in MUX REG) are aligned properly, or whether the read point is leading or lagging its optimum position. The exact function can be described in a table, but it basically consists of looking at all 36 valid combinations and then generating a function that indicates whether the read point needs to be moved ahead (for each combination) and a function that indicates whether the read point needs to be moved back (for each combination). 
     CONTROL block 17 synchronizes the signal generated by COMPARE 19 and determines when an adjustment to the read point is necessary; then, when it detects the gap between two packets, it signals SYNC-COUNT 15 to make the required adjustment. 
     The remaining two blocks (EDGE SYNC 23, OUT STAGE 25) function to assure that the packets to be transmitted always begin on the rising edge of the output clock. This was necessary for our particular design, but is not part of the SCI spec. Deleting or adding symbols to the data stream changes where the packet begins with respect to the clock. Aligning the packet to a rising edge is accomplished by inserting or deleting an extra register stage, depending on whether symbols are being added or deleted and on whether the stage is currently in the data path or not. 
     Variations: 
     Some variations or modifications of the FIG. 1 arrangement should be considered as extensions of my &#34;circular FIFO&#34; method. First, the use of the dual input clocks that are out of phase adds a little complication to the design, but is not an essential feature of the solution. (So, instead, one could merely use the transmit clock directly and make the circular FIFO comprise 4+ registers (three wouldn&#39;t avoid the restriction vs. adjacent registers written-in and reading-out). 
     Also, it is nonessential that data be transferred on both edges of an input clock that has half the frequency of the clock to which data is being synchronized. Rather, this should be considered a general method for taking data which is synchronized to a &#34;source clock&#34; (e.g., incoming) and synchronizing it to another clock (e.g., local) that has the same frequency, but is generated by a different oscillator such that there can be drift between the clocks. 
     Also, one should assume that my method is applicable only for data which is packetized or otherwise constructed such that there exists detectable data which can be deleted occasionally without loss of information. 
     The length of the &#34;circular FIFO&#34; (number of registers) used for re-synchronization is not fixed. The nature of the data, being transferred on both edges of the clock, made it convenient to use an even number of registers; also the length of the data packet, coupled with the clock drift rate and desired margins, indicated that 6 registers was optimum for this design. 
     However, for short packets with tightly controlled clock drifts, a FIFO with as few as 3 or 4 registers could be feasible;--e.g., to minimize the average delay from data input to synchronized data available. 
     Further, the COMPARE function can be varied to change the point at which an adjustment occurs to add or delete data symbols. 
     Also, preferably built into CONTROL block 17 is a hysteresis circuit which controls for how many clocks the synchronized status indicator from COMPARE block 19 must be stable to be considered valid. This circuit can be optimized to filter-out jitter and other clock variations in order to eliminate unnecessary symbol insertion and deletions. 
     Variation of any of the foregoing parameters will still use essentially the same method. 
     Conclusion: 
     In conclusion, it will be understood that the preferred embodiments described herein are only exemplary, and that the invention is capable of many modifications and variations in construction, arrangement and use without departing from the spirit of the claims. 
     For example, the means and methods disclosed herein are also applicable to other related node arrays and associated clocking. Also, the present invention is applicable for use with other related data transmission/clocking arrangements. 
     The above examples of possible variations of the present invention are merely illustrative. Accordingly, the present invention is to be considered as including all possible modifications and variations coming within the scope of the invention as defined by the appended claims.