USPatent applicationPatented

Elastic store: recovery and boundary verification

Granted 7 May 2002 · no office action yet

Application· this page
9788430
filed 21 Feb 2001
Publication
Not published
not published
Patent
US 6,384,634
granted 7 May 2002

Life of the application

7 dated events
⤢ drag to zoom20022004200620082010201220142016201820202022ProsecutionOwnershipTerm & fees
ProsecutionOwnershipTerm & feeshover for detail · click to open

Abstract

When a FULL or EMPTY state of a First In First Out memory (FIFO) in an elastic store is detected by a verification and recovery circuit, a recovery operation is initiated, i.e., writing to or reading from the FIFO is disabled for a predetermined number of respective (write or read) clock cycles. This predetermined number of respective clock cycles is chosen to meet an objective of a maximal distance between read and write addresses. At boot-up time, after waiting a number of clock cycles, a verification operation is performed on the boundaries (write vs. read addresses). The verification operation requires that the recovery operation described above be initiated if the read and write addresses are equal or adjacent. The verification operation then continues for a number of clock cycles after which the elastic store moves to steady state operation. In steady state operation, the recovery operation is initiated only if the read and write addresses are equal. As well as at boot-up time, the verification operation is also performed after each recovery operation.

Description

7 parts
›FIELD OF THE INVENTION

The present invention relates to movement of data across asynchronous clock boundaries and, more particularly, to elastic storage operations. Further particularly, the invention relates to recovery and boundary verification for elastic storage operations.

›BACKGROUND OF THE INVENTION

The purpose of an elastic store is to allow the movement of data across asynchronous clock boundaries. At a boundary between two clock domains, a clock associated with incoming data and a clock associated with outgoing data may have different periods. Alternatively, the two clocks may alternate from high to low at the same rate.

A FIFO (First In First Out) memory may be used as part of an elastic store between the two clock domains. This FIFO memory may be a dual port RAM (Random Access Memory) with independent address inputs and data ports for read and write. A true dual-port memory allows each port to operate independently. Each side (read and write) of the elastic store uses a continuously-running independent clock and data may be read or written to the elastic store after activating a read or write enable port.

A typical FIFO has many inputs and many outputs. The inputs are arranged to receive, for a write, a write address at a write address input, data to write at a write data input, a signal on a write enable port and a write clock. The inputs are arranged to receive, for a read, a read address at a read address input, a signal on a read enable port and a read clock. The output is arranged to transmit, for a read, the data that is read at the read address. In particular, while writing is enabled by the signal on the write line, a write operation is performed on the data received at the write data input at a write address received at the write address input. The write operation occurs as triggered by the write clock. Further, when a read is enabled by the signal on the read line, a read operation is performed on the data present at the read address received at the read address input. The read operation occurs as triggered by the read clock.

A well designed elastic store includes a write counter for providing a write address, at the write address input, for each write operation. Similarly, the elastic store includes a read counter for providing a read address, at the read address input, for each read operation. Following each write or read operation, the respective counter is incremented to the next value in a counter cycle. The write counter and read counter cycle through the same sequence of addresses.

In designing an elastic store, consideration must be given to avoidance of overflow or underflow conditions. Take, for example, an elastic store having a clock ratio (the ratio between the write clock and read clock periods) of 15:14 and 64 buffer addresses. In this case, the elastic store may perform 34 more write operations than read operations before the elastic store is full (overflow). Similarly, the elastic store may perform 30 more read operations than write operations before the elastic store is empty (underflow). With a ratio of 15 to 14, the worst case is that the elastic store will perform 16 more write operations (or read operations) than read operations (or write operations). This scenario assumes a write address of 0 and read address of 31 at the beginning (boot-up time or after several recoveries). Under ideal conditions then, the distance between the read address and the write address is not less than 15.

At boot-up time, i.e., when the elastic store is turned on, write and read clocks may not reach a steady functionality immediately. Unfortunately, the address supplied by the write counter and the address supplied by the read counter are unknown at boot-up time. Thus, the possibility exists that the read address and the write address are adjacent (i.e., if one counter is incremented, the value supplied by each counter may be equal). This is a potentially dangerous scenario. For example, if a slip occurs on one clock (jitter), the elastic store might go into an overflow condition (an attempt to write to a full—i.e., unread—memory address) or an underflow condition (an attempt to read from an empty memory address). The result of the elastic store having gone into an overflow or underflow condition, is that the elastic store can no longer handle data without corruption.

In one recovery scheme, an interrupt can be generated, as triggered by an overflow or underflow condition, and software can reset the elastic store. However, the elastic store in this recovery scheme can take a while to react. Furthermore, when the elastic store does react, the software may reset the elastic store at an inopportune time.

Clearly, there is a requirement for measures to avoid overflow or underflow. However, if overflow or underflow occurs despite the avoidance measures there is a requirement for a recovery method for returning the elastic store to a functional state.

›SUMMARY OF THE INVENTION

A circuit is provided that attempts to avoid elastic store overflow or underflow through address boundary verifications. However, if the elastic store fails due to over flow or underflow, a method is provided for recovering elastic store functionality.

Advantageously, the elastic store can work alone, i.e., external assistance is not required to correct for failures. Further, the elastic store is fully programmable for flexibility.

In accordance with an aspect of the present invention there is provided a method of operating an elastic store, the elastic store including a First In First Out memory (FIFO) having a write address input and a read address input. The method includes determining a write address as supplied to the write address input, determining a read address as supplied to the read address input, detecting a state of the elastic store wherein the write address is adjacent to the read address and, responsive to the detecting the state, performing a recovery operation.

In accordance with another aspect of the present invention there is provided an elastic store including a First In First Out memory (FIFO) having a write address input and a read address input, a write counter for supplying a write address to the write address input of the FIFO, a read counter for supplying a read address to the read address input of the FIFO and a verification and recovery circuit for receiving a write address as supplied to the write address input, receiving a read address as supplied to the read address input, detecting a state of the elastic store wherein the write address is adjacent to the read address and, responsive to the detecting the state, performing a recovery operation.

Other aspects and features of the present invention will become apparent to those of ordinary skill in the art upon review of the following description of specific embodiments of the invention in conjunction with the accompanying figures.

›BRIEF DESCRIPTION OF THE DRAWINGS

In the figures which illustrate example embodiments of this invention:

FIG. 1 illustrates a known elastic store;

FIG. 2 illustrates an elastic store improved over the elastic store of FIG. 1 according to an embodiment of the present invention;

FIG. 3 illustrates a logic circuit for use in the elastic store of FIG. 2 in an embodiment of the present invention;

FIG. 4A illustrates a write finite state machine and a read finite state machine;

FIG. 4B illustrates the states through which the state machines of FIG. 4A may cycle; and

FIG. 5 illustrates quadrants and exemplary grey counter codes to which the quadrants may be associated.

›DETAILED DESCRIPTION · 1 of 3

FIG. 1 illustrates an elastic store 100 (as disclosed in Peter Alfke, “Moving Data across Asynchronous Clock Boundaries,” http://www.isdmag.com/editorial/2000/design0003.html) including a dual port FIFO 102 , a write counter 104 , a read counter 106 and a verification circuit 108 . The verification circuit 108 includes a comparator 110 , a lookup table 112 , an S-R latch 114 and a logic circuit 116 . Additionally, the FIFO 102 receives input on a write enable port 122 , a write data line 124 and a read enable port 126 . The FIFO 102 transmits output on a read data line 128 . The FIFO 102 also receives a write clock signal on a write clock line 132 and a read clock signal on a read clock line 134 .

In an inventive elastic store 200 , illustrated in FIG. 2, the FIFO 102 , the write counter 104 and the read counter 106 are maintained while a verification and recovery circuit 208 replaces the verification circuit 108 of the elastic store 100 of FIG. 1 . The verification and recovery circuit 208 maintains the comparator 110 , the lookup table 112 and the S-R latch 114 found in the verification circuit 108 of FIG. 1 and adds a boundary check unit 206 , a new logic circuit 216 , a full recovery engine 210 and an empty recovery engine 212 . The full recovery engine 210 connects to the write enable port 122 and, therefore, controls whether the FIFO 102 may receive data for a write operation. Meantime, the empty recovery engine 212 connects to the read enable port 126 and, therefore, controls whether the FIFO 102 may release data for a read operation.

The new logic circuit 216 is illustrated in detail in FIG. 3. A pair of input AND gates 302 A, 302 B form a sub-circuit 316 that is logically identical to the logic circuit 116 of FIG. 1 for acting on the output of the S-R latch 114 and the comparator 110 . A second pair of input AND gates 302 C, 302 D is included in the new logic circuit 216 for acting on the output of the S-R latch 114 and the boundary check unit 206 . An arrangement of D-latches 304 A, 304 B, 304 C, 304 D and corresponding flip flops 306 A, 306 B, 306 C, 306 D act to maintain the output of the input AND gates 304 A, 304 B, 304 C, 304 D. Four output AND gates 308 A, 308 B, 308 C, 308 D receive the output from the flip flops along with output (SSW, SSR, VW, VR) from two finite state machines (not shown). A full OR gate 310 F receives output from particular output AND gates 308 A, 308 C and passes results to the full recovery engine 210 (FIG. 2 ). An empty OR gate 310 E receives output from particular output AND gates 308 B, 308 D and passes results to the empty recovery engine 212 (FIG. 2 ).

It is typical of systems including circuits like the elastic store 100 of FIG. 1 and the elastic store 200 of FIG. 2 that a phase locked loop (not shown) be included in a separate synchronization circuit (not shown) for removing noise and jitter from digital input signals. Herein, separate phase locked loops are used to remove noise and jitter from the read clock 134 and the write clock 132 . Each phase locked loop provides an indication (PLL LOCKED) of phase lock to the elastic store.

In order to prevent race conditions (circuit behavior that depends on which input variable changes fastest) at boot-up time, the clock boundaries (the distance between the read and write addresses) must be verified. For verification purposes, one finite state machine (FSM) is used per clock domain. One FSM is responsible for write data and one FSM is responsible for read data. FIG. 4A illustrates a “write” finite state machine 400 W and a “read” finite state machine 400 R (generally, finite state machine 400 ) while FIG. 4B illustrates the states through which the state machines of FIG. 4A may cycle. In particular, in a PLL_LOCK_WAIT state 402 , the finite state machine 400 is waiting for a phase locked loop (not shown) to indicate that the phase locked loop is locked to the appropriate clock (the read clock 134 or the write clock 132 ). The PLL_LOCK_WAIT state 402 occurs only at boot-up time or after a reset. In a START_MODE state 404 , the elastic store 200 is waiting at boot-up time or after a recovery. The START_MODE state 404 lasts for X cycles of a respective clock before allowing the elastic store 200 to go into a VERIFICATION state 406 . The write finite state machine 400 W is associated with the write clock signal received on the write clock line 132 while the read finite state machine 400 R is associated with the read clock signal received on the read clock line 134 . In the VERIFICATION state 406 , the elastic store 200 tracks BOUNDARY FULL or BOUNDARY EMPTY states for Y cycles of the respective clock. In a STEADY_STATE state 408 the FIFO FULL or FIFO EMPTY states are tracked.

The write finite state machine 400 W outputs a high signal on a VW line when in the VERIFICATION state 406 and a high signal on a SSW line when in the STEADY_STATE state 408 . The read finite state machine 400 R outputs a high signal on a VR line when in the VERIFICATION state 406 and a high signal on a SSR line when in the STEADY_STATE state 408 .

To avoid decoding glitches, it is known to use a grey addressing code sequence in both the write counter 104 and the read counter 106 . In the FIFO 102 , the addressing code sequence is irrelevant, provided that both counters use the same sequence.

A counter cycle 500 , exemplary of that corresponding to an eight state (three bit) grey counter, is illustrated in FIG. 5 . The number of states in a counter for an elastic store is determined by the FIFO size. In this exemplary case, the FIFO size is eight. The counter cycle 500 progresses in a clockwise direction. Quadrants are identified by the two most significant bits in each counter state.

In operation of the elastic store 100 in FIG. 1, if the elastic store 100 has a state of FIFO FULL or FIFO EMPTY, all that will be available for reading on the read data line 128 will be junk data. The states FIFO FULL and FIFO EMPTY occur when addresses supplied by the write counter 104 and the read counter 106 are equal. To distinguish between the two states, the S-R latch 114 is used and, before the addresses supplied by the write counter 104 and the read counter 106 are equal, the two most significant address bits of the write counter 104 and the read counter 106 are examined in the look-up table 112 . In view of the counter cycle 500 of FIG. 5, the two most-significant bits in the counter cycle (whether the counter code is grey, binary or other) can designate an address quadrant for the state of each counter. The quadrant distance between the state of the read counter 106 and the state of the write counter 104 indicates whether the elastic store 100 is progressing TOWARDS FULL or TOWARDS EMPTY and may be termed the “direction” of the FIFO.

›DETAILED DESCRIPTION · 2 of 3

If a read address is one quadrant ahead of a write address, the direction of the FIFO 102 may be identified as TOWARDS EMPTY by a low signal output from the lookup table 112 and passed to the S-R latch 114 . If a write address is one quadrant ahead of a read address, the direction of the FIFO 102 may be identified as TOWARDS FULL by a high signal output from the lookup table 112 and passed to the S-R latch 114 . If the read address and the write address are in the same or opposite quadrants, no direction information may be learned, therefore, these scenarios are ignored.

If a read address differs a write address, an address equivalence may be identified as UNEQUAL by a low signal output from the comparator 110 . If a read address is identical to a write address, an address equivalence may be identified as EQUAL by a high signal output from the comparator 110 .

The output of the S-R latch 114 is representative of the direction and is thus established well before an actual state of FIFO FULL or FIFO EMPTY can occur. The output of the S-R latch 114 and the output of the comparator 110 are converted, by the logic circuit 116 , into an output signal indicating a state of either FIFO FULL or FIFO EMPTY.

To declare the FIFO 102 to be in the FIFO FULL state, the direction must be identified as TOWARDS FULL (high) and the write address and the read address, as compared in the comparator 110 , must be EQUAL (high). When the FIFO 102 is declared to be in the FIFO FULL state, the state is reported to an external assistance (not shown) and recovery procedures are applied by the external assistance.

To declare the FIFO 102 to be in the FIFO EMPTY state, the direction must be identified as TOWARDS EMPTY (low) and the write address and the read address, as compared in the comparator 110 , must be EQUAL (high). When the FIFO 102 is declared to be in the EMPTY state, the state is reported to the external assistance and recovery procedures are applied by the external assistance.

Turning to FIG. 2, in overview, if, while in steady state operation, a FIFO FULL or FIFO EMPTY state of the FIFO 102 is detected by the new logic circuit 216 , a recovery operation is initiated at either the full recovery engine 210 or the empty recovery engine 212 , i.e., writing or reading is disabled for a predetermined number of respective clock cycles. Furthermore, at boot-up time, after waiting a number of clock cycles, a verification operation is performed on the boundaries (write vs. read addresses). In contrast to steady state operation, the verification operation requires that the recovery operation described above be initiated if the read and write addresses are adjacent. This additional sensitivity to the proximity of read and write addresses is necessary due to the potential instability inherent on the write clock 132 and/or the read clock 134 after a boot-up or recovery operation. Once initiated, the verification operation continues for a number clock cycles. As well as at boot-up time, the verification operation is also performed after each recovery operation.

The value for the number of respective clock cycles for which writing or reading is disabled during the recovery operation is programmable. This value may be based on the clock ratio and the number of clock cycles required to result in a half-full FIFO. That is, the number of respective clock cycles is predetermined to meet an objective of maximal distance between read and write addresses.

Although state 408 is called “STEADY STATE”, the elastic store will generally be progressing either towards full or towards empty. However, while the finite state machines 400 are in the STEADY_STATE state 408 the elastic store 200 is in a more stable condition than that which exists after a boot-up or recovery operation.

The detection of the FIFO FULL or FIFO EMPTY state has been described in conjunction with FIG. 1 . In the new logic circuit 216 , the FIFO FULL state is only reported by output AND gate 308 A to the full OR gate 310 F if the SSW signal received from the read finite state machine 400 W is high, indicating that the write finite state machine 400 W is in the STEADY_STATE state 408 . Similarly, the FIFO EMPTY state is only reported by output AND gate 308 B to the empty OR gate 310 E if the SSR signal received from the read finite state machine 400 R is high, indicating that the read finite state machine 400 R is in the STEADY_STATE state 408 .

The objective of the verification operation is to avoid adjacent read and write addresses. If the read and write addresses are adjacent and one of the clocks slips, then it is possible that a false FIFO FULL or FIFO EMPTY state may be detected. Without boundary verification, it would be very difficult to debug a false FIFO FULL or FIFO EMPTY state occurring on a stable network due to a slip on one of the clocks.

The verification operation is aided by the boundary check unit 206 . The output of the boundary check unit 206 is high if the read address and the write address are adjacent or if the addresses are equal, indicated by an “ADJACENT” signal. The logic performed by the input AND gates 302 C, 302 D that receive input from the S-R latch 114 and the boundary check unit 206 is similar to the logic performed by the sub-circuit 316 .

To declare the FIFO 102 to be in a BOUNDARY FULL state, the direction must be identified as TOWARDS FULL (high) and the write address and the read address, as compared in the boundary check unit 206 , must be ADJACENT (high). The BOUNDARY FULL state is maintained by the corresponding D-latch 304 C and the corresponding flip flop 306 C.

To declare the FIFO 102 to be in a BOUNDARY EMPTY state, the direction must be identified as TOWARDS EMPTY (low) and the write address and the read address, as compared in the boundary check unit 206 , must be ADJACENT (high). The BOUNDARY EMPTY state is maintained by the corresponding D-latch 304 D and the corresponding flip flop 306 D.

In the new logic circuit 216 , the BOUNDARY FULL state is only reported by the appropriate output AND gate 308 C to the full OR gate 310 F if the VW signal received from the write finite state machine 400 W is high, indicating that the write finite state machine 400 W is in the VERIFICATION state 406 . Similarly, the BOUNDARY EMPTY state is only reported by the appropriate output AND gate 308 D to the empty OR gate 310 E if the VR signal received from the read finite state machine 400 R is high, indicating that the read finite state machine 400 R is in the VERIFICATION state 406 .

›DETAILED DESCRIPTION · 3 of 3

When either a FIFO FULL state or a BOUNDARY FULL state is received by the full OR gate 310 F, a FULL state is indicated to the full recovery engine 210 and a recovery operation is initiated by the full recovery engine 210 . The recovery operation, i.e., the disabling of writing at the FIFO 102 through use of the write enable port 122 , is maintained by the full recovery engine 210 for a predetermined number of write clock cycles. Further, when either a FIFO EMPTY state or a BOUNDARY EMPTY state is received by the empty OR gate 310 E, an EMPTY state is indicated to the empty recovery engine 212 and a recovery operation is initiated by the empty recovery engine 212 . The recovery operation, i.e., the disabling of reading at the FIFO 102 through use of the read enable port 126 , is maintained by the empty recovery engine 212 for a predetermined number of read clock cycles. The duration of the recovery operation is programmable and may be, for instance, based on the clock ratio.

At boot-up time, the FSM 400 W, 400 R of the elastic store 200 may loop for a while (START_MODE to VERIFICATION to START_MODE and so on). The design ensures that, after some time, the elastic store 200 will recover from this instability without help from a third party. Also, concern about software resetting the elastic store 200 at an inopportune time, as can happen in other elastic store designs, is alleviated.

Advantageously, the elastic store 200 can operate without external assistance, that is, the elastic store 200 does not require help from a third party when failures occur. Furthermore, the elastic store 200 is programmable for added flexibility.

As will be apparent to a person skilled in the art, the STEADY_STATE state 408 may not be necessary, and the VERIFICATION state 406 may used in place of the STEADY_STATE state 408 . However, it should be noted that a false FULL/EMPTY signal, received while in the VERIFICATION state 406 may be difficult to debug.

Other modifications will be apparent to those skilled in the art and, therefore, the invention is defined in the claims.

Claims as granted

22 claims

Log in to read the claims of this application.

Log in to unlock

Classifications

5 codes
IPC · International Patent Classification
Section G — Physics
  • G06F5/14
Section H — Electricity
  • H03K19/00
USPC · US Patent Classification
326/93326/40326/46

Claim changes

Soon
Coming soonHow the claims changed between publication and grant

See which claims were amended, added or cancelled during examination, with every added and removed word marked.

AmendedAddedCancelledUnchanged

The published claims of this application are not paired with the granted ones in what we hold.

File wrapper

⤢ drag to zoomJan 2001Apr 2001Jul 2001Oct 2001Jan 2002Apr 2002Jul 2002USPTOApplicantNotice of allowance
USPTOApplicanthover for detail · click to open
Pendency
1.2 y
440 days filing → grant
Office actions
0
none on record
Examiner
Michael Tokar
art unit 2819 · TC 2800
Citations: 4 back · 12 forward

See the full prosecution history — every USPTO and applicant action on this file, in order.

Log in to unlock

Documents

Log in to open the documents of this file: the application as filed, every office action and response, the notice of allowance.

Log in to unlock

Chain of title

⤢ drag to zoom20022004200620082010201220142016201820202022Owner 1Owner 3
Titlehover for detail · click to open

See the full assignment history — every owner this patent has passed through, with recordation dates and reel/frame numbers.

Log in to unlock