1. Field of the Invention
The present invention relates to a data reading circuit, and particularly relates to a data reading circuit which adjusts according to a delay state of the data reading clock signal of the memory.
2. Description of the Prior Art
In modern electronics, a memory is used for storing various kinds of data, where a data reading clock signal is used for reading the data in the memory. The elements and connection lines of an electronic apparatus become complicated as related techniques improve, however, potentially resulting in delay of the data reading clock signal. Such an error may be caused by the delay when reading data through a pad. If the memory is used for ASICs (Application Specific Integrated Circuit), such a problem becomes even more serious. Because each ASIC has its different characteristics, the system may be unstable and a design error will occur if the problem of a delayed data read clock signal is not solved.
Many inventions and related techniques are developed for solving this problem.
Therefore, a new invention is desired for solving the above-mentioned problems.
Therefore, one objective of the present invention is to provide a data reading circuit, which immediately adjusts the read data by a plurality of signals having specific relations for decreasing data reading error due to signal delay.
Another objective of the present invention is to provide a data reading circuit for a memory, which adjusts read data on time by utilizing the data reading clock signal for reading memory data and specific signals relative to the data reading clock signal, such that data reading error due to signal delay can be decreased.
One embodiment of the present invention discloses a data reading circuit, comprising: a first register, for receiving a first data signal and for sampling the first data signal according to the first edges of a first predetermined signal to generate a second data signal; a second register, coupled to the first register, for sampling the second data signal according to the second edges of a second predetermined signal to generate a third data signal; a first selector, coupled to the second register, for selecting one of the second and third data signals as a fourth data signal according to the phases of the first and second predetermined signals; a second selector, coupled to the first selector, for selecting one of the fourth and a fifth data signals as a sixth data signal according to an enable signal; and a third register, coupled to the second selector, for sampling the sixth data signal according to the first edges of the second predetermined signal to generate the fifth data signal.
If the data reading circuit is used for the memory, the second predetermined signal is a data reading clock signal for reading the data of the memory.
Another embodiment of the present invention discloses a data reading method, comprising: receiving a first data signal; sampling the first data signal according to the first edges of a first predetermined signal to generate a second data signal; sampling the second data signal according to the second edges of a second predetermined signal to generate a third data signal; determining if the phase error of the first predetermined signal and the second predetermined signal is larger than a predetermined value, if yes, selecting the second signal as the fourth data signal, if no, selecting the third signal as the fourth data signal; and utilizing the second predetermined signal to sample the fourth data signal for obtaining a correct data signal.
According to the above-mentioned circuit and method, the data read can be adjusted regardless of the frequency or delay of the data reading signal.
These and other objectives of the present invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiment that is illustrated in the various figures and drawings.
The data reading circuit 200 not only can be used for reading memory, but can also be used for reading other data. The second predetermined signal PS2 can be a data reading clock signal for reading data in a memory. The data reading circuit 200 can be used for an ASIC. In this embodiment, the first edge of the first predetermined signal PS1 is a rising edge, and the first and second edges of the second predetermined signal PS2 are the rising edge and the falling edge respectively. The edges for sampling can be changed according to different requirements.
Furthermore, the delay clock signal generating circuit 300 shown in
The enable signal ES can be generated by using the enable signal generator 400 shown in
When the data signal enters the data reading circuit 200, the data reading circuit 200 uses the first predetermined signal PS1 to determine which one of the data reading clock signal phases is used for reading data, and uses the enable signal ES to determine which clock of the first predetermined signal PS1 is used for reading data. In other words, correct data reading timings can be obtained through this circuit, which also compensates the above-mentioned signal delay issue to obtain correct data. Furthermore, the falling edges of the second predetermined signal PS2 can be used for sampling input data to increase accuracy of data corresponding to the relation between the data signal and the first predetermined signal PS1, which is described as follows.
If the read data is correct and the timing for reading data does not need to be adjusted, the enable signal ES selects the fifth data signal DS5 as the sixth data signal DS6, such that the output circulates continuously. If the read data is incorrect and the timing for reading data needs to be adjusted, the enable signal ES selects the fourth data signal DS4 as the sixth data signal DS6. In general, such methods are used when the data signal DS1 read by the second predetermined signal PS2 is delayed by less than 180°. Although such methods can also be applied when the data signal DS1 read by the second predetermined signal is delayed by a predetermined value, the suggestions provided above are not meant to limit the scope of the present invention.
As described above, the enable signal ES is used for determining the clock of the second predetermined signal PS2 which starts reading the data starts. In this case, the data starts to be read at the fifth clock T5. Next, the sixth data signal DS6 is sampled by the second predetermined signal PS2 to generate the fifth data signal DS5. If the read data is correct and the timing for reading data does not need to be adjusted, the enable signal ES selects the fifth data signal DS5 as the sixth data signal DS6, such that the output circulates continuously. If the read data is incorrect and the timing for reading data needs to be adjusted, the enable signal ES selects the fourth data signal DS4 as the sixth data signal DS6. Normally, such a method can be used if the data signal DS1 read by the second predetermined signal PS2 is delayed by more than 180°.
It should be noted that, although the data signal is sampled by the rising edges of the first predetermined signal PS1 and is adjusted by the falling edges of the second predetermined signal PS2, this embodiment is not meant to limit the scope of the present invention. For example, the data signal can be sampled by the falling edges of the first predetermined signal PS1 and adjusted by the rising edges of the second predetermined signal PS2, and this should also fall within the scope of the present invention.
Detailed characteristics of this method can be obtained according to the above-mentioned circuit.
By using the above-mentioned circuit, the synchronization circuit can be omitted and correct data can be obtained for any delay or operation frequency. If the circuit or method according to the present invention is used for FPGAs (Field-Programmable Gate Array) or ASICs, the same reading circuit used provides integrity of the whole circuit.
Those skilled in the art will readily observe that numerous modifications and alterations of the device and method may be made while retaining the teachings of the invention. Accordingly, the above disclosure should be construed as limited only by the metes and bounds of the appended claims.
| Number | Date | Country | Kind |
|---|---|---|---|
| 95143072 A | Nov 2006 | TW | national |
| Number | Name | Date | Kind |
|---|---|---|---|
| 5467464 | Oprescu et al. | Nov 1995 | A |
| 5864706 | Kurokawa et al. | Jan 1999 | A |
| 6052329 | Nishino | Apr 2000 | A |
| 6316980 | Vogt et al. | Nov 2001 | B1 |
| 6401213 | Jeddeloh | Jun 2002 | B1 |
| 6529424 | Koutsoures | Mar 2003 | B2 |
| 6847558 | Fischaber | Jan 2005 | B1 |
| 6925014 | Fischaber | Aug 2005 | B1 |
| 6940768 | Dahlberg et al. | Sep 2005 | B2 |
| 20070064850 | Tamura | Mar 2007 | A1 |
| Number | Date | Country | |
|---|---|---|---|
| 20080117693 A1 | May 2008 | US |