Carry chain timing calibration method, device, equipment and storage medium
By acquiring random and main clock signals, generating test pulse signals and establishing a lookup table, and calibrating the carry chain timing in conjunction with the calibration correction factor, the impact of the external environment on timing accuracy is solved, measurement accuracy is improved, and high-cost chips and FPGAs are avoided. Resource limitations.
Patent Information
- Application Number
- CN202211204517.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-29
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2042-09-29
AI Technical Summary
In the existing technology, the carry chain timing system is sensitive to changes in the external environment (such as temperature and voltage), which affects timing measurement accuracy. ASIC chip development cycles are long and costly, and changes in the delay time of FPGA carry chain resources also affect timing accuracy.
By obtaining the random clock signal and the master clock signal, the test pulse signal is generated, the delay time of each transmission level is determined, a lookup table is established, and the delay time is calibrated and corrected with the calibration correction factor to reduce the impact of the external environment on timing.
It improves the measurement accuracy of carry chain timing, reduces the impact of the external environment on the timing system, and avoids the limitations of high-cost ASIC chips and FPGA resources.
Smart Images

Figure CN116009376B
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of digital measurement technology, and in particular to a carry chain timing calibration method, device, equipment and storage medium. Background Art
[0002] High-precision time measurement is of great significance in many fields. For example, laser radar detects the position, speed and other characteristic quantities of the target by emitting laser beams. The timing accuracy between the transmitted signal and the echo signal affects the measurement accuracy of the laser radar.
[0003] In the prior art, semiconductor chips ASIC (Application Specific Integrated Circuit) chips are usually used to implement timing, but the development cycle of ASIC chips is long and the cost is expensive; or FPGA (Field Programmable Gate Array) carry chain resources are used to implement timing, but the carry chain inside the FPGA will change with the changes in ambient temperature and operating voltage, and the delay time will also change, thereby affecting the measurement accuracy of the timing.
[0004] Therefore, how to calibrate the timing of the carry chain to avoid the influence of the external environment has become a technical problem that needs to be solved at present. Summary of the invention
[0005] The embodiments of the present application provide a carry chain timing calibration method, device, equipment and storage medium, which can compensate for the timing of the carry chain, reduce the impact of the external environment on the carry chain timing, and thus improve the measurement accuracy of the timing.
[0006] In a first aspect, an embodiment of the present application provides a carry chain timing calibration method, comprising:
[0007] Obtain random clock signal and main clock signal;
[0008] Obtaining a test pulse signal according to the random clock signal and the main clock signal;
[0009] Inputting the test pulse signal into the carry chain, determining the delay time corresponding to the signal at each transmission level, so as to generate a lookup table, the lookup table is used to determine the delay time corresponding to the signal input into the carry chain;
[0010] When receiving the measurement signal of the input carry chain, the corresponding calibration correction factor is determined in combination with the random clock signal and the master clock signal;
[0011] The delay time in the lookup table is calibrated and corrected according to the calibration correction factor, and the calibration time after calibration correction is obtained.
[0012] In a second aspect, an embodiment of the present application further provides a carry chain timing calibration device, the device comprising:
[0013] A first signal acquisition module, configured to acquire a random clock signal and a main clock signal;
[0014] A second signal acquisition module is configured to acquire a test pulse signal according to the random clock signal and the main clock signal;
[0015] A delay determination module is configured to input the test pulse signal into the carry chain, determine the delay time corresponding to the signal at each transmission level, and generate a lookup table, the lookup table is used to determine the delay time corresponding to the signal input into the carry chain;
[0016] A correction determination module configured to determine a corresponding calibration correction factor in combination with the random clock signal and the master clock signal upon receiving a measurement signal of the input carry chain;
[0017] The timing calibration module is configured to calibrate and correct the delay time in the lookup table according to the calibration correction factor, and obtain the calibration time after the calibration correction.
[0018] In a third aspect, an embodiment of the present application further provides a carry chain timing calibration device, comprising:
[0019] one or more processors;
[0020] A storage device is used to store one or more programs. When the one or more programs are executed by one or more processors, the one or more processors implement the carry chain timing calibration method as described in the first aspect above.
[0021] In a fourth aspect, an embodiment of the present application further provides a storage medium storing computer executable instructions, which, when executed by a processor, are used to execute the carry chain timing calibration method as described in the first aspect above.
[0022] The present application obtains a non-correlated random clock signal and a main clock signal, and generates a test pulse signal of an input carry chain according to the random clock signal and the main clock signal, so as to obtain the delay time corresponding to each transmission level in the carry chain, and then records the delay time in a lookup table to facilitate the corresponding delay time by looking up the table. In addition, the output delay time is calibrated and corrected by a calibration correction factor to obtain the calibration time after calibration, thereby realizing the calibration of the carry chain timing, reducing the influence of the external environment on the carry chain timing, and thus improving the measurement accuracy of the timing. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 A flow chart of a carry chain timing calibration method provided in an embodiment of the present application;
[0024] Figure 2 A schematic diagram of generating a test pulse signal provided in an embodiment of the present application;
[0025] Figure 3 A pulse schematic diagram for generating a test pulse signal is provided for an embodiment of the present application;
[0026] Figure 4 A flowchart for determining a delay time provided in an embodiment of the present application;
[0027] Figure 5 A schematic diagram of a carry chain timing calibration device provided in an embodiment of the present application;
[0028] Figure 6 A schematic diagram of the structure of a carry chain timing calibration device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0029] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the embodiments described herein are used to explain the present application, rather than to limit the present application. It should also be noted that, for ease of description, only parts related to the present application, rather than all structures, are shown in the accompanying drawings.
[0030] It should be noted that due to space limitations, this application description does not list all optional implementation methods. After reading this application description, those skilled in the art should be able to understand that as long as the technical features do not contradict each other, any combination of technical features can constitute an optional implementation method.
[0031] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity, operation or object from another entity, operation or object, and do not necessarily require or imply that there is any such actual relationship or order between these entities, operations or objects. And the number of objects distinguished by "first", "second", etc. is not limited, and it can be one or more. It is conceivable that in the description of this application, "more than one" means two or more.
[0032] For an n-bit parallel adder formed by interconnecting n adders in a certain way, each bit of the operand is added to the adder for calculation at the same time. Not all bits and numbers are generated at the same time. There is the generation and transmission of carries, which is called a carry chain. The adder carries are generated and transmitted bit by bit from the low bit to the high bit, and the high bit depends on the generation and transmission of the low bit. There are multiple delay units in the carry chain. If each adder is used as a delay unit, the time of the electrical signal passing through all delay units in the carry chain is accumulated to obtain the signal time. Therefore, the carry chain can be used to measure the signal transmission time.
[0033] In addition, the carry chain can also be implemented using logic units such as CARRY4 and LUT (Look Up Table) in FPGA.
[0034] The carry chain timing calibration method provided in the present application can be used to calibrate the timing of the carry chain. There are multiple delay units in the carry chain. The delay units are used to determine the transmission level in the carry chain. It can be understood that when the signal passes through 2 delay units in sequence, the corresponding transmission level is 2; when the signal passes through 3 delay units in sequence, the corresponding transmission level is 3.
[0035] Figure 1 The flowchart of the carry chain timing calibration method provided in the embodiment of the present application is shown in the figure. The carry chain timing calibration method includes the following steps:
[0036] Step S110: Obtain a random clock signal and a master clock signal.
[0037] In one embodiment, to obtain the master clock signal, it can be multiplied according to the fixed frequency provided by the external crystal oscillator, such as by using an external crystal oscillator and a phase-locked loop, wherein the phase-locked loop provides a frequency multiplication function. Therefore, based on the fixed frequency provided by the external crystal oscillator and the frequency multiplication coefficient provided by the phase-locked loop, the clock signal provided by the external crystal oscillator is multiplied to obtain a first clock signal, and the first clock signal is used as the master clock signal.
[0038] As for obtaining a random clock signal, it can be implemented according to a ring oscillator. In this embodiment, the ring oscillator can be composed of LUTs inside the FPGA. By adjusting the number of LUTs, the period of the output signal of the ring oscillator can be changed. It should be considered that the number of LUTs is an odd number. Exemplarily, when the input of the first-stage LUT is 0, the output of all LUTs is 0, and when the input of the first-stage LUT is 1, the ring oscillator starts to work, and the final-stage LUT starts to alternately output the corresponding waveform, which is the second clock signal, and the second clock signal is used as the random clock signal.
[0039] It should be noted that, for other methods of generating the random clock signal, a ring oscillator composed of three NOT gates or more odd number of NOT gates with their output terminals and input terminals connected end to end may be used to generate the random clock signal.
[0040] Step S120: Obtain a test pulse signal according to the random clock signal and the main clock signal.
[0041] The test pulse signal input to the carry chain can be generated according to the random clock signal and the main clock signal. The test pulse signal is used to input the carry chain to determine the corresponding delay time on each delay unit.
[0042] For the generation of the test pulse signal, in one embodiment, as Figure 2 As shown, Figure 2 A schematic diagram of generating a test pulse signal provided in an embodiment of the present application, wherein the carry chain timing calibration method further includes:
[0043] Step S210: Sample the random clock signal with the master clock signal to obtain a sampled clock signal.
[0044] Step S220: Perform a logic operation on the sampling clock signal and the random clock signal according to a preset operation rule to generate a test pulse signal.
[0045] The random clock signal is sampled with the master clock signal, that is, the master clock signal is used as the sampling signal, and the random clock signal is used as the sampled signal, and the sampling clock signal is obtained after sampling. In addition, the currently acquired sampling clock signal and the random clock signal are subjected to a logical operation according to a preset operation rule. For example, in the preset operation rule, a negation operation is required for the sampling clock signal, and the negation of the sampling clock signal and the random clock signal are ANDed, thereby generating a random pulse signal, and the random pulse signal is a test pulse signal for the input carry chain.
[0046] like Figure 3 As shown, Figure 3 A pulse schematic diagram for generating a test pulse signal is provided for an embodiment of the present application, in which Clk_1 represents a random clock signal, Clk_2 represents a sampling clock signal, Clk_3 represents a third clock signal obtained by performing a negation operation on the sampling clock signal, and Clk_4 represents a test pulse signal.
[0047] Reference Figure 3 The rising edge of the test pulse signal (Clk_4) corresponds to the rising edge of the random clock signal (Clk_1), and the falling edge of the test pulse signal (Clk_4) corresponds to the rising edge of the sampling clock signal (Clk_2) following the rising edge of the random clock signal (Clk_1). Similarly, the falling edge of the test pulse signal (Clk_4) also corresponds to the falling edge of the third clock signal (Clk_3) following the rising edge of the random clock signal (Clk_1).
[0048] It can be seen that this scheme obtains a random clock signal and a main clock signal, and the random clock signal and the main clock signal are non-correlated, and the test pulse signal obtained after the logical operation can be better adapted to the calculation of the delay time, making the calculation of the delay time of each delay unit more accurate.
[0049] Step S130: Input the test pulse signal into the carry chain to determine the delay time corresponding to the signal at each transmission level to generate a lookup table.
[0050] It can be understood that the random clock signal and the main clock signal are non-correlated, and the generated test pulse signal is a random pulse, which falls into the delay unit of the carry chain after being input into the carry chain. After inputting enough random pulses, i.e., test pulse signals, the delay time corresponding to the test pulse signal in each transmission level can be determined. Each transmission level and the corresponding delay time are recorded to obtain a lookup table. It should be noted that in the lookup table, the transmission level is associated with the delay time and stored. Therefore, the lookup table is used to determine the delay time corresponding to the signal input into the carry chain, that is, the corresponding delay time can be determined by looking up the table.
[0051] Step S140: When the measurement signal of the input carry chain is received, the corresponding calibration correction factor is determined in combination with the random clock signal and the main clock signal.
[0052] It is understandable that, with the master clock signal as the working clock, the waveform of the random clock signal is counted within a preset time period, such as within a preset number of working clocks, so as to determine the output waveform frequency corresponding to the random clock signal. It is conceivable that the output waveform frequency can be determined after obtaining the random clock signal and the master clock signal, and stored and recorded for easy reference when performing calibration correction.
[0053] When receiving the measurement signal of the input carry chain, it is necessary to generate a measurement clock signal corresponding to the measurement signal. The measurement clock signal can be generated by a ring oscillator, just like generating a random clock signal. The measurement signal can be obtained by performing a logical operation on the measurement clock signal and the main clock signal according to the corresponding operation rules. It should be noted that the operation rules used to generate the measurement signal can be different from the operation rules used to generate the test pulse signal, as long as the measurement signal can be obtained.
[0054] Therefore, the waveform of the current measurement clock signal is counted to determine the corresponding real-time waveform frequency, and then the ratio of the output waveform frequency to the real-time waveform frequency can be used as a calibration correction factor. The calibration correction factor is used to calibrate and correct the delay time to reduce the impact caused by external environmental factors, thereby improving measurement accuracy.
[0055] For example, taking the random clock signal output by the ring oscillator as an example, correspondingly, when the measurement signal of the input carry chain is received, after determining the real-time waveform frequency fc_osc of the current ring oscillator, by comparing the real-time waveform frequency fc_osc and the stored output waveform frequency sfc_osc of the ring oscillator, the ratio of the output waveform frequency sfc_osc to the real-time waveform frequency fc_osc is used as the calibration correction factor, that is, the calibration correction factor k = sfc_osc / fc_osc.
[0056] Step S150: calibrate and correct the delay time in the lookup table according to the calibration correction factor, and obtain the calibration time after calibration correction.
[0057] The carry chain is easily affected by environmental factors, such as changes in ambient temperature and operating voltage, which will cause the corresponding delay time to change, thereby affecting the measurement accuracy of the timing. Therefore, the determined delay time is calibrated and corrected. For the calibration correction factor used to calibrate the delay time, after the transmission level of the signal transmitted in the carry chain, the transmission level is used as the search address to find the corresponding delay time in the lookup table, and then the delay time is calibrated and corrected using the calibration correction factor.
[0058] For example, the calibration correction factor currently determined is k = sfc_osc / fc_osc, and the delay time obtained from the table is t lut , therefore, the calibration time after calibration correction is t real =k*t lut .
[0059] It can be seen from the above scheme that for the acquired non-correlated random clock signal and main clock signal, the corresponding test pulse signal is obtained according to the corresponding operation rules to obtain the delay time corresponding to each transmission level in the carry chain. The delay time corresponding to different transmission levels is recorded in the lookup table. For the signal input into the carry chain, after determining its transmission level, the corresponding delay time can be obtained by looking up the table, and the calibration correction factor can also be determined in combination with the current signal to calibrate and correct the delay time. While calibrating the timing of the carry chain, it can also effectively reduce the influence of the external environment and improve the measurement accuracy.
[0060] In some embodiments, the random clock signal and the master clock signal are non-correlated, that is, the random clock signal and the master clock signal are two independent signals. The random clock signal and the master clock signal should meet at least one of the following conditions:
[0061] Condition I: The frequency ratio of the random clock signal to the main clock signal is a decimal.
[0062] Condition II: The jitter and frequency drift of the random clock signal and the main clock signal are greater than a preset threshold.
[0063] Condition III: The frequency difference between the main clock signal and the random clock signal is within a preset frequency range.
[0064] It can be seen from the above conditions that for the random clock signal and the main clock signal, the frequencies of the two are not in an integer multiple relationship, that is, the frequency ratio of the two is a decimal. Moreover, the jitter and frequency drift of the corresponding random clock signal and the main clock signal are greater than the preset threshold, so that the jitter and frequency drift of the acquired sampling clock signal are large, so as to improve the randomness of the test pulse signal. It should be noted that the preset threshold and the preset frequency range can be adjusted according to design requirements. The frequency difference between the main clock signal and the random clock signal is within the frequency range, so that the generated test pulse signal has enough time to change randomly. Therefore, the frequency of the random clock signal can be less than the frequency of the main clock signal, and the difference is within the frequency range.
[0065] The random clock signal and the main clock signal that meet the above conditions are non-correlated. The more conditions are met, the greater the non-correlation. Correspondingly, the more accurate the calculation of the delay time of each delay unit is, so as to obtain a more effective and accurate delay time, thereby improving the measurement accuracy of timing.
[0066] In one embodiment, the signal passes through the sequentially connected delay units in the carry chain, and the corresponding transmission level is related to the passed delay units. For sequentially connected delay units, the corresponding transmission level is the order of the delay units in the carry chain. Figure 4 As shown, Figure 4 The flowchart for determining the delay time provided in the embodiment of the present application, the carry chain timing method further includes the following steps:
[0067] Step S410, determining the transmission level of the test pulse signal in the carry chain and the number of pulses on each corresponding delay unit.
[0068] Step S420: Determine the delay time corresponding to each transmission level according to the transmission level and the number of pulses and based on a preset delay calculation formula.
[0069] It can be understood that by inputting the test pulse signal into the carry chain, the delay time of all delay units can be obtained by counting the number of times the test pulse signal appears in the delay unit, and then the delay time of the previous i-stage delay units is accumulated to calculate the cumulative time t taken by the test pulse signal to reach each stage of the delay unit. i ,Right now:
[0070]
[0071] The range of the measured value t is [t i-1 , t], assuming the value is t a , then the standard deviation is:
[0072]
[0073] If and only if t a =(t i -t i-1 ) / 2, the standard deviation reaches the minimum value, so the measured value should be taken:
[0074]
[0075] It can be seen from this that when the transmission level is 0, the test pulse signal falls on the first-level delay unit, and half of the delay time of the first-level delay unit is considered to be the measured delay time; when the transmission level is 1, the test pulse signal falls on the second-level delay unit, and the sum of half of the delay time of the second-level delay unit and the delay time of the first-level delay unit is considered to be the measured delay time; and so on, when the transmission level is N, the test pulse signal falls on the N+1th delay unit, and the sum of half of the delay time of the N+1th delay unit and the delay time of the previous Nth delay units is considered to be the measured delay time.
[0076] The generated lookup table records all the corresponding transmission levels and the associated delay times when the signal is input into the carry chain. When a new signal is input into the carry chain, if the corresponding transmission level is determined, the transmission level can be used as the search address to query the corresponding delay time in the lookup table.
[0077] It should be noted that the ratio of the delay time on the delay unit to the total delay time of the carry chain is the same as the ratio of the number of pulses on each delay unit to the number of pulses on the carry chain. It can be imagined that when there are enough random pulses, the number of times Ni that the random pulse falls on the i-th delay unit can be statistically obtained to be proportional to the total number of random pulses N, and the ratio is the ratio of the delay time Ti of the i-th delay unit to the total delay time Tc, that is, Ti=Tc*Ni / N.
[0078] Therefore, when the test pulse signal enters the carry chain, the delay time of each transmission level is calculated to facilitate the determination of the delay time corresponding to the subsequent measurement signal entering the carry chain. That is, the corresponding delay time can be determined by determining its transmission level, which provides convenience for the timing of the carry chain.
[0079] Figure 5 A schematic diagram of a carry chain timing calibration device provided in an embodiment of the present application, the device is used to execute the carry chain timing calibration method provided in the above embodiment, and has functional modules and beneficial effects corresponding to the execution method. As shown in the figure, the device specifically includes: a first signal acquisition module 501, a second signal acquisition module 502, a delay determination module 503, a correction determination module 504 and a timing calibration module 505.
[0080] The first signal acquisition module 501 is configured to acquire a random clock signal and a main clock signal.
[0081] The second signal acquisition module 502 is configured to acquire a test pulse signal according to the random clock signal and the main clock signal.
[0082] The delay determination module 503 is configured to input the test pulse signal into the carry chain, determine the delay time corresponding to the signal at each transmission level, and generate a lookup table for determining the delay time corresponding to the signal input into the carry chain.
[0083] The correction determination module 504 is configured to determine a corresponding calibration correction factor in combination with the random clock signal and the main clock signal upon receiving the measurement signal of the input carry chain.
[0084] The timing calibration module 505 is configured to calibrate and correct the delay time in the lookup table according to the calibration correction factor, and obtain the calibration time after the calibration correction.
[0085] Based on the above embodiment, the first signal acquisition module 501 is further configured as follows:
[0086] Based on the fixed frequency and the frequency multiplication factor provided by the external crystal oscillator, a first clock signal is generated, and the first clock signal is used as the main clock signal;
[0087] Based on the ring oscillator, a second clock signal is generated, and the second clock signal is used as the random clock signal.
[0088] Based on the above embodiment, the random clock signal and the main clock signal are non-correlated, and the random clock signal and the main clock signal satisfy at least one of the following conditions:
[0089] The frequency ratio of the random clock signal to the main clock signal is a decimal;
[0090] The jitter and frequency drift of the random clock signal and the main clock signal are greater than a preset threshold;
[0091] The frequency difference between the main clock signal and the random clock signal is within a preset frequency range.
[0092] Based on the above embodiment, the second signal acquisition module 502 is further configured as follows:
[0093] The random clock signal is sampled using the master clock signal to obtain a sampling clock signal;
[0094] According to the preset operation rules, the sampling clock signal and the random clock signal are logically operated to generate a test pulse signal.
[0095] Based on the above embodiment, there are a plurality of sequentially connected delay units in the carry chain, and the number of transmission levels of the signal in the carry chain is related to the delay units passed through;
[0096] The delay determination module 503 is further configured to:
[0097] Determine the transmission level of the test pulse signal in the carry chain and the number of pulses on each corresponding delay unit;
[0098] According to the transmission level and the number of pulses, and based on a preset delay calculation formula, the delay time corresponding to each transmission level is determined.
[0099] Based on the above embodiment, the ratio of the delay time on the delay unit to the total delay time of the carry chain is the same as the ratio of the number of pulses on each delay unit to the number of pulses on the carry chain.
[0100] Based on the above embodiment, the calibration correction factor is the ratio of the output waveform frequency corresponding to the random clock signal to the real-time waveform frequency of the measurement signal.
[0101] It is worth noting that in the embodiment of the above-mentioned carry chain timing calibration device, the various functional modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the various functional modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application.
[0102] Figure 6The present invention provides a structural schematic diagram of a carry chain timing calibration device provided in an embodiment of the present invention. The device is used to execute the carry chain timing calibration method provided in the above embodiment, and has functional modules and beneficial effects corresponding to the execution method. As shown in the figure, the device includes a processor 601, a memory 602, an input device 603 and an output device 604. The number of processors 601 in the device can be one or more, and one processor 601 is taken as an example in the figure; the processor 601, the memory 602, the input device 603 and the output device 604 in the device can be connected through a bus or other means, and the figure takes the connection through a bus as an example. The memory 602, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the carry chain timing calibration method in the embodiment of the present invention. The processor 601 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 602, that is, the above-mentioned carry chain timing calibration method is realized. The input device 603 can be used to receive input digital or character information, and generate key signal input related to user settings and function control of the device. The output device 604 can be used to send output digital or character information and generate key signal output related to the functional control of the device, such as transmission level, delay time, etc.
[0103] The embodiment of the present application further provides a storage medium storing computer executable instructions. When the computer executable instructions are executed by a processor, they are used to execute the carry chain timing calibration method described in the above embodiment. Specifically, the method includes:
[0104] Obtain random clock signal and main clock signal;
[0105] Obtaining a test pulse signal according to the random clock signal and the main clock signal;
[0106] Inputting the test pulse signal into the carry chain, determining the delay time corresponding to the signal at each transmission level, so as to generate a lookup table, the lookup table is used to determine the delay time corresponding to the signal input into the carry chain;
[0107] When receiving the measurement signal of the input carry chain, the corresponding calibration correction factor is determined in combination with the random clock signal and the master clock signal;
[0108] The delay time in the lookup table is calibrated and corrected according to the calibration correction factor, and the calibration time after calibration correction is obtained.
[0109] Storage media that store computer executable instructions include permanent and non-permanent, removable and non-removable media, and can be implemented by any method or technology to store information. Information can be computer executable instructions, data structures, modules of programs or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
[0110] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0111] Note that the above are only preferred embodiments of the present application and the technical principles used. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the appended claims.
Claims
1. A carry chain timing calibration method, characterized in that: include: Acquire a random clock signal and a main clock signal, wherein the random clock signal and the main clock signal are non-correlated, so that a frequency ratio of the random clock signal to the main clock signal is a decimal; Acquire a test pulse signal according to the random clock signal and the master clock signal; Input the test pulse signal into the carry chain, determine the delay time corresponding to the test pulse signal at each transmission level, and generate a lookup table, wherein the lookup table is used to determine the delay time corresponding to the test pulse signal input into the carry chain; When receiving the measurement signal input into the carry chain, combining the random clock signal and the master clock signal, determining a corresponding calibration correction factor, wherein the calibration correction factor is a ratio of an output waveform frequency corresponding to the random clock signal to a real-time waveform frequency of the measurement signal; Calibrate and correct the delay time in the lookup table according to the calibration correction factor, and obtain the calibration time after calibration correction; Wherein, acquiring a test pulse signal according to the random clock signal and the master clock signal comprises: Sampling the random clock signal with the master clock signal to obtain a sampled clock signal; According to a preset operation rule, a logic operation is performed on the sampling clock signal and the random clock signal to generate the test pulse signal.
2. The carry chain timing calibration method according to claim 1, characterized in that: The obtaining of the random clock signal and the main clock signal comprises: Generate a first clock signal based on a fixed frequency and a frequency multiplication factor provided by an external crystal oscillator, and use the first clock signal as the main clock signal; Based on the ring oscillator, a second clock signal is generated, and the second clock signal is used as the random clock signal.
3. The carry chain timing calibration method according to claim 1, characterized in that: The random clock signal and the master clock signal also satisfy at least one of the following: The jitter and frequency drift of the random clock signal and the master clock signal are greater than a preset threshold; A frequency difference between the main clock signal and the random clock signal is within a preset frequency range.
4. The carry chain timing calibration method according to claim 1, characterized in that: The carry chain corresponds to a plurality of sequentially connected delay units, and the transmission level of the signal in the carry chain is related to the delay units passed through; The step of inputting the test pulse signal into a carry chain and determining the delay time corresponding to the test pulse signal at each transmission level to generate a lookup table, wherein the lookup table is used to determine the delay time corresponding to the test pulse signal input into the carry chain and comprises: Determine the transmission level of the test pulse signal in the carry chain and the number of pulses on each of the corresponding delay units; According to the transmission level and the number of pulses, and based on a preset delay calculation formula, the delay time corresponding to each transmission level is determined.
5. The carry chain timing calibration method according to claim 4, characterized in that: The ratio of the delay time in the delay unit to the total delay time of the carry chain is the same as the ratio of the number of pulses in each of the delay units to the number of pulses in the carry chain.
6. A carry chain timing calibration device, characterized in that: include: A first signal acquisition module is configured to acquire a random clock signal and a main clock signal, wherein the random clock signal and the main clock signal are non-correlated, so that a frequency ratio of the random clock signal to the main clock signal is a decimal; A second signal acquisition module, configured to acquire a test pulse signal according to the random clock signal and the master clock signal; A delay determination module is configured to input the test pulse signal into the carry chain, determine the delay time corresponding to the test pulse signal at each transmission level, and generate a lookup table, wherein the lookup table is used to determine the delay time corresponding to the test pulse signal input into the carry chain; A correction determination module is configured to determine a corresponding calibration correction factor in combination with the random clock signal and the master clock signal when receiving the measurement signal input into the carry chain, wherein the calibration correction factor is a ratio of an output waveform frequency corresponding to the random clock signal to a real-time waveform frequency of the measurement signal; A timing calibration module, configured to calibrate and correct the delay time in the lookup table according to the calibration correction factor, and obtain a calibration time after calibration correction; Wherein, the second signal acquisition module is further configured as follows: Sampling the random clock signal with the master clock signal to obtain a sampled clock signal; According to a preset operation rule, a logic operation is performed on the sampling clock signal and the random clock signal to generate the test pulse signal.
7. A carry chain timing calibration device, characterized in that: include: one or more processors; A storage device for storing one or more programs, when one or more of the programs are executed by one or more of the processors, the one or more processors implement the carry chain timing calibration method as described in any one of claims 1-5.
8. A storage medium storing computer executable instructions, characterized in that: When the computer executable instructions are executed by a processor, the computer executable instructions are used to perform the carry chain timing calibration method according to any one of claims 1 to 5.
