CN101521567B - Sampling method and its data recovery circuit - Google Patents
Sampling method and its data recovery circuit Download PDFInfo
- Publication number
- CN101521567B CN101521567B CN2008100813124A CN200810081312A CN101521567B CN 101521567 B CN101521567 B CN 101521567B CN 2008100813124 A CN2008100813124 A CN 2008100813124A CN 200810081312 A CN200810081312 A CN 200810081312A CN 101521567 B CN101521567 B CN 101521567B
- Authority
- CN
- China
- Prior art keywords
- clock
- sampling
- digital signal
- edge
- module
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000005070 sampling Methods 0.000 title claims abstract description 478
- 238000000034 method Methods 0.000 title claims abstract description 67
- 238000011084 recovery Methods 0.000 title claims abstract description 39
- 230000007704 transition Effects 0.000 claims abstract description 95
- 230000000630 rising effect Effects 0.000 claims description 15
- 230000001360 synchronised effect Effects 0.000 claims description 9
- 238000013459 approach Methods 0.000 claims description 6
- 230000003247 decreasing effect Effects 0.000 claims 1
- 238000010586 diagram Methods 0.000 description 27
- 102100040844 Dual specificity protein kinase CLK2 Human genes 0.000 description 8
- 101000749291 Homo sapiens Dual specificity protein kinase CLK2 Proteins 0.000 description 8
- 230000008569 process Effects 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 238000010187 selection method Methods 0.000 description 3
- 102100040862 Dual specificity protein kinase CLK1 Human genes 0.000 description 2
- 101000749294 Homo sapiens Dual specificity protein kinase CLK1 Proteins 0.000 description 2
- 238000012952 Resampling Methods 0.000 description 2
- 239000008186 active pharmaceutical agent Substances 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 230000001934 delay Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 239000002184 metal Substances 0.000 description 2
- 230000008878 coupling Effects 0.000 description 1
- 238000010168 coupling process Methods 0.000 description 1
- 238000005859 coupling reaction Methods 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Images
Landscapes
- Synchronisation In Digital Transmission Systems (AREA)
Abstract
Description
技术领域technical field
本发明涉及一种取样方法及其数据恢复电路,且特别是涉及一种可提高数据取样的正确性的取样方法及其数据恢复电路。The invention relates to a sampling method and a data recovery circuit thereof, and in particular to a sampling method capable of improving the correctness of data sampling and a data recovery circuit thereof.
背景技术Background technique
在高速串行连结(serial link)系统中,常常会因为半导体制程的飘移或芯片布局不一致,又或者是因为内连金属线(wire-interconnect)的长度差异、温度变化、中继元件(intermediate devices)的变化、电容耦合、金属部分的瑕疵(material imperfections)以及时钟与信号信道的输入电容差异...等因素,而导致接收端所接收到的时钟(在本发明的相关领域中,时钟的英文为strobe)与数据有不同步或间隙(skew)的情况。In the high-speed serial link system, it is often caused by the drift of the semiconductor process or the inconsistency of the chip layout, or because of the length difference of the internal metal wire (wire-interconnect), temperature change, intermediate devices (intermediate devices) ) changes, capacitive coupling, metal imperfections (material imperfections), and the input capacitance difference between the clock and the signal channel... and other factors, resulting in the clock received by the receiving end (in the related field of the present invention, the clock's English is strobe) and the data are out of sync or gap (skew).
图1为在接收端所接收到的时钟与数字信号的时序图。如图1所示,当接收端所接收的时钟CLK1与其锁相环(phase locked loop,简称PLL)的时钟CLK2同步时,便会利用时钟CLK2的下降缘(falling edge)对接收的数字信号DATA进行取样。在理想的情况下,数字信号DATA的数据转态(transition)点与时钟CLK2的上升缘对齐。如此一来,时钟CLK2的下降缘就会在每一位的中间点(也就是最佳的数据取样点,如标记102所示)来进行数据取样,以保证取得正确的数据。Figure 1 is a timing diagram of the clock and digital signals received at the receiving end. As shown in Figure 1, when the clock CLK1 received by the receiver is synchronized with the clock CLK2 of its phase locked loop (PLL), the falling edge (falling edge) of the clock CLK2 will be used to update the received digital signal DATA Take a sample. Ideally, the data transition point of the digital signal DATA is aligned with the rising edge of the clock CLK2. In this way, the falling edge of the clock CLK2 will perform data sampling at the middle point of each bit (that is, the best data sampling point, as shown by mark 102 ), so as to ensure that correct data is obtained.
然而,在数字信号DATA落后或领先于时钟CLK2时,就会有间隙出现,如图2所示。图2为在接收端所接收到的时钟与数据的另一时序图。当数字信号DATA的数据转态点与时钟CLK2的上升缘没有对齐,便产生了间隙202。若间隙202太大,导致时钟CLK2的下降缘刚好落在数字信号DATA的数据转态点附近(如标记204所示),便容易取样到错误的数据。However, when the digital signal DATA is behind or ahead of the clock CLK2, there will be a gap, as shown in FIG. 2 . FIG. 2 is another timing diagram of clock and data received at the receiving end. The
为了避免取样到错误的数据,美国专利第5905769号提出一种超取样(over sampling)技术,如图3所示。图3为超取样技术的取样时钟与数字信号的一时序图。在此图中,标记24-1-24-12皆表示为取样时钟的上升缘(rising edge)或下降缘,该些边缘可称为取样边缘,而标记28-1-28-4则表示数字信号DATA的其中四个位,且位28-1-28-4的值分别为1、0、1及0。至于标记S[0]-S[11]则表示为不同时间下的取样结果,每一取样结果上方的数字表示其取样值。由此图可看出取样频率已被提高,以致于每个位可被取样三次。以前三个取样结果S[0]-S[2]为例,由于这三个取样结果的取样值皆为1,故可判定第一个位(即位28-1)的值为1。In order to avoid sampling wrong data, US Patent No. 5905769 proposes an over sampling (over sampling) technology, as shown in FIG. 3 . FIG. 3 is a timing diagram of sampling clocks and digital signals of the over-sampling technique. In this figure, marks 24-1-24-12 all represent the rising edge (rising edge) or falling edge of the sampling clock, and these edges can be called sampling edges, and marks 28-1-28-4 represent digital Among the four bits of the signal DATA, the values of the bits 28-1-28-4 are 1, 0, 1 and 0, respectively. As for the marks S[0]-S[11], they represent the sampling results at different times, and the number above each sampling result represents its sampling value. From this figure it can be seen that the sampling frequency has been increased so that each bit can be sampled three times. Taking the previous three sampling results S[0]-S[2] as an example, since the sampling values of these three sampling results are all 1, it can be determined that the value of the first bit (ie bit 28-1) is 1.
以这样的取样技术来进行取样,在数字信号与取样时钟不同步的情况之下,还是可取样到正确的数据,如图4所示。图4为超取样技术的取样时钟与数字信号的另一时序图。请参照图4,同样以前三个取样结果S[0]-S[2]为例,由于在这三个取样结果的取样值当中有二个取样值为1,只有一个取样值为0,故亦可判定第一个位(即位28-1)的值为1。换句话说,三个取样值当中只要有二个取样值一样,便以此相同值作为被取样位的值。Sampling with such a sampling technique can still sample correct data when the digital signal is not synchronized with the sampling clock, as shown in Figure 4. FIG. 4 is another timing diagram of the sampling clock and the digital signal of the over-sampling technique. Please refer to Fig. 4, take the previous three sampling results S[0]-S[2] as an example, because there are two sampling values of 1 among the sampling values of these three sampling results, and only one sampling value is 0, so It can also be determined that the value of the first bit (ie, bit 28-1) is 1. In other words, as long as two sampled values are the same among the three sampled values, the same value is used as the value of the sampled bit.
然而,即使这种超取样技术能够提升数据取样的正确性,但在数字信号与取样时钟的间隙过大,使得取样边缘落在数据转态点的情况之下,通过这种方法来判断被取样位的值,便会发生判断错误的情况。However, even if this oversampling technique can improve the accuracy of data sampling, if the gap between the digital signal and the sampling clock is too large, so that the sampling edge falls on the data transition point, the sampled data can be judged by this method. If the value of the bit is changed, a judgment error will occur.
发明内容Contents of the invention
本发明的目的就是在提供一种取样方法,其可提高数据取样的正确性。The purpose of the present invention is to provide a sampling method, which can improve the accuracy of data sampling.
本发明的另一目的是提供一种数据恢复电路,其运用本发明的取样方法,以提高数据取样的正确性。Another object of the present invention is to provide a data recovery circuit, which uses the sampling method of the present invention to improve the accuracy of data sampling.
基于上述及其它目的,本发明提出一种取样方法,此取样方法的步骤包括:首先,提供第一时钟、第二时钟、第三时钟及第四时钟,每一时钟的频率相同,且第二时钟落后第一时钟第一预设相位,而第三时钟及第四时钟分别落后第一时钟及第二时钟第二预设相位,且第二预设相位为第一预设相位的一半。接着,分别利用第一时钟及第二时钟取样数字信号,且皆以第一时钟及第二时钟的上升缘或下降缘作为取样边缘,其中,数字信号的位长度与第一时钟、第二时钟、第三时钟及第四时钟的时钟周期相等。然后,依据第一时钟及第二时钟的取样结果判断数字信号的数据转态点的位置。接着,依据判断结果选择以第三时钟或第四时钟作为较佳取样时钟。然后,利用较佳取样时钟取样数字信号,其中,较佳取样时钟的取样边缘与第一时钟的取样边缘相同。Based on the above and other purposes, the present invention proposes a sampling method. The steps of the sampling method include: first, providing the first clock, the second clock, the third clock and the fourth clock, each clock has the same frequency, and the second The clock is behind the first clock by a first preset phase, and the third clock and the fourth clock are respectively behind the first clock and the second clock by a second preset phase, and the second preset phase is half of the first preset phase. Then, use the first clock and the second clock to sample the digital signal respectively, and use the rising edge or falling edge of the first clock and the second clock as the sampling edge, wherein the bit length of the digital signal is the same as that of the first clock and the second clock , clock periods of the third clock and the fourth clock are equal. Then, the position of the data transition point of the digital signal is judged according to the sampling results of the first clock and the second clock. Next, the third clock or the fourth clock is selected as a better sampling clock according to the judgment result. Then, the digital signal is sampled using a preferred sampling clock, wherein the sampling edge of the preferred sampling clock is the same as the sampling edge of the first clock.
基于上述及其它目的,本发明提出一种数据恢复电路,此数据恢复电路包括有超取样模块、时间重置模块及间隙控制模块。超取样模块用以接收第一时钟、第二时钟、第三时钟及第四时钟,每一时钟的频率相同,且第二时钟落后第一时钟第一预设相位,而第三时钟及第四时钟分别落后第一时钟及第二时钟第二预设相位,且第二预设相位为第一预设相位的一半。在第一期间中,超取样模块利用第一时钟及第二时钟取样数字信号,且皆以第一时钟及第二时钟的上升缘或下降缘作为取样边缘。在第二期间中,超取样模块利用第三时钟及第四时钟取样数字信号,且第三时钟及第四时钟的取样边缘与第一时钟的取样边缘相同。此外,超取样模块还将取样结果转换为并列数据,以作为超取样模块的输出,而上述的数字信号的位长度与上述四个时钟的时钟周期相等。时间重置模块用以同步超取样模块所输出的并列数据,以产生同步结果。间隙控制模块在第一期间中,依据同步结果判断数字信号的数据转态点的位置,以依据判断结果选择第三时钟或第四时钟作为较佳取样时钟,而在第二期间中,间隙控制模块控制时间重置模块,使时间重置模块从同步结果中选择由较佳取样时钟所获得的同步并列数据,以作为数据恢复电路的输出。Based on the above and other objectives, the present invention proposes a data recovery circuit, which includes an oversampling module, a time reset module and a gap control module. The oversampling module is used to receive the first clock, the second clock, the third clock and the fourth clock, each clock has the same frequency, and the second clock lags behind the first clock by the first preset phase, and the third clock and the fourth clock The clock lags behind the first clock and the second clock by a second preset phase respectively, and the second preset phase is half of the first preset phase. During the first period, the over-sampling module uses the first clock and the second clock to sample the digital signal, and takes the rising edge or falling edge of the first clock and the second clock as the sampling edge. During the second period, the over-sampling module uses the third clock and the fourth clock to sample the digital signal, and the sampling edges of the third clock and the fourth clock are the same as the sampling edges of the first clock. In addition, the over-sampling module converts the sampling result into parallel data as an output of the over-sampling module, and the bit length of the above-mentioned digital signal is equal to the clock period of the above-mentioned four clocks. The time reset module is used for synchronizing the parallel data output by the oversampling module to generate a synchronization result. In the first period, the gap control module judges the position of the data transition point of the digital signal according to the synchronization result, so as to select the third clock or the fourth clock as a better sampling clock according to the judgment result, and in the second period, the gap control module The module controls the time reset module, so that the time reset module selects the synchronous parallel data obtained by the better sampling clock from the synchronization results as the output of the data recovery circuit.
基于上述及其它目的,本发明提出另一种数据恢复电路,此数据恢复电路包括有超取样模块、时间重置模块及间隙控制模块。超取样模块接收第一时钟、第二时钟、第三时钟、第四时钟、第五时钟、第六时钟、第七时钟及第八时钟,每一时钟的频率相同,且第二时钟落后第一时钟第一预设相位,第三时钟及第四时钟分别落后第一时钟及第二时钟第二预设相位,而第五时钟、第六时钟、第七时钟及第八时钟分别落后第一时钟、第二时钟、第三时钟及第四时钟第三预设相位,且第二预设相位为第一预设相位的一半,而第三预设相位为第二预设相位的一半。在第一期间中,超取样模块利用第一时钟及第二时钟取样数字信号,且皆以第一时钟及第二时钟的上升缘或下降缘作为取样边缘。在第二期间中,超取样模块利用第三时钟及第四时钟取样数字信号,且第三时钟及第四时钟的取样边缘与第一时钟的取样边缘相同。在第三期间中,超取样模块利用第五时钟及第六时钟来取样数字信号,或利用第七时钟及第八时钟来取样数字信号。其中,第五时钟、第六时钟、第七时钟及第八时钟的取样边缘与第一时钟的取样边缘相同。此外,超取样模块将取样结果转换为并列数据,以作为超取样模块的输出,而上述的数字信号的位长度与上述八个时钟的时钟周期相等。时间重置模块用以同步超取样模块所输出的并列数据,以产生同步结果。间隙控制模块在第一期间中,依据同步结果判断数字信号的数据转态点的位置,以依据判断结果选择第三时钟或第四时钟作为较佳取样时钟。在第二期间中,间隙控制模块依据同步结果判断数字信号的数据转态点的位置,并依据判断结果选择与较佳取样时钟相差第三预设相位的二个时钟的其中之一作为最佳取样时钟。在第三期间中,间隙控制模块控制超取样模块选择最佳取样时钟以及与最佳取样时钟相差第一预设相位的时钟来进行取样,并控制时间重置模块,使时间重置模块从同步结果中选择由最佳取样时钟所获得的同步并列数据,以作为数据恢复电路的输出。Based on the above and other objectives, the present invention proposes another data recovery circuit, which includes an oversampling module, a time reset module and a gap control module. The oversampling module receives the first clock, the second clock, the third clock, the fourth clock, the fifth clock, the sixth clock, the seventh clock and the eighth clock, each clock has the same frequency, and the second clock lags behind the first The first preset phase of the clock, the third clock and the fourth clock are respectively behind the first clock and the second preset phase of the second clock, and the fifth clock, the sixth clock, the seventh clock and the eighth clock are respectively behind the first clock , the third preset phase of the second clock, the third clock and the fourth clock, and the second preset phase is half of the first preset phase, and the third preset phase is half of the second preset phase. During the first period, the over-sampling module uses the first clock and the second clock to sample the digital signal, and takes the rising edge or falling edge of the first clock and the second clock as the sampling edge. During the second period, the over-sampling module uses the third clock and the fourth clock to sample the digital signal, and the sampling edges of the third clock and the fourth clock are the same as the sampling edges of the first clock. During the third period, the over-sampling module uses the fifth clock and the sixth clock to sample the digital signal, or uses the seventh clock and the eighth clock to sample the digital signal. Wherein, the sampling edges of the fifth clock, the sixth clock, the seventh clock and the eighth clock are the same as the sampling edges of the first clock. In addition, the over-sampling module converts the sampling result into parallel data as an output of the over-sampling module, and the bit length of the above-mentioned digital signal is equal to the clock period of the above-mentioned eight clocks. The time reset module is used for synchronizing the parallel data output by the oversampling module to generate a synchronization result. During the first period, the gap control module judges the position of the data transition point of the digital signal according to the synchronization result, so as to select the third clock or the fourth clock as a better sampling clock according to the judgment result. During the second period, the gap control module judges the position of the data transition point of the digital signal according to the synchronization result, and selects one of the two clocks with a third preset phase difference from the better sampling clock as the best according to the judgment result. sampling clock. During the third period, the gap control module controls the oversampling module to select the best sampling clock and the clock with the first preset phase difference from the best sampling clock to sample, and controls the time reset module to make the time reset module synchronize from As a result, the synchronous parallel data obtained by the optimal sampling clock is selected as the output of the data recovery circuit.
依照本发明一实施例所述,其还包括依据数字信号的数据转态点所处的位置来控制数字信号的延迟时间,以使数字信号的位的中间点被调整至较(/最)佳取样时钟的取样边缘,或使数字信号的位的中间点趋近较(/最)佳取样时钟的取样边缘。According to an embodiment of the present invention, it also includes controlling the delay time of the digital signal according to the position of the data transition point of the digital signal, so that the middle point of the bit of the digital signal is adjusted to a better (/best) The sampling edge of the sampling clock, or the sampling edge of the better (/best) sampling clock where the midpoint of the bit of the digital signal approaches.
本发明因提供四个频率相同,但具有不同相位延迟的取样时钟,且其中的第二时钟落后第一时钟第一预设相位,而第三时钟及第四时钟则分别落后第一时钟及第二时钟第二预设相位,第二预设相位为第一预设相位的一半。接着,利用第一时钟及第二时钟来判断数字信号的数据转态点位置,并从第三时钟及第四时钟当中选择出取样边缘较接近数字信号的位中间点的时钟来作为较佳取样时钟,以利用较佳取样时钟来取样数字信号,进而提高数据取样的正确性。甚至,本发明还可搭配利用调整数字信号的延迟时间的技巧,以使数字信号的位的中间点被调整至较佳取样时钟的取样边缘,或使数字信号的位的中间点趋近较佳取样时钟的取样边缘,以更进一步地提高数据取样的正确性。The present invention provides four sampling clocks with the same frequency but with different phase delays, and the second clock lags behind the first clock by the first preset phase, while the third clock and the fourth clock lag behind the first clock and the second clock respectively. The second preset phase of the second clock is half of the first preset phase. Next, use the first clock and the second clock to judge the data transition point position of the digital signal, and select the clock whose sampling edge is closer to the middle point of the digital signal from the third clock and the fourth clock as a better sample clock, to use a better sampling clock to sample digital signals, thereby improving the accuracy of data sampling. Even, the present invention can also be combined with the technique of adjusting the delay time of the digital signal, so that the middle point of the bit of the digital signal is adjusted to the sampling edge of the better sampling clock, or the middle point of the bit of the digital signal approaches the better The sampling edge of the sampling clock to further improve the accuracy of data sampling.
基于上述及其它目的,本发明还提出一种取样方法,包括:提供一第一时钟、一第二时钟、一第三时钟及一第四时钟,每一时钟的频率相同,且该第二时钟落后该第一时钟一第一预设相位,而该第三时钟及该第四时钟分别落后该第一时钟及该第二时钟一第二预设相位,且该第二预设相位为该第一预设相位的一半;分别利用该第一时钟及该第二时钟取样一数字信号,且皆以该第一时钟及该第二时钟的上升缘或下降缘作为取样边缘,其中,该数字信号的位长度与该第一时钟、该第二时钟、该第三时钟及该第四时钟的时钟周期相等;依据该第一时钟及该第二时钟的取样结果判断该数字信号的数据转态点的位置;依据判断结果选择以该第三时钟或该第四时钟作为一较佳取样时钟;依据该数字信号的数据转态点所处的位置来控制该数字信号的延迟时间,以使该数字信号的位的中间点被调整至该较佳取样时钟的取样边缘,或使该数字信号的位的中间点趋近该较佳取样时钟的取样边缘;以及利用该较佳取样时钟取样该数字信号,其中,该较佳取样时钟的取样边缘与该第一时钟的取样边缘相同。Based on the above and other purposes, the present invention also proposes a sampling method, including: providing a first clock, a second clock, a third clock and a fourth clock, each clock has the same frequency, and the second clock lagging behind the first clock by a first preset phase, and the third clock and the fourth clock lagging behind the first clock and the second clock by a second preset phase respectively, and the second preset phase is the first clock Half of a preset phase; use the first clock and the second clock to sample a digital signal respectively, and use the rising edge or falling edge of the first clock and the second clock as the sampling edge, wherein the digital signal The bit length is equal to the clock period of the first clock, the second clock, the third clock and the fourth clock; judge the data transition point of the digital signal according to the sampling results of the first clock and the second clock position; select the third clock or the fourth clock as a better sampling clock according to the judgment result; control the delay time of the digital signal according to the position of the data transition point of the digital signal, so that the digital the midpoint of the bit of the signal is adjusted to the sampling edge of the preferred sampling clock, or the midpoint of the bit of the digital signal is brought closer to the sampling edge of the preferred sampling clock; and the digital signal is sampled using the preferred sampling clock , wherein the sampling edge of the preferred sampling clock is the same as the sampling edge of the first clock.
基于上述及其它目的,本发明还提出一种数据恢复电路,包括:一超取样模块,接收一第一时钟、一第二时钟、一第三时钟及一第四时钟,每一时钟的频率相同,且该第二时钟落后该第一时钟一第一预设相位,而该第三时钟及该第四时钟分别落后该第一时钟及该第二时钟一第二预设相位,且该第二预设相位为该第一预设相位的一半,在一第一期间中,该超取样模块利用该第一时钟及该第二时钟取样一数字信号,且皆以该第一时钟及该第二时钟的上升缘或下降缘作为取样边缘,在一第二期间中,该超取样模块利用该第三时钟及该第四时钟取样该数字信号,且该第三时钟及该第四时钟的取样边缘与该第一时钟的取样边缘相同,该超取样模块将取样结果转换为并列数据,以作为该超取样模块的输出,其中,该数字信号的位长度与上述四个时钟的时钟周期相等;一时间重置模块,用以同步该超取样模块所输出的并列数据,以产生一同步结果;一间隙控制模块,在该第一期间中,该间隙控制模块依据该同步结果判断该数字信号的数据转态点的位置,以依据判断结果选择该第三时钟或该第四时钟作为一较佳取样时钟,而在该第二期间中,该间隙控制模块控制该时间重置模块,使该时间重置模块从该同步结果中选择由该较佳取样时钟所获得的同步并列数据,以作为该数据恢复电路的输出;以及一可变延迟模块,该超取样模块通过该可变延迟模块接收该数字信号,该可变延迟模块依据一第一控制信号来控制该数字信号的延迟时间,且在该第二期间中,该间隙控制模块更依据该数字信号的数据转态点所处的位置来产生该第一控制信号。Based on the above and other purposes, the present invention also proposes a data recovery circuit, including: an oversampling module, receiving a first clock, a second clock, a third clock and a fourth clock, and the frequency of each clock is the same , and the second clock is behind the first clock by a first preset phase, and the third clock and the fourth clock are behind the first clock and the second clock by a second preset phase, and the second The preset phase is half of the first preset phase. In a first period, the oversampling module uses the first clock and the second clock to sample a digital signal, and both use the first clock and the second clock to sample a digital signal. The rising edge or falling edge of the clock is used as the sampling edge. In a second period, the oversampling module uses the third clock and the fourth clock to sample the digital signal, and the sampling edge of the third clock and the fourth clock Same as the sampling edge of the first clock, the oversampling module converts the sampling result into parallel data as the output of the oversampling module, wherein the bit length of the digital signal is equal to the clock period of the above four clocks; A time reset module, used to synchronize the parallel data output by the oversampling module to generate a synchronization result; a gap control module, in the first period, the gap control module judges the data of the digital signal according to the synchronization result The position of the transition point, to select the third clock or the fourth clock as a better sampling clock according to the judgment result, and in the second period, the gap control module controls the time reset module to make the time reset a setting module selects synchronous parallel data obtained by the better sampling clock from the synchronization result as the output of the data recovery circuit; and a variable delay module through which the oversampling module receives the digital signal, the variable delay module controls the delay time of the digital signal according to a first control signal, and in the second period, the gap control module further generates according to the position of the data transition point of the digital signal the first control signal.
为让本发明的上述和其它目的、特征和优点能更明显易懂,下文特举较佳实施例,并配合附图,作详细说明如下。In order to make the above and other objects, features and advantages of the present invention more comprehensible, preferred embodiments are described below in detail with accompanying drawings.
附图说明Description of drawings
图1为在接收端所接收到的时钟与数字信号的时序图。Figure 1 is a timing diagram of the clock and digital signals received at the receiving end.
图2为在接收端所接收到的时钟与数据的另一时序图。FIG. 2 is another timing diagram of clock and data received at the receiving end.
图3为超取样技术的取样时钟与数字信号的一时序图。FIG. 3 is a timing diagram of sampling clocks and digital signals of the over-sampling technique.
图4为超取样技术的取样时钟与数字信号的另一时序图。FIG. 4 is another timing diagram of the sampling clock and the digital signal of the over-sampling technique.
图5(a)-图5(c)、6(a)-图6(c)、图7(a)-图7(b)、图8(a)-图8(c)、图9(a)-图9(c)及图10(a)-图10(b)皆为依照本发明的取样方法的说明图。Figure 5(a)-Figure 5(c), Figure 6(a)-Figure 6(c), Figure 7(a)-Figure 7(b), Figure 8(a)-Figure 8(c), Figure 9( a)-FIG. 9(c) and FIG. 10(a)-FIG. 10(b) are explanatory diagrams of the sampling method according to the present invention.
图11为应用本发明的取样系统的其中一较佳操作流程图。FIG. 11 is a flow chart of one preferred operation of the sampling system of the present invention.
图12、图13、图15及图16皆为采用本发明的取样方法的其中一数据恢复电路的方块图。FIG. 12 , FIG. 13 , FIG. 15 and FIG. 16 are block diagrams of one of the data recovery circuits adopting the sampling method of the present invention.
图14为可变延迟模块1240的其中一种实施方式的电路方块图。FIG. 14 is a circuit block diagram of one implementation of the
图17为依照本发明一实施例的取样方法的流程图。FIG. 17 is a flowchart of a sampling method according to an embodiment of the present invention.
附图元件符号说明Explanation of symbols in drawings
24-1-24-12:取样边缘24-1-24-12: Sampling Edge
28-1-28-4:位28-1-28-4: bits
102、204:标记102, 204: mark
202:间隙202: Gap
1102-1112、1702-1710:步骤1102-1112, 1702-1710: Steps
1210、1510:超取样模块1210, 1510: Oversampling module
1212、1214、1414、1426、1512、1514:多路复用器1212, 1214, 1414, 1426, 1512, 1514: Multiplexers
1216、1516:超取样电路1216, 1516: Oversampling circuit
1220、1520:时间重置模块1220, 1520: Time reset module
1230、1530:间隙控制模块1230, 1530: gap control module
1240、1540:可变延迟模块1240, 1540: variable delay module
1410:第一阶段延迟控制电路1410: First stage delay control circuit
1420:第二阶段延迟控制电路1420: Second stage delay control circuit
1411-1413、1421-1425:延迟单元1411-1413, 1421-1425: delay unit
A、B、C、D、A’、B’、C’、D’、CLK1、CLK2:时钟A, B, C, D, A', B', C', D', CLK1, CLK2: Clock
CS1、CS2:控制信号CS1, CS2: Control signal
DATA:数字信号DATA: digital signal
DS:可变延迟模块的输出DS: Output of variable delay block
OS:超取样电路的输出OS: output of the oversampling circuit
OUT:数据恢复电路的输出OUT: the output of the data recovery circuit
S[0]-S[11]:取样结果S[0]-S[11]: sampling result
SL:选择信号SL: select signal
TS:同步结果。TS: Sync results.
具体实施方式Detailed ways
图5(a)为依照本发明的取样方法的说明图。请参照图5(a),为了方便说明,图中的标记A、B、C及D表示为四个频率相同,但具有不同相位延迟的时钟(在本发明的相关领域中,时钟的英文为strobe),且相同的标记表示相同的时钟。至于标记A、B、C及D旁的箭头则表示为该时钟的取样边缘,以图中二个标记A旁边的箭头为例,这二个箭头表示时钟A的二个相邻脉冲的取样边缘。Fig. 5(a) is an explanatory diagram of a sampling method according to the present invention. Please refer to Fig. 5 (a), for convenience of explanation, the mark A in the figure, B, C and D represent as four frequency identical, but have the clock of different phase delay (in the relevant field of the present invention, the English of clock is strobe), and the same mark indicates the same clock. As for the arrows next to the marks A, B, C, and D, they represent the sampling edges of the clock. Take the arrows next to the two marks A in the figure as an example. These two arrows represent the sampling edges of two adjacent pulses of the clock A. .
在这四个时钟中,时钟B落后时钟A第一预设相位,而时钟C及时钟D则分别落后时钟A及时钟B第二预设相位,且第二预设相位为第一预设相位的一半。以此例而言,第一预设相位订定为180°,故第二预设相位为90°。由图中可知,时钟A、时钟B、时钟C及时钟D皆使用上升缘或下降缘来作为取样边缘。此外,标记DATA表示为数字信号,其数据是以串行的方式来传输,且数字信号DATA的位长度与上述四个时钟的时钟周期相等。Among these four clocks, clock B lags behind clock A by the first preset phase, while clock C and clock D lag behind clock A and clock B by the second preset phase, and the second preset phase is the first preset phase half of. In this example, the first preset phase is set to be 180°, so the second preset phase is 90°. It can be seen from the figure that clock A, clock B, clock C and clock D all use rising or falling edges as sampling edges. In addition, the mark DATA is represented as a digital signal, the data of which is transmitted in a serial manner, and the bit length of the digital signal DATA is equal to the clock periods of the above four clocks.
请继续参照图5(a),首先,分别利用时钟A及时钟B来取样数字信号DATA。接着,依据时钟A及时钟B的取样结果判断数字信号DATA的数据转态点的位置。判断数据转态点位置的方式可以使用下列二式来说明:Please continue to refer to FIG. 5( a ), firstly, the digital signal DATA is sampled by clock A and clock B respectively. Next, the position of the data transition point of the digital signal DATA is judged according to the sampling results of the clock A and the clock B. The method of judging the position of the data transition point can be described by the following two formulas:
(A[0]XOR B[0])+(A[1]XOR B[1])+(A[2]XOR B[2])+…+(A[M-1]XOR B[M-1])(A[0]XOR B[0])+(A[1]XOR B[1])+(A[2]XOR B[2])+…+(A[M-1]XOR B[M- 1])
...(式1)...(Formula 1)
(B[0]XOR A[1])+(B[1]XOR A[2])+(B[2]XOR A[3])+…+(B[M-1]XOR A[M])(B[0]XOR A[1])+(B[1]XOR A[2])+(B[2]XOR A[3])+…+(B[M-1]XOR A[M] )
...(式2)...(Formula 2)
式1是用来判断数据转态点的位置是否位于时钟A的取样边缘之后与时钟B的取样边缘之前,式2则是用来判断数据转态点的位置是否位于时钟B的取样边缘之后与时钟A的取样边缘之前。
在式1及式2中,A[0]-A[M]表示时钟A共有(M+1)个取样结果,而B[0]-B[M]则表示时钟B共有(M+1)个取样结果,其中,M为正整数,取样多个的目的为再确保取样结果正确。至于XOR则表示将时钟A与时钟B的取样结果进行异或(exclusive-OR)运算。在判断数据转态点位置的时候,需同时使用式1与式2所述方式来进行判断。若式1所得到的值为非零值,而式2所得到的值为零,则可判断判断数据转态点的位置位于时钟A的取样边缘之后与时钟B的取样边缘之前,即数据转态点位于A[0]与B[0]之间,以及A[1]与B[1]之间,以此类推。反之,若式1所得到的值为零,而式2所得到的值为非零值,则可判断数据转态点的位置位于时钟B的取样边缘之后与时钟A的取样边缘之前,即数据转态点位于B[0]与A[1]之间,以及B[1]与A[2]之间,以此类推。In
接下来,便可依据判断结果选择以时钟C或时钟D来作为较佳取样时钟。在此例中,由于数据转态点的位置位于时钟A的取样边缘之后与时钟B的取样边缘之前,且恰好介于时钟A及时钟B二者的取样边缘的中间,因此时钟D的取样边缘位于数字信号DATA的位的中间点(也就是最佳的数据取样点),故可选择时钟D作为较佳取样时钟,并利用时钟D来进行数据取样,以保证取得正确的数据。当然,在较严谨的系统中,利用时钟A及时钟B来判断数据转态点位置的步骤会被重复多次,以避免误判数据转态点的位置。Next, clock C or clock D can be selected as a better sampling clock according to the judgment result. In this example, since the position of the data transition point is located after the sampling edge of clock A and before the sampling edge of clock B, and just in the middle of the sampling edges of clock A and clock B, the sampling edge of clock D It is located at the middle point of the bit of the digital signal DATA (that is, the best data sampling point), so the clock D can be selected as the better sampling clock, and the clock D can be used for data sampling to ensure that the correct data is obtained. Of course, in a more rigorous system, the steps of using clock A and clock B to determine the position of the data transition point will be repeated several times to avoid misjudging the position of the data transition point.
图5(a)所示的例子为理想的情况,以致于时钟D的取样边缘恰好位于数字信号DATA的位的中间点,但在非理想的情况之下,依据判断结果所选出的较佳取样时钟,其取样边缘仍然会在数字信号DATA的位的中间点附近,如图5(b)及图5(c)所示。图5(b)及图5(c)为依照本发明的取样方法的另一说明图。请先参照图5(b),由此图可明显看出,数字信号DATA的数据转态点位置亦位于时钟A的取样边缘之后与时钟B的取样边缘之前,但较接近时钟A的取样边缘,因此在时钟C及时钟D二者的取样边缘当中,时钟D的取样边缘会较接近数字信号DATA的位的中间点,故选择时钟D来作取样较为理想。请再参照图5(c),由此图可明显看出,数字信号DATA的数据转态点位置也是位于时钟A的取样边缘之后与时钟B的取样边缘之前,但较接近时钟B的取样边缘,故选择时钟D来作取样较为理想。The example shown in Figure 5(a) is an ideal situation, so that the sampling edge of the clock D is just at the middle point of the bit of the digital signal DATA, but in a non-ideal situation, the better selected according to the judgment result The sampling edge of the sampling clock is still near the middle point of the bit of the digital signal DATA, as shown in FIG. 5(b) and FIG. 5(c). Fig. 5(b) and Fig. 5(c) are another explanatory diagrams of the sampling method according to the present invention. Please refer to Figure 5(b) first. It can be clearly seen from this figure that the position of the data transition point of the digital signal DATA is also located after the sampling edge of clock A and before the sampling edge of clock B, but it is closer to the sampling edge of clock A. Therefore, among the sampling edges of the clock C and the clock D, the sampling edge of the clock D is closer to the middle point of the bit of the digital signal DATA, so it is ideal to select the clock D for sampling. Please refer to Figure 5(c) again, it can be clearly seen from this figure that the position of the data transition point of the digital signal DATA is also located after the sampling edge of clock A and before the sampling edge of clock B, but it is closer to the sampling edge of clock B , so it is ideal to choose the clock D for sampling.
上述图5(a)-图5(c)所举的例子,都是以数据转态点位置位于时钟A的取样边缘之后与时钟B的取样边缘之前为例,因此皆选择时钟D作为较佳取样时钟,但若判断出数据转态点的位置位于时钟B的取样边缘之后与时钟A的取样边缘之前,则选择时钟C作为较佳取样时钟较为理想,从图6(a)-图6(c)所示便可理解。图6(a)-图6(c)亦为依照本发明的取样方法的另一说明图。由于图6(a)-图6(c)所述的操作方式与图5(a)-图5(c)所述的操作方式极其类似,使用者当可触类旁通,在此便不再赘述。除了图5(a)-图5(c)及图6(a)-图6(c)所述的情况之外,当判断出数据转态点的位置位于时钟A的取样边缘或是时钟B的取样边缘时,则可选择时钟C及时钟D其中任一作为较佳取样时钟,从图7(a)及图7(b)所示便可理解。图7(a)及图7(b)为依照本发明的取样方法的另一说明图。The above-mentioned examples in Figure 5(a)-Figure 5(c) all take the data transition point position after the sampling edge of clock A and before the sampling edge of clock B as an example, so clock D is selected as the best sampling clock, but if it is judged that the position of the data transition point is located after the sampling edge of clock B and before the sampling edge of clock A, it is ideal to select clock C as a better sampling clock, from Figure 6(a)-Figure 6( c) can be understood as shown. Fig. 6(a)-Fig. 6(c) are also another explanatory diagram of the sampling method according to the present invention. Since the operation modes described in Fig. 6(a)-Fig. 6(c) are very similar to those described in Fig. 5(a)-Fig. In addition to the situations described in Figure 5(a)-Figure 5(c) and Figure 6(a)-Figure 6(c), when it is judged that the position of the data transition point is located at the sampling edge of clock A or clock B When the sampling edge of , then either clock C or clock D can be selected as a better sampling clock, which can be understood from Fig. 7(a) and Fig. 7(b). Fig. 7(a) and Fig. 7(b) are another explanatory diagrams of the sampling method according to the present invention.
藉由上述例子可知,由于在较佳取样时钟的选择过程中就已经排除了较佳取样时钟的取样边缘位于数据转态点的可能性,因此通过这种取样方式所取得的数据,其正确性会比通过现有技术所取得的数据的正确性来得高。From the above example, it can be seen that since the possibility of the sampling edge of the better sampling clock being at the data transition point has been ruled out during the selection process of the better sampling clock, the accuracy of the data obtained through this sampling method is The accuracy of the data obtained through the existing technology will be higher.
此外,在非理想的情况之下,较佳取样时钟的取样边缘并不会位于数字信号DATA的位的中间点,而本发明更提供一方法,可以通过适当地调整数字信号DATA的延迟时间,让数字信号DATA的位的中间点移至较佳取样时钟的取样边缘,或者,至少让数字信号DATA的位的中间点趋近于较佳取样时钟的取样边缘。In addition, under non-ideal conditions, the sampling edge of the preferred sampling clock will not be located at the middle point of the bit of the digital signal DATA, and the present invention further provides a method, which can adjust the delay time of the digital signal DATA appropriately, Let the midpoint of the bit of the digital signal DATA move to the sampling edge of the preferred sampling clock, or at least let the midpoint of the bit of the digital signal DATA approach the sampling edge of the preferred sampling clock.
延迟时间的调整方式如下:首先,在选定时钟C或时钟D作为较佳取样时钟之后,再进一步去判定数据转态点是位于时钟C的取样边缘之后与时钟D的取样边缘之前,还是位于时钟D的取样边缘之后与时钟C的取样边缘之前,以依照判断结果来进行数字信号DATA的延迟时间的调整。举例来说,如果是选择时钟D作为较佳取样时钟,且判定数据转态点位于时钟C的取样边缘之后与时钟D的取样边缘之前,因此可知数字信号DATA的位的中间点落后时钟D的取样边缘,故要减少数字信号DATA的延迟时间,以使数字信号DATA的位的中间点被调整至时钟D的取样边缘。相对的,若选择时钟D作为较佳取样时钟,但数据转态点位却位于时钟D的取样边缘之后与时钟C的取样边缘之前,因此可知数字信号DATA的位的中间点超前时钟D的取样边缘,故要增加数字信号DATA的延迟时间,以使数字信号DATA的位的中间点被调整至时钟D的取样边缘。同理,若选择时钟C作为较佳取样时钟,也可利用同样的方式来进行延迟时间的控制。The adjustment method of the delay time is as follows: First, after selecting clock C or clock D as a better sampling clock, further determine whether the data transition point is located after the sampling edge of clock C and before the sampling edge of clock D, or at After the sampling edge of the clock D and before the sampling edge of the clock C, the delay time of the digital signal DATA is adjusted according to the judgment result. For example, if the clock D is selected as the better sampling clock, and it is determined that the data transition point is located after the sampling edge of the clock C and before the sampling edge of the clock D, it can be known that the middle point of the bit of the digital signal DATA lags behind the clock D Therefore, the delay time of the digital signal DATA should be reduced so that the middle point of the bit of the digital signal DATA is adjusted to the sampling edge of the clock D. In contrast, if clock D is selected as the better sampling clock, but the data transition point is located after the sampling edge of clock D and before the sampling edge of clock C, it can be known that the middle point of the bit of the digital signal DATA is ahead of the sampling of clock D Therefore, it is necessary to increase the delay time of the digital signal DATA, so that the middle point of the bit of the digital signal DATA is adjusted to the sampling edge of the clock D. Similarly, if the clock C is selected as a better sampling clock, the delay time can also be controlled in the same manner.
在上述延迟时间的调整方式当中,不管是增加或减少数字信号DATA的延迟时间,每次调整可以用单一阶段或是分为多个阶段来实施。例如以分成二个阶段而言,则可分为粗略调整与细部调整。先利用粗略调整进行大幅度的时间调整,然后再利用细部调整来使位的中间点更靠近较佳取样时钟的取样边缘。其中,粗略调整(也就是首阶段调整)的调整范围应当不会大于位长度的四分之一。In the above delay time adjustment methods, whether it is to increase or decrease the delay time of the digital signal DATA, each adjustment can be implemented in a single stage or divided into multiple stages. For example, in terms of being divided into two stages, it can be divided into rough adjustment and fine adjustment. Coarse adjustments are used to make large timing adjustments, followed by fine adjustments to bring the midpoint of the bit closer to the sampling edge of the preferred sampling clock. Wherein, the adjustment range of the rough adjustment (that is, the first-stage adjustment) should not be greater than a quarter of the bit length.
此外,由于每一阶段的调整皆可能无法一次就调整到位,因此使用者可视设计时的实际需要而让每个阶段的调整多进行几次,且每次调整后可再去判断数据转态点的位置,据以判定位的中间点的位置是否被调整过头,以进一步取得该阶段的最佳延迟时间。倘若某一阶段的调整在某二个延迟时间之间不断变换(即出现toggle现象),那么只要限定每一阶段的执行时间,并限定由最终取得的延迟时间作为该阶段的最佳延迟时间,然后再继续进行下一阶段的调整即可。In addition, because the adjustment of each stage may not be adjusted in place at one time, the user can make the adjustment of each stage several times according to the actual needs of the design, and can judge the data transition after each adjustment The position of the point is used to determine whether the position of the middle point of the bit has been adjusted too far, so as to further obtain the optimal delay time of this stage. If the adjustment of a certain stage is constantly changing between a certain two delay times (that is, the toggle phenomenon occurs), then only the execution time of each stage is limited, and the delay time finally obtained is defined as the optimal delay time of this stage. Then proceed to the next stage of adjustment.
熟习此技艺者,还可增加时钟的数目来进行操作,只要时钟的总数等于2N即可,其中,N为正整数。图8(a)为依照本发明的取样方法的另一说明图。请同时参照图5(a)及图8(a),经比较后可发现,图8(a)较图5(a)多了四个时钟,分别以A’、B’、C’及D’来标记,且相同的标记表示相同的时钟。至于标记A’、B’、C’及D’旁的箭头亦表示为该时钟的取样边缘,以图中二个标记A’旁边的箭头为例,这二个箭头表示时钟A’的二个相邻脉冲的取样边缘。Those skilled in this art can also increase the number of clocks to operate, as long as the total number of clocks is equal to 2N, where N is a positive integer. Fig. 8(a) is another explanatory diagram of the sampling method according to the present invention. Please refer to Figure 5(a) and Figure 8(a) at the same time. After comparison, it can be found that Figure 8(a) has four more clocks than Figure 5(a), with A', B', C' and D respectively ' to mark, and the same mark represents the same clock. As for the arrows next to the marks A', B', C' and D', they also indicate the sampling edges of the clock. Take the arrows next to the two marks A' in the figure as an example. These two arrows represent the two points of the clock A'. Sampling edge of adjacent pulses.
在此八个时钟中,时钟A’、时钟B’、时钟C’及时钟D’四者的频率与时钟A的频率相同,且时钟A’、时钟B’、时钟C’及时钟D’分别落后时钟A、时钟B、时钟C及时钟D第三预设相位,而第三预设相位为第二预设相位的一半。以此例而言,第一预设相位亦订定为180°,故第二预设相位为90°,而第三预设相位为45°。由图中可知,时钟A’、时钟B’、时钟C’及时钟D’皆使用上升缘或下降缘来作为取样边缘,且此四者的取样边缘与时钟A的取样边缘相同。此外,标记DATA亦表示为数字信号,且数字信号DATA的位长度与图中的八个时钟的时钟周期相等。Among the eight clocks, the frequency of clock A', clock B', clock C' and clock D' is the same as that of clock A, and clock A', clock B', clock C' and clock D' are respectively The clock A, the clock B, the clock C and the clock D are lagging behind by a third preset phase, and the third preset phase is half of the second preset phase. In this example, the first preset phase is also set to be 180°, so the second preset phase is 90°, and the third preset phase is 45°. It can be seen from the figure that clock A', clock B', clock C' and clock D' all use rising or falling edges as sampling edges, and the sampling edges of these four are the same as that of clock A. In addition, the symbol DATA is also represented as a digital signal, and the bit length of the digital signal DATA is equal to the clock period of eight clocks in the figure.
请继续参照图8(a),虽然图8(a)是利用8个时钟来进行操作,然而其取得较佳取样时钟的方式与图5(a)所述的取得方式一模一样。以此例来说,便是利用时钟A及时钟B来判断数字信号的数据转态点的位置,然后从时钟C及时钟D中选出时钟D来作为较佳取样时钟。然而图8(a)与图5(a)二者所述方式的不同处在于,图8(a)所述方式更将时钟C与时钟D当中不同于较佳取样时钟者作为参考时钟(亦即将时钟C当作参考时钟),然后再利用时钟C及时钟D来取样数字信号DATA。接着,依据时钟D及时钟C的取样结果判断数字信号DATA的数据转态点的位置。判断数据转态点位置的方式可以使用下列二式来说明:Please continue to refer to FIG. 8( a ). Although FIG. 8( a ) utilizes 8 clocks for operation, the way to obtain a better sampling clock is exactly the same as that described in FIG. 5( a ). In this example, clock A and clock B are used to determine the position of the data transition point of the digital signal, and then clock D is selected from clock C and clock D as a better sampling clock. However, the difference between the methods described in Fig. 8(a) and Fig. 5(a) is that the method described in Fig. 8(a) further uses the clock C and the clock D which is different from the preferred sampling clock as the reference clock (also That is, the clock C is used as a reference clock), and then the clock C and the clock D are used to sample the digital signal DATA. Next, the position of the data transition point of the digital signal DATA is determined according to the sampling results of the clock D and the clock C. The method of judging the position of the data transition point can be described by the following two formulas:
(C[0]XOR D[0])+(C[1]XOR D[1])+(C[2]XOR D[2])+…+(C[M-1]XOR D[M-1])(C[0]XOR D[0])+(C[1]XOR D[1])+(C[2]XOR D[2])+…+(C[M-1]XOR D[M- 1])
...(式3)...(Formula 3)
(D[0]XOR C[1])+(D[1]XOR C[2])+(D[2]XOR C[3])+…+(D[M-1]XOR C[M])(D[0]XOR C[1])+(D[1]XOR C[2])+(D[2]XOR C[3])+…+(D[M-1]XOR C[M] )
...(式4)...(Formula 4)
式3是用来判断数据转态点的位置是否位于时钟C的取样边缘之后与时钟D的取样边缘之前,式4则是用来判断数据转态点的位置是否位于时钟D的取样边缘之后与时钟C的取样边缘之前。
在式3及式4中,C[0]-C[M]表示时钟C共有(M+1)个取样结果,而D[0]-D[M]则表示时钟D共有(M+1)个取样结果,其中M为正整数。至于XOR则表示将时钟C与时钟D的取样结果进行异或运算。在判断数据转态点位置的时候,亦需同时使用式3与式4所述方式来进行判断。若式3所得到的值为非零值,而式4所得到的值为零,则可判断判断数据转态点的位置位于时钟C的取样边缘之后与时钟D的取样边缘之前。反之,若式3所得到的值为零,而式4所得到的值为非零值,则可判断数据转态点的位置位于时钟D的取样边缘之后与时钟C的取样边缘之前。In
接下来,便可依据判断结果选择与时钟D(即较佳取样时钟)相差45°的二个时钟的其中之一作为最佳取样时钟,也就是选择时钟B’或时钟D’作为最佳取样时钟。在图8(a)中,由于数据转态点的位置恰好介于时钟A及时钟B二者的取样边缘的中间,且恰好位于时钟C的取样边缘,则时钟B’或时钟D’其中任一均可作为最佳取样时钟。虽然在此例中,时钟B’及时钟D’二者的取样边缘相对于时钟D来说并非位于数字信号DATA的位的中间点,但仍然极为接近,故可取样到正确的数据。当然,在较严谨的系统中,利用时钟C及时钟D来判断数据转态点位置的步骤亦可重复多次,以避免误判数据转态点的位置。Next, one of the two clocks that differ by 45° from clock D (that is, the better sampling clock) can be selected as the best sampling clock according to the judgment result, that is, clock B' or clock D' is selected as the best sampling clock clock. In Figure 8(a), since the position of the data transition point is just in the middle of the sampling edges of clock A and clock B, and is just at the sampling edge of clock C, then either clock B' or clock D' Either can be used as the best sampling clock. Although in this example, the sampling edges of the clock B' and the clock D' are not located at the middle point of the bits of the digital signal DATA relative to the clock D, they are still very close, so correct data can be sampled. Of course, in a more rigorous system, the step of using the clock C and the clock D to determine the position of the data transition point can also be repeated several times to avoid misjudging the position of the data transition point.
图8(b)及图8(c)亦为依照本发明的取样方法的另一说明图,此二图示亦以8个时钟为例。请先参照图8(b),由此图可明显看出,数字信号DATA的数据转态点位置位于时钟D的取样边缘之后与时钟C的取样边缘之前,但较接近时钟C的取样边缘,因此,在时钟B’及时钟D’二者的取样边缘当中,时钟B’的取样边缘会较接近数字信号DATA的位的中间点,故选择时钟B’来作取样较为理想。请再参照图8(c),由此图可明显看出,数字信号DATA的数据转态点位置位于时钟C的取样边缘之后与时钟D的取样边缘之前,但较接近时钟C的取样边缘,故选择时钟D’来作取样较为理想。FIG. 8( b ) and FIG. 8( c ) are also another explanatory diagram of the sampling method according to the present invention, and these two diagrams also take 8 clocks as an example. Please refer to FIG. 8(b) first. It can be clearly seen from this figure that the data transition point of the digital signal DATA is located after the sampling edge of the clock D and before the sampling edge of the clock C, but is closer to the sampling edge of the clock C. Therefore, among the sampling edges of the clock B' and the clock D', the sampling edge of the clock B' is closer to the middle point of the bit of the digital signal DATA, so it is ideal to select the clock B' for sampling. Please refer to FIG. 8(c) again. It can be clearly seen from this figure that the data transition point of the digital signal DATA is located after the sampling edge of the clock C and before the sampling edge of the clock D, but is closer to the sampling edge of the clock C. Therefore, it is ideal to select the clock D' for sampling.
上述图8(a)-图8(c)所举的例子,其数据转态点位置皆位于时钟A的取样边缘之后与时钟B的取样边缘之前,然后再利用时钟C及时钟D来判断出最佳取样时钟。以下再以数据转态点位置皆位于时钟B的取样边缘之后与时钟A的取样边缘之前,然后再利用时钟C及时钟D来判断出最佳取样时钟为例,如图9(a)-图9(c)所示。图9(a)-图9(c)为依照本发明的取样方法的另一说明图。此外,数据转态点的位置位于时钟A的取样边缘或时钟B的取样边缘,然后再利用时钟C及时钟D来判断出最佳取样时钟的例子,则展现于图10(a)及图10(b)。图10(a)及图10(b)亦为依照本发明的取样方法的另一说明图。由于图9(a)-图9(c)以及图10(a)-图10(b)所述的操作方式与图8(a)-图8(c)所述-操作方式极其类似,且在这些图示中已呈现出各时钟与数字信号之间的时序关系,使用者当可藉由图示轻易挑选出最佳取样时钟,在此便不再赘述。In the above examples shown in Figure 8(a)-Figure 8(c), the positions of the data transition points are located after the sampling edge of clock A and before the sampling edge of clock B, and then use clock C and clock D to determine Optimal sampling clock. In the following, the position of the data transition point is located after the sampling edge of clock B and before the sampling edge of clock A, and then use clock C and clock D to determine the best sampling clock as an example, as shown in Figure 9(a) 9(c). 9(a)-9(c) are another explanatory diagrams of the sampling method according to the present invention. In addition, the position of the data transition point is located at the sampling edge of clock A or the sampling edge of clock B, and then the example of using clock C and clock D to determine the best sampling clock is shown in Figure 10(a) and Figure 10 (b). Fig. 10(a) and Fig. 10(b) are also another explanatory diagram of the sampling method according to the present invention. Since the operation modes described in Fig. 9(a)-Fig. 9(c) and Fig. 10(a)-Fig. 10(b) are very similar to those described in Fig. 8(a)-Fig. 8(c), and The timing relationship between each clock and the digital signal has been shown in these diagrams, and the user can easily select the best sampling clock through the diagrams, and details will not be repeated here.
藉由上述例子可知,通过八个时钟来进行取样操作,其正确性会比通过四个时钟来进行取样操作的正确性来得高。此外,尽管在非理想的情况之下,最佳取样时钟的取样边缘并不会位于数字信号DATA的位的中间点,然而使用者却一样可以通过适当地调整数字信号DATA的延迟时间,例如利用前述调整数字信号DATA的延迟时间的方式,让数字信号DATA的位的中间点移至最佳取样时钟的取样边缘,或者,至少让数字信号DATA的位的中间点趋近于最佳取样时钟的取样边缘。当然,通过控制数字信号DATA的延迟时间所能调整的延迟范围应该要小于等于数字信号的位长度的八分之一。From the above example, it can be seen that the accuracy of the sampling operation performed by eight clocks is higher than the accuracy of the sampling operation performed by four clocks. In addition, although under non-ideal conditions, the sampling edge of the optimal sampling clock will not be located at the middle point of the bit of the digital signal DATA, the user can also adjust the delay time of the digital signal DATA appropriately, such as using The aforementioned method of adjusting the delay time of the digital signal DATA allows the midpoint of the bit of the digital signal DATA to move to the sampling edge of the optimal sampling clock, or at least allows the midpoint of the bit of the digital signal DATA to approach the sampling edge of the optimal sampling clock. Sample edges. Of course, the delay range that can be adjusted by controlling the delay time of the digital signal DATA should be less than or equal to one-eighth of the bit length of the digital signal.
从以上各实施例所述的方法可以知道,对于应用本发明的取样系统,其较佳的操作流程应包含数字信号的延迟时间的调整动作,如图11所示。图11为应用本发明的取样系统的其中一较佳操作流程图。请参照图11,该取样系统(未示出)会按照以下的流程操作:首先,从2N个取样时钟中选择出最佳的取样时钟(如步骤1102)。接着,粗略调整数字信号的延迟时间(如步骤1104)。然后,判断粗略调整的动作是否超过其预定时间(如步骤1106)。当判断为否时,继续粗略调整数字信号的延迟时间;当判断为是时,则细部调整数字信号的延迟时间(如步骤1108)。接着,判断细部调整的动作是否超过其预定时间(如步骤1110)。当判断为否时,继续细部调整数字信号的延迟时间;当判断为是时,则动态调整数字信号的延迟时间,以使数字信号的位的中间点接近所选定的取样时钟的取样边缘(如步骤1112)。藉由这样的取样方式,此取样系统取样到错误数据的机率将大大地降低。当然,图11所示的操作流程不一定要经过两阶段调整,有可能只要一阶段,例如仅进行粗略调整。如此一来,当判断粗略调整的动作已超过其预定时间之后,便可直接执行步骤1112。From the methods described in the above embodiments, it can be known that for the sampling system applying the present invention, its preferred operation flow should include the adjustment of the delay time of the digital signal, as shown in FIG. 11 . FIG. 11 is a flow chart of one preferred operation of the sampling system of the present invention. Referring to FIG. 11 , the sampling system (not shown) will operate according to the following procedure: First, select the best sampling clock from 2 N sampling clocks (such as step 1102 ). Next, roughly adjust the delay time of the digital signal (such as step 1104). Then, it is judged whether the action of coarse adjustment exceeds its predetermined time (such as step 1106). When the judgment is no, continue to roughly adjust the delay time of the digital signal; when the judgment is yes, finely adjust the delay time of the digital signal (such as step 1108). Next, it is judged whether the action of detail adjustment exceeds its predetermined time (such as step 1110). When judged as no, continue to adjust the delay time of the digital signal in detail; Such as step 1112). With such a sampling method, the probability of the sampling system sampling wrong data will be greatly reduced. Of course, the operation process shown in FIG. 11 does not necessarily have to undergo two-stage adjustments, and may only need one stage, for example, only rough adjustments. In this way, when it is judged that the rough adjustment has exceeded the predetermined time,
图12为采用本发明的取样方法的其中一数据恢复(data recovery)电路的方块图。请参照图12,此数据恢复电路包括有超取样模块1210、时间重置模块1220及间隙控制模块1230。超取样模块1210用以接收时钟A、时钟B、时钟C及时钟D,此四个时钟的频率皆相同,且时钟B落后时钟A第一预设相位,而时钟C及时钟D分别落后时钟A及时钟B第二预设相位,且第二预设相位为第一预设相位的一半。在此例中,第一预设相位订定为180°,故第二预设相位为90°。此外,数字信号DATA的数据是以串行的方式来传输,且数字信号DATA的位长度与上述四个时钟的时钟周期相等。FIG. 12 is a block diagram of one of the data recovery circuits using the sampling method of the present invention. Please refer to FIG. 12 , the data recovery circuit includes an
图12所示电路分成二个期间来操作,首先,在第一期间中,超取样模块1210利用时钟A及时钟B来取样数字信号DATA,且皆以时钟A及时钟B的上升缘或下降缘作为取样边缘。并且,超取样模块1210将取样结果转换为并列数据,以作为超取样模块1210的输出OS。接着,时间重置模块1220同步超取样模块1210所输出的并列数据,以产生同步结果TS。此同步结果TS是经过同步后的并列数据,因此数据于时间上的基准点已由原先的不一致调整为一致。在此例中,并列数据的同步可利用一独立时钟重新取样这些并列数据来达到。然后,间隙控制模块1230依据同步结果TS判断数字信号DATA的数据转态点的位置,以依据判断结果选择时钟C或时钟D作为较佳取样时钟。判断数字信号DATA的数据转态点位置的方式已在前述式(1)及式(2)的相关说明中解释过,而较佳取样时钟的选择方式亦在先前的实施例便讨论过,在此皆不再赘述。The circuit shown in FIG. 12 is divided into two periods to operate. First, in the first period, the
在选出较佳取样时钟之后,此数据恢复电路便进入第二期间来进行操作。在第二期间中,超取样模块1210利用时钟C及时钟D来取样数字信号DATA,且时钟C及时钟D的取样边缘与时钟A的取样边缘相同。并且,超取样模块1210将取样结果转换为并列数据,以作为超取样模块1210的输出OS。接着,时间重置模块1220同步超取样模块1210所输出的并列数据,以产生同步结果TS。然后,间隙控制模块1230控制时间重置模块1220,使时间重置模块1220从同步结果TS中选择由较佳取样时钟所获得的同步并列数据,以作为数据恢复电路的输出OUT。After selecting a better sampling clock, the data recovery circuit enters a second period to operate. During the second period, the
在此例中,超取样模块1210以多路复用器1212、1214及超取样电路1216来实现。多路复用器1212用以接收时钟A及时钟C,且在第一期间及第二期间中分别输出时钟A及时钟C。多路复用器1214用以接收时钟B及时钟D,且在第一期间及第二期间中分别输出时钟B及时钟D。超取样电路1216用以利用多路复用器1212及多路复用器1214所输出的时钟来取样数字信号DATA。此外,使用者可利用独立的选择信号(未示出)输入至多路复用器1212及多路复用器1214,以控制这二个多路复用器进行时钟的选择,只要选择信号的选择标的能配合上述第一期间及第二期间的选择标的即可。当然,通过适当的电路设计,使用者也可选择利用间隙控制模块1230来输出上述的选择信号。In this example, the
在图11的相关说明中曾经提到,对于应用本发明的取样系统,其较佳的操作流程应包含数字信号的延迟时间的调整动作,且控制数字信号的延迟时间的方式包括以分成多个阶段的方式来控制数字信号DATA的延迟时间。以下便以运用2个阶段的方式来控制数字信号DATA的延迟时间来举例,如图13所示。It has been mentioned in the relevant description of Fig. 11 that for the sampling system applying the present invention, its preferred operation process should include the adjustment action of the delay time of the digital signal, and the way of controlling the delay time of the digital signal includes dividing it into multiple Stage way to control the delay time of the digital signal DATA. The following is an example of using two stages to control the delay time of the digital signal DATA, as shown in FIG. 13 .
图13为采用本发明的取样方法的其中另一数据恢复电路的方块图。请同时参照图12及图13,经比较后可发现,图13所示的数据恢复电路多了可变延迟模块1240,且超取样电路1216更通过可变延迟模块1240接收数字信号DATA。此可变延迟模块1240依据控制信号CS1及CS2来控制数字信号DATA的延迟时间,而控制信号CS1及CS2乃是间隙控制模块1230在第二期间中,依据数字信号DATA的数据转态点所处的位置而产生。控制信号CS1用以进行第一阶段的控制,而控制信号CS2用以进行第二阶段的控制。因此,控制信号CS2所能调整的延迟范围小于控制信号CS1所能调整的延迟范围,且利用控制信号CS1所能调整的延迟范围小于等于数字信号DATA的位长度的四分之一。在可变延迟模块1240依据控制信号CS1及CS2来控制数字信号DATA的延迟时间之后,超取样电路1216便依据多路复用器1212及1214所输出的时钟对可变延迟模块1240的输出DS进行取样。FIG. 13 is a block diagram of another data recovery circuit employing the sampling method of the present invention. Please refer to FIG. 12 and FIG. 13 at the same time. After comparison, it can be found that the data recovery circuit shown in FIG. 13 has a
为了更清楚地说明控制信号CS1及CS2如何控制数字信号DATA的延迟时间,以下再列举可变延迟模块1240的其中一种实施方式,如图14所示。图14为可变延迟模块1240的其中一种实施方式的电路方块图。请参照图14,此可变延迟模块1240包括有第一阶段延迟控制电路1410及第二阶段延迟控制电路1420。第一阶段延迟控制电路1410包括有延迟单元1411-1413及多路复用器1414,而第二阶段延迟控制电路1420包括有延迟单元1421-1425及多路复用器1426。这些延迟单元皆以多个串接的反相器(inverter)来实施,且每一延迟单元中的反相器的串接数目皆不同,因此每一延迟单元所能延迟的时间也都不一样。In order to illustrate more clearly how the control signals CS1 and CS2 control the delay time of the digital signal DATA, one implementation of the
在第一阶段延迟控制电路1410中,延迟单元1411、1412及1413三者的延迟时间分别设定为该第一阶段的最少延迟时间、预设延迟时间及最多延迟时间,然后多路复用器1414再依据控制信号CS1选择维持预设延迟时间,或者选择调整至最多延迟时间及最少延迟时间二者其中之一。此外,最少延迟时间与预设延迟时间二者之间距及预设延迟时间与最多延迟时间二者的间距相等,且间距皆小于等于数字信号DATA的位长度的四分之一。换句话说,通过第一阶段延迟控制电路1410控制数字信号DATA的延迟时间所能调整的延迟范围小于等于数字信号DATA的位长度的四分之一。In the first-stage delay control circuit 1410, the delay times of the delay units 1411, 1412, and 1413 are respectively set to the minimum delay time, the preset delay time, and the maximum delay time of the first stage, and then the multiplexer 1414 selects to maintain the preset delay time according to the control signal CS1, or selects to adjust to one of the maximum delay time and the minimum delay time. In addition, the distance between the minimum delay time and the predetermined delay time and the distance between the predetermined delay time and the maximum delay time are equal, and the distance is less than or equal to 1/4 of the bit length of the digital signal DATA. In other words, the delay range that can be adjusted by controlling the delay time of the digital signal DATA through the first-stage delay control circuit 1410 is less than or equal to a quarter of the bit length of the digital signal DATA.
同理,在第二阶段延迟控制电路1420中,延迟单元1421、1422、1423、1424及1425的延迟时间分别设定为该第二阶段的最少延迟时间、次少延迟时间、预设延迟时间、次多延迟时间及最多延迟时间,然后多路复用器1426再依据控制信号CS2选择维持预设延迟时间,或者选择调整至最少延迟时间、次少延迟时间、次多延迟时间及最多延迟时间四者其中之一。在第二阶段的延迟控制中,最少延迟时间与次少延迟时间二者的间距、次少延迟时间与预设延迟时间二者的间距、预设延迟时间与次多延迟时间二者的间距、次多延迟时间与最多延迟时间二者的间距,上述四间距皆相等。Similarly, in the second-stage delay control circuit 1420, the delay times of the delay units 1421, 1422, 1423, 1424, and 1425 are respectively set to the minimum delay time, the second least delay time, the preset delay time, and the second-stage delay time of the second stage. The second maximum delay time and the maximum delay time, and then the multiplexer 1426 selects to maintain the preset delay time according to the control signal CS2, or selects to adjust to the minimum delay time, the second minimum delay time, the second maximum delay time and the maximum delay time one of them. In the delay control of the second stage, the distance between the minimum delay time and the second least delay time, the distance between the second least delay time and the preset delay time, the distance between the preset delay time and the second most delay time, The intervals between the second most delay time and the maximum delay time are equal to the above four intervals.
此外,第二阶段的最少延迟时间与预设延迟时间二者之间距及预设延迟时间与最多延迟时间二者的间距,皆小于第一阶段的最少延迟时间与预设延迟时间二者的间距及预设延迟时间与最多延迟时间二者的间距。换句话说,第二阶段所能调整的延迟范围小于第一阶段所能调整的延迟范围。因此,第一阶段的延迟控制是对数字信号DATA的延迟时间进行粗略调整,而第二阶段的延迟控制是对数字信号DATA的延迟时间进行细部调整。当然,此图所展现的只是延迟控制电路的其中一种实施例,使用者当可依照实际设计的需求而变更每一延迟控制电路中的延迟单元的数目,甚至是增加延迟控制电路的数目,以进行更细微的调整。In addition, the distance between the minimum delay time and the preset delay time and the distance between the default delay time and the maximum delay time in the second stage are smaller than the distance between the minimum delay time and the preset delay time in the first stage and the distance between the preset delay time and the maximum delay time. In other words, the adjustable delay range of the second stage is smaller than the adjustable delay range of the first stage. Therefore, the delay control in the first stage is to roughly adjust the delay time of the digital signal DATA, and the delay control in the second stage is to fine-tune the delay time of the digital signal DATA. Of course, what this figure shows is only one embodiment of the delay control circuit. Users can change the number of delay units in each delay control circuit according to actual design requirements, or even increase the number of delay control circuits. for finer adjustments.
以上所介绍的是从四个取样时钟中取得一较佳取样时钟的数据恢复电路,接下来将介绍从八个取样时钟中取得最佳取样时钟的数据恢复电路,如图15所示。图15为采用本发明的取样方法的其中另一数据恢复电路的方块图。请参照图15,此数据恢复电路包括有超取样模块1510、时间重置模块1520及间隙控制模块1530。超取样模块1510用以接收时钟A、时钟B、时钟C、时钟D、时钟A’、时钟B’、时钟C’及时钟D’,此八个时钟的频率皆相同,且时钟B落后时钟A第一预设相位,时钟C及时钟D分别落后时钟A及时钟B第二预设相位,而时钟A’、时钟B’、时钟C’及时钟D’则分别落后时钟A、时钟B、时钟C、时钟D第三预设相位,且第二预设相位为第一预设相位的一半,而第三预设相位为第二预设相位的一半。在此例中,第一预设相位订定为180°,故第二预设相位为90°,而第二预设相位则为45°。此外,数字信号DATA的数据是以串行的方式来传输,且数字信号DATA的位长度与上述八个时钟的时钟周期相等。What has been introduced above is a data recovery circuit that obtains a better sampling clock from four sampling clocks. Next, a data recovery circuit that obtains the best sampling clock from eight sampling clocks will be introduced, as shown in FIG. 15 . FIG. 15 is a block diagram of another data recovery circuit employing the sampling method of the present invention. Please refer to FIG. 15 , the data recovery circuit includes an
图15所示电路分成三个期间来操作,首先,在第一期间中,超取样模块1510利用时钟A及时钟B来取样数字信号DATA,且皆以时钟A及时钟B的上升缘或下降缘作为取样边缘。并且,超取样模块1510将取样结果转换为并列数据,以作为超取样模块1510的输出OS。接着,时间重置模块1520同步超取样模块1510所输出的并列数据,以产生同步结果TS。此同步结果TS是经过同步后的并列数据,因此数据于时间上的基准点已由原先的不一致调整为一致。在此例中,并列数据的同步亦可利用一独立时钟重新取样这些并列数据来达到。然后,间隙控制模块1530依据同步结果TS判断数字信号DATA的数据转态点的位置,以依据判断结果选择时钟C或时钟D作为较佳取样时钟。判断数字信号DATA的数据转态点位置的方式已在前述式(1)及式(2)的相关说明中解释过,而较佳取样时钟的选择方式亦在先前的实施例便讨论过,在此皆不再赘述。The circuit shown in FIG. 15 is divided into three periods to operate. First, in the first period, the
在选出较佳取样时钟之后,此数据恢复电路便进入第二期间来进行操作。在第二期间中,超取样模块1510利用时钟C及时钟D来取样数字信号DATA,且时钟C及时钟D的取样边缘与时钟A的取样边缘相同。并且,超取样模块1510将取样结果转换为并列数据,以作为超取样模块1510的输出OS。接着,时间重置模块1520同步超取样模块1510所输出的并列数据,以产生同步结果TS。然后,间隙控制模块1530依据同步结果TS判断数字信号的数据转态点的位置,并依据判断结果选择与较佳取样时钟相差第三预设相位的二个时钟的其中之一作为最佳取样时钟,以及依据最佳取样时钟产生选择信号SL。利用时钟C及时钟D来判断数字信号DATA的数据转态点位置的方式已在前述式(3)及式(4)的相关说明中解释过,而最佳取样时钟的选择方式亦在先前的实施例便讨论过,在此皆不再赘述。After selecting a better sampling clock, the data recovery circuit enters a second period to operate. During the second period, the
在选出最佳取样时钟之后,此数据恢复电路便进入第三期间来进行操作。在第三期间中,超取样模块1510依据选择信号SL选择时钟A’及时钟B’来取样数字信号DATA,或选择时钟C’及时钟D’来取样数字信号DATA。总之,超取样模块1510会依据选择信号SL从时钟A’、时钟B’、时钟C’及时钟D’中选择出最佳取样时钟以及与最佳取样时钟相差180°的时钟来进行取样,且这二个时钟的取样边缘时钟A的取样边缘相同。并且,超取样模块1510将取样结果转换为并列数据,以作为超取样模块1510的输出OS。接着,时间重置模块1520同步超取样模块1510所输出的并列数据,以产生同步结果TS。然后,间隙控制模块1530控制时间重置模块1520,使时间重置模块1520从同步结果TS中选择由最佳取样时钟所获得的同步并列数据,以作为数据恢复电路的输出OUT。After selecting the best sampling clock, the data recovery circuit enters the third period to operate. In the third period, the
在此例中,超取样模块1510以多路复用器1512、1514及超取样电路1516来实现。多路复用器1512用以接收时钟A、时钟C、时钟A’及时钟C’,且在第一期间及第二期间中分别输出时钟A及时钟C,而在第三期间中,多路复用器1512依据选择信号SL来进行时钟的选择,以从时钟A’及时钟C’当中选择最佳取样时钟或与最佳取样时钟相差180°的时钟来作为输出。多路复用器1514用以接收时钟B、时钟D、时钟B’及时钟D’,且在第一期间及第二期间中分别输出时钟B及时钟D,而在第三期间中,多路复用器1514依据选择信号SL来进行时钟的选择,以从时钟B’及时钟D’当中选择与多路复用器1512的输出相差180°的时钟来作为输出。超取样电路1516用以利用多路复用器1512及1514所输出的时钟取样数字信号DATA。In this example, the
同样地,图15所示的电路亦可增加一可变延迟模块,以用来调整数字信号DATA的延迟时间。以下亦以运用2个阶段的方式来控制数字信号DATA的延迟时间来举例,如图16所示。图16为采用本发明的取样方法的其中另一数据恢复电路的方块图。请同时参照图15及图16,经比较后可发现,图16所示电路多了可变延迟模块1540,且超取样电路1516更通过可变延迟模块1540接收数字信号DATA。此可变延迟模块1540的操作方式与图13中的可变延迟模块1240的操作方式一模一样,因此可变延迟模块1540的内部电路亦可采用如图14所示电路的方式来实现。Similarly, the circuit shown in FIG. 15 can also add a variable delay module to adjust the delay time of the digital signal DATA. In the following, it is also taken as an example to control the delay time of the digital signal DATA in a two-stage manner, as shown in FIG. 16 . FIG. 16 is a block diagram of another data recovery circuit employing the sampling method of the present invention. Please refer to FIG. 15 and FIG. 16 at the same time. After comparison, it can be found that the circuit shown in FIG. 16 has a
依照上述各实施例的教示,可以归纳出一些基本的操作流程,如图17所示。图17为依照本发明一实施例的取样方法的流程图。请参照图17,首先,提供第一时钟、第二时钟、第三时钟及第四时钟,每一时钟的频率相同,且第二时钟落后第一时钟第一预设相位,而第三时钟及第四时钟分别落后第一时钟及第二时钟第二预设相位,且第二预设相位为第一预设相位的一半(如步骤1702)。接着,分别利用第一时钟及第二时钟取样数字信号,且皆以第一时钟及第二时钟的上升缘或下降缘作为取样边缘,其中,数字信号的位长度与第一时钟、第二时钟、第三时钟及第四时钟的时钟周期相等(如步骤1704)。然后,依据第一时钟及第二时钟的取样结果判断数字信号的数据转态点的位置(如步骤1706)。接着,依据判断结果选择以第三时钟或第四时钟作为较佳取样时钟(如步骤1708)。然后,利用较佳取样时钟取样数字信号,其中,较佳取样时钟的取样边缘与第一时钟的取样边缘相同(如步骤1710)。According to the teachings of the above embodiments, some basic operation procedures can be summarized, as shown in FIG. 17 . FIG. 17 is a flowchart of a sampling method according to an embodiment of the present invention. Please refer to Fig. 17, at first, provide the first clock, the second clock, the third clock and the fourth clock, the frequency of each clock is the same, and the second clock lags behind the first preset phase of the first clock, and the third clock and The fourth clock lags behind the first clock and the second clock by a second preset phase, and the second preset phase is half of the first preset phase (eg step 1702 ). Then, use the first clock and the second clock to sample the digital signal respectively, and use the rising edge or falling edge of the first clock and the second clock as the sampling edge, wherein the bit length of the digital signal is the same as that of the first clock and the second clock , clock periods of the third clock and the fourth clock are equal (eg step 1704). Then, determine the position of the data transition point of the digital signal according to the sampling results of the first clock and the second clock (such as step 1706). Next, the third clock or the fourth clock is selected as a better sampling clock according to the judgment result (such as step 1708). Then, the digital signal is sampled with a better sampling clock, wherein the sampling edge of the better sampling clock is the same as the sampling edge of the first clock (eg step 1710).
纵上所述,本发明因提供四个频率相同,但具有不同相位延迟的取样时钟,且其中的第二时钟落后第一时钟第一预设相位,而第三时钟及第四时钟则分别落后第一时钟及第二时钟第二预设相位,第二预设相位为第一预设相位的一半。接着,利用第一时钟及第二时钟来判断数字信号的数据转态点位置,并从第三时钟及第四时钟当中选择出取样边缘较接近数字信号的位中间点的时钟来作为较佳取样时钟,以利用较佳取样时钟来取样数字信号,提高数据取样的正确性。甚至,本发明还可搭配利用调整数字信号的延迟时间的技巧,以使数字信号的位的中间点被调整至较佳取样时钟的取样边缘,或使数字信号的位的中间点趋近较佳取样时钟的取样边缘,以更进一步地提高数据取样的正确性。In summary, the present invention provides four sampling clocks with the same frequency but with different phase delays, and the second clock lags behind the first clock by the first preset phase, while the third clock and the fourth clock lag behind respectively The first clock and the second clock have second preset phases, and the second preset phase is half of the first preset phase. Next, use the first clock and the second clock to judge the data transition point position of the digital signal, and select the clock whose sampling edge is closer to the middle point of the digital signal from the third clock and the fourth clock as a better sample clock, to use a better sampling clock to sample digital signals and improve the accuracy of data sampling. Even, the present invention can also be combined with the technique of adjusting the delay time of the digital signal, so that the middle point of the bit of the digital signal is adjusted to the sampling edge of the better sampling clock, or the middle point of the bit of the digital signal approaches the better The sampling edge of the sampling clock to further improve the accuracy of data sampling.
Claims (16)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN2008100813124A CN101521567B (en) | 2008-02-25 | 2008-02-25 | Sampling method and its data recovery circuit |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN2008100813124A CN101521567B (en) | 2008-02-25 | 2008-02-25 | Sampling method and its data recovery circuit |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN101521567A CN101521567A (en) | 2009-09-02 |
| CN101521567B true CN101521567B (en) | 2011-06-15 |
Family
ID=41081958
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN2008100813124A Active CN101521567B (en) | 2008-02-25 | 2008-02-25 | Sampling method and its data recovery circuit |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN101521567B (en) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104796219B (en) * | 2014-01-20 | 2018-06-05 | 晨星半导体股份有限公司 | Signal transmission method and related signal transmitter |
| CN106470346A (en) * | 2015-08-18 | 2017-03-01 | 晨星半导体股份有限公司 | Transmission stream processor with time sequence calibration function and time sequence calibration device and method |
| CN106788955B (en) * | 2016-12-26 | 2020-06-19 | 中核控制系统工程有限公司 | Four-phase high-speed code element detection method |
| CN112468140B (en) * | 2019-09-09 | 2024-08-09 | 瑞昱半导体股份有限公司 | Pulse data recovery device and method |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US4935942A (en) * | 1989-03-16 | 1990-06-19 | Western Digital Corporation | Data sampling architecture |
| CN1172402A (en) * | 1996-07-30 | 1998-02-04 | 张亦龙 | Method and device for eliminating non-simultaneous sampling color glitches |
| CN1350234A (en) * | 2000-10-19 | 2002-05-22 | 精工爱普生株式会社 | Sampling time-clock generation circuit, data transmission control device and electronic equipment |
| CN1713267A (en) * | 2004-06-15 | 2005-12-28 | 联发科技股份有限公司 | Sampling clock pulse phase selection method and device |
-
2008
- 2008-02-25 CN CN2008100813124A patent/CN101521567B/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US4935942A (en) * | 1989-03-16 | 1990-06-19 | Western Digital Corporation | Data sampling architecture |
| CN1172402A (en) * | 1996-07-30 | 1998-02-04 | 张亦龙 | Method and device for eliminating non-simultaneous sampling color glitches |
| CN1350234A (en) * | 2000-10-19 | 2002-05-22 | 精工爱普生株式会社 | Sampling time-clock generation circuit, data transmission control device and electronic equipment |
| CN1713267A (en) * | 2004-06-15 | 2005-12-28 | 联发科技股份有限公司 | Sampling clock pulse phase selection method and device |
Non-Patent Citations (1)
| Title |
|---|
| JP特开2001-203676A 2001.07.27 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN101521567A (en) | 2009-09-02 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7571340B2 (en) | Eliminating receiver clock drift caused by voltage and temperature change in a high-speed I/O system that uses a forwarded clock | |
| JP4163180B2 (en) | Clock data recovery circuit | |
| US20050238126A1 (en) | Multi rate clock data recovery based on multi sampling technique | |
| KR20090010579A (en) | Serial transceiver and its communication method | |
| CN106537783B (en) | Clock synchronization | |
| EP2988450B1 (en) | Circuit arrangement and method for clock and data recovery | |
| US8170168B2 (en) | Clock data recovery circuit | |
| WO2005093443A1 (en) | Test device and test method | |
| JP2004145999A (en) | Timing adjustment circuit and semiconductor device provided with it | |
| JP2007256127A (en) | Receiver circuit and receiver circuit test method | |
| CN101521567B (en) | Sampling method and its data recovery circuit | |
| US6795514B2 (en) | Integrated data clock extractor | |
| KR20010007473A (en) | Bit synchronizing circuit | |
| JP6123305B2 (en) | Electronic device and synchronization method | |
| US8295423B2 (en) | System and method for clockless data recovery | |
| JP6221857B2 (en) | Phase adjustment circuit, data transmission device, data transmission system, and phase adjustment method | |
| KR101470599B1 (en) | Apparatus of receiving data transmitted by using recovered clock | |
| US8139697B2 (en) | Sampling method and data recovery circuit using the same | |
| US20100239059A1 (en) | Transmission method and transmission apparatus | |
| JP4137005B2 (en) | Phase synchronization circuit | |
| TWI779853B (en) | Clock calibration module, high-speed receiver, and associated calibration method | |
| JP3973149B2 (en) | Data recovery circuit and data recovery method | |
| JP2015100017A (en) | Phase comparison circuit and clock data recovery circuit | |
| JP6160322B2 (en) | Reception circuit and semiconductor integrated circuit device | |
| TWI469522B (en) | Signal circuit |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant |