Correction circuit, correction method and related equipment

By measuring and correcting the clock signal of the clock generation model through the correction circuit, the problem of clock signal frequency error in the SOC system is solved, the accuracy of the clock signal is improved, and the accuracy of functional verification is ensured.

CN118569165APending Publication Date: 2024-08-30CHENGDU HAIGUANG INTEGRATED CIRCUIT DESIGN CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410620807.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-17
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

During the simulation process of the SOC system, the clock signal generated by the clock generation model has a frequency error, which affects the accuracy of the system function verification. Especially in high-speed interconnection systems, the frequency error will cause verification failure.

Method used

Provides a correction circuit that obtains error information by comparing the first clock cycle of the clock signal generated by the clock generation model with the design clock cycle, generates correction instructions, accumulates errors until it reaches a preset accuracy range, and then corrects the clock cycle to ensure The accuracy of the clock signal.

Benefits of technology

It effectively reduces the difference between the clock generation model and the clock design, improves the accuracy of the clock signal, and ensures the accuracy of functional verification, especially in high-speed interconnection systems, avoiding functional verification anomalies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118569165A
    Figure CN118569165A
Patent Text Reader

Abstract

The embodiment of the invention provides a correction circuit, which is used for measuring a first clock period of a clock signal generated by a clock generation model and a second clock period configured for a clock generation circuit based on clock design, and obtaining error information according to a comparison result of the first clock period and the second clock period; generating instruction content according to the error information; and determining a correction instruction based on instruction content, the correction instruction being used for correcting the first clock period so that error information of the corrected first clock period and the second clock period satisfies a clock design. According to the embodiment of the invention, the clock generation model can be accurately corrected, and the accuracy of the clock signal is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a correction circuit, a correction method, and related equipment. Background Art

[0002] In the simulation process of chip systems such as SOC (System on Chip), clock generation models (such as analog clock models) are responsible for generating analog clock signals to control and synchronize the operations of various components in the chip system during the simulation process, which is crucial for verifying the performance and functions of the chip system. Therefore, how to improve the accuracy of the clock signal generated by the clock generation model has become a technical problem that technicians in this field need to solve urgently. Summary of the invention

[0003] In view of this, embodiments of the present application provide a correction circuit, a correction method and related devices to improve the accuracy of a clock signal generated by a clock generation model.

[0004] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:

[0005] The present application provides a correction circuit for:

[0006] measuring a first clock cycle of a clock signal generated by a clock generation circuit and a second clock cycle configured for the clock generation circuit according to a clock design, and acquiring error information according to a comparison result of the first clock cycle and the second clock cycle;

[0007] Generate instruction content according to the error information; and determine correction instructions based on the instruction content, wherein the correction instructions are used to correct the first clock cycle so that the error information between the first clock cycle and the second clock cycle after correction meets the clock design.

[0008] Optionally, the correction circuit includes:

[0009] A correction engine module, configured to use the error information as an initial basis for accumulating the cycle error, and use the comparison result of each accumulated cycle error with the preset clock generation precision as an update basis, to accumulate the accumulated cycle error multiple times until the error between the accumulated cycle error and the preset clock generation precision is within an allowable error range; and, based on each comparison result, to generate each instruction content;

[0010] A command generator is used to determine each correction instruction based on the content of each instruction, wherein the correction instruction is used to correct the first clock cycle so that the error information between the first clock cycle and the second clock cycle after correction meets the clock design.

[0011] Optionally, the correction engine module includes: an accumulator and a comparator combination;

[0012] The accumulator is used to determine an initially accumulated cumulative cycle error based on the error information; and based on the comparison result of the comparator combination, update the accumulated cumulative cycle error at least once until the error between the accumulated cycle error and the preset clock generation accuracy reaches the allowable error range;

[0013] The comparator combination is used to compare the accumulated period error accumulated by the correction engine module each time with the preset clock generation accuracy until the error between the accumulated period error and the preset clock generation accuracy reaches the allowable error range; and, based on each comparison result, generate each instruction content.

[0014] Optionally, the error information includes an absolute value of an error between the first clock cycle and the second clock cycle and an error direction;

[0015] The accumulator, for determining an initially accumulated accumulated period error based on the error information, comprises:

[0016] If the error direction is positive, the initial accumulated cumulative period error is the value obtained by negating the absolute value of the error;

[0017] If the error direction is negative, the initially accumulated accumulated period error is the absolute value of the error.

[0018] Optionally, the correction engine module further includes:

[0019] The first multiplier is used to negate the absolute value of the error and send the result to the accumulator as the initial accumulated period error when the error direction is positive; when the error direction is negative, directly send the absolute value of the error to the accumulator as the initial accumulated period error.

[0020] Optionally, the instruction content is divided into positive correction instruction content and negative correction instruction content;

[0021] The comparator combination is used to generate each instruction content based on each comparison result, including:

[0022] If the comparison result is that the accumulated period error is greater than the positive preset clock generation accuracy, a positive correction instruction content is generated;

[0023] If the comparison result is that the accumulated period error is less than the negative of the preset clock generation accuracy, a negative correction instruction content is generated.

[0024] Optionally, the accumulator is used to update the accumulated period error accumulated by at least one update based on the comparison result of the comparator combination, including:

[0025] If the comparison result is that the accumulated period error is greater than the positive preset clock generation precision, the result after the accumulated period error is updated is the difference between the accumulated period error and the preset clock generation precision;

[0026] If the comparison result is that the accumulated period error is less than the negative of the preset clock generation precision, the accumulated period error is updated to be the sum of the accumulated period error and the preset clock generation precision.

[0027] Optionally, the correction engine module further includes:

[0028] A second multiplier, configured to, if the comparison result shows that the accumulated period error is greater than the positive absolute value of the error, negate the preset clock generation accuracy and send the result to an accumulator;

[0029] The third multiplier is used to positively calculate the preset clock generation accuracy and send it to the accumulator if the comparison result is that the accumulated period error is less than the negative absolute value of the error.

[0030] Optionally, the comparator combination includes:

[0031] A first comparator, used for comparing whether the accumulated period error is greater than the positive preset clock generation accuracy, and if so, generating a negative correction instruction content;

[0032] The second comparator is used to compare whether the accumulated period error is less than the negative of the preset clock generation accuracy, and if so, generate a positive correction instruction content.

[0033] Optionally, the command generator includes:

[0034] An instruction content acquisition module, used to acquire the instruction content;

[0035] The correction instruction output module is used to retrieve and output the corresponding correction instruction in a preset instruction library according to the instruction content.

[0036] Optionally, also include:

[0037] The clock cycle measurement module is used to measure the first clock cycle of the clock signal generated by the clock generation model and determine the error information between the first clock cycle and the second clock cycle of the clock signal.

[0038] Optionally, the clock period measurement module includes:

[0039] A measurement circuit assembly, used to measure a first clock cycle of a clock signal generated by a clock generation model;

[0040] A third comparator, used for comparing the first clock cycle and the second clock cycle of the clock signal and outputting an error direction;

[0041] The adder combination is used to obtain the absolute value of the error according to the result of the third comparator.

[0042] Optionally, the adder combination includes:

[0043] a fourth multiplier, configured to multiply the error direction by the first clock period to obtain a first multiplication result;

[0044] a fifth multiplier, configured to negate the error direction and multiply the result by the second clock cycle to obtain a second multiplication result;

[0045] The first adder is used to add the first multiplication result obtained by the fourth multiplier and the second multiplication result obtained by the fifth multiplier to obtain an absolute value of the error.

[0046] Optionally, the measurement circuit combination includes:

[0047] a first capacitor, used for performing voltage integration on the clock signal to measure a first clock cycle of the clock signal;

[0048] The switch combination is used to control the first capacitor to start measuring the first clock cycle, or to control the first capacitor to be reset.

[0049] The embodiment of the present application further provides a correction method for correcting the clock generation accuracy of a clock generation model, comprising:

[0050] measuring a first clock cycle of a clock signal generated by a clock generation model;

[0051] Determine error information between a first clock cycle and a second clock cycle of the clock signal; wherein the second clock cycle is a clock cycle corresponding to a clock design of the clock generation model;

[0052] A correction instruction is determined according to the error information; the correction instruction is used to correct the first clock cycle so that the error information between the first clock cycle and the second clock cycle after correction meets the clock design.

[0053] Optionally, the step of determining a correction instruction according to the error information includes:

[0054] Taking the error information as the initial basis of the accumulated cycle error, taking the comparison result of each accumulated accumulated cycle error with the preset clock generation precision as the update basis, the accumulated cycle error is accumulated multiple times until the error between the accumulated cycle error and the preset clock generation precision reaches the allowable error range;

[0055] And, each time the accumulated cycle error is compared with the preset clock generation accuracy, the instruction content is generated based on the comparison result each time;

[0056] Based on the content of each instruction, each correction instruction is determined.

[0057] Optionally, taking the error information as the initial basis of the accumulated cycle error, taking the comparison result of each accumulated accumulated cycle error with the preset clock generation accuracy as the update basis, and accumulating the accumulated cycle error multiple times until the error between the accumulated cycle error and the preset clock generation accuracy reaches the allowable error range includes:

[0058] determining an initially accumulated cumulative period error based on the error information;

[0059] Based on the comparison result of each accumulated cumulative cycle error with the preset clock generation accuracy, the accumulated cumulative cycle error is updated at least once until the error between the accumulated cycle error and the preset clock generation accuracy reaches the allowable error range; wherein the initial accumulated cumulative cycle error is the accumulated cycle error compared with the preset clock generation accuracy for the first time.

[0060] Optionally, the error information includes an absolute value of an error between the first clock cycle and the second clock cycle and an error direction;

[0061] The step of determining an initial accumulated cumulative period error based on the error information comprises:

[0062] checking the direction of the error;

[0063] If the error direction is positive, the initial accumulated cumulative period error is the value obtained by negating the absolute value of the error;

[0064] If the error direction is negative, the initially accumulated accumulated period error is the absolute value of the error.

[0065] Optionally, the instruction content is divided into positive correction instruction content and negative correction instruction content;

[0066] The step of generating the instruction content each time based on the comparison result each time includes:

[0067] If the comparison result is that the accumulated period error is greater than the positive preset clock generation accuracy, a positive correction instruction content is generated;

[0068] If the comparison result is that the accumulated period error is less than the negative of the preset clock generation accuracy, a negative correction instruction content is generated.

[0069] Optionally, the step of updating the accumulated cumulative period error at least once based on the comparison result of each accumulated cumulative period error with the preset clock generation accuracy includes:

[0070] If the comparison result is that the accumulated period error is greater than the positive preset clock generation precision, the result after the accumulated period error is updated is the difference between the accumulated period error and the preset clock generation precision;

[0071] If the comparison result is that the accumulated period error is less than the negative of the preset clock generation precision, the accumulated period error is updated to be the sum of the accumulated period error and the preset clock generation precision.

[0072] Optionally, the step of determining error information between a first clock cycle and a second clock cycle of the clock signal includes:

[0073] Comparing the magnitudes of the first clock cycle and the second clock cycle of the clock signal and outputting an error direction;

[0074] An absolute value of the error is obtained according to the first clock cycle, the second clock cycle and the error direction.

[0075] Optionally, the step of obtaining the absolute value of the error according to the first clock cycle, the second clock cycle and the error direction includes:

[0076] Multiplying the error direction by the first clock period to obtain a first multiplication result; and negating the error direction and multiplying the result by the second clock period to obtain a second multiplication result;

[0077] The first multiplication result and the second multiplication result are added to obtain an absolute value of the error.

[0078] Optionally, the step of measuring a first clock cycle of a clock signal generated by a clock generation model includes:

[0079] A voltage integration is performed on the clock signal to measure a first clock cycle of the clock signal.

[0080] An embodiment of the present application also provides a simulation system, including a clock generation model, and a correction circuit for correcting the clock generation accuracy of the clock generation model; the correction circuit is the correction circuit as described above.

[0081] An embodiment of the present application also provides a computer device, comprising the correction circuit as described above.

[0082] The correction circuit provided in the embodiment of the present application is used to: measure the first clock cycle of the clock signal generated by the clock generation model and the second clock cycle configured for the clock generation circuit based on the clock design, and obtain error information according to the comparison result of the first clock cycle and the second clock cycle; generate instruction content according to the error information; and determine the correction instruction based on the instruction content, the correction instruction is used to correct the first clock cycle so that the error information of the first clock cycle and the second clock cycle after correction meets the clock design. It can be seen that the correction circuit obtains error information by measuring the first clock cycle of the clock generation model and comparing it with the second clock cycle of the clock generation model; since the second clock cycle is a clock cycle corresponding to the clock design of the clock generation model, the error information can reflect the difference between the first clock cycle of the clock generation model and the clock design, so as to determine the correction instruction according to the error information, and use the correction instruction to correct the clock generation accuracy of the clock generation model, which can reduce the difference between the first clock cycle of the clock generation model and the clock design, so that the first clock cycle of the clock signal generated by the clock generation model matches the clock design, and improves the accuracy of the clock signal generated by the clock generation model. Therefore, the embodiment of the present application can accurately correct the clock generation accuracy of the clock generation model and improve the accuracy of the clock signal generated by the clock generation model. BRIEF DESCRIPTION OF THE DRAWINGS

[0083] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0084] Figure 1 A first structural schematic diagram of a correction circuit provided in an embodiment of the present application;

[0085] Figure 2 A second structural schematic diagram of a correction circuit provided in an embodiment of the present application;

[0086] Figure 3 A schematic diagram of the circuit structure of a clock cycle measurement module provided in an embodiment of the present application;

[0087] Figure 4 A schematic diagram of the circuit structure of the correction engine module provided in an embodiment of the present application;

[0088] Figure 5 A first flow chart of the calibration method provided in an embodiment of the present application;

[0089] Figure 6A second flow chart of the calibration method provided in the embodiment of the present application;

[0090] Figure 7 A third flow chart of the calibration method provided in the embodiment of the present application;

[0091] Figure 8 A fourth flow chart of the calibration method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0092] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0093] As the complexity and integration of SOC system design continue to increase, multiple clock domains exist in each level of the structure. The frequent interactions between clock domains lead to an exponential increase in the complexity of functional verification. Therefore, the clock signal generated by the clock generation model needs to meet the functional verification requirements of complex SOC system design.

[0094] For the system function to be verified, the clock generation model can simulate the characteristics of the real clock circuit by accurately modeling clock offset, jitter, spread spectrum, etc., to achieve comprehensive and detailed verification of the system function, thereby simulating the defects of the design under various extreme clock combinations during the functional verification process. The clock generation model referred to here can be an analog clock model, which generates a clock signal by analog means, and the corresponding generated clock signal can be an analog clock signal.

[0095] However, there may be an error in clock frequency between the clock signal generated by the clock generation model and the clock signal generated by the real clock circuit, which can be called a clock frequency error, wherein the real clock circuit can be an actual hardware circuit used to generate a clock signal in a chip system. The clock frequency error may be caused by the fact that the clock generation model cannot accurately simulate the clock characteristics of the real clock circuit when simulating and generating the clock signal. For example, the simulation time accuracy of the clock generation model is limited, while the accuracy of the real-time cycle of the real clock circuit may be less than the simulation time accuracy of the clock generation model. Therefore, the clock generation model is prone to cause a clock frequency error under limited simulation time accuracy.

[0096] For SOC systems with lower clock frequencies, the clock frequency error can be ignored. However, for SOC systems with higher clock frequencies, such as high-speed interconnection systems, the clock frequency error affects the accuracy of system function verification, and the accumulation of the clock frequency error may even cause abnormalities in system function verification. For example, the clock frequency of the current clock generation model is 133.33MHz, and the expected clock period is 7500187.504687617fs. Assuming that the minimum simulation time accuracy of the current clock model is 1fs, the clock period of the clock signal actually generated by the current clock model is 7500187fs, resulting in an error of 0.504687617fs. This error has a smaller impact on clock generation models with lower clock frequencies, but has a greater impact on clock generation models with higher clock frequencies.

[0097] To further understand the impact of clock frequency error, the following is an example of high-speed interconnect technology, which is a key technology for the implementation of chiplet mode. In high-speed interconnect technology, in addition to PCIE (peripheral component interconnect express, a high-speed serial computer expansion bus standard) and CXL (Compute Express Link, a new type of high-speed interconnect technology) protocols, there are also many different high-speed interconnect protocols. The physical layer of the high-speed interconnect protocol consists of PCS (Physical Coding Sublayer) and PMA (Physical Media Access), where PMA is a digital-analog hybrid design system. PCS encodes and scrambles the data sent by the upper layer, and then PMA serializes it and sends it to the link peer via the differential signal line; PMA restores the parallel data sent by the link peer on the differential signal line to the parallel data, and then PCS descrambles and decodes the parallel data and packages it to the upper layer.

[0098] In front-end functional verification and gate-level netlist verification, each analog circuit module of the analog channel of the PMA exists in the form of a simulation model. There are many clock generation models in the PMA, such as the MPLL (Mixed-signal PhaseLocked Loop) at the transmitter, the ROPLL (Ring Oscillator PLL), the CDR (Clock Data Recover) at the receiver, etc. According to the application protocol rate, the configuration words of these clock generation models are configured to a certain frequency through the port signal or internal configuration register of the PMA.

[0099] The simulation time accuracy of these clock generation models is limited, and there is an error between the frequency of the generated clock and the frequency of the clock generated by the real clock circuit. This error causes the data FIFO (First-In-First-Out, a first-in-first-out data buffer) on the physical layer transmission channel and the receiving channel to work abnormally, which in turn leads to verification failure. For example, for the elastic FIFO of the receiving channel, the read clock is the working clock of the PCS, and the write clock is the clock that the CDR of the PMA recovers from the serial data on the differential signal line. The frequency difference between the read clock and the write clock is required to be within a certain range, which is related to the protocol and the specific design. However, the clock frequency error caused by the simulation time accuracy problem of the CDR simulation model of the PMA leads to inaccurate verification, and it is impossible to ensure the correctness of the design through comprehensive verification.

[0100] SOC systems that integrate high-speed interconnect protocols and complex mixed-analog chips all have clock generation models. During the front-end functional verification and gate-level netlist verification, the simulation models of these modules may have difficulty in verifying the accuracy of the clock frequency due to the simulation time accuracy problem.

[0101] It can be seen that the clock frequency error will affect the accuracy of the functional verification of the chip system, and may even cause abnormalities in the functional verification of the chip system. Therefore, how to correct the clock frequency error of the analog clock signal to improve the accuracy of the analog clock signal has become a technical problem that technicians in this field need to solve urgently.

[0102] Based on this, the embodiments of the present application consider detecting the generation accuracy of the clock generation model and correcting the error of the analog clock at the same time to more accurately correct the clock generation model.

[0103] Based on the above ideas, an embodiment of the present application provides a correction circuit for correcting the clock generation accuracy of a clock generation model. The correction circuit provided in the embodiment of the present application is used for:

[0104] measuring a first clock cycle of a clock signal generated by a clock generation circuit and a second clock cycle configured for the clock generation circuit according to a clock design, and acquiring error information according to a comparison result of the first clock cycle and the second clock cycle;

[0105] Generate instruction content according to the error information; and determine correction instructions based on the instruction content, wherein the correction instructions are used to correct the first clock cycle so that the error information between the first clock cycle and the second clock cycle after correction meets the clock design.

[0106] In this way, the correction circuit can obtain error information by measuring the first clock cycle of the clock generation model and comparing it with the second clock cycle of the clock generation model; since the second clock cycle is a clock cycle corresponding to the clock design of the clock generation model, the error information can reflect the difference between the first clock cycle of the clock generation model and the clock design, and then determine the correction instruction based on the error information, and use the correction instruction to simultaneously correct the first clock cycle, which can reduce the error between the first clock cycle and the second clock cycle of the clock generation model, that is, the first clock cycle and the clock design, so that the first clock cycle of the clock signal generated by the clock generation model matches the clock design, and improves the accuracy of the clock signal generated by the clock generation model. Therefore, the embodiment of the present application can accurately correct the clock generation accuracy of the clock generation model and improve the accuracy of the clock signal generated by the clock generation model.

[0107] As an optional implementation, Figure 1 FIG. 4 shows a schematic diagram of the structure of the correction circuit provided in the embodiment of the present application. Figure 1 As shown, the correction circuit 200 is connected to the clock generation model 100. It should be noted that the clock generation model 100 is a model for simulating the generation of clock signals, such as a simulation clock model; the correction circuit 200 is a circuit structure connected to the clock generation model 100 and correcting the clock generation accuracy of the clock generation model 100. The correction circuit 200 and the clock generation model 100 can be connected through an interface. Through the interface connection mode, the correction circuit 200 can be implanted or bound to the clock generation model 100 of any position or structure, which improves the scope of application of the correction circuit provided in the present application and makes it easy to integrate, transplant and reuse.

[0108] Furthermore, if the clock generation model 100 needs to be corrected, its clock period needs to be detected first. Figure 1 As shown, in an optional implementation, the correction circuit includes: a clock cycle measurement module 300, which is used to measure the first clock cycle of the clock signal generated by the clock generation model, and determine the error information between the first clock cycle and the second clock cycle of the clock signal.

[0109] It should be noted that the clock generation model 100 is a simulation modeling of a clock design circuit, which is usually used for verification of a digital-analog hybrid system. Therefore, the clock cycle can be converted into a voltage value so that the correction circuit 200 processes the clock cycle. Specifically, in an optional implementation, the clock cycle measurement module 300 integrates the generated clock cycle of the clock generation model 100 through a capacitor, and then represents the first clock cycle according to the voltage value of the capacitor after the integration.

[0110] Furthermore, since the time information needs to be converted into a voltage value, and the magnitude relationship between the first clock cycle and the second clock cycle cannot be determined before the clock generation model 100 is corrected, the circuit for implementing the subtraction of two voltage values ​​with unknown magnitude relationships is relatively complex. Therefore, in order to simplify the circuit logic, in an optional implementation, the error information includes an absolute value of the error and an error direction. In this way, when obtaining the error information, the magnitude relationship between the first clock cycle and the second clock cycle can be compared first, and the magnitude relationship can be stored as the error direction. For example, the first clock cycle is greater than the second clock cycle, and the error direction of the first clock cycle is positive, and the first clock cycle is less than the second clock cycle, and the error direction of the first clock cycle is negative; then, according to the error direction, the magnitude relationship between the first clock cycle and the second clock cycle is determined, and then the voltage value of the smaller one of the first clock cycle and the second clock cycle is reversed, and then the first clock cycle and the second clock cycle after the reversed value are added, so that the larger one of the first clock cycle and the second clock cycle is subtracted from the smaller one, and then a non-negative result is calculated, and the result is the absolute value of the error.

[0111] Further, according to the above ideas, if Figure 2 As shown, in an optional implementation, the clock period measurement module 300 includes:

[0112] The measurement circuit assembly 310 is configured to measure a first clock cycle of the clock signal generated by the clock generation model 100 .

[0113] It should be noted that, in an optional implementation, the measurement circuit combination 310 is a series RC circuit (Resistor-Capacitance circuit), and the series RC circuit is a circuit structure composed of a resistor and a capacitor connected in series. In this way, the clock signal generated by the clock generation model 100 can pass through the measurement circuit combination 310, and then the capacitor of the measurement circuit combination 310 stores energy within a clock cycle, so that after the energy storage is completed, the voltage value released by the capacitor of the measurement circuit combination 310 can represent the clock cycle.

[0114] Specifically, Figure 2 As shown, in an optional implementation, the measurement circuit assembly 310 includes:

[0115] The first capacitor 311 is used to perform voltage integration on the clock signal to measure a first clock cycle of the clock signal.

[0116] The switch combination 312 is used to control the first capacitor 311 to start measuring the first clock cycle or control the first capacitor 311 to be reset.

[0117] Specifically, Figure 3 As shown, the switch combination 312 includes a first switch 313 and a second switch 314; one end of the first capacitor 311 is grounded, so that a basic integration circuit can be formed by combining the first capacitor 311, the first switch 313 and the second switch 314. It should be noted that since the resistor in the integration circuit is used to adjust the integration slope, the resistor in the integration circuit can be omitted. In this way, the clock signal generated by the clock generation model 100 is integrated within a first clock cycle by the integration circuit. After the integration is completed, the voltage value of the first capacitor 311 can be used to represent the first clock cycle of the clock signal.

[0118] It should be noted that, when the first switch 313 is closed and the second switch 314 is open, the first capacitor 311 can integrate the clock cycle. When the first switch 313 is open and the second switch 314 is closed, both ends of the first capacitor 311 are connected to a low level, and the first capacitor 311 is cleared at this time. When in a non-working state, the first switch 313 and the second switch 314 are open at the same time. The first switch 313 and the second switch 314 do not exist in a state of being closed at the same time.

[0119] Furthermore, in an optional implementation, the measurement circuit assembly 310 further includes a switch control module (not shown) to control the first clock cycle of the clock generation model 100.

[0120] The states of the switch 313 and the second switch 314 .

[0121] Please continue to refer to Figure 2 The clock cycle measurement module 300 further includes: a third comparator 320, configured to compare the first clock cycle and the second clock cycle of the clock signal and output an error direction.

[0122] It should be noted that, in an optional implementation, when the clock generation model 100 is an analog circuit, the second clock cycle is the clock cycle that the clock generation model 100 should theoretically generate in accordance with the clock design after the clock generation model 100 is configured according to the configuration word, wherein the configuration word is an option parameter used to control the performance of the functional circuit unit in the clock design. At this time, when obtaining the second clock cycle, the voltage value representing the second clock cycle can be calculated according to the configuration word of the clock generation model 100. Further, the voltage value representing the second clock cycle can be calculated in the clock cycle measurement module 300, or calculated by the clock generation model 100 and sent to the clock cycle measurement module 300, or calculated by adding a calculation module in the correction circuit 200 and sent to the clock cycle measurement module 300.

[0123] Further, such as Figure 3 As shown, the third comparator 320 can be a comparator circuit. In this case, the voltage polarity of the voltage output by the third comparator 320 is the error direction. Therefore, the error direction is divided into a positive error direction and a negative error direction. For example, when the voltage output by the third comparator 320 is a positive voltage, the error direction is positive, indicating that the first clock cycle is greater than the second clock cycle; when the voltage output by the third comparator 320 is a negative voltage, the error direction is negative, indicating that the first clock cycle is less than the second clock cycle.

[0124] Specifically, in an optional implementation, the third comparator 320 can be used to: if the first clock cycle is greater than the second clock cycle, the output error direction is positive; if the first clock cycle is less than the second clock cycle, the output error direction is negative.

[0125] Please continue to refer to Figure 2 The clock period measurement module 300 further includes: an adder combination 330, configured to obtain an absolute value of an error according to a result of the third comparator.

[0126] It should be noted that, according to the voltage polarity information of the voltage output by the third comparator 320, that is, the error direction, the voltage value of the smaller one of the first clock cycle and the second clock cycle can be reversed, and then the first clock cycle and the second clock cycle are added to obtain the absolute value of the error. For example, when the positive voltage of the voltage output by the third comparator 320 is greater than the second clock cycle, the voltage value representing the second clock cycle is reversed and then added to the voltage value representing the first clock cycle, so that the first clock cycle is subtracted from the second clock cycle, and then the voltage value indicating the period error value of the first clock cycle and the second clock cycle is obtained.

[0127] Specifically, Figure 3 As shown, in an optional implementation, the adder combination 330 includes:

[0128] The fourth multiplier 331 is used to multiply the error direction by the first clock period to obtain a first multiplication result.

[0129] The fifth multiplier 332 is used to negate the error direction and multiply it by the second clock cycle to obtain a second multiplication result.

[0130] The first adder 333 is used to add the first multiplication result obtained by the fourth multiplier 331 and the second multiplication result obtained by the fifth multiplier 332 to obtain an absolute value of the error. In this way, the calculation of the absolute value of the error can be achieved through three circuit modules.

[0131] Further, in an optional implementation, the correction circuit is used to determine the correction instruction according to the error information, including:

[0132] According to the error direction, the absolute value of the error is compared with the preset clock generation accuracy and the instruction content is outputted. A correction instruction is determined according to the instruction content.

[0133] It should be noted that the minimum adjustable value of the first clock cycle of the clock signal generated by the clock generation model 100 is the precision value of the clock generation model 100, that is, the preset clock generation precision, for example, the preset clock generation precision is 1f. Therefore, in order to more accurately adjust the first clock cycle, the first clock cycle can be accumulated or subtracted multiple times in units of a preset clock generation precision to adjust the first clock cycle. Furthermore, by comparing the absolute value of the error and the preset clock generation precision, it can be determined whether to increase or decrease the preset clock generation precision.

[0134] Furthermore, since the adjustment of the first clock cycle is cumulative or cumulative, in contrast, in an optional implementation, the instruction content includes positive correction instruction content and negative correction instruction content. The correction instruction includes a positive correction instruction and a negative correction instruction. It should be noted that the positive correction and negative correction are respectively used to instruct the clock generation model 100 to increase or decrease a preset precision. The preset precision can be a preset clock generation precision or a preset time size.

[0135] Further, such as Figure 1 As shown, in an optional implementation, the correction circuit 200 further includes:

[0136] The correction engine module 400 is used to use the error information as the initial basis for the accumulated cycle error, and use the comparison result of each accumulated accumulated cycle error with the preset clock generation accuracy as the update basis, to accumulate the accumulated cycle error multiple times until the error between the accumulated cycle error and the preset clock generation accuracy reaches the allowable error range; and, based on each comparison result, to generate each instruction content.

[0137] It should be noted that the preset clock generation accuracy is the minimum simulation accuracy of the clock generation model. The allowable error range is a range pre-determined according to the performance of the clock generation model 100, for example, a positive preset clock generation accuracy to a negative preset clock generation accuracy.

[0138] In this way, the correction engine module 400 can determine the value of the preset clock generation precision that needs to be increased or decreased when correcting the first clock cycle, thereby facilitating the subsequent correct output of the correction instruction.

[0139] Further, such as Figure 2 As shown, in an optional implementation, the correction engine module 400 includes an accumulator 410 and a comparator combination 420. The accumulator 410 is used to determine the initial accumulated cumulative cycle error based on the error information; and based on the comparison result of the comparator combination 420, update the accumulated cumulative cycle error at least once until the error between the accumulated cycle error and the preset clock generation accuracy reaches the allowable error range.

[0140] It should be noted that, since the first clock cycle is represented by a voltage value in the correction circuit 200, the accumulation or subtraction of the first clock cycle is also represented by the accumulation or subtraction of the voltage value. In this way, the voltage value representing the first clock cycle is accumulated or subtracted by the accumulator 410, simulating the process of the correction circuit 200 correcting the clock generation model 100.

[0141] Specifically, Figure 4 As shown, the accumulator 410 is an adder with an output end connected to an input end. In this way, after the accumulator 410 outputs the initially accumulated accumulated period error, the initially accumulated accumulated period error will be re-input into the accumulator 410 and perform the next operation, thereby updating the accumulated result of the accumulator 410.

[0142] For further information, please continue to refer to Figure 2In an optional implementation, the correction engine module 400 also includes: a comparator combination 420, which is used to compare the cumulative cycle error accumulated by the correction engine module 400 each time with the preset clock generation accuracy, until the error between the cumulative cycle error and the preset clock generation accuracy reaches the allowable error range; and, based on each comparison result, generate each instruction content.

[0143] It should be noted that, since the minimum adjustable value of the first clock cycle of the clock signal generated by the clock generation model 100 is a preset clock generation precision, that is, the correction circuit 200 can correct the error of a preset clock generation precision at a minimum. Therefore, the correction range of the correction circuit 200 is that the first clock cycle is greater than the second clock cycle by a preset clock generation precision, or less than the second clock cycle by a preset clock generation precision. Until the accumulated cycle error and the error of the preset clock generation precision reach the allowable error range, that is, the error information is greater than the voltage representing a negative preset clock generation precision, and less than the voltage representing a positive preset clock generation precision. Therefore, it is necessary to compare the accumulated result with the voltage representing a negative preset clock generation precision, and also to compare it with the voltage representing a positive preset clock generation precision.

[0144] Furthermore, since the absolute value of the error is a non-negative value, if the absolute value of the error is directly sent to the accumulator 410, the accumulated result will always be greater than the voltage representing a negative preset clock generation accuracy. Therefore, it is necessary to negative the absolute value of the error according to the direction of the error and then send it to the accumulator 410.

[0145] Specifically, in an optional implementation, the accumulator 410 is used to, if the direction of the period error is positive, the initial accumulated period error is the negative value of the absolute value of the error; if the direction of the period error is negative, the initial accumulated period error is the absolute value of the error.

[0146] Specifically, Figure 4 As shown, in an optional implementation, the correction engine module 400 includes:

[0147] The first multiplier 411 is used to negate the absolute value of the error and send the result to the accumulator 410 as the initial accumulated cumulative period error when the error direction is positive; when the error direction is negative, the absolute value of the error is directly sent to the accumulator 410 as the initial accumulated cumulative period error.

[0148] In this way, the accumulated result can reflect in real time the accumulated error between the first clock cycle of the clock signal generated by the clock generation model 100 that needs to be corrected and the second clock cycle of the clock generation model.

[0149] Further, such as Figure 4 As shown, in an optional implementation, the comparator combination 420 includes:

[0150] The first comparator 421 is used to compare whether the accumulated period error is greater than the positive preset clock generation accuracy, and if so, generate a positive correction instruction content.

[0151] The second comparator 422 is used to compare whether the accumulated period error is less than the negative of the preset clock generation accuracy, and if so, generate a negative correction instruction content.

[0152] It should be noted that, for one accumulation result, it needs to be compared twice by the first comparator 421 and the second comparator 422, wherein the high level result value of the first comparator 421 and the second comparator 422 is the instruction content. Figure 4 In the circuit structure shown, when the first comparator 421 outputs a high level, it indicates that the accumulated cycle error is greater than the positive preset clock generation accuracy, and the high level output by the first comparator 421 is the increase instruction content; when the second comparator 422 outputs a high level, it indicates that the accumulated cycle error is less than the negative preset clock generation accuracy, and the high level output by the second comparator 422 is the decrease instruction content, and the low levels output by the first comparator 421 and the second comparator 422 are meaningless.

[0153] It should be noted that since the accumulated result cannot be both less than a voltage of a negative preset clock generation accuracy and greater than a voltage of a positive preset clock generation accuracy, the output results of the first comparator 421 and the second comparator 422 must be opposite and will not output high levels or low levels at the same time.

[0154] For further information, please continue to refer to Figure 2 and Figure 4 In an optional implementation, the correction engine module 400 further includes:

[0155] The second multiplier 412 is used to negate the preset clock generation accuracy value and send it to the accumulator 410 if the comparison result is that the accumulated period error is greater than the positive absolute value of the error.

[0156] The third multiplier 413 is used to positively calculate the preset clock generation accuracy value and send it to the accumulator 410 if the comparison result is that the accumulated period error is less than the negative absolute value of the error.

[0157] It should be noted that, when the first comparator 421 or the second comparator 422 outputs an instruction content, it can be considered that the clock generation model 100 has received a correction instruction and adjusted the first clock cycle. Correspondingly, the accumulator also needs to update the accumulation result according to the instruction content, so as to simulate the correction of the first clock cycle of the clock generation model 100. Therefore, when the first comparator 421 outputs a high level, it means that the first clock cycle of the clock generation model 100 is increased, and a negative preset clock generation accuracy value is sent to the accumulator for accumulation through the second multiplier 412; when the second comparator 422 outputs a high level, it means that the first clock cycle of the clock generation model 100 is reduced, and a positive preset clock generation accuracy value is sent to the accumulator for accumulation through the third multiplier 413.

[0158] Furthermore, in an optional implementation, the accumulator 410 is used to update the accumulated result of the accumulator 410 according to the comparison result of the comparator combination and the preset clock generation accuracy, including: sending the result of the second multiplier 412 into the accumulator 410 to update the accumulated result of the accumulator 410; or, sending the result of the third multiplier 413 into the accumulator 410 to update the accumulated result of the accumulator 410.

[0159] In this way, the accumulator 410 can update the accumulation result according to the instruction information. The accumulated cycle error initially accumulated by the accumulator 410 is calculated by the error information of the first clock cycle and the second clock cycle before correction. Therefore, the accumulated cycle error initially accumulated by the accumulator 410 can represent the error information of the first clock cycle and the second clock cycle before correction, and each update of the accumulator 410 corresponds to the correction instruction. Therefore, the error information represented by the updated accumulation result of the accumulator 410 is equivalent to the error information of the first clock cycle and the second clock cycle after the clock generation model 100 corrects the first clock cycle. Then, when the accumulation result of the accumulator 410 meets the requirements, it is equivalent to the error information of the first clock cycle after correction and the second clock cycle before correction meeting the clock design.

[0160] Furthermore, in an optional implementation, if Figure 2 As shown, the correction engine module 400 further includes: a command generator 500, which is used to determine each correction instruction based on the content of each instruction; the correction instruction is used to correct the first clock cycle so that the error information between the first clock cycle and the second clock cycle after correction meets the clock design. Specifically, Figure 2 As shown, in an optional implementation, the correction circuit 200 includes:

[0161] The instruction content acquisition module 510 is used to acquire the instruction content.

[0162] It should be noted that the instruction content acquisition module 510 receives the high level of the first comparator 421 or the second comparator 422 as the instruction content. When the high level output by the first comparator 421 is received, the increase instruction content is acquired, and when the high level output by the second comparator 422 is received, the decrease instruction content is acquired.

[0163] The correction instruction output module 520 is used to retrieve and output the corresponding correction instruction in a preset instruction library according to the instruction content.

[0164] It should be noted that the preset instruction library includes a variety of correction instructions, such as instructions for adjusting configuration words based on preset clock generation accuracy, or instructions for adjusting configuration words based on mathematical models related to configuration words, or instructions for adjusting the simulation accuracy of the clock generation model 100. The correction instruction output module 520 can retrieve and output correction instructions that meet the preset instruction requirements in the instruction library according to the preset instruction requirements.

[0165] Specifically, in an optional implementation, the correction instruction is used to adjust the configuration word to correct a preset clock generation accuracy of the first clock cycle so that the error information between the first clock cycle after correction and the second clock cycle before correction meets the clock design.

[0166] It should be noted that, in the clock generation circuit, since the first clock period can be directly adjusted by adjusting the configuration word, and the instruction for adjusting the configuration word itself is relatively simple, the use of the instruction for adjusting the configuration word can also more efficiently implement the correction of the clock generation model 100.

[0167] Furthermore, since the second clock cycle is calculated based on the configuration word, after the correction of the clock generation model 100 based on the correction instruction corrects the first clock cycle, the configuration word after correction changes, and the second clock cycle after correction also changes. Furthermore, since the configuration word after correction changes, the configuration word after correction is no longer related to the clock design, and thus the second clock cycle after correction is no longer related to the clock design. Therefore, when checking the error information, the error information between the first clock cycle after correction and the second clock cycle before correction must meet the requirements to ensure that the first clock cycle after correction meets the clock design.

[0168] Further, in an optional implementation, the correction circuit 200 provided in the present application can complete the correction of the clock generation model 100 within one cycle. That is, the correction circuit 200 can generate at least one correction instruction within one clock cycle to complete the correction of the clock generation model 100. In an optional implementation, the correction process of the correction circuit 200 can also be a moderate adjustment process. That is, a certain number of clock cycles are corrected each time, and new error information is re-acquired after each correction, and the correction is repeated multiple times to complete the correction of the clock generation model 100 through multiple cycles.

[0169] Thus, the correction circuit provided in the embodiment of the present application can correct the period error caused by the simulation time accuracy in real time by monitoring the clock cycle and adopting the circuit structure of the feedback loop. Moreover, the correction circuit has low cost, wide application range and high correction accuracy.

[0170] It should be noted that, in an optional implementation, the clock period measurement unit, the correction engine and the command generator may all be implemented using software, verification components or circuit models.

[0171] The embodiment of the present application also provides a correction method for correcting the clock generation accuracy of the clock generation model, such as Figure 5 As shown, including:

[0172] Step S100: measuring a first clock cycle of a clock signal generated by a clock generation circuit and a second clock cycle configured for the clock generation circuit according to a clock design;

[0173] Step S200: Obtain error information according to the comparison result of the first clock cycle and the second clock cycle;

[0174] Step S300: Generate instruction content according to the error information; and determine a correction instruction based on the instruction content, wherein the correction instruction is used to correct the first clock cycle so that the error information between the first clock cycle and the second clock cycle after correction meets the clock design.

[0175] For further information, please refer to Figure 6 In an optional implementation, the step S200 includes:

[0176] Step S210: comparing the first clock cycle and the second clock cycle of the clock signal and outputting an error direction;

[0177] Step S220: Obtain an absolute value of the error according to the first clock cycle, the second clock cycle and the error direction.

[0178] Further, such as Figure 6 As shown, in an optional implementation, the step S100 includes:

[0179] Step S110: performing voltage integration on the clock signal to measure a first clock cycle of the clock signal.

[0180] Further, such as Figure 7 As shown, in an optional implementation, the step S220 includes:

[0181] Step S221: multiply the error direction by the first clock cycle to obtain a first multiplication result; and negate the error direction and multiply it by the second clock cycle to obtain a second multiplication result; add the first multiplication result and the second multiplication result to obtain an absolute value of the error.

[0182] For further information, please continue to refer to Figure 6 In an optional implementation, step S300 includes:

[0183] Step S311: taking the error information as the initial basis of the accumulated cycle error, taking the comparison result of each accumulated accumulated cycle error and the preset clock generation precision as the update basis, accumulating the accumulated cycle error multiple times until the error between the accumulated cycle error and the preset clock generation precision reaches the allowable error range;

[0184] Step S312: generating instruction content each time based on the comparison result each time when comparing the accumulated period error with the preset clock generation accuracy;

[0185] Step S320: Determine the correction instruction for each time based on the instruction content for each time.

[0186] Further, such as Figure 7 As shown, in an optional implementation, the step S311 includes:

[0187] Step S3111: determining an initially accumulated cumulative period error based on the error information;

[0188] Step S3112: Based on the comparison result of each accumulated cumulative cycle error with the preset clock generation accuracy, the accumulated cumulative cycle error is updated at least once until the error between the accumulated cycle error and the preset clock generation accuracy reaches the allowable error range; wherein the initial accumulated cumulative cycle error is the accumulated cycle error compared with the preset clock generation accuracy for the first time.

[0189] Specifically, in an optional implementation, the error information includes an absolute value of an error between the first clock cycle and the second clock cycle and an error direction. Figure 8 As shown, the step S3111 includes:

[0190] Step S3113: Check the error direction;

[0191] If the error direction is positive, then execute step S3114: the initial accumulated cumulative period error is the value obtained by negating the absolute value of the error;

[0192] If the error direction is negative, step S3115 is executed: the initially accumulated accumulated period error is the absolute value of the error.

[0193] Furthermore, in an optional implementation, if Figure 8 As shown, the step S3112 includes:

[0194] Step S3116: comparing the accumulated period error with a preset clock generation accuracy;

[0195] If the comparison result is that the accumulated period error is greater than the positive preset clock generation precision, step S3117 is executed: the result after the accumulated period error is updated is set to be the difference between the accumulated period error and the preset clock generation precision;

[0196] If the comparison result is that the accumulated period error is less than the negative of the preset clock generation accuracy, step S3118 is executed: the result after the accumulated period error is updated is set to be the sum of the accumulated period error and the preset clock generation accuracy.

[0197] Specifically, in an optional implementation, the instruction content is divided into negative correction instruction content and positive correction instruction content. Further, if Figure 8 As shown, the step S320 includes:

[0198] If the comparison result of step S3116 is that the accumulated period error is greater than the positive preset clock generation accuracy, after step S3117 is completed, step S321 needs to be executed: generating positive correction instruction content.

[0199] If the comparison result of step S3116 is that the accumulated period error is less than the negative preset clock generation accuracy, after step S3118 is completed, step S322 needs to be executed: generating negative correction instruction content.

[0200] An embodiment of the present application also provides a simulation system, including a clock generation model, and a correction circuit for correcting the clock generation accuracy of the clock generation model; the correction circuit is the correction circuit as described above.

[0201] An embodiment of the present application also provides a computer device, such as a device having a high-speed serial computer expansion bus interface, comprising the correction circuit described above.

[0202] Although the embodiments of the present application are disclosed above, the present application is not limited thereto. Any person skilled in the art may make various changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be subject to the scope defined by the claims.

Claims

1. A correction circuit, characterized in that: Used for: measuring a first clock cycle of a clock signal generated by a clock generation model and a second clock cycle configured for a clock generation circuit based on a clock design, and acquiring error information based on a comparison result of the first clock cycle and the second clock cycle; generating instruction content according to the error information; And determining a correction instruction based on the instruction content, wherein the correction instruction is used to correct the first clock cycle so that error information between the first clock cycle and the second clock cycle after correction meets clock design.

2. The correction circuit according to claim 1, characterized in that: The correction circuit comprises: A correction engine module, configured to use the error information as an initial basis for the accumulated cycle error, and use the comparison result of each accumulated accumulated cycle error with the preset clock generation precision as an update basis, to accumulate the accumulated cycle error multiple times until the error between the accumulated cycle error and the preset clock generation precision reaches an allowable error range; and, based on each comparison result, to generate each instruction content; A command generator is used to determine each correction instruction based on the content of each instruction; the correction instruction is used to correct the first clock cycle so that the error information between the corrected first clock cycle and the second clock cycle meets the clock design.

3. The correction circuit according to claim 2, characterized in that: The correction engine module includes: an accumulator and a comparator combination; The accumulator is used to determine an initially accumulated cumulative cycle error based on the error information; and based on the comparison result of the comparator combination, update the accumulated cumulative cycle error at least once until the error between the accumulated cycle error and the preset clock generation accuracy reaches an allowable error range; The comparator combination is used to compare the accumulated period error accumulated by the correction engine module each time with the preset clock generation accuracy until the error between the accumulated period error and the preset clock generation accuracy reaches the allowable error range; and, based on each comparison result, generate each instruction content.

4. The correction circuit according to claim 3, characterized in that: The error information includes an absolute value of an error between a first clock cycle and a second clock cycle and an error direction; The accumulator, for determining an initially accumulated accumulated period error based on the error information, comprises: If the error direction is positive, the initial accumulated cumulative period error is the value obtained by negating the absolute value of the error; If the error direction is negative, the initially accumulated accumulated period error is the absolute value of the error.

5. The correction circuit according to claim 4, characterized in that: The correction engine module also includes: The first multiplier is used to negate the absolute value of the error and send the result to the accumulator as the initial accumulated period error when the error direction is positive; when the error direction is negative, directly send the absolute value of the error to the accumulator as the initial accumulated period error.

6. The correction circuit according to claim 3, characterized in that: The instruction content is divided into positive correction instruction content and negative correction instruction content; The comparator combination is used to generate each instruction content based on each comparison result, including: If the comparison result is that the accumulated period error is greater than the positive preset clock generation accuracy, a positive correction instruction content is generated; If the comparison result is that the accumulated period error is less than the negative of the preset clock generation accuracy, a negative correction instruction content is generated.

7. The correction circuit according to claim 6, characterized in that: The accumulator is used for accumulating the accumulated period error accumulated by at least one update based on the comparison result of the comparator combination, including: If the comparison result is that the accumulated period error is greater than the positive preset clock generation precision, the result after the accumulated period error is updated is the difference between the accumulated period error and the preset clock generation precision; If the comparison result is that the accumulated period error is less than the negative of the preset clock generation accuracy, the accumulated period error is updated to be the sum of the accumulated period error and the preset clock generation accuracy.

8. The correction circuit according to claim 7, characterized in that: The correction engine module also includes: A second multiplier, configured to, if the comparison result shows that the accumulated period error is greater than the positive absolute value of the error, negate the preset clock generation accuracy and send the result to an accumulator; The third multiplier is used to positively calculate the preset clock generation accuracy and send it to the accumulator if the comparison result is that the accumulated period error is less than the negative absolute value of the error.

9. The correction circuit according to claim 6, characterized in that: The comparator combination comprises: A first comparator, used for comparing whether the accumulated period error is greater than the positive preset clock generation accuracy, and if so, generating a positive correction instruction content; The second comparator is used to compare whether the accumulated period error is less than the negative of the preset clock generation accuracy, and if so, generate a negative correction instruction content.

10. The correction circuit according to claim 3, characterized in that: The command generator comprises: An instruction content acquisition module, used to acquire the instruction content; The correction instruction output module is used to retrieve and output the corresponding correction instruction in a preset instruction library according to the instruction content.

11. The correction circuit according to claim 2, characterized in that: Also includes: The clock cycle measurement module is used to measure a first clock cycle of a clock signal generated by a clock generation circuit and determine error information between the first clock cycle and a second clock cycle of the clock signal.

12. The correction circuit according to claim 11, characterized in that: The clock cycle measurement module comprises: A measurement circuit assembly, used to measure a first clock cycle of a clock signal generated by a clock generation model; A third comparator, used for comparing the first clock cycle and the second clock cycle of the clock signal and outputting an error direction; The adder combination is used to obtain the absolute value of the error according to the result of the third comparator.

13. The correction circuit according to claim 12, characterized in that: The adder combination comprises: a fourth multiplier, configured to multiply the error direction by the first clock period to obtain a first multiplication result; a fifth multiplier, configured to negate the error direction and multiply the result by the second clock cycle to obtain a second multiplication result; The first adder is used to add the first multiplication result obtained by the fourth multiplier and the second multiplication result obtained by the fifth multiplier to obtain an absolute value of the error.

14. The correction circuit according to any one of claims 12 to 13, characterized in that: The measuring circuit combination comprises: a first capacitor, used for performing voltage integration on the clock signal to measure a first clock cycle of the clock signal; The switch combination is used to control the first capacitor to start measuring the first clock cycle, or to control the first capacitor to be reset.

15. A calibration method, characterized in that: Used to calibrate the clock generation accuracy of the clock generation model, including: measuring a first clock cycle of a clock signal generated by a clock generation model and a second clock cycle configured for a clock generation circuit according to a clock design; Acquire error information according to a comparison result between the first clock cycle and the second clock cycle; Generate instruction content according to the error information; and determine correction instructions based on the instruction content, wherein the correction instructions are used to correct the first clock cycle so that the error information between the first clock cycle and the second clock cycle after correction meets the clock design.

16. The calibration method according to claim 15, characterized in that: The step of determining the correction instruction according to the error information comprises: Taking the error information as the initial basis of the accumulated period error, taking the comparison result of each accumulated period error with the preset clock generation precision as the update basis, the accumulated period error is accumulated multiple times until the error between the accumulated period error and the preset clock generation precision reaches the allowable error range; And, each time the accumulated cycle error is compared with the preset clock generation accuracy, the instruction content is generated based on the comparison result each time; Based on the content of each instruction, each correction instruction is determined.

17. The method according to claim 16, characterized in that The step of taking the error information as the initial basis for accumulating the cycle error, taking the comparison result of each accumulated cycle error and the preset clock generation precision as the update basis, and accumulating the accumulated cycle error multiple times until the error between the accumulated cycle error and the preset clock generation precision reaches the allowable error range includes: determining an initially accumulated cumulative period error based on the error information; Based on the comparison result of each accumulated cumulative cycle error with the preset clock generation accuracy, the accumulated cumulative cycle error is updated at least once until the error between the accumulated cycle error and the preset clock generation accuracy reaches the allowable error range; wherein the initial accumulated cumulative cycle error is the accumulated cycle error compared with the preset clock generation accuracy for the first time.

18. The calibration method according to claim 17, characterized in that: The error information includes an absolute value of an error between a first clock cycle and a second clock cycle and an error direction; The step of determining an initial accumulated cumulative period error based on the error information comprises: checking the direction of the error; If the error direction is positive, the initial accumulated cumulative period error is the value obtained by negating the absolute value of the error; If the error direction is negative, the initially accumulated accumulated period error is the absolute value of the error.

19. The calibration method according to claim 16, characterized in that: The instruction content is divided into positive correction instruction content and negative correction instruction content; The step of generating the instruction content each time based on the comparison result each time includes: If the comparison result is that the accumulated period error is greater than the positive preset clock generation accuracy, a positive correction instruction content is generated; If the comparison result is that the accumulated period error is less than the negative of the preset clock generation accuracy, a negative correction instruction content is generated.

20. The calibration method according to claim 17, characterized in that: The step of updating the accumulated cumulative period error at least once based on the comparison result of each accumulated cumulative period error with the preset clock generation accuracy comprises: If the comparison result is that the accumulated period error is greater than the positive preset clock generation precision, the result after the accumulated period error is updated is the difference between the accumulated period error and the preset clock generation precision; If the comparison result is that the accumulated period error is less than the negative of the preset clock generation accuracy, the accumulated period error is updated to be the sum of the accumulated period error and the preset clock generation accuracy.

21. The calibration method according to claim 15, characterized in that: The step of determining error information between a first clock cycle and a second clock cycle of the clock signal comprises: Comparing the magnitudes of the first clock cycle and the second clock cycle of the clock signal and outputting an error direction; An absolute value of the error is obtained according to the first clock cycle, the second clock cycle and the error direction.

22. The calibration method according to claim 21, characterized in that: The step of obtaining the absolute value of the error according to the first clock cycle, the second clock cycle and the error direction comprises: Multiplying the error direction by the first clock period to obtain a first multiplication result; and negating the error direction and multiplying the result by the second clock period to obtain a second multiplication result; The first multiplication result and the second multiplication result are added to obtain an absolute value of the error.

23. The calibration method according to claim 15, characterized in that: The step of measuring a first clock cycle of a clock signal generated by a clock generation model comprises: A voltage integration is performed on the clock signal to measure a first clock cycle of the clock signal.

24. A simulation system, characterized in that: It comprises a clock generation model and a correction circuit for correcting the clock generation accuracy of the clock generation model; the correction circuit is the correction circuit as described in any one of claims 1-14.

25. A computer device, characterized in that: It comprises the correction circuit as claimed in any one of claims 1 to 14.