Memory controller and memory data receiving method

By using the receiving circuit and the comparison circuit in the memory controller to adjust the phase of the sampling clock signal, the problem of high sampling error rate and reduced effective sampling window in the prior art is solved, and more stable and efficient data reception is achieved.

CN119107992APending Publication Date: 2024-12-10REALTEK SEMICON CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310670261.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-07
Publication Date
2024-12-10

AI Technical Summary

Technical Problem

When receiving data signals, the existing memory controller may lead to incorrect sampling values ​​due to improper phase selection of the sampling clock signal, and the effective sampling window will shrink as the data rate increases, increasing the sampling error rate.

Method used

By introducing a receiving circuit in the memory controller, the sampling circuit and the comparison circuit sample the data signal according to multiple delayed versions of the data trigger signal, multiple sampling values ​​are generated, and the data signal or delayed data signal is determined as the target data signal through the comparison result. , dynamically adjust the phase of the sampling clock signal to expand the effective sampling window.

Benefits of technology

It effectively extends the sampling range of data, improves the data stability and noise immunity of the memory device system, and reduces the sampling error rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119107992A_ABST
    Figure CN119107992A_ABST
Patent Text Reader

Abstract

Various embodiments of the invention relate to a memory controller and a memory data receiving method. A memory controller for accessing a memory device includes a receive circuit. The receiving circuit receives a data signal and a data trigger signal from a memory device. The receiving circuit comprises a sampling circuit and a comparison circuit. The sampling circuit is configured to sample the data signal or a delayed data signal according to a plurality of delayed versions of the data trigger signal to generate a plurality of sampled values, where the delayed data signal is a delayed version of the data signal. The comparison circuit is used for comparing the sampling values to obtain a comparison result and determining which one of the data signal and the delayed data signal is supplied to the sampling circuit according to the comparison result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a memory controller and a memory data receiving method, and in particular to a memory controller and a memory data receiving method which can achieve the effect of expanding an effective sampling window by delaying a data signal.

[0002] Background of the Invention

[0003] When receiving data signals, the well-known memory controller uses the sampling clock signal from the memory device to sample the data signal. However, if the phase of the sampling clock signal is not well selected, an erroneous sampling value may be obtained. In addition, as the data rate increases, the effective sampling window for receiving data will be correspondingly reduced, which will also increase the sampling error rate. Summary of the invention

[0004] Therefore, the object of the present invention is to provide a memory controller and a corresponding memory data receiving method, which can dynamically adjust the sampling phase of the sampling clock signal according to the sampling result, so as to sample the memory data signal with a suitable sampling phase, and at the same time, the effective sampling window can be further expanded by delaying the data signal.

[0005] According to an embodiment of the present invention, a memory controller is used to access a memory device, and the memory controller includes a receiving circuit. The receiving circuit receives a data signal and a data trigger signal from the memory device. The receiving circuit includes a sampling circuit and a comparison circuit. The sampling circuit is used to sample the data signal or the delayed data signal according to multiple delayed versions of the data trigger signal to generate multiple sampled values, wherein the delayed data signal is a delayed version of the data signal. The comparison circuit is used to compare the sampled values ​​to obtain a comparison result, and determine which one of the data signal and the delayed data signal is provided to the sampling circuit according to the comparison result.

[0006] According to another embodiment of the present invention, a memory data receiving method includes the following steps: (A) receiving a data signal and a data trigger signal from a memory device; (B) generating a delayed data signal according to a predetermined delay value; (C) selecting the data trigger signal or the delayed data signal as a target data signal, and sampling the target data signal according to multiple delayed versions of the data trigger signal to generate multiple sampling values; and (D) comparing the sampling values ​​to obtain a comparison result, and determining which of the provided data signal and the delayed data signal is used as the target data signal according to the comparison result. BRIEF DESCRIPTION OF THE DRAWINGS

[0007] Figure 1 is a schematic diagram showing a memory device system according to an embodiment of the present invention.

[0008] Figure 2 FIG. 4 is a block diagram showing an example of a receiving circuit according to an embodiment of the present invention.

[0009] Figure 3 It is a schematic diagram showing waveforms of a data signal and a data trigger signal according to an embodiment of the present invention.

[0010] Figure 4 is a flow chart showing an example of a memory data receiving method according to an embodiment of the present invention.

[0011] Figure 5 is a schematic diagram showing a state machine according to an embodiment of the present invention.

[0012] Figure 6 FIG. 1 shows the feedback control in state S01 according to an embodiment of the present invention.

[0013] Figure 7 It shows the feedback control in state S03 according to an embodiment of the present invention.

[0014] Figure 8 is a schematic diagram showing an effective sampling window according to an embodiment of the present invention. DETAILED DESCRIPTION

[0015] Figure 1 1 is a schematic diagram showing a memory device system according to an embodiment of the present invention. The memory device system 100 can be applied to a personal computer, a notebook computer, etc. The memory device system 100 may include a memory controller 110 and a memory device 120, such as a dynamic random access memory. The memory controller 110 is used to access the memory device 120. The memory controller 110 is coupled to the memory device 120, and may receive a data signal DQ and a data trigger signal DQS from the memory device 120 during a read operation. The memory controller 110 obtains the content of the read data by sampling the data signal DQ according to the data trigger signal DQS. The memory controller 110 may also be coupled to a host (not shown) to transmit the obtained read data to the host.

[0016] The memory controller 110 may include a receiving circuit 111 and a processing circuit 112. The receiving circuit 111 receives a data signal DQ and a data trigger signal DQS from the memory device 120 through a plurality of receiving pads, and samples the data signal DQ according to the data trigger signal DQS to generate a plurality of sampled values. The processing circuit 112 may receive the sampled values ​​from the receiving circuit 111, and process the sampled values ​​to obtain one or more data bits of the read data. In addition, the memory controller 110 may further include a transmitting circuit (not shown in the figure), which transmits a control signal and a data signal DQ to the memory device 120 under the control of the processing circuit 112, so as to write data to the memory device 120.

[0017] As described above, as the data rate increases, the effective sampling window for receiving data will be correspondingly reduced. In addition, in double data rate (DDR) applications, since the sampling path of the rising edge (or positive edge) is responsible for sampling the data of half a clock cycle, and the sampling path of the falling edge (or negative edge) is responsible for sampling the data of the corresponding other half clock cycle, each sampling path actually has only an effective sampling window of half a clock cycle length. In order to solve the problem of too small effective sampling window, the present invention proposes a memory controller circuit and a corresponding memory data receiving method, which achieves the effect of expanding the effective sampling window of data by delaying the data signal, so that the effective sampling range of data can be automatically extended and enlarged, so that the memory device system 100 is not easy to cause sampling errors due to noise interference, thereby effectively improving the stability and noise resistance of the memory device system 100 receiving data.

[0018] Figure 22 is a block diagram showing an example of a receiving circuit according to an embodiment of the present invention. The receiving circuit 200 receives a data signal DQ and a data trigger signal DQS from a memory device 120 through a plurality of receiving pads. The receiving circuit 200 may include a sampling clock signal positioning circuit 210 for locating a sampling clock signal in the data trigger signal DQS that can be used to sample the data signal DQ. More specifically, before the memory device 120 outputs the sampling clock signal, the voltage level of the data trigger signal DQS may be set to a tri-state logic other than the two logic levels of 0 and 1. When the memory device 120 is ready to start outputting the sampling clock signal, the memory device 120 may transmit a preamble signal in the data trigger signal DQS before outputting the sampling clock signal. Therefore, the sampling clock signal positioning circuit 210 can locate the cycle of the first sampling clock signal by identifying the pattern of the preamble signal transmitted to the data trigger signal DQS, and after confirming the pattern of the sampling clock signal transmitted to the data trigger signal DQS, the data trigger signal DQS is provided to the delay control circuit 220-1 configured in the rising edge sampling path and the delay control circuit 220-2 configured in the rising edge sampling path. It should be noted that since the data trigger signal DQS will continue to carry the sampling clock signal provided by the memory device 120, the data trigger signal DQS will be used to represent the sampling clock signal for explanation in the following paragraphs.

[0019] In an embodiment of the present invention, the delay control circuits 220-1 and 220-2 can delay the data trigger signal DQS according to a plurality of delay values ​​to generate a plurality of different delayed versions of the data trigger signal DQS. More specifically, assuming that the sampling operation of the receiving circuit 200 uses the data trigger signal DQS delayed according to the basic delay value (e.g., the second delay value) to sample the data signal DQ, the delay control circuits 220-1 and 220-2 can additionally derive a leading delay value (e.g., the first delay value) and a lagging delay value (e.g., the third delay value) according to the basic delay value, and respectively generate a corresponding first delayed data trigger signal (e.g., the delayed data trigger signal pre_DQS shown in the figure), a second delayed data trigger signal (e.g., the delayed data trigger signal cen_DQS shown in the figure) and a third delayed data trigger signal (e.g., the delayed data trigger signal post_DQS shown in the figure) according to the leading delay value, the basic delay and the lagging delay value.

[0020] In an embodiment of the present invention, the leading delay value (first delay value) may be smaller than the base delay value (second delay value), the base delay value (second delay value) may be smaller than the lagging delay value (third delay value), and each delay value may correspond to a sampling phase. Therefore, the leading delay value may correspond to the leading sampling phase, the base delay value may correspond to the central sampling phase, and the lagging delay value may correspond to the lagging sampling phase, wherein the leading sampling phase leads the central sampling phase, and the central sampling phase leads the lagging sampling phase.

[0021] The receiving circuit 200 may further include a multiplexer 230-1, a delay circuit 240-1, a sampling circuit 250-1 and a comparison circuit 260-1 configured in a rising edge sampling path, and a multiplexer 230-2, a delay circuit 240-2, a sampling circuit 250-2 and a comparison circuit 260-2 configured in a falling edge sampling path. The multiplexers 230-1 and 230-2 may respectively select one of the data signal DQ and the delayed data signal DQ' as a target data signal to provide to the corresponding sampling circuits 250-1 and 250-2 in response to the comparison results of the comparison circuits 260-1 and 260-2, wherein the delayed data signal DQ' is generated by the delay circuits 240-1 and 240-2 by delaying the data signal DQ according to a predetermined delay value, and in the embodiment of the present invention, the predetermined delay value may be a fixed value. However, it should be noted that the present invention is not limited thereto.

[0022] The sampling circuits 250-1 and 250-2 sample the target data signal in sequence according to multiple delayed versions of the data trigger signal DQS (for example, the first delayed data trigger signal, the second delayed data trigger signal and the third delayed data trigger signal received from the delay control circuits 220-1 and 220-2 mentioned above) to generate corresponding first sampling values ​​(for example, the sampling value pre_Data shown in the figure), second sampling values ​​(for example, the sampling value cen_Data shown in the figure) and third sampling values ​​(for example, the sampling value post_Data shown in the figure).

[0023] Figure 3 1 is a waveform diagram showing a data signal DQ and a data trigger signal DQS according to an embodiment of the present invention. This example is used to illustrate the operation of sampling the data signal DQ using a delayed data trigger signal DQS with different delay values. It should be noted that the waveform of the data signal DQ shown in the figure can also be replaced by the waveform of the delayed data signal DQ'. If the waveform of the data signal DQ is replaced by the waveform of the delayed data signal DQ', this example is used to illustrate the operation of sampling the delayed data signal DQ' using a delayed data trigger signal DQS with different delay values.

[0024] Figure 3In the figure, three arrows are drawn at each rising edge and falling edge, which are used to represent the operation of sampling the data signal DQ using three delayed data trigger signals DQS with different delay values, wherein the arrows drawn with thin solid lines represent the operation of sampling the data signal DQ using the edge (e.g., rising edge or falling edge) of the first delayed data trigger signal, the arrows drawn with thick solid lines represent the operation of sampling the data signal DQ using the edge (e.g., rising edge or falling edge) of the second delayed data trigger signal, and the arrows drawn with dotted lines represent the operation of sampling the data signal DQ using the edge (e.g., rising edge or falling edge) of the third delayed data trigger signal, and the three operations will respectively generate corresponding first sampled values ​​(e.g., Figure 2 The sample value pre_Data shown), the second sample value (eg, Figure 2 The sampled value cen_Data shown) and the third sampled value (eg, Figure 2 The sampled value post_Data shown).

[0025] More specifically, within a cycle of a sampling clock signal, the sampling circuit 250-1 and the sampling circuit 250-2 may respectively use the first edge of the first delayed data trigger signal to sample the target data signal to generate a corresponding first sampled value, respectively use the second edge of the second delayed data trigger signal to sample the target data signal to generate a corresponding second sampled value, and respectively use the third edge of the third delayed data trigger signal to sample the target data signal to generate a corresponding third sampled value, wherein the first edge, the second edge and the third edge may be rising edges for the sampling circuit 250-1 and falling edges for the sampling circuit 250-2, and in an embodiment of the present invention, as Figure 3 As shown, the first edge may be the edge closest to the second edge among all edges of the first delayed data trigger signal, and the third edge may be the edge closest to the other side of the second edge among all edges of the third delayed data trigger signal.

[0026] refer to Figure 2 The comparison circuit 260-1 is used to sequentially receive the first sampling value, the second sampling value and the third sampling value generated in the rising edge sampling path from the sampling circuit 250-1, and the comparison circuit 260-2 is used to sequentially receive the first sampling value, the second sampling value and the third sampling value generated in the falling edge sampling path from the sampling circuit 250-2, and the comparison circuit 260-1 and the comparison circuit 260-2 respectively compare the received sampling values ​​to obtain a comparison result.

[0027] According to an embodiment of the present invention, the comparison results can be provided to the multiplexers 230-1 and 230-2 and the delay control circuits 220-1 and 220-2, respectively. The multiplexers 230-1 and 230-2 can select the data signal DQ or the delayed data signal DQ' as the target data signal to provide to the corresponding sampling circuits 250-1 and 250-2 according to the comparison results. The delay control circuits 220-1 and 220-2 can determine whether to adjust the basic delay value according to the comparison results. That is, in this embodiment, the comparison results generated by the comparison circuits 260-1 and 260-2 only include the comparison results of the three sampling values.

[0028] According to another embodiment of the present invention, the comparison circuit 260-1 and the comparison circuit 260-2 can further determine which of the data signal DQ and the delayed data signal DQ' needs to be provided to the sampling circuit 250-1 and the sampling circuit 250-2 in the next sampling operation according to the current comparison result, and generate corresponding control signals to control the selection of the multiplexer 230-1 and the multiplexer 230-2 respectively. Similarly, the comparison circuit 260-1 and the comparison circuit 260-2 can determine whether to adjust the basic delay value according to the current comparison result, and generate corresponding delay control signals to the delay control circuit 220-1 and the delay control circuit 220-2, so that the delay control circuit 220-1 and the delay control circuit 220-2 can adjust or control the basic delay value (second delay value) according to the corresponding delay control signal.

[0029] It should be noted that in the embodiment of the present invention, there is a predetermined relationship between the basic delay value (second delay value) and the leading delay value (first delay value) and the lagging delay value (third delay value), so when the basic delay value (second delay value) is adjusted, the leading delay value (first delay value) and the lagging delay value (third delay value) are also adjusted synchronously. For example, they are adjusted in equal amounts. However, the present invention is not limited to adjusting the three delay values ​​in equal amounts.

[0030] Therefore, in the embodiment of the present invention, the delay control circuit 220-1 and the delay control circuit 220-2 can first set a preset basic delay value, and derive the corresponding leading delay value and lagging delay value according to the preset basic delay value, and generate the corresponding delayed data trigger signal DQS according to these different delay values. After the sampling circuit 250-1 and the sampling circuit 250-2 use the delayed data trigger signal DQS with different delay values ​​to sample the data signal DQ or the delayed data signal DQ' and obtain the corresponding sampled values ​​pre_Data, cen_Data and post_Data, the sampling circuit 250-1 and the sampling circuit 250-2 can provide the sampled value cen_Data to the subsequent circuit, for example, Figure 1The processing circuit 112 shown. The comparison circuit 260-1 and the comparison circuit 260-2 simultaneously compare the size relationship of the sampled values ​​pre_Data, cen_Data and post_Data to generate the aforementioned comparison result that can be used to feedback control the delay adjustment of the delay control circuit 220-1 and the delay control circuit 220-2 and feedback control the input selection of the sampling circuit 250-1 and the sampling circuit 250-2. Through repeated feedback control and adjustment, the sampling phase or sampling point of the data signal DQ (for example, the sampling phase or sampling point corresponding to the basic delay value) can be well controlled within the effective sampling range of the data.

[0031] In addition, as described above, by using the delay circuit 240-1 and the delay circuit 240-2, the data signal DQ can be delayed, and by using the multiplexer 230-1 and the multiplexer 230-2, the input source (i.e., the target data signal) of the sampling circuit 250-1 and the sampling circuit 250-2 can be flexibly switched between the data signal DQ and the delayed data signal DQ'. In this way, the effect of expanding the effective sampling window of the data can be achieved, so that the effective sampling range of the data can be automatically extended and enlarged.

[0032] Figure 4 is a flow chart showing an exemplary method for receiving memory data according to an embodiment of the present invention, comprising the following steps:

[0033] Step S402: Receive a data signal DQ and a data trigger signal DQS from a memory device.

[0034] Step S404: Generate delayed data signal DQ' according to a predetermined delay value. For example, the delay values ​​used by delay circuit 240-1 and delay circuit 240-2 are set with a predetermined delay value, and the delay circuit 240-1 and delay circuit 240-2 respectively generate delayed data signal DQ'.

[0035] Step S406: Select the data signal DQ or the delayed data signal DQ' as the target data signal, and sample the target data signal according to the multiple delayed versions of the data trigger signal DQS to generate multiple sampled values. In the embodiment of the present invention, when the step S406 is executed for the first time, the data signal DQ can be directly selected or determined as the target data signal, but the present invention is not limited thereto. In addition, before the sampling is performed, the multiple delayed versions of the data trigger signal DQS can be generated by the following steps:

[0036] Step S406-1: Generate a first delayed data trigger signal according to the first delay value;

[0037] Step S406-2: generating a second delayed data trigger signal according to the second delay value; and

[0038] Step S406-3: Generate a third delayed data trigger signal according to the third delay value.

[0039] Step S408: Compare the plurality of sample values ​​generated in step S406 to obtain a comparison result, and determine which of the data signal DQ and the delayed data signal DQ′ should be provided as the target data signal in subsequent operations according to the comparison result.

[0040] Step S410: Adjust the first delay value, the second delay value and the third delay value according to the comparison result.

[0041] In an embodiment of the present invention, step S406 , step S408 and step S410 may be repeatedly executed, and the target data signal determined in step S408 and the adjustment made in step S410 will be applied to the next execution of step S406 .

[0042] In addition, it should be noted that, in the embodiment of the present invention, step S410 is an optional step, or, in some embodiments of the present invention, the adjustment made in step S410 may be an adjustment with an adjustment amount of 0 (i.e., no adjustment). In the embodiment of the present invention, it can be selectively determined whether to further perform step S410 or determine whether the adjustment amount in step S410 is 0 according to which data signal is currently selected as the target data signal and according to the size relationship of the multiple sample values ​​generated in step S406.

[0043] Figure 5 It is a schematic diagram of a state machine according to an embodiment of the present invention, and uses state transition to explain the feedback control mechanism implemented according to the relationship between the setting of the current target data signal and the obtained sampling value in the embodiment of the present invention.

[0044] State S01: When the data signal DQ is provided as the target data signal (i.e., the data signal source of the sampling circuit is switched to a data signal supply path without delay through a multiplexer), and when the third sampling value (e.g., sampling value post_Data) is different from the first sampling value (e.g., sampling value pre_Data) and the second sampling value (e.g., sampling value cen_Data), it is determined to provide the delayed data signal DQ' to the sampling circuit 250-1 and the sampling circuit 250-2 as the target data signal. It should be noted that when the third sampling value is different from the first sampling value and the second sampling value, it means that the sampling point (or, the central sampling phase) corresponding to the currently set basic delay value is too close to the trailing edge of the data, and in the embodiment of the present invention, the feedback control implemented in state S01 is to change the target data signal, which is equivalent to moving the sampling point corresponding to the basic delay value to the leading edge of the data, and the delay value used to delay the data trigger signal DQS is not adjusted.

[0045] Figure 6 The feedback control implemented in state S01 is illustrated with waveform diagrams of a data signal DQ, a delayed data signal DQ′, and a data trigger signal DQS, wherein the waveform of the data signal DQ is additionally covered by a shading pattern, and the delayed data signal DQ′ is not covered by the shading pattern, to represent the operation of switching the target data signal (i.e., the signal source of the sampling operation) from the data signal DQ to the delayed data signal DQ′.

[0046] State S02: When the delayed data signal DQ' is provided as the target data signal (i.e., the data signal source of the sampling circuit is switched to a delayed data signal supply path through a multiplexer), and when the third sampling value (e.g., the sampling value post_Data) is different from the first sampling value (e.g., the sampling value pre_Data) and the second sampling value (e.g., the sampling value cen_Data), the delay control circuits 220-1 and 220-2 can synchronously reduce the first delay value, the second delay value, and the third delay value controlled by them. It should be noted that, since the state S02 has used the delayed data signal DQ′ as the signal source for the sampling operation, the sampling result still shows that the sampling point (or the central sampling phase) corresponding to the currently set basic delay value is too close to the trailing edge of the data. Therefore, in the embodiment of the present invention, the feedback control implemented in the state S02 is to change (for example, reduce) the delay value used to delay the data trigger signal DQS, so that the sampling point corresponding to the basic delay value (and the leading delay value and the lagging delay value) can be moved to the leading edge of the data, while the part of the target data signal is not adjusted.

[0047] State S03: When the delayed data signal DQ' is provided as the target data signal (i.e., the data signal source of the sampling circuit is switched to the delayed data signal supply path through the multiplexer), and when the first sampling value (e.g., the sampling value pre_Data) is different from the second sampling value (e.g., the sampling value cen_Data) and the third sampling value (e.g., the sampling value post_Data), it is determined to change to provide the data signal DQ to the sampling circuit 250-1 and the sampling circuit 250-2 as the target data signal. It should be noted that when the first sampling value is different from the second sampling value and the third sampling value, it means that the sampling point (or, the central sampling phase) corresponding to the currently set basic delay value is too close to the leading edge of the data, and in the embodiment of the present invention, the feedback control implemented in state S03 is to change the target data signal, which is equivalent to moving the sampling point corresponding to the basic delay value to the trailing edge of the data, and the delay value used to delay the data trigger signal DQS is not adjusted.

[0048] Figure 7The feedback control implemented in state S03 is illustrated by waveform diagrams of the data signal DQ, the delayed data signal DQ′ and the data trigger signal DQS, wherein the waveform of the delayed data signal DQ′ is additionally covered by a shading pattern, and the data signal DQ is not covered by the shading pattern, so as to represent the operation of switching the target data signal (i.e., the signal source of the sampling operation) from the delayed data signal DQ′ to the data signal DQ.

[0049] State S04: When the data signal DQ is provided as the target data signal (i.e., the data signal source of the sampling circuit is switched to a data signal supply path without delay through the multiplexer), and when the first sampling value (e.g., the sampling value pre_Data) is different from the second sampling value (e.g., the sampling value cen_Data) and the third sampling value (e.g., the sampling value post_Data), the delay control circuits 220-1 and 220-2 can synchronously increase the first delay value, the second delay value, and the third delay value controlled by them. It should be noted that since the state S04 has taken the data signal DQ as the signal source for the sampling operation, but the sampling result still shows that the sampling point (or, the central sampling phase) corresponding to the currently set basic delay value is too close to the leading edge of the data, in the embodiment of the present invention, the feedback control implemented in the state S04 is to change the delay value used to delay the data trigger signal DQS, so that the sampling point corresponding to the basic delay value (and the leading delay value and the lagging delay value) can be moved to the trailing edge of the data, and the part of the target data signal is not adjusted.

[0050] Figure 8 1 is a schematic diagram showing the effective sampling window according to an embodiment of the present invention. In the embodiment of the present invention, by delaying the data signal DQ and dynamically and flexibly switching the signal source of the sampling operation between the data signal DQ and the delayed data signal DQ' according to the currently obtained sampling result, the effect of expanding the effective sampling window can be achieved. As shown in the figure, the effective sampling window (effective sampling range) Valid_D obtained by applying the memory data receiving method proposed by the present invention will be the union of the effective sampling range of the data signal DQ and the effective sampling range of the delayed data signal DQ', so the effective sampling range of the data can be automatically extended and enlarged, thereby effectively reducing the sampling error rate and improving the stability and anti-noise ability of the received data of the memory device system.

[0051] The above description is only a preferred embodiment of the present invention. All equivalent changes and modifications made according to the claims of the present invention should fall within the scope of the present invention.

Claims

1. A memory controller, the memory controller being used to access a memory device, the memory controller include: A receiving circuit, the receiving circuit is used to receive a data signal and a data trigger signal from the memory device, the receiving circuit comprising: a sampling circuit configured to sample the data signal or a delayed data signal according to a plurality of delayed versions of the data trigger signal to generate a plurality of sampled values, wherein the delayed data signal is a delayed version of the data signal; and A comparison circuit is used for comparing the sampled values ​​to obtain a comparison result, and determining which one of the data signal and the delayed data signal is provided to the sampling circuit according to the comparison result.

2. The memory controller of claim 1 , wherein the delayed version of the data trigger signal comprises a first delayed data trigger signal generated according to a first delay value, a second delayed data trigger signal generated according to a second delay value, and a third delayed data trigger signal generated according to a third delay value, and the sampling circuit samples the data signal or the delayed data signal in sequence according to the first delayed data trigger signal, the second delayed data trigger signal, and the third delayed data trigger signal to generate corresponding first sampling values, second sampling values, and third sampling values, and wherein the first delay value is smaller than the second delay value, and the second delay value is smaller than the third delay value.

3. The memory controller of claim 2 , wherein when the data signal is provided to the sampling circuit, and when the third sampling value is different from the first sampling value and the second sampling value, the comparison circuit determines to provide the delayed data signal to the sampling circuit instead.

4. The memory controller of claim 2 , wherein when the delayed data signal is provided to the sampling circuit, and when the first sampling value is different from the second sampling value and the third sampling value, the comparison circuit determines to provide the data signal to the sampling circuit instead.

5. The memory controller as claimed in claim 2, wherein the receiving circuit further comprises a delay control circuit, wherein the delay control circuit is used to control the first delay value, the second delay value and the third delay value according to the comparison result, and when the delayed data signal is provided to the sampling circuit, and when the third sampling value is different from the first sampling value and the second sampling value, the delay control circuit reduces the first delay value, the second delay value and the third delay value.

6. The memory controller of claim 5, wherein when the data signal is provided to the sampling circuit, and when the first sampling value is different from the second sampling value and the third sampling value, the delay control circuit increases the first delay value, the second delay value, and the third delay value.

7. The memory controller of claim 2 , wherein the sampling circuit samples the data signal or the delayed data signal using a first edge of the first delayed data trigger signal to generate the corresponding first sampled value, samples the data signal or the delayed data signal using a second edge of the second delayed data trigger signal to generate the corresponding second sampled value, and samples the data signal or the delayed data signal using a third edge of the third delayed data trigger signal to generate the corresponding third sampled value.

8. The memory controller of claim 7 , wherein the first edge is an edge of all edges of the first delayed data trigger signal that is closest to one side of the second edge, and the third edge is an edge of all edges of the third delayed data trigger signal that is closest to the other side of the second edge.

9. A memory data receiving method, The following steps are involved: (A) receiving a data signal and a data trigger signal from a memory device; (B) generating a delayed data signal according to a predetermined delay value; (C) selecting the data trigger signal or the delayed data signal as a target data signal, and sampling the target data signal according to a plurality of delayed versions of the data trigger signal to generate a plurality of sampled values; and (D) comparing the sampled values ​​to obtain a comparison result, and determining which of the data signal and the delayed data signal to provide as the target data signal according to the comparison result.

10. The memory data receiving method as claimed in claim 9, wherein step (C) further comprises: include: (C-1) generating a first delayed data trigger signal according to the first delay value; (C-2) generating a second delayed data trigger signal according to the second delay value; (C-3) generating a third delayed data trigger signal according to the third delay value; as well as (C-4) sampling the target data signal in sequence according to the first delayed data trigger signal, the second delayed data trigger signal, and the third delayed data trigger signal to generate corresponding first sampling values, second sampling values, and third sampling values, The first delay value is smaller than the second delay value, and the second delay value is smaller than the third delay value.