Delay optimization method and ring oscillator design method, device, equipment, and medium

By determining the input conversion delay preset range in the delay circuit, and traversing and iteratively determining the target input conversion delay value, the problem of low input conversion delay accuracy in the existing technology is solved, and more accurate delay circuit design and performance analysis are achieved.

CN118282361BActive Publication Date: 2024-09-03LINGYANGE SEMICONDUCTOR, INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410684490.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-30
Publication Date
2024-09-03
Estimated Expiration
2044-05-30

AI Technical Summary

Technical Problem

The input conversion delay accuracy of the delay circuit in the prior art is low, resulting in inaccurate delay comparison.

Method used

By determining the input conversion delay preset range of the delay circuit, traversing the preset input conversion delay, and iteratively determining the target input conversion delay value according to the output conversion delay and the signal flip direction of the component unit, improving the accuracy of the input conversion delay.

Benefits of technology

Improved input slew delay accuracy, ensuring the true input slew delay value of the delay circuit, supporting more accurate circuit design and performance analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118282361B
    Figure CN118282361B
Patent Text Reader

Abstract

The present invention relates to the field of circuit design technology, and specifically to a delay optimization method and a ring oscillator design method, device, equipment, and medium. The present invention first determines a preset range of input conversion delay of a delay circuit, then traverses the preset input conversion delays within the preset range of input conversion delay, and determines the output conversion delay corresponding to the preset input conversion delay obtained through the traversal; finally, the target input conversion delay value of the delay circuit is determined based on the output conversion delay and the preset input conversion delay and the signal flip direction of the component unit inside the delay circuit. The present invention adopts a traversal search method so that the target input conversion delay value obtained through the final traversal is as close to the output conversion delay as possible, so as to improve the accuracy of the input conversion delay value obtained through the final traversal. Therefore, the input conversion delay calculated by the present invention has a certain representativeness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of circuit design, and in particular to a delay optimization method and a ring oscillator design method, device, equipment and medium. Background Art

[0002] Common delay circuits include RC delay circuit, master-slave JK trigger delay circuit, counter delay circuit, monostable trigger delay circuit, digital logic delay circuit, microprocessor delay circuit, voltage comparator delay circuit, 555 timer delay circuit, transistor delay circuit, and relay delay circuit. The above ten delay circuits have their own characteristics and application scenarios.

[0003] Each of the above delay circuits includes several units connected in series. The output of the previous unit is used as the input of the next unit. If the output signal of the previous unit is low, the time required to convert the low level to a high level (the input signal of the next unit) is the input conversion delay; similarly, if the output signal of the previous unit is high, the time required to convert the high level to a low level (the input signal of the next unit) is also the input conversion delay. The prior art is to directly specify an input conversion delay for the delay circuit based on experience in the delay lookup table of the delay circuit, resulting in low accuracy of the input conversion delay.

[0004] In summary, the input conversion delay obtained by the prior art is not accurate enough when used for delay comparison due to its low accuracy.

[0005] Therefore, the prior art still needs to be improved and enhanced. Summary of the invention

[0006] In order to solve the above technical problems, the present invention provides a delay optimization method, which solves the problem of low accuracy of input conversion delay obtained in the prior art.

[0007] To achieve the above object, the present invention adopts the following technical solutions:

[0008] In a first aspect, the present invention provides a delay optimization method, which includes:

[0009] determining a preset range of input transition delay of a delay circuit;

[0010] Traversing the preset input conversion delays within the preset range of the input conversion delay, and determining the output conversion delay corresponding to the traversed preset input conversion delay, the output conversion delay being the output conversion delay of the delay circuit;

[0011] A target input conversion delay value of the delay circuit is determined according to the output conversion delay, the preset input conversion delay, and the signal flip direction of the component unit inside the delay circuit.

[0012] In one implementation, determining a preset range of input conversion delay of the delay circuit includes:

[0013] According to the delay lookup table of the delay circuit, obtaining the maximum input conversion delay and the minimum input conversion delay of the delay circuit;

[0014] constructing an input conversion delay original range of the delay circuit according to the maximum input conversion delay and the minimum input conversion delay;

[0015] The original range of the input conversion delay is expanded to obtain a preset range of the input conversion delay of the delay circuit.

[0016] In one implementation, traversing the preset input conversion delays within the preset range of the input conversion delay, and determining the output conversion delay corresponding to the traversed preset input conversion delay, wherein the output conversion delay is the output conversion delay of the delay circuit, includes:

[0017] Determine, according to the delay lookup table of the delay circuit, a first conversion delay index and a second conversion delay index and a first capacitance index and a second capacitance index corresponding to the preset input conversion delay, wherein the first conversion delay index is less than or equal to the second conversion delay index, and the first capacitance index is less than or equal to the second capacitance index;

[0018] The first conversion delay index is combined with the first capacitance index and the second capacitance index in pairs, and the second conversion delay index is combined with the first capacitance index and the second capacitance index in pairs, to obtain an index pair;

[0019] Determining a preset delay corresponding to the index pair according to the delay lookup table;

[0020] The output conversion delay of the delay circuit is predicted based on the preset delay, the preset input conversion delay, the preset capacitance value corresponding to the preset input conversion delay, the first conversion delay index, the second conversion delay index, the first capacitance index and the second capacitance index.

[0021] In one implementation, when the traversal is in a small-to-large traversal order, determining the target input conversion delay value of the delay circuit according to the output conversion delay and the preset input conversion delay and the signal flip direction of the component unit inside the delay circuit includes:

[0022] determining a relative error formed by the output switching delay and the preset input switching delay;

[0023] When the signal flip direction is positive negation and the relative error gradually approaches the minimum error, continue to traverse the preset input conversion delay within the preset range of the input conversion delay to continue to iterate the relative error until the relative error is far away from the minimum error, stop the iterative traversal, and use the last traversed preset input conversion delay as the target input conversion delay value.

[0024] In one implementation, when the traversal is in a small-to-large traversal order, determining the target input conversion delay value of the delay circuit according to the output conversion delay and the preset input conversion delay and the signal flip direction of the component unit inside the delay circuit also includes:

[0025] When the signal flip direction is reverse negation, continuing to iterate through the preset input conversion delay within the preset range of the input conversion delay to iterate the relative error twice;

[0026] When the changing trend of the relative error of the second iteration is gradually approaching the minimum error, continue to traverse the preset input conversion delay within the preset range of the input conversion delay to continue iterating the relative error. When the changing trend of the relative error is away from the minimum error, stop the iterative traversal and use the preset input conversion delay traversed last as the target input conversion delay value.

[0027] In one implementation, all of the component units within the delay circuit are identical.

[0028] In a second aspect, an embodiment of the present invention further provides a ring oscillator design method, including:

[0029] When the delay circuit is a ring oscillator, based on the above delay optimization method,

[0030] determining a target input transition delay value for the ring oscillator;

[0031] Obtaining a capacitance value of a load capacitor, and according to the capacitance value and the target input conversion delay value,

[0032] determining a characteristic delay value of the ring oscillator, wherein the load capacitor is located inside the ring oscillator;

[0033] The delay of the oscillation start-up NAND gate is obtained, and the ring oscillator is designed according to the delay of the oscillation start-up NAND gate and the characteristic delay value, wherein the oscillation start-up NAND gate is located inside the ring oscillator.

[0034] In a third aspect, an embodiment of the present invention further provides a delay optimization device, wherein the delay optimization device includes the following components:

[0035] A preset range building module, used to determine a preset range of input conversion delay of the delay circuit;

[0036] An output delay construction module, used to traverse the preset input conversion delays within the preset range of the input conversion delay, and determine the output conversion delay corresponding to the traversed preset input conversion delay, wherein the output conversion delay is the output conversion delay of the delay circuit;

[0037] The input delay construction module is used to determine the target input conversion delay value of the delay circuit according to the output conversion delay and the preset input conversion delay and the signal flip direction of the component unit inside the delay circuit.

[0038] In a fourth aspect, an embodiment of the present invention further provides a terminal device, wherein the terminal device includes a memory, a processor, and a delay optimization program stored in the memory and executable on the processor, and when the processor executes the delay optimization program, the steps of the delay optimization method described above are implemented;

[0039] Alternatively, the terminal device includes a memory, a processor, and a ring oscillator design program stored in the memory and executable on the processor, and when the processor executes the ring oscillator design program, the steps of the above-mentioned ring oscillator design method are implemented.

[0040] In a fifth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a delay optimization program is stored, and when the delay optimization program is executed by a processor, the steps of the delay optimization method described above are implemented;

[0041] Alternatively, a ring oscillator design program is stored on the computer-readable storage medium, and when the ring oscillator design program is executed by the processor, the steps of the above-mentioned ring oscillator design method are implemented.

[0042] Beneficial effect: The present invention first determines the preset range of the input conversion delay of the delay circuit, then traverses the preset input conversion delays within the preset range of the input conversion delay, and determines the output conversion delay corresponding to the preset input conversion delay obtained through the traversal; finally, the target input conversion delay value of the delay circuit is determined according to the output conversion delay and the preset input conversion delay and the signal flip direction of the component unit inside the delay circuit. The present invention adopts a traversal search method so that the target input conversion delay value obtained through the final traversal is as close to the output conversion delay as possible, and the input conversion delay close to the output conversion delay can represent the real input conversion delay of a delay circuit. Therefore, the present invention improves the accuracy of the input conversion delay. After accurately calculating the input conversion delay, it can help to better design the delay circuit, that is, accurately calculating the input conversion delay value can better carry out the subsequent process of circuit design.

[0043] The present invention also determines the characteristic delay value of the ring oscillator according to the capacitance value of the load capacitance and the target input conversion delay value. The characteristic delay value obtained by the present invention can compare the temperature sensitivity of the delay, the voltage sensitivity of the delay, the temperature sensitivity of the leakage current, the voltage sensitivity of the leakage current, the changes of the delay and the leakage current with the process angle, the changes with VT, etc. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 It is the overall flow chart of the present invention;

[0045] Figure 2 is a flow chart of a search algorithm in an embodiment of the present invention;

[0046] Figure 3 It is a schematic diagram of positive negation in an embodiment of the present invention;

[0047] Figure 4 is a schematic diagram of the relationship between the relative error and the input conversion delay in an embodiment of the present invention;

[0048] Figure 5 Schematic diagram of reverse negation in an embodiment of the present invention;

[0049] Figure 6 A flow chart of a fully automatic compilation ring oscillator in an embodiment of the present invention;

[0050] Figure 7 is a schematic diagram of driving capabilities of different types of units in an embodiment of the present invention;

[0051] Figure 8 It is a schematic diagram of comparison between different libraries of the same foundry in an embodiment of the present invention;

[0052] Fig. 9 A schematic diagram of comparison between different libraries in different foundries in an embodiment of the present invention;

[0053] Fig.10 are load lines of different drivers in the embodiments of the present invention;

[0054] Fig.11 A structural diagram of the delay optimization device provided by the present invention;

[0055] Fig.12 This is a block diagram of the internal structure principle of the terminal device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0056] The following is a clear and complete description of the technical solution of the present invention in combination with the embodiments and the accompanying drawings. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0057] Research has found that common delay circuits include RC delay circuit, master-slave JK trigger delay circuit, counter delay circuit, monostable trigger delay circuit, digital logic delay circuit, microprocessor delay circuit, voltage comparator delay circuit, 555 timer delay circuit, transistor delay circuit, and relay delay circuit. The above ten delay circuits have their own characteristics and application scenarios.

[0058] Each of the above delay circuits includes several units connected in series. The output of the previous unit is used as the input of the next unit. If the output signal of the previous unit is low, the time required to convert the low level to a high level (the input signal of the next unit) is the input conversion delay; similarly, if the output signal of the previous unit is high, the time required to convert the high level to a low level (the input signal of the next unit) is also the input conversion delay. The prior art is to directly specify an input conversion delay for the delay circuit based on experience in the delay lookup table of the delay circuit, resulting in low accuracy of the input conversion delay.

[0059] In order to solve the above technical problems, the first paragraph of the invention content. In specific implementation, first determine the preset range of input conversion delay of the delay circuit; then traverse the preset input conversion delay within the preset range of input conversion delay, and determine the output conversion delay corresponding to the traversed preset input conversion delay, the output conversion delay is the output conversion delay of the delay circuit; finally, determine the target input conversion delay value of the delay circuit according to the output conversion delay and the preset input conversion delay and the signal flip direction of the component unit inside the delay circuit.

[0060] The delay optimization method of this embodiment can be applied to a terminal device, which can be a terminal product with computing functions, such as a computer. Figure 1 As shown in , the delay optimization method specifically includes the following steps:

[0061] S100, determining a preset range of input conversion delay of a delay circuit.

[0062] S200, traversing preset input conversion delays within the preset range of the input conversion delay, and determining an output conversion delay corresponding to the traversed preset input conversion delay, wherein the output conversion delay is an output conversion delay of the delay circuit.

[0063] S300 , determining a target input conversion delay value of the delay circuit according to the output conversion delay, the preset input conversion delay, and a signal flipping direction of a component unit inside the delay circuit.

[0064] For a delay circuit with several identical component units inside, different types of component units make the delay circuit have different preset ranges of input conversion delay. The component units include a drive unit and a load unit. The drive unit is used to drive the load unit. The drive unit and the load unit are the same. Each of the two units has many parameters, including input capacitance, channel length L of CMOS transistor, width of CMOS transistor, etc. and aspect ratio The value of , the drive unit and the load unit are the same, that is, the drive unit and load cell The present invention continuously searches for the input conversion delay within the preset range through the output conversion delay corresponding to different input conversion delays to refine the input conversion delay until a target input conversion delay value is obtained.

[0065] After the input conversion delay value is obtained through step S100 to step S300, it can be used to design a delay circuit, for example, a ring oscillator delay circuit can be designed. The input conversion delay value can also be used to analyze the driving capability of the delay circuit to compare the performance of the circuit.

[0066] In one embodiment, step S100 includes the following specific steps S101, S102, and S103:

[0067] S101 , obtaining a maximum input conversion delay and a minimum input conversion delay of the delay circuit according to a delay lookup table of the delay circuit.

[0068] The liberty library stores delay lookup tables for delay circuits. For example, the liberty library stores delay lookup tables for a ring oscillator delay circuit and delay lookup tables for other delay circuits.

[0069] Index_1 in the following code is part of the delay lookup table:

[0070] pin(ZN) {

[0071] direction : output;

[0072] power_ down_ function: “!VDD + VSS”;

[0073] function : "(!I)";

[0074] related_ ground pin : VSS;

[0075] related_ power_ pin : VDD

[0076] max_capacitance : 0.02813;

[0077] timing ()

[0078] related pin : "I";

[0079] timing_ sense: negative unate;

[0080] timing_type: combinational;

[0081] cell rise (delay_ template 7x7_ 0) {

[0082] Index_1("0.0041, 0.0099, 0.0217, 0.0453, 0.0924, 0.1866, 0.3751");

[0083] index_ 2 ("0. 00039, 0.0009, 0. 00193, 0.00399, 0.0081, 0.01632, 0.03277");

[0084] vaLues ( \

[0085] "0.01029, 0.01344, 0.01963, 0.0318, 0.05608, 0.1045, 0.2016", \

[0086] "0.01253, 0.01587, 0.02228, 0.03463, 0.05888, 0.1073, 0.2044",\

[0087] "0. 01653, 0. 0202, 0. 02712, 0. 04001, 0. 06464, 0. 1132, 0.2103",\

[0088] "0.02334, 0.02787, 0.0355, 0.04947, 0.07534, 0.1247, 0.2219",\

[0089] "0.03257, 0.03916, 0.04991, 0.06604, 0.09401, 0.1459, 0.2448",\

[0090] "0.04494, 0.05509, 0.07048, 0.09338, 0.1269, 0.1833, 0.2873",\

[0091] "0.06009, 0.07506, 0.09846, 0.1323, 0.1804, 0.2487, 0.3615",\ );

[0093] }

[0094] rise_ transition (delay template 7x7_ 0) {

[0095] index_ 1 ("0. 0041, 0. 0099,0. 0217, 0. 0453, 0. 0924, 0.1866, 0.3751");

[0096] From the above code, we can see that index_1 covers "0.0041, 0.0099, 0.0217, 0.0453, 0.0924, 0.1866, 0.3751", among which the maximum value is 0.3751 and the minimum value is 0.0041.

[0097] S102: constructing an original range of input conversion delay of the delay circuit according to the maximum input conversion delay and the minimum input conversion delay.

[0098] For example, the maximum input conversion delay is 0.3751, and the minimum input conversion delay is 0.0041, so the original range of the input conversion delay is [0.0041, 0.3751].

[0099] S103, expanding the original range of the input conversion delay to obtain a preset range of the input conversion delay of the delay circuit.

[0100] The purpose of expanding the original range of the input conversion delay is to finally find the target input conversion delay value of the delay circuit.

[0101] The original range of the input conversion delay can be expanded three times, that is, the preset range of the input conversion delay is [0.0014, 1.1253].

[0102] In one embodiment, step S200 includes the following specific steps S201 to S204:

[0103] S201, determining a delay corresponding to the preset input conversion delay according to a delay lookup table of the delay circuit Corresponding conversion delay first index and conversion delay second index and the first index of capacitance and the second index of capacitance , the first conversion delay index is less than or equal to the second conversion delay index, and the first capacitance index is less than or equal to the second capacitance index.

[0104] The preset range of input conversion delay is divided into several equal parts, for example, it can be divided into 1000 equal parts, that is, the preset range of input conversion delay is divided into 1000 preset input conversion delays, and these preset input conversion delays are traversed from small to large. When traversing to one of the preset input conversion delays, since the corresponding relationship between the input conversion delay and the index is recorded in the delay lookup table, the first index of the conversion delay and the second index of the conversion delay can be found through the preset input conversion delay, for example:

[0105] The delay lookup table records the following input conversion delays in ascending order: 0.0007, 0.0014, 0.0028, 0.0056, 0.0112, 0.0224, 0.0448. When it is 0.003, since 0.003 is between 0.0028 and 0.0056, the conversion delay first index That is 3, which is 0.0028, the third input conversion delay in the delay lookup table; the second index of the conversion delay That is 4, which is 0.0056, the 4th input transition delay in the delay lookup table.

[0106] The delay lookup table also records the preset input conversion delay The corresponding relationship between the capacitance value and the capacitance index is recorded in the delay lookup table, so the input conversion delay is preset. The first capacitance index can also be found and the second index of capacitance .

[0107] S202, combining the first conversion delay index with the first capacitance index and the second capacitance index in pairs, and combining the second conversion delay index with the first capacitance index and the second capacitance index in pairs, to obtain index pairs.

[0108] That is, the index pair includes , , , .

[0109] S203: Determine a preset delay corresponding to the index pair according to the delay lookup table.

[0110] The preset delay corresponding to each index pair can be found in the delay lookup table, that is, as long as an index pair is known, the preset delay corresponding to the index pair can be matched. , , , The corresponding preset delays are A, B, C, and D. , , , , where Dly represents delay.

[0111] S204, according to the preset delay, the preset input conversion delay , the preset capacitance value C corresponding to the preset input conversion delay, the first conversion delay index , the conversion delay second index , the first capacitance index and the capacitance second index , predicting the output transition delay of the delay circuit .

[0112] (1)

[0113] , ,

[0114] In the formula, The first index of the delay recorded in the delay lookup table and the conversion delay The corresponding input conversion delay, The second index of the delay recorded in the delay lookup table and the conversion delay The corresponding input conversion delay, The first index of the delay lookup table and the capacitance The corresponding capacitance value is The second index of the capacitance recorded in the delay lookup table The corresponding capacitance value.

[0115] In summary, when the logic gate is positively negated, the input conversion delay generated by the first iteration can be used as the output conversion delay, that is, the output conversion delay is calculated according to formula (1).

[0116] In one embodiment, step S300 includes the following specific steps S301 and S302:

[0117] S301, determining the output conversion delay and the preset input conversion delay The relative error err is formed.

[0118] like Figure 2 As shown, , where abs stands for absolute value.

[0119] S302, when the signal flip direction is positive negation and the relative error gradually approaches the minimum error, continue to traverse the preset input conversion delay within the preset range of the input conversion delay to continue to iterate the relative error until the relative error is far away from the minimum error, stop the iterative traversal, and use the last traversed preset input conversion delay as the target input conversion delay value.

[0120] like Figure 3 As shown, the delay circuit in this embodiment includes a plurality of cells (cells, namely Stdcells) connected in series, the signal flipping directions of the plurality of cells are the same, and the structures of the plurality of cells are also the same. If the input end environment and the output end environment of the cell are exactly the same, then the input conversion delay is equal to the output conversion delay.

[0121] When the signal flip direction is positive negation, such as Figure 3 As shown, if the input signal of the unit is flipped upward ( Figure 3), then the output signal of the unit is also flipped upward; similarly, if the input signal of the unit is flipped downward, then the output signal of the unit is also flipped downward.

[0122] The relationship between the relative error err and the input conversion delay is as follows: Figure 4 As shown, the relative error err first decreases with the increase of input conversion delay, that is, the relative error generated by the next iteration is smaller than the relative error of the previous iteration, and then the relative error err increases with the increase of input conversion delay. Figure 4 in " is the minimum error Minierror. When the relative error err generated by multiple iterations decreases to Minierror and then starts to increase, the preset input conversion delay obtained by the iteration is the target input conversion delay value. For positive negation, since the preset input conversion delays within the preset input conversion delay range are traversed from small to large, the preset input conversion delay traversed at the beginning is small. Figure 4 It can be seen that when the preset input conversion delay is small, the relative error err gradually decreases. When the relative error err suddenly increases, that is, the relative error err is greater than or equal to the minimum error Minierror, it means that the relative error err begins to gradually increase with the increase of the preset input conversion delay. At this time, the preset input conversion delay is the target input conversion delay value.

[0123] In this embodiment, when the signal flip direction is reverse negation, the first iteration is performed to calculate the first iteration corresponding to formula (1). Then according to The corresponding conversion delay index ,as well as The corresponding , , , , apply formula (1) again to obtain the corresponding value of the second iteration ; When the changing trend of the relative error after two iterations is gradually approaching the minimum error, continue to traverse the preset input conversion delay within the preset range of the input conversion delay to continue iterating the relative error, until the changing trend of the relative error is away from the minimum error, stop the iterative traversal, and use the preset input conversion delay traversed last as the target input conversion delay value.

[0124] like Figure 5As shown, the delay circuit in this embodiment includes a number of standard cells (Stdcell) connected in series. If the flip direction of the cell input signal is opposite to the flip direction of the output signal, then the flip direction of the cell is reverse negation. That is, when the cell input signal flips upward and the output signal flips downward ( Figure 5 The signal flip direction of this unit is reverse negation.

[0125] like Figure 2 As shown, when it is not positive negation, that is, reverse negation, the input conversion delay preset range (that is, the input conversion delay preset range in S103) is calculated according to formula (1). The corresponding output conversion delay of the second iteration (That is, when the logic gate is reverse negated, the input conversion delay generated by two iterations can be used as the output conversion delay), and calculate The relative error err between the second t and the second t is used to determine the change trend between the relative error err at this time and the relative error err corresponding to the first t. If the change trend is gradually approaching the minimum error Minierror, it indicates that the corresponding relationship between the relative error and the preset input conversion delay is still Figure 4 The descending part of the curve in , so the step size of t needs to be increased. The relative error err will gradually decrease as the step size of t increases, that is, err will be smaller than the relative error lasterr of the previous cycle. When entering the next cycle, first let lasterr = err, that is, record the err of this cycle as lasterr, and then enter the next cycle. The lasterr of the next cycle is the err of this cycle, until the relative error changes away from the minimum error Minierror, that is, the corresponding relationship between the relative error and the input conversion delay is Figure 4 The rising part of the curve.

[0126] In another embodiment, when the delay circuit is a ring oscillator (belonging to the first delay), the ring oscillator is designed based on the target input conversion delay value of the ring oscillator in steps S100 to S300. This embodiment includes the following specific steps S401 and S402:

[0127] S401, obtaining a capacitance value C of a load capacitor, and converting the load capacitor according to the capacitance value and the target input

[0128] The delay value determines a characteristic delay value tdly of the ring oscillator, and the load capacitor is located inside the ring oscillator.

[0129] The delay lookup table of the liberty library records the correspondence between the capacitance value C of the ring oscillator and the target input conversion delay value and the characteristic delay value tdly. That is, if the capacitance value C and the target input conversion delay value are known, the characteristic delay value tdly can be known. The ring oscillator is a closed loop composed of a series of identical standard units, and the characteristic delay value tdly is the delay value of the previous unit driving the next unit.

[0130] S402, obtaining the start-up delay tnd2 of the start-up NAND gate and the half period of the ring oscillator , and designing the ring oscillator according to the start-up delay, the characteristic delay value and the half period, wherein the start-up NAND gate is located inside the ring oscillator.

[0131] The first unit of the ring oscillator is a NAND gate nd2, which is used to control the oscillation start-up of the ring oscillator. The delay of the NAND gate nd2 is the oscillation start-up delay tnd2.

[0132] This embodiment mainly designs the number N of ring oscillators. , where Round is the rounding symbol. After you have N, you can execute Figure 6 (Flowchart for fully automatic compilation of ring oscillator) in the automatic writing of Verilog netlist. The code excerpt for writing Verilog netlist is as follows:

[0133] timescale 1ns / 1ps

[0134] module DLO INVD1BWP(EN, RO);

[0135] input EN;

[0136] output RO;

[0137] wire [101:1] WIRE;

[0138] ND2D1BWP u enable ( . A1(WIRE

[101] ), .A2(EN), . ZN(WIRE[1]) );

[0139] / / 10.0 ps

[0140] INVD1BWP u inv ( I(NTRE

[99] ),. ZN(RO) );

[0141] INVD1BWP u stagel (.I(WTRE[1]), .ZN(WIRE[2]) ); / / 20.0 ps

[0142] INVD1BWP u_ stage2 (.I(WIRE[2]), . ZN(WIRE[3]) ); / / 30.0 ps

[0143] INVD1BWP u stage3 (.I(WIRE[3]), .ZN(WIRE[4]) ); / / 46.0 ps

[0144] INVD1BWP u stage4 (.I(WTRE[4]), ZN(WTRE[51); / / 50.0 ps

[0145] INVD1BWP u stage5 (.I(WIRE[5]), .ZN(WIRE[6]) ); / / 60.0 ps

[0146] INVD1BWP u_ stage6 (.I(WIRE[6]), .ZN(WIRE[7]) ); / / 70.0 ps

[0147] INVD1BWP u stage7 (.I(NTRE[7]), .ZN(WIRE[8]) ); / / 80.0 ps

[0148] INVD1BWP u_ stage8 (.I(WTRE[8]), ZN(WTRE[91); / / 90.0 ps

[0149] INVD1BWP u_ stage9 (.I(WIRE[9]), .ZN(WIRE

[10] ]); / / 100.0 ps

[0150] INVD1BWP u stage10 (.I(NIRE

[18] ), .ZN(WIRE[11) ); / / 110.0 ps

[0151] INVD1BWP u stage1l (.I(WIRE

[11] ), .ZN(WIRE

[12] ) ): / / 120.0 ps

[0152] INVD1BWP u stage12 (.I(WTRE

[12] ), .ZN(NIRE

[13] ]): / / 130.0 ps

[0153] The compilation of the fully automatic ring oscillator is controlled by a global configuration file and automatically executed by a Makefile. The code of the global configuration file is as follows:

[0154] {"top": "PME_ TOP",

[0155] "lib":{

[0156] "rvt" :“tc ”,

[0157] "lvt": "tc ",

[0158] hvt" : "tc"}

[0159] ”enGate ”:{”name":“ ND2D1BWP"} ,

[0160] ”invGate"{"name" :” INVD1 BWP"} ,

[0161] "RING SEL "4,

[0162] "divDFF" : {"name" : "DFCNQD1BWP", "div_ by" : 2, "clear" : "CDN"},

[0163] "delayL ine" : {"DL0" : [" INVD1BWP", 2000],

[0164] "DL1" : ["INVD1BWPLVT" ,2000],

[0165] "DL2" :["INVD1 BWPHVT ",2000],

[0166] "DL3" : ["ND2D1BWP" ,2000],

[0167] "DL 4" : [”ND2D1BWPHVT",2000],

[0168] "DL 5" : [”ND2D1BWPLVT" ,2000] ,

[0169] "DL6" : ["NR2D1BWP" ,2000],

[0170] "DL7" :["NR2D1BWPHVT”2000] ,

[0171] "DL8" : [”NR2D1BWPLVT"2000] ,

[0172] "DL9" : [”BUFFD1BWP”2000],

[0173] "DL10": ["BUFFD1BWPHVT", 2000],

[0174] "DL11": ["BUF FD1 BWPLVT", 2000],

[0175] "DL12": ["0R2D1BWP", 2000],

[0176] "DL13": ["OR2D 1 BWPHVT", 2000],

[0177] "DL 14": ["OR2D1BWPLVT", 2000]}}

[0178] The Makefile code is as follows:

[0179] SHELL := / bin / bash

[0180] Library keymane := tcbn40Lpbmp

[0181] config f1le := "CONFIG json"

[0182] verllog ubraryo := s(Library keynne),v

[0183] Largestdir := S(shelt Ls rtl / source |sort :VItall -n 1)

[0184] nedir := S(shell echo s(Largestdir)sed -Es / ([0-9]+) / ss((\1+1)) / )

[0185] liberty2json:

[0186] ccs2json_allne.py s(library_ keynane) | tee ccs2json allinone lLog

[0187] #NO2 cett VT sequence nust be in the sare order as VT sequence

[0188] in our exsmple, rvt followed by Lut and then by hvt; It should be noted that there are some possible typos or unclear parts in the original text (such as "verllog ubraryo", "shelt", "sare", "exsmple" etc.), and the translation is done based on the best understanding of the context.

[0189] RingDscilLator:

[0190] python3 -u R0_stsges.py s(config_f1le) $lbrary_ keynare) rvt lvt,hevt' ' MD2D1BMP ,ND2D1BMPLVT ,NDZ2D1BMPHVT |teeRO .0btainstages .1og RO.PY $(ver1log_ Library

[0191] Adjust_RO_stage:

[0192] mkdir rtL / source / $ (newdir)

[0193] mv NTPHIUR8D5.W ring.v rosc.v cLk_div.v pme_top.v std1ib.v pme tb.vdec*to*.v rtl / source / $(newdir)

[0194] Cp RO_config. json rtL / source / $ (newdir)

[0195] unlink rt1 / pestAPR / RO_config. json

[0196] ln-s .. / source / sinewdir) / R0 config.json rtL / postAPR: cd rtl / postAPR;adjust_RO_stages.py

[0197] RO.PY $(verllog Library)

[0198] RTLsim:

[0199] if[!d"work"];then\

[0200] mkdir work;\

[0201] fi

[0202] If[!:- d “work”];then\

[0203] mkdir work;\

[0204] fi

[0205] If[!: -d “work / bak”]then\

[0206] mkdir work;\

[0207] fi

[0208] If[!: -d “work / bak”]then\

[0209] mkdir work / rtl;\

[0210] Else\

[0211] Mv work / rtl worrk / bar / rt1.$$$; \

[0212] mkdir work / rt1;\

[0213] fi

[0214] cd work / rtl:; .. / cp.csh; run_ves_fsab| tee run_vcs_ fsdb.log; simv |tee sirv.log: .. / .. / R0_sum_short.py|tee RO_

[0215] When executed Figure 6 ( Figure 6 In the ninth step of the process (where PrimeTime is a static timing analysis, Spice is a general analog circuit simulator, and PT is a simulation tool), the SPICE simulation after layout and routing will be compared with the target oscillation frequency. If it does not meet the requirements, the tenth step is to adjust the level of the ring oscillator and then the first step of iteration is entered again. This closed loop of this embodiment is very efficient. Usually, it can converge after two iterations. The implementation summary report of this embodiment (as shown in Table 1) shows that the cycles of SPICE simulation and PT simulation are close to the target 2ns:

[0216] Table 1

[0217]

[0218] In one embodiment, the delay optimization algorithm of the present invention is also applicable to calculate the input transition delay of different drivers with the same load (i.e., Type II delay). Figure 7 The following is a comparison chart of the driving capabilities of three types of driving units (INV-inverter, ND2-two-terminal NAND gate, NR2-two-terminal NOR gate). Figure 7The variation trend of delay with drive size is depicted in Figure 1. It can be proved that the curve is close to a hyperbola (that is, the delay is inversely proportional to the drive size); the liberty library provides enough inverter units until the size of 24x; the NAND gates and NOR gates end at 8x. Figure 7 It can be seen that the inverter has the strongest driving capability (driver size) and the smallest input conversion delay (Delay); the NAND gate is close to the inverter; the NOR gate has the worst driving capability and the largest delay. Therefore, the input conversion delay calculated by the present invention can be used to compare the driving capabilities of different types of driving units. That is, there is a corresponding relationship between the input conversion delay and the driving capability of the driving unit, and the driving unit with better driving capability can be screened out through the input conversion delay.

[0219] In this embodiment, for Type II delay, the delay optimization algorithm of the present invention is first used to search for the input conversion delay, and then based on the input conversion delay and the delay lookup table, a characteristic delay value is obtained, and different libraries are compared using the characteristic delay values ​​of different libraries. Figure 8 Libraries for different process nodes of the same foundry (including type II delay circuits), Figure 8 The horizontal axis is the driving capability, and the vertical axis is the input conversion delay. Figure 8 a, b, and c correspond to different libraries respectively. The characteristic delay value obtained by the present invention can be used to compare a series of design indicators such as the driving capabilities of libraries at different process nodes of the same foundry.

[0220] Based on the characteristic delay value obtained in this embodiment, libraries of similar process nodes of different foundries can also be compared, such as Fig. 9 As shown, the horizontal axis represents different units, and a series of design indicators such as area, unit rise, unit fall, rise transition, fall transition and leakage current can be compared.

[0221] In one embodiment, the delay optimization algorithm of the present invention is also applicable to calculate the input transition delay of Type III delay (delay of the same driver with different loads). Fig.10 Each straight line in represents a load line. By comparing the load lines, it can be seen that the load line slope of the driver with small driving ability is large, and the load line slope of the driver with strong driving ability is small. Small driving ability means large delay, and large driving ability means small delay. The load line is a straight line because the delay increases linearly with the increase of driving or load capacitance, thus forming a straight line.

[0222] This embodiment also provides a delay optimization device, such as Fig.11 As shown, the delay optimization device includes:

[0223] A preset range building module 01 is used to determine a preset range of input conversion delay of a delay circuit;

[0224] An output delay construction module 02, used to traverse the preset input conversion delays within the preset range of the input conversion delay, and determine the output conversion delay corresponding to the traversed preset input conversion delay, wherein the output conversion delay is the output conversion delay of the delay circuit;

[0225] The input delay construction module 03 is used to determine the target input conversion delay value of the delay circuit according to the output conversion delay, the preset input conversion delay and the signal flip direction of the component unit inside the delay circuit.

[0226] Based on the above embodiments, the present invention further provides a terminal device, whose principle block diagram can be shown as follows: Fig.12 As shown. The terminal device includes a processor, a memory, a network interface, and a display screen connected via a system bus. Among them, the processor of the terminal device is used to provide computing and control capabilities. The memory of the terminal device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the terminal device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a delay optimization method is implemented. The display screen of the terminal device can be a liquid crystal display screen or an electronic ink display screen.

[0227] Those skilled in the art will understand that Fig.12 The principle block diagram shown in the figure is only a block diagram of a partial structure related to the scheme of the present invention, and does not constitute a limitation on the terminal device to which the scheme of the present invention is applied. The specific terminal device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0228] In one embodiment, a terminal device is provided. The terminal device includes a memory, a processor, and a delay optimization program stored in the memory and executable on the processor. When the processor executes the delay optimization program, the following operation instructions are implemented:

[0229] determining a preset range of input transition delay of a delay circuit;

[0230] Traversing the preset input conversion delays within the preset range of the input conversion delay, and determining the output conversion delay corresponding to the traversed preset input conversion delay, the output conversion delay being the output conversion delay of the delay circuit;

[0231] A target input conversion delay value of the delay circuit is determined according to the output conversion delay, the preset input conversion delay, and the signal flip direction of the component unit inside the delay circuit.

[0232] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0233] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A delay optimization method, characterized in that: include: determining a preset range of input transition delay of a delay circuit; Traversing the preset input conversion delays within the preset range of the input conversion delay, and determining the output conversion delay corresponding to the traversed preset input conversion delay, the output conversion delay being the output conversion delay of the delay circuit; Determining a target input conversion delay value of the delay circuit according to the output conversion delay, the preset input conversion delay, and a signal flip direction of a component unit within the delay circuit; The step of determining a preset range of input conversion delay of the delay circuit comprises: According to a delay lookup table of the delay circuit, obtaining a maximum input conversion delay and a minimum input conversion delay of the delay circuit; constructing an input conversion delay original range of the delay circuit according to the maximum input conversion delay and the minimum input conversion delay; The original range of the input conversion delay is expanded to obtain a preset range of the input conversion delay of the delay circuit.

2. The delay optimization method according to claim 1, characterized in that: The traversing the preset input conversion delays within the preset range of the input conversion delay, and determining the output conversion delay corresponding to the traversed preset input conversion delay, wherein the output conversion delay is the output conversion delay of the delay circuit, comprises: Determine, according to a delay lookup table of the delay circuit, a first conversion delay index and a second conversion delay index and a first capacitance index and a second capacitance index corresponding to the preset input conversion delay, wherein the first conversion delay index is less than or equal to the second conversion delay index, and the first capacitance index is less than or equal to the second capacitance index; The first conversion delay index is combined with the first capacitance index and the second capacitance index in pairs, and the second conversion delay index is combined with the first capacitance index and the second capacitance index in pairs, to obtain an index pair; Determining a preset delay corresponding to the index pair according to the delay lookup table; The output conversion delay of the delay circuit is predicted based on the preset delay, the preset input conversion delay, the preset capacitance value corresponding to the preset input conversion delay, the first conversion delay index, the second conversion delay index, the first capacitance index and the second capacitance index.

3. The delay optimization method according to claim 1, characterized in that: When the traversal is in a small-to-large traversal order, determining the target input conversion delay value of the delay circuit according to the output conversion delay and the preset input conversion delay and the signal flip direction of the component unit inside the delay circuit includes: determining a relative error formed by the output switching delay and the preset input switching delay; When the signal flip direction is positive negation and the relative error gradually approaches the minimum error, continue to traverse the preset input conversion delay within the preset range of the input conversion delay to continue to iterate the relative error until the relative error is far away from the minimum error, stop the iterative traversal, and use the last traversed preset input conversion delay as the target input conversion delay value.

4. The delay optimization method according to claim 3, characterized in that: When the traversal is in a small-to-large traversal order, determining the target input conversion delay value of the delay circuit according to the output conversion delay and the preset input conversion delay and the signal flip direction of the component unit inside the delay circuit also includes: When the signal flip direction is reverse negation, continuing to iterate through the preset input conversion delay within the preset range of the input conversion delay to iterate the relative error twice; When the variation trend of the relative error of the second iteration is gradually approaching the minimum error, the preset input conversion delay within the preset range of the input conversion delay is continued to be traversed to continue iterating the relative error until the variation trend of the relative error is away from the minimum error, the iteration is stopped, and the last traversed preset input conversion delay is used as Enter a transition delay value for the target.

5. The delay optimization method according to any one of claims 1 to 4, characterized in that: All the component units inside the delay circuit are the same.

6. A delay optimization device, characterized in that: The delay optimization device comprises the following components: A preset range building module, used to determine a preset range of input conversion delay of the delay circuit; An output delay construction module, used to traverse the preset input conversion delays within the preset range of the input conversion delay, and determine the output conversion delay corresponding to the traversed preset input conversion delay, wherein the output conversion delay is the output conversion delay of the delay circuit; An input delay construction module, used to determine a target input conversion delay value of the delay circuit according to the output conversion delay and the preset input conversion delay and the signal flip direction of the component unit inside the delay circuit; The step of determining a preset range of input conversion delay of the delay circuit comprises: According to a delay lookup table of the delay circuit, obtaining a maximum input conversion delay and a minimum input conversion delay of the delay circuit; constructing an input conversion delay original range of the delay circuit according to the maximum input conversion delay and the minimum input conversion delay; The original range of the input conversion delay is expanded to obtain a preset range of the input conversion delay of the delay circuit.

7. A terminal device, characterized in that: The terminal device includes a memory, a processor, and a delay optimization program stored in the memory and executable on the processor. When the processor executes the delay optimization program, the steps of the delay optimization method according to any one of claims 1 to 5 are implemented.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a delay optimization program, and when the delay optimization program is executed by a processor, the steps of the delay optimization method according to any one of claims 1 to 5 are implemented.