Claims
- 1. An apparatus for buffering data, comprisinga buffer comprising 2n memory locations for storing said data, each said memory location being associated with an n-bit binary address; a Gray-code formatted n+1-bit binary write counter and a Gray-code formatted n+1-bit binary read counter; a control circuit storing data in said buffer by storing said data in a memory location associated with a current value of said n+1-bit binary write counter and incrementing said n+1-bit binary write counter in accordance with said Gray-code format, only when a current value of said n+1 bits of said binary write counter have a predetermined relationship to a current value of said n+1 bits of said binary read counter, said control circuit reading data from said buffer by reading said data from a memory location associated with a current value of said n+1-bit binary read counter and inrcrementing said n+1-bit binary read counter in accordance with said Gray-code format, only when a current value of said n+1 bits of said binary read counter have a predetermined relationship to a current value of said n+1 bits of said binary write counter.
- 2. The apparatus of claim 1, wherein said control circuitforms an n+1-bit binary read address from a logical function of said n+1-bit binary read counter, and forms an n+1-bit binary write address from a logical function of said n+1-bit binary write counter, wherein data is stored in said buffer at a memory location associated with said n+1-bit write address and data is read from said buffer from a memory location associated with said n+1-bit binary read counter.
- 3. The apparatus of claim 2, wherein said control circuit stores said data in a memory location associated with the n least significant bits of said n+1-bit binary write address.
- 4. The apparatus of claim 2, wherein said control circuit reads data from said buffer from a memory location associated with the n least significant bits of said n+1-bit binary read address.
- 5. The apparatus of claim 4, wherein said control circuit stores data in said buffer in a memory location associated with the n least significant bits of said n+1-bit binary write address.
- 6. The apparatus of claim 5 wherein said control circuit stores data in said buffer only when a most significant bit of said n+1-bit binary write address is equal to a most significant bit of said n+1-bit binary read address, or said n least significant bits of said n+1-bit binary write address are not equal to said n least significant bits of said n+1-bit binary read address.
- 7. The apparatus of claim 5 wherein said control circuit reads data from said buffer only when a most significant bit of said n+1-bit binary write address is not equal to a most significant bit of said n+1-bit binary read address, or said n least significant bits of said n+1-bit binary write address are not equal to said n least significant bits of said n+1-bit binary read address.
- 8. The apparatus of claim 1 wherein said control circuitstores data in said buffer in synchrony with a first clock signal, and reads data from said buffer in synchrony with a second clock different in frequency than, and asynchronous relative to, said first clock.
- 9. The apparatus of claim 8 wherein said control circuit further comprisesa latch latching a current value of said n+1 bits of said binary read counter in synchrony with said first clock, and a comparator comparing the latched values of said n+1 bits of said binary read counter to a current value of said n+1 bits of said binary write counter to determine whether said read and write counters have said predetermined relationship.
- 10. The apparatus of claim 9 wherein said latch comprisesa first stage latching a current value of said n+1 bits of said binary read counter in synchrony with said first clock, and a second stage re-latching said current values of said n+1 bits of said binary read counter latched in said first latching stage, in synchrony with said first clock, whereby the likelihood for metastability in said latched values of said n+1 bits of said binary read counter is reduced.
- 11. The apparatus of claim 8 wherein said control circuit further comprisesa latch latching a current value of said n+1 bits of said binary write counter in synchrony with said second clock, and a comparator comparing the latched values of said n+1 bits of said binary write counter to a current value of said n+1 bits of said binary read counter to determine whether said write and read counters have said predetermined relationship.
- 12. The apparatus of claim 11 wherein said latch comprisesa first stage latching a current value of said n+1 bits of said binary write counter in synchrony with said second clock, and a second stage re-latching said current values of said n+1 bits of said binary write counter latched in said first latching stage, in synchrony with said second clock, whereby the likelihood for metastability in said latched values of said n+1 bits of said binary write counter is reduced.
CROSS REFERENCE TO RELATED APPLICATION
This application is a continuation of application Ser. No. 08/846,948, filed Apr. 30, 1997, now U.S. Pat. No. 5,960,468, issued Sep. 28, 1999.
US Referenced Citations (8)
Foreign Referenced Citations (2)
| Number |
Date |
Country |
| 0 579 375 |
Jan 1994 |
EP |
| 2 291 231 |
Jan 1996 |
GB |
Continuations (1)
|
Number |
Date |
Country |
| Parent |
08/846948 |
Apr 1997 |
US |
| Child |
09/255223 |
|
US |