Time sequence window margin detection method and time sequence window calibration method
Through the timing window margin detection circuit and calibration method, the deviation between the data signal and the clock signal is detected and calibrated, and the sampling error caused by timing offset is solved, ensuring the correct sampling of the data signal and timing convergence.
Patent Information
- Application Number
- CN202411220481.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-02
- Publication Date
- 2024-11-29
AI Technical Summary
In the source synchronization clock system, due to trace delay, PVT changes and other factors, timing offsets occur between the data signal and the clock signal, which cannot ensure the correct sampling of the data signal. How to detect and calibrate the timing window margin becomes an urgent solution The problem.
Through the timing window margin detection circuit, including data sampling path, leading circuit, lag circuit, left window detection circuit and right window detection circuit, the deviation between the data signal and the clock signal is detected, the window margin detection result is output, and the status is passed The machine and CNC delay module perform timing window calibration.
It accurately detects the deviation between the data signal and the clock signal, outputs the window margin detection result, provides an important reference for timing window calibration, and ensures the correct sampling and timing convergence of the data signal.
Smart Images

Figure CN119051633A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electronic technology, and in particular to a timing window margin detection method and a timing window calibration method. Background Art
[0002] In a source synchronous clock system, the data signal must be sampled in a valid window based on the clock signal to avoid timing violations. However, in actual circuit systems, due to factors such as routing delays and PVT (Process Voltage Temperature) changes, timing offsets may occur, resulting in setup time or hold time violations, making it impossible to guarantee the correct sampling of data signals. Therefore, how to detect the deviation between the data signal and the clock signal, that is, the timing window margin, has become a technical problem that needs to be solved urgently. Summary of the invention
[0003] The present invention provides a timing window margin detection method and a timing window calibration method to accurately detect the deviation between a data signal and a clock signal, and output a corresponding window margin detection result, thereby providing an important reference for the subsequent timing window calibration process.
[0004] According to one aspect of the present invention, a timing window margin detection method is provided, which is applied to a timing window margin detection circuit, wherein the timing window margin detection circuit comprises: a data sampling path and a redundant detection path, wherein the redundant detection path comprises: an advance circuit, a lag circuit, a left window detection circuit and a right window detection circuit; wherein the method comprises:
[0005] Determine, through a data sampling path, a reference data signal after the data signal is sampled by a clock signal;
[0006] Performing delay processing of different delay units on the data signal through the advance circuit to obtain delayed data signals corresponding to the different delay units;
[0007] The clock signal is delayed by different delay units through a hysteresis circuit to obtain delayed clock signals corresponding to the different delay units;
[0008] Determine the first data sampling signals of each delayed data signal after being sampled by the clock signal through the left window detection circuit, and determine the corresponding left window margin detection result according to the signal difference between each first data sampling signal and the reference data signal;
[0009] The right window detection circuit determines the second data sampling signals after the data signal is sampled by each delayed clock signal, and determines the corresponding right window margin detection result according to the signal difference between each second data sampling signal and the reference data signal.
[0010] According to another aspect of the present invention, a timing window calibration method is provided, which is applied to a timing window calibration circuit, wherein the timing window calibration circuit comprises: a state machine, a digital control delay module, and the timing window margin detection circuit according to any embodiment of the present invention; wherein the method comprises:
[0011] Obtaining a left window margin detection result and a right window margin detection result output by a timing window margin detection circuit through a state machine, and determining a target delay control codeword according to the left window margin detection result, the right window margin detection result and a preset window detection margin threshold;
[0012] The corresponding target delayed clock signal is determined by the digital control delay module according to the target delay control codeword and the clock signal.
[0013] The technical solution of the embodiment of the present invention is to determine the reference data signal after the data signal is sampled by the clock signal by using the data sampling path; to perform delay processing of different delay units on the data signal and the clock signal by using the advance circuit and the lag circuit respectively, to obtain the corresponding delayed data signal and delayed clock signal; to determine the first data sampling signal of each delayed data signal after being sampled by the clock signal by using the left window detection circuit, and to determine the corresponding left window margin detection result according to the signal difference between each first data sampling signal and the reference data signal; to determine the second data sampling signal of the data signal after being sampled by each delayed clock signal by using the right window detection circuit, and to determine the corresponding right window margin detection result according to the signal difference between each second data sampling signal and the reference data signal. This solution can realize the accurate detection of the deviation between the data signal and the clock signal, and output the corresponding window margin detection result, thereby providing an important reference for the subsequent timing window calibration process.
[0014] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0016] Figure 1 is a structural schematic diagram of a timing window margin detection circuit provided according to Embodiment 1 of the present invention;
[0017] Figure 2is a flow chart of a timing window margin detection method provided according to the first embodiment of the present invention;
[0018] Figure 3 is a flow chart of a timing window margin detection method provided according to Embodiment 2 of the present invention;
[0019] Figure 4 This is a timing waveform diagram of DDR sampling provided according to the second embodiment of the present invention;
[0020] Figure 5 1 is a schematic diagram of an advance / lag circuit structure based on a serial delay structure provided according to a second embodiment of the present invention;
[0021] Figure 6 1 is a schematic diagram of an advance / lag circuit structure based on a parallel delay structure provided according to a second embodiment of the present invention;
[0022] Figure 7 is a schematic diagram of a delay waveform provided according to Embodiment 2 of the present invention;
[0023] Figure 8 is a structural schematic diagram of a left window detection circuit provided according to Embodiment 2 of the present invention;
[0024] Fig. 9 is a structural schematic diagram of a right window detection circuit provided according to Embodiment 2 of the present invention;
[0025] Fig.10 is a structural schematic diagram of a timing window margin detection circuit provided according to a second embodiment of the present invention;
[0026] Fig.11 is a schematic diagram of a timing window detection provided according to the second embodiment of the present invention;
[0027] Fig.12 is a schematic diagram of another timing window detection provided according to the second embodiment of the present invention;
[0028] Fig.13 is a schematic diagram of another timing window detection provided according to the second embodiment of the present invention;
[0029] Fig.14 is a schematic diagram of another timing window detection provided according to the second embodiment of the present invention;
[0030] Fig.15 is a structural schematic diagram of a timing window calibration circuit provided according to Embodiment 3 of the present invention;
[0031] Fig.16 is a structural schematic diagram of a digital control delay module provided according to Embodiment 3 of the present invention;
[0032] Fig.17 is a flow chart of a timing window calibration method provided according to Embodiment 3 of the present invention;
[0033] Fig.18 It is a flow chart of a timing window calibration method provided according to the fourth embodiment of the present invention. DETAILED DESCRIPTION
[0034] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0035] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0036] Embodiment 1
[0037] Figure 1 The structure diagram of a timing window margin detection circuit provided by the first embodiment of the present invention is shown in FIG. Figure 1 As shown, the timing window margin detection circuit includes: a data sampling path 100 and a redundant detection path 200, wherein the redundant detection path 200 includes: an advance circuit 210, a lag circuit 220, a left window detection circuit 230 and a right window detection circuit 240.
[0038] Specifically, the input terminal of the advance circuit 210 is connected in parallel with the input data terminal of the data sampling path 100;
[0039] The input terminal of the hysteresis circuit 220 is connected in parallel with the input clock terminal of the data sampling path 100;
[0040] The input end of the left window detection circuit 230 is respectively connected to the output end of the data sampling path 100, the input clock end and the output end of the advance circuit 210;
[0041] The input terminal of the right window detection circuit 240 is respectively connected to the output terminal of the data sampling path 100 , the input data terminal, and the output terminal of the hysteresis circuit 220 .
[0042] Based on the above timing window margin detection circuit, Figure 2 This is a flowchart of a timing window margin detection method provided in the first embodiment of the present invention. This embodiment can be applied to the situation where the advance or lag of the timing window is detected during the delay calibration process, the deviation between the data signal and the clock signal is measured, and the corresponding timing window margin detection result is output. Figure 2 As shown, a timing window margin detection method provided in the first embodiment is applied to a timing window margin detection circuit, and the method specifically includes the following steps:
[0043] S110 , determining a reference data signal after the data signal is sampled by the clock signal through a data sampling path.
[0044] In the embodiment of the present invention, Figure 1 As shown, the data sampling path 100 is used to output a synchronously sampled reference data signal after the external input data signal is sampled by the clock signal trigger. At the same time, it is necessary to ensure that the data signal is within the timing window and does not violate the setup time and the hold time, that is, to ensure timing convergence.
[0045] It should be understood that the setup time refers to the minimum time that the data signal needs to remain stable before the clock signal edge is reached; and the hold time refers to the minimum time that the data signal needs to remain stable after the clock signal edge is reached. If the data signal does not arrive or hold at the correct time, it will lead to timing non-convergence problems, that is, setup time or hold time violations, which may trigger data sampling errors.
[0046] S120 , performing delay processing of different delay units on the data signal through the advance circuit to obtain delayed data signals corresponding to the different delay units.
[0047] In the embodiment of the present invention, Figure 1 As shown, the advance circuit 210 is used to perform multi-phase delayed output on the irregular data signal, that is, to perform delay processing on the data signal with different delay units and output multiple data signals with different delays, that is, delayed data signals.
[0048] It should be understood that since the actual physical system is a causal system, it can only be shifted backward in time but not forward in time. Therefore, this embodiment introduces the advance circuit 210, which delays the data signal with different delay units to achieve an equivalent timing advance (clock signal advance) effect.
[0049] S130 , performing delay processing of different delay units on the clock signal through a hysteresis circuit to obtain delayed clock signals corresponding to the different delay units.
[0050] In the embodiment of the present invention, different from the advance circuit 210, the lag circuit 220 is used to perform multi-phase delay output on the periodic clock signal, thereby obtaining delayed clock signals corresponding to different delay units.
[0051] S140, determining, through a left window detection circuit, first data sampling signals of each delayed data signal after being sampled by a clock signal, and determining a corresponding left window margin detection result according to a signal difference between each first data sampling signal and a reference data signal.
[0052] Among them, the left window margin detection result can refer to the timing window margin indication result used to reflect the relative position between the data signal and the advanced clock signal, which can be represented by temperature code or other encoding forms; the left window represents the timing window located before the current data path sampling position.
[0053] In an embodiment of the present invention, the left window detection circuit 230 is used to sample each delayed data signal output by the advance circuit 210 based on the input clock signal to obtain the corresponding first data sampling signals, and then compare each first data sampling signal with the reference data signal output by the data sampling path 100 to determine whether the two signals are the same, and finally output the left window margin detection result that can reflect the relative position between the data signal and the advance clock signal according to the signal difference between each first data sampling signal and the reference data signal.
[0054] It can be understood that by outputting the left window margin detection result, the advanced timing drift can be detected, and it can be determined whether the current data signal is developing towards a trend of worsening the establishment time margin (i.e., left window deterioration), thereby determining whether it is necessary to execute the timing window calibration process to ensure timing convergence.
[0055] S150, determining, through a right window detection circuit, second data sampling signals after the data signal is sampled by each delayed clock signal, and determining corresponding right window margin detection results according to signal differences between each second data sampling signal and a reference data signal.
[0056] Among them, the right window margin detection result can refer to the timing window margin indication result used to reflect the relative position between the data signal and the lagging clock signal, which can be represented by temperature code or other encoding forms; the right window represents the timing window located after the current data path sampling position.
[0057] In the embodiment of the present invention, unlike the left window detection circuit 230, the right window detection circuit 240 is used to sample the input data signal based on each delayed clock signal output by the hysteresis circuit 220 to obtain respectively corresponding second data sampling signals, and then compare each second data sampling signal with the reference data signal output by the data sampling path 100 to determine whether the two signals are the same, and finally output a right window margin detection result that can reflect the relative position between the data signal and the lagged clock signal according to the signal difference between each second data sampling signal and the reference data signal.
[0058] It can be understood that by outputting the right window margin detection result, it is possible to detect the delayed timing drift and determine whether the current data signal is developing towards a trend of worsening the retention time margin (i.e., right window deterioration), thereby determining whether it is necessary to execute the timing window calibration process to ensure timing convergence.
[0059] The technical solution of the embodiment of the present invention is to determine the reference data signal after the data signal is sampled by the clock signal by using the data sampling path; to perform delay processing of different delay units on the data signal and the clock signal by using the advance circuit and the lag circuit respectively, to obtain the corresponding delayed data signal and delayed clock signal; to determine the first data sampling signal of each delayed data signal after being sampled by the clock signal by using the left window detection circuit, and to determine the corresponding left window margin detection result according to the signal difference between each first data sampling signal and the reference data signal; to determine the second data sampling signal of the data signal after being sampled by each delayed clock signal by using the right window detection circuit, and to determine the corresponding right window margin detection result according to the signal difference between each second data sampling signal and the reference data signal. This solution can realize the accurate detection of the deviation between the data signal and the clock signal, and output the corresponding window margin detection result, thereby providing an important reference for the subsequent timing window calibration process.
[0060] Embodiment 2
[0061] Figure 3 The flowchart of a timing window margin detection method provided in the second embodiment of the present invention is further optimized and expanded based on the above implementation, and can be combined with various optional technical solutions in the above implementation. Figure 3 As shown, a timing window margin detection method provided in the second embodiment is applied to a timing window margin detection circuit, and the method specifically includes the following steps:
[0062] S210 , using a first data sampling component to synchronously sample a data signal based on a clock signal to obtain a corresponding reference data signal.
[0063] In the embodiment of the present invention, the data sampling path 100 may include a first data sampling component 110. The first data sampling component 110 may be a component with a data synchronization sampling function such as a trigger, for example, a D trigger, a T trigger, etc. The data sampling path 100 may adopt data sampling principles including but not limited to single data rate (SDR), double data rate (DDR), and quad data rate (QDR). Figure 4 This is the timing waveform of one phase sampling of DDR sampling, that is, data synchronous sampling is performed when the rising edge of the clock signal is triggered. The other sampling phase process is similar and will not be repeated here.
[0064] It should be understood that in order to ensure that the setup time and hold time are not violated, the change edge of the data signal is required not to fall into the interval where the timing does not converge under normal working conditions (that is, to ensure correct sampling), that is, Figure 4 The gray area in the figure, where the interval where the timing does not converge = setup time + hold time.
[0065] S220 , using each first delay unit to perform delay processing on the data signal by a corresponding delay unit, to obtain a corresponding delayed data signal.
[0066] In the embodiment of the present invention, the look-ahead circuit 210 may include a first preset number of first delay units 211 , and the look-ahead circuit 210 may be composed of a plurality of first delay units 211 in series or in parallel. Figure 5 and Figure 6 The schematic diagrams of the lead circuit structure are based on a serial delay structure and a parallel delay structure respectively. Among them, the number of the first delay units 211 is the first preset number, which can be set accordingly according to the actual detection accuracy requirements. The more the number of first delay units 211 set in the lead circuit 210, the higher the accuracy of the subsequent left window margin detection result.
[0067] According to the specific delay structure type adopted by the advance circuit 210, a corresponding delay unit can be set for each first delay unit 211, so as to obtain a delayed data signal corresponding to different delay units. Figure 5 The serial delay structure shown in FIG. 1 can set the same delay unit for each first delay unit 211, so that after the data signal is delayed by each first delay unit 211, a delayed data signal corresponding to a different delay unit can be obtained; if the serial delay structure is used Figure 6In the parallel delay structure shown in FIG. 1 , different delay units can be set for each first delay unit 211, for example, 1 delay unit (1X) is set for the first first delay unit 211, 2 delay units (2X) are set for the second first delay unit 211, 3 delay units (3X) are set for the third first delay unit 211, and so on. In this way, after the data signal is delayed by each first delay unit 211, a delayed data signal corresponding to a different delay unit can also be obtained. The corresponding delay waveform diagram is shown in FIG. Figure 7 shown.
[0068] S230 , using each second delay unit to perform delay processing on the clock signal by a corresponding delay unit, to obtain a corresponding delayed clock signal.
[0069] In the embodiment of the present invention, the hysteresis circuit 220 may include a second preset number of second delay units 221 , and the hysteresis circuit 220 may also be composed of a plurality of second delay units 221 in a serial or parallel manner. Figure 5 and Figure 6 It can also be a schematic diagram of a hysteresis circuit structure based on a serial delay structure and a schematic diagram of a hysteresis circuit structure based on a parallel delay structure. The delay principle of the hysteresis circuit 220 here is the same as that of the above-mentioned advance circuit 210, so it will not be repeated here. It is worth noting that the advance circuit 210 uses a plurality of first delay units 211 to delay the data signal and outputs a delayed data signal corresponding to different delay units, while the hysteresis circuit 220 uses a plurality of second delay units 221 to delay the clock signal and output a delayed clock signal corresponding to different delay units, thereby achieving the effects of timing advance (advance) and timing delay (lag), respectively.
[0070] The number of second delay units 221 set, namely the second preset number, may also be set accordingly according to the actual detection accuracy requirement. The more second delay units 221 are set, the higher the accuracy of the subsequent right window margin detection result.
[0071] It is understandable that the delay elements used in the first delay unit 211 and the second delay unit 221 may be the same or different, and the first preset number and the second preset number may be the same or different, and this embodiment does not impose any specific limitation on this.
[0072] S240 , using each second data sampling component to synchronously sample the delayed data signal pairs corresponding to each second data sampling component based on the clock signal, to obtain corresponding first data sampling signals respectively.
[0073] Figure 8 FIG. 1 is a schematic diagram of a left window detection circuit provided in Embodiment 2 of the present invention. Figure 8As shown, the left window detection circuit 230 may include a first preset number of second data sampling components 231 and a first XOR gate 232, as well as a first signal interference removal module 233 and a first voting coding module 234. The input end of the second data sampling component 231 is respectively connected to the output end of the corresponding first delay unit 211 in the lead circuit 210, and the input end of each second data sampling component 231 is respectively connected in parallel to the input clock end of the data sampling path 100; the input end of each first XOR gate 232 is respectively connected to the output end of the data sampling path 100 and the output end of the corresponding second data sampling component 231; the input end of the first signal interference removal module 233 is respectively connected to the output end of each first XOR gate 232; the input end of the first voting coding module 234 is connected to the output end of the first signal interference removal module 233.
[0074] In the embodiment of the present invention, the number of the second data sampling components 231 is the same as the number of the first delay units 211 in the look-ahead circuit 210, that is, each first delay unit 211 corresponds to a second data sampling component 231; at the same time, the second data sampling component 231 and the first data sampling component 110 in the data sampling path 100 may be the same or different in component type, for example, both may be D flip-flops, which is not specifically limited in this embodiment. Each second data sampling component 231 may synchronously sample the delayed data signal output by the first delay unit 211 connected thereto based on the input clock signal, and output the corresponding first data sampling signal, that is, synchronously sample the delayed data signals with different delays under the same clock signal.
[0075] S250 , using the first XOR gates corresponding to the second data sampling components respectively, to determine a first signal comparison result between the reference data signal and the first data sampling signal corresponding to the second data sampling component.
[0076] In the embodiment of the present invention, the number of the first XOR gates 232 is the same as the number of the second data sampling components 231, that is, each first XOR gate 232 is connected to a corresponding second data sampling component 231. The first XOR gate 232 is used to compare the input reference data signal and the first data sampling signal to determine whether the two are the same, and output the corresponding first signal comparison result; wherein the first signal comparison result can be represented by a binary number, such as 0 to indicate that the input reference data signal and the first data sampling signal are the same, and 1 to indicate that the two are different.
[0077] S260, using the first signal interference removal module and the first voting coding module to perform signal interference removal and voting coding processing on each first signal comparison result, respectively, to obtain a corresponding left window offset detection code, and use the left window offset detection code as a left window margin detection result.
[0078] In an embodiment of the present invention, since the first XOR gate 232 may have jitter during actual output, and there may also be noise interference in the circuit system, the first signal interference removal module 233 can be used to de-burr and filter the input first signal comparison results; at the same time, in order to facilitate the detection and output of the first signal comparison results, the first voting coding module 234 can be further used to encode and output the processed first signal comparison results, such as outputting a temperature code or a left window offset detection code in other encoded forms, and using the left window offset detection code as the corresponding left window margin detection result.
[0079] S270 , using each third data sampling component to synchronously sample the data signal based on the corresponding delayed clock signal, to obtain corresponding second data sampling signals respectively.
[0080] Fig. 9 FIG. 1 is a schematic diagram of a right window detection circuit provided in Embodiment 2 of the present invention. Fig. 9 As shown, the right window detection circuit 240 may include a second preset number of third data sampling components 241 and second XOR gates 242, as well as a second signal interference removal module 243 and a second voting coding module 244. The input end of the third data sampling component 241 is respectively connected to the output end of the corresponding second delay unit 221 in the hysteresis circuit 220, and the input end of each third data sampling component 241 is respectively connected in parallel to the input data end of the data sampling path 100; the input end of each second XOR gate 242 is respectively connected to the output end of the data sampling path 100 and the output end of the corresponding third data sampling component 241; the input end of the second signal interference removal module 243 is respectively connected to the output end of each second XOR gate 242; the input end of the second voting coding module 244 is connected to the output end of the second signal interference removal module 243.
[0081] Similarly, the number of the third data sampling components 241 is the same as the number of the second delay units 221 in the hysteresis circuit 220, that is, each third data sampling component 241 is connected to a corresponding second delay unit 221; at the same time, the component types used by the first data sampling component 110, the second data sampling component 231 and the third data sampling component 241 can be the same or different, for example, they can all use D flip-flops, and this embodiment does not impose any specific restrictions on this.
[0082] Each third data sampling component 241 can synchronously sample the input data signal based on the corresponding delayed clock signal and output the corresponding second data sampling signal, that is, synchronously sample the input data signal under different delayed clock signals.
[0083] S280 , using the second XOR gates corresponding to the third data sampling components respectively, to determine a second signal comparison result between the reference data signal and the second data sampling signal corresponding to the third data sampling components.
[0084] In the embodiment of the present invention, similar to S250, the second XOR gate 242 can be used to compare the input reference data signal and the second data sampling signal to determine whether the two are the same, and output the corresponding second signal comparison result.
[0085] S290, using the second signal interference removal module and the second voting coding module to perform signal interference removal and voting coding processing on each second signal comparison result, respectively, to obtain a corresponding right window offset detection code, and use the right window offset detection code as the right window margin detection result.
[0086] In an embodiment of the present invention, similar to S260, the second signal interference removal module 243 can be used to de-burr and filter each input second signal comparison result, and the second voting coding module 244 can be further used to encode and output the processed second signal comparison result, such as outputting a temperature code or a right window offset detection code in other encoded forms, and using the right window offset detection code as the corresponding right window margin detection result.
[0087] Fig.10 The structure diagram of a timing window margin detection circuit provided by the second embodiment of the present invention is shown in FIG. Fig.10 As shown, the leading circuit 210 adopts a parallel delay structure, and the lagging circuit 220 adopts a serial delay structure. Other circuit structures can refer to the above embodiments and will not be described here. It is worth noting that if the timing window margin detection circuit is used in the subsequent timing window calibration method, the input clock signal should be replaced by the target delayed clock signal output by the digital control delay module 400.
[0088] Fig.11 A schematic diagram of a timing window detection provided by the second embodiment of the present invention. Fig.11 As shown, the number of first delay units 211 included in the lead circuit 210 and the number of second delay units 221 included in the lag circuit 220 are both 4; the time interval between symbol ① and symbol △1 represents the setup time + hold time, that is, the minimum time window to ensure that data sampling is error-free. Fig.11 It can be seen that the phase positions of the current data signal and the clock signal are in a relatively optimal position, and the left window offset detection code and the right window offset detection code are both temperature codes represented by 0000, that is, neither the left window nor the right window touches the timing boundary, and there is no need to trigger the subsequent timing window calibration process.
[0089] Fig.12 A schematic diagram of another timing window detection provided by the second embodiment of the present invention. Fig.12 It can be seen that the current left window offset detection code is the temperature code 0011, and the right window offset detection code is the temperature code 0000, indicating that the relative position between the current data signal and the clock signal is getting closer, that is, the data signal is "early" relative to the clock signal, and is developing towards a trend of worsening setup time margin (that is, left window deterioration), and towards a situation where the hold time margin is getting better. However, it is still in a normal working state, that is, the change edge of the data signal will not fall into the interval where the timing does not converge. At this time, you can choose whether to trigger the subsequent timing window calibration process based on the specific reliability requirements of the system.
[0090] Fig.13 A schematic diagram of another timing window detection provided by the second embodiment of the present invention. Fig.13 It can be seen that the current left window offset detection code is the temperature code 0000, and the right window offset detection code is the temperature code 0011, indicating that the relative position between the current data signal and the clock signal is getting farther, that is, the data signal is "late" relative to the clock signal, and is developing towards a trend of worsening retention time margin (that is, right window deterioration), and towards a situation where the setup time margin is getting better. However, it is still in a normal working state, that is, the change edge of the data signal will not fall into the interval where the timing does not converge. At this time, you can choose whether to trigger the subsequent timing window calibration process based on the specific reliability requirements of the system.
[0091] Fig.14 A schematic diagram of another timing window detection provided by the second embodiment of the present invention. Fig.14 It can be seen that the current left window offset detection code is the temperature code 1111, and the right window offset detection code is the temperature code 0000, indicating that the timing window has reached the establishment time boundary and the left window has seriously deteriorated. At this time, the data sampling path can no longer guarantee the accuracy of data sampling, and the timing window calibration process needs to be triggered in time to prevent further deterioration of the timing window.
[0092] The technical solution of the embodiment of the present invention provides a simple and reliable timing window margin detection mechanism, which can accurately detect the delay or lag of the timing window and output the window margin detection result of the relative position between the data signal and the clock signal, thereby providing an important reference for the subsequent timing window calibration process.
[0093] Embodiment 3
[0094] Fig.15 This is a schematic diagram of the structure of a timing window calibration circuit provided by Embodiment 3 of the present invention. Fig.15As shown, the timing window calibration circuit includes: a state machine 300, a digital control delay module 400 and a timing window margin detection circuit described in any embodiment of the present invention, and the timing window margin detection circuit includes: a data sampling path 100 and a redundancy detection path 200.
[0095] Among them, the input end of the state machine 300 is connected to the output end of the redundant detection path 200, and is used to determine the corresponding target delay control codeword according to the window margin detection result output by the redundant detection path 200, and send it to the digital control delay module 400; the input end of the digital control delay module 400 is connected to the output end of the state machine 300, and is used to delay the input clock signal according to the target delay control codeword, and output the corresponding target delayed clock signal for use by the subsequent stage. Its structural schematic diagram is shown in FIG. Fig.16 shown.
[0096] Based on the above timing window calibration circuit, Fig.17 This is a flowchart of a timing window calibration method provided in Embodiment 3 of the present invention. This embodiment is applicable to the case where the timing window is calibrated to ensure timing convergence. Fig.17 As shown, a timing window calibration method provided in the third embodiment is applied to a timing window calibration circuit, and the method specifically includes the following steps:
[0097] S310, obtaining a left window margin detection result and a right window margin detection result output by a timing window margin detection circuit through a state machine, and determining a target delay control codeword according to the left window margin detection result, the right window margin detection result and a preset window detection margin threshold.
[0098] The preset window detection margin threshold may be understood as the threshold of the left and right window detection margins that are set in advance according to the reliability requirements of the circuit system.
[0099] The target delay control codeword may refer to the delay control codeword used to optimize the corresponding timing window determined by the state machine according to the timing window (left window or right window) where severe deterioration has occurred after determining to trigger the timing window calibration process; wherein, severe deterioration of the left window indicates that the setup time boundary has been reached (setup time violation), and severe deterioration of the right window indicates that the hold time boundary has been reached (hold time violation).
[0100] In the embodiment of the present invention, Fig.15As shown, the state machine 300 can obtain the left window margin detection result and the right window margin detection result output by the redundant detection path 200, and then determine whether the left window margin detection result and the right window margin detection result exceed the preset window detection margin threshold according to the pre-configured preset window detection margin threshold. If one of the window margin detection results exceeds the preset window detection margin threshold, the timing window calibration process will be triggered, and the corresponding target delay control codeword will be determined according to the timing window (left window or right window) where severe deterioration occurs.
[0101] S320 , determining a corresponding target delayed clock signal according to the target delay control codeword and the clock signal through a digital control delay module.
[0102] In the embodiment of the present invention, Fig.15 As shown, the numerical control delay module 400 can receive the target delay control codeword sent by the state machine 300, and then delay the input clock signal accordingly according to the target delay control codeword, and output the corresponding target delayed clock signal for use by the subsequent stage. The subsequent data sampling path 100 will synchronously sample the data signal based on the target delayed clock signal, and output the correctly sampled reference data signal, thereby realizing the calibration of the timing window, ensuring that the change edge of the data signal does not fall into the interval where the timing does not converge, and adjusting and optimizing the synchronization of the clock signal and the data signal.
[0103] The technical solution of the embodiment of the present invention obtains the left window margin detection result and the right window margin detection result output by the timing window margin detection circuit through a state machine, and determines the target delay control codeword according to the left window margin detection result, the right window margin detection result and the preset window detection margin threshold; and determines the corresponding target delay clock signal according to the target delay control codeword and the clock signal through the numerical control delay module. This technical solution can realize dynamic adjustment of the timing window according to the window margin detection result output by the timing window margin detection circuit, so that the change edge of the data signal does not fall into the deteriorated timing window, thereby realizing that during the delay calibration process, the normal transmission and reception of data can still be guaranteed.
[0104] Embodiment 4
[0105] Fig.18 The flowchart of a timing window calibration method provided in the fourth embodiment of the present invention is further optimized and expanded based on the above implementation, and can be combined with various optional technical solutions in the above implementation. Fig.18 As shown, a timing window calibration method provided in the fourth embodiment is applied to a timing window calibration circuit. The method specifically includes the following steps:
[0106] S410, using a state machine to obtain a left window margin detection result and a right window margin detection result output by a redundant detection path of a timing window margin detection circuit, and to obtain a pre-configured preset left window detection margin threshold and a preset right window detection margin threshold.
[0107] Among them, the preset left window detection margin threshold and the preset right window detection margin threshold are window detection margin thresholds configured separately for the left timing window and the right timing window, respectively, and the preset left window detection margin threshold and the preset right window detection margin threshold can be the same or different, and this embodiment does not impose specific restrictions on this.
[0108] In the embodiment of the present invention, the corresponding preset left window detection margin threshold and the preset right window detection margin threshold can be pre-set according to the reliability requirements of the system, wherein the higher the system reliability, the larger the corresponding preset left window detection margin threshold and the preset right window detection margin threshold are; then the state machine 300 is used to read the left window margin detection result and the right window margin detection result output by the redundant detection path 200, for example, the left window offset detection code L_code <n:0>and right window offset detection code R_code <m:0>, so that it can be determined whether the timing window calibration process needs to be executed based on the above window margin detection result and the corresponding window detection margin threshold.
[0109] S420. When the state machine determines that the left window margin detection result exceeds the preset left window detection margin threshold and the right window margin detection result does not exceed the preset right window detection margin threshold, determine the first delay unit adjustment amount corresponding to the left window margin detection result, and generate the corresponding first delay control codeword according to the first delay unit adjustment amount.
[0110] The first delay unit adjustment amount may refer to the corresponding number of delay units for delay adjustment of the input clock signal in order to achieve timing convergence when the left window is severely deteriorated. Fig.14 , the left window offset detection code is the temperature code 1111 (corresponding to decimal 4), and the preset left window detection margin threshold is assumed to be the temperature code 0011 (corresponding to decimal 2). Obviously, the left window offset detection code has exceeded the margin threshold of the corresponding window, and the difference is 2 (decimal). At this time, the timing window has reached the establishment time boundary, that is, the left window is seriously deteriorated. In order to make the timing converge, the current timing window needs to be adjusted to the left by 2 delay units, that is, the first delay unit adjustment amount is 2.
[0111] The first delay control codeword may be a delay control codeword used by the digital controlled delay module to adjust the timing window of the input clock signal to the left so as to achieve timing convergence.
[0112] In an embodiment of the present invention, the state machine 300 can be used to determine whether the left window margin detection result exceeds the preset left window detection margin threshold, and whether the right window margin detection result exceeds the preset right window detection margin threshold. If the left window margin detection result exceeds the preset left window detection margin threshold, and the right window margin detection result does not exceed the preset right window detection margin threshold, the timing window calibration process will be triggered, and the position of the current timing window will be determined according to the left window margin detection result, and the corresponding first delay unit adjustment amount will be determined, and then the corresponding first delay control codeword for adjusting the timing window to the left to achieve timing convergence will be output according to the first delay unit adjustment amount.
[0113] S430. When the state machine determines that the right window margin detection result exceeds the preset right window detection margin threshold and the left window margin detection result does not exceed the preset left window detection margin threshold, determine the second delay unit adjustment amount corresponding to the right window margin detection result, and generate the corresponding second delay control codeword according to the second delay unit adjustment amount.
[0114] The second delay unit adjustment amount may refer to the corresponding number of delay units for delay adjustment of the input clock signal in order to achieve timing convergence when the right window is severely deteriorated.
[0115] The second delay control codeword may be a delay control codeword used by the digital delay module to adjust the timing window of the input clock signal to the right to achieve timing convergence.
[0116] In an embodiment of the present invention, similar to S420, when the state machine 300 detects that the right window margin detection result exceeds the preset right window detection margin threshold, and the left window margin detection result does not exceed the preset left window detection margin threshold, the calibration process will be triggered immediately, and the position of the current timing window will be determined according to the right window margin detection result, and the corresponding second delay unit adjustment amount will be determined, and then the corresponding second delay control codeword for adjusting the timing window to the right to achieve timing convergence will be output according to the second delay unit adjustment amount.
[0117] S440 , using a digital control delay module to delay the clock signal by a corresponding delay unit according to the first delay control codeword or the second delay control codeword of the target delay control codeword, to obtain a corresponding target delayed clock signal.
[0118] In an embodiment of the present invention, the digital control delay module 400 can receive the first delay control codeword or the second delay control codeword sent by the state machine 300, and then perform delay processing on the input clock signal by the corresponding delay unit according to the first delay control codeword or the second delay control codeword, and output the corresponding target delayed clock signal for use by the subsequent stage. After that, the data sampling path 100 will synchronously sample the data signal based on the target delayed clock signal, and output the correctly sampled reference data signal, thereby realizing the calibration of the timing window.
[0119] The technical solution of the embodiment of the present invention provides an accurate and reliable timing window calibration mechanism, which can determine the current timing window state according to the window margin detection result output by the timing window margin detection circuit, predict the trend of timing adjustment in advance, and when the window margin detection result exceeds the window detection margin threshold, dynamically adjust the timing window using the state machine and the numerical control delay module, so that the change edge of the data signal does not fall into the deteriorated timing window, thereby ensuring the normal transmission and reception of data during the delay calibration process; at the same time, based on the measurement range provided by the timing window margin detection circuit, it can allow the designer to select an appropriate window detection margin threshold according to the specific reliability requirements of the system, thereby increasing the flexibility of the application scenario.
[0120] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0121] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A timing window margin detection method, characterized in that: Applied to a timing window margin detection circuit, the timing window margin detection circuit includes: a data sampling path and a redundant detection path, the redundant detection path includes: an advance circuit, a lag circuit, a left window detection circuit and a right window detection circuit; wherein the method includes: Determine, through the data sampling path, a reference data signal after the data signal is sampled by the clock signal; Performing delay processing of different delay units on the data signal through the advance circuit to obtain delayed data signals corresponding to the different delay units; Performing delay processing of different delay units on the clock signal through the hysteresis circuit to obtain delayed clock signals corresponding to the different delay units; Determine, by the left window detection circuit, first data sampling signals of each of the delayed data signals after being sampled by the clock signal, and determine corresponding left window margin detection results according to signal differences between each of the first data sampling signals and the reference data signal; The right window detection circuit determines the second data sampling signals of the data signal after being sampled by each of the delayed clock signals, and determines the corresponding right window margin detection result according to the signal difference between each of the second data sampling signals and the reference data signal.
2. The method according to claim 1, characterized in that The data sampling path includes a first data sampling component; accordingly, determining the reference data signal after the data signal is sampled by the clock signal through the data sampling path includes: The first data sampling component is used to synchronously sample the data signal based on the clock signal to obtain the corresponding reference data signal.
3. The method according to claim 1, characterized in that The advance circuit includes a first preset number of first delay units; accordingly, the advance circuit performs delay processing of different delay units on the data signal to obtain delayed data signals corresponding to different delay units, including: The first delay units are used to perform delay processing corresponding to the delay unit on the data signal to obtain the corresponding delayed data signals.
4. The method according to claim 1, characterized in that: The hysteresis circuit includes a second preset number of second delay units; accordingly, the hysteresis circuit performs delay processing of different delay units on the clock signal to obtain delayed clock signals corresponding to different delay units, including: The second delay units are used to perform delay processing on the clock signal corresponding to the delay unit to obtain the corresponding delayed clock signals.
5. The method according to claim 1, characterized in that The left window detection circuit includes a first preset number of second data sampling components and a first XOR gate, as well as a first signal interference removal module and a first voting encoding module; accordingly, the left window detection circuit determines the first data sampling signal of each delayed data signal after being sampled by the clock signal, and determines the corresponding left window margin detection result according to the signal difference between each first data sampling signal and the reference data signal, including: Using each of the second data sampling components to synchronously sample the delayed data signals corresponding to each of the second data sampling components based on the clock signal, to obtain corresponding first data sampling signals respectively; Determine a first signal comparison result between the reference data signal and the first data sampling signal corresponding to the second data sampling component by using the first XOR gates respectively corresponding to the second data sampling components; The first signal interference removal module and the first voting coding module are used to perform signal interference removal and voting coding processing on each of the first signal comparison results, respectively, to obtain a corresponding left window offset detection code, and the left window offset detection code is used as the left window margin detection result.
6. The method according to claim 1, characterized in that The right window detection circuit includes a second preset number of third data sampling components and a second XOR gate, as well as a second signal interference removal module and a second voting encoding module; accordingly, the right window detection circuit determines the second data sampling signals of the data signal after being sampled by each of the delayed clock signals, and determines the corresponding right window margin detection result according to the signal difference between each of the second data sampling signals and the reference data signal, including: Using each of the third data sampling components to synchronously sample the data signal based on the corresponding delayed clock signal, respectively, to obtain the corresponding second data sampling signal; Determine a second signal comparison result between the reference data signal and the second data sampling signal corresponding to the third data sampling component by using the second XOR gates respectively corresponding to the third data sampling components; The second signal interference removal module and the second voting coding module are used to perform signal interference removal and voting coding processing on each second signal comparison result respectively to obtain a corresponding right window offset detection code, and the right window offset detection code is used as the right window margin detection result.
7. The method according to claim 1, characterized in that The encoding forms corresponding to the left window margin detection result and the right window margin detection result at least include a temperature code.
8. A timing window calibration method, characterized in that: Applied to a timing window calibration circuit, the timing window calibration circuit comprising: a state machine, a digital control delay module and a timing window margin detection circuit according to any one of claims 1 to 7; wherein the method comprises: Obtaining a left window margin detection result and a right window margin detection result output by the timing window margin detection circuit through the state machine, and determining a target delay control codeword according to the left window margin detection result, the right window margin detection result and a preset window detection margin threshold; The digitally controlled delay module determines a corresponding target delayed clock signal according to the target delay control codeword and the clock signal.
9. The method according to claim 8, characterized in that The target delay control codeword includes: a first delay control codeword for adjusting the timing window to the left, and a second delay control codeword for adjusting the timing window to the right; accordingly, obtaining the left window margin detection result and the right window margin detection result output by the timing window margin detection circuit through the state machine, and determining the target delay control codeword according to the left window margin detection result, the right window margin detection result and a preset window detection margin threshold, including: Using the state machine to obtain the left window margin detection result and the right window margin detection result output by the redundant detection path of the timing window margin detection circuit, and to obtain a pre-configured preset left window detection margin threshold and a preset right window detection margin threshold; When it is determined by the state machine that the left window margin detection result exceeds the preset left window detection margin threshold and the right window margin detection result does not exceed the preset right window detection margin threshold, determine a first delay unit adjustment amount corresponding to the left window margin detection result, and generate the corresponding first delay control codeword according to the first delay unit adjustment amount; When the state machine determines that the right window margin detection result exceeds the preset right window detection margin threshold and the left window margin detection result does not exceed the preset left window detection margin threshold, the second delay unit adjustment amount corresponding to the right window margin detection result is determined, and the corresponding second delay control codeword is generated according to the second delay unit adjustment amount.
10. The method according to claim 8, characterized in that The determining the corresponding target delayed clock signal according to the target delay control codeword and the clock signal by the digital control delay module includes: The digitally controlled delay module is used to delay the clock signal by a corresponding delay unit according to the first delay control codeword or the second delay control codeword of the target delay control codeword to obtain the corresponding target delayed clock signal.
