FLEXIBLE MODELING METHOD FOR TIMING CONSTRAINT OF REGISTER

Information

  • Patent Application
  • 20230195985
  • Publication Number
    20230195985
  • Date Filed
    March 09, 2022
    2 years ago
  • Date Published
    June 22, 2023
    a year ago
  • CPC
    • G06F30/3312
    • G06F30/3315
    • G06F2119/12
  • International Classifications
    • G06F30/3312
    • G06F30/3315
Abstract
Disclosed in the present invention is a flexible modeling method for a timing constraint of a register. Simulation ranges of input terminal transition time, clock terminal transition time, and output load capacitance of a register are determined first, simulation is performed under each combination of input terminal transition time, clock terminal transition time, and output load capacitance to obtain a timing constraint range, then setup slack and hold slack are extracted in this constraint range with a particular interval, and then simulation is performed to obtain a clock terminal-to-output terminal delay. Finally, a mutually independent timing model of the register is established by using an artificial neural network, where the clock terminal-to-output terminal delay is modeled as a function of the input terminal transition time, the clock terminal transition time, the output load capacitance, the setup slack, the hold slack, and an output terminal state. A flexible timing constraint model in the present invention has advantages of low simulation overheads and high prediction precision, and is of great significance for static timing analysis timing signoff of a digital integrated circuit.
Description
TECHNICAL FIELD

The present invention belongs to the field of electronic design automation, and in particular, to a flexible modeling method for a timing constraint of a register.


BACKGROUND

In static timing analysis (STA), setup and hold synchronous timing check is essential for verifying whether timing of a register-based Sequential circuit is correct. A setup time (setup time) of a register is a time within which a data input (D) needs to be valid before a clock toggle (a toggle of 0→1 of the register is triggered for positive edge), and a hold time (hold time) of the register is a time within which the data input still needs to be valid after a clock edge. Data at an input terminal (D) is copied to an output terminal (Q) only when the setup time and the hold time both satisfy requirements. If either one of the two constraints is disobeyed, it is determined that the register operates abnormally, and a timing violation is reported.


In conventional static timing analysis (STA), it is assumed that a register operates in a region (that is, a stable region) with a constant register delay, that is, a clock terminal-to-output terminal delay Tcq. An assumed operating point of the register is obtained when the setup slack or the hold slack is sufficiently large. In this case, a corresponding clock terminal-to-output terminal delay is minimum Tcq of the register when the setup slack and the hold slack are changed, and is denoted as Tcqmin. In addition, when the hold slack is set to a sufficiently large value, the setup slack is gradually reduced. Generally, the setup slack when Tcq just reaches 110%×Tcqmin is set as the setup time. Similarly, when the setup slack is set to a sufficiently large value, the hold slack is gradually reduced. Generally, the hold slack when Tcq just reaches 110%×Tcqmin is set as the hold time. In such simplification, a feasible region other than the setup time and the hold time, a mutually independent relationship between the setup slack, the hold slack, and the register delay is omitted. Therefore, circuit performance may be underestimated.


In addition, in a region in which the setup slack is greater than the setup time and the hold slack is greater than the hold time, there is a region in which Tcq is greater than 110%×Tcqmin. However, in conventional STA, it is still assumed that the register delay is 110%×Tcqmin, causing a risk that the circuit still cannot operate normally even if a timing constraint is satisfied.


In fact, there is a mutually independent relationship between the setup slack, the hold slack, and the register delay of the register. As shown in FIG. 1, when the setup slack and the hold slack are sufficiently large, the clock terminal-to-output terminal delay of the register is a minimum delay of the register. If the setup slack and the hold slack become sufficiently short, the register delay increases until the register enters a metastable region. If the register is allowed to operate in the region in which the setup slack is less than the setup time, a clock cycle of a critical path of a circuit may be shorter. Even if this level of register has relatively small setup slack, the delay of this level of register increases, but the increased delay time only affects a combinational path between the level of register and a next level of register. If the combinational path delay is not large, a timing violation does not occur.


SUMMARY

An objective of the present invention is to provide a flexible modeling method for a timing constraint of a register, to resolve the technical problem that circuit performance is underestimated due to the omission of correlation between setup slack, hold slack, and a clock terminal-to-output terminal delay of a register in a conventional static timing analysis method and the technical problem of reducing simulation overheads required for establishing a flexible model.


To solve the foregoing technical problem, a specific technical solution of the present invention is as follows:


A flexible modeling method for a timing constraint of a register includes the following steps:


step 1. performing simulation in a case of each combination of SQ, Tdi, Tckj, and CLk respectively to obtain a timing constraint range for establishing a model, where SQ represents an output terminal state of a register; Tdi represents p types of input terminal transition time Td of the register, i is an integer, and 1≤i≤p; Tckj represents q types of clock terminal transition time Tck of the register, j is an integer, and 1≤j≤q; and CLk represents m types of output load capacitance CL of the register, k is an integer, and 1≤k≤m;


step 2. under the obtained timing constraint range under each combination of SQ, Tdi, Tckj, and CLk, setting that Tstep is a sampling interval of both setup slack and hold slack, extracting N combination pairs of setup slack and hold slack with the set Tstep as intervals for both setup slack and hold slack, performing simulation by using a transistor-level simulation tool to respectively obtain N clock terminal-to-output terminal delays of the register, and subsequently combining all simulation data under all combinations of SQ, Tdi, Tckj, and CLk together to obtain Ns groups of model training sample data, where each group of training sample data includes parameters including the input terminal transition time, the clock terminal transition time, the output load capacitance, the setup slack, the hold slack, the output terminal state, and the clock terminal-to-output terminal delay of the register;


step 3. using the input terminal transition time, the clock terminal transition time, the output load capacitance, the setup slack, the hold slack, and the output terminal state of the register as model features, using the corresponding clock terminal-to-output terminal delays of the register obtained in step 2 as model labels, performing training by using a neural network, and establishing a mutually independent timing model of the register; and


step 4. obtaining timing constraints by using a static timing analysis tool, the timing constraints including the output terminal state, the input terminal transition time, the clock terminal transition time, and the output load capacitance of the register, and performing inference by using the mutually independent timing model of the register obtained in step 3 to obtain a clock terminal-to-output terminal delay of the register when the setup slack is Tsut and a clock terminal-to-output terminal delay of the register when the hold slack is Thdt.


Further, step 1 specifically includes the following steps:


step 1.1. under each combination of SQ, Tdi, Tckj, and CLk, performing simulation by using the transistor-level simulation tool first to obtain clock terminal-to-output terminal delays Tcq when the setup slack has a sufficiently large value Tsu(max) and the hold slack has a sufficiently large value Thd(max), where the sufficiently large value of the setup slack refers to that in this case, if Tsu continues to increase, Tcq no longer continues to decrease, and the sufficiently large value of the hold slack refers to that in this case, if Thd continues to increase, Tcq no longer continues to decrease, specifically, when the setup slack increases from Tsu(max) to δsu×Tsu(max) and the hold slack increases from Thd(max) to δhd×Thd(max). Tcq remains unchanged, where δsu is a setup slack verification coefficient, 1≤δsu≤1.1, δhd is a hold slack verification coefficient, 1≤δhd≤1.1, and in this case, the register operates in a stable region, and it is denoted in this case that Tcq is Tcqmin, the hold slack is ThdA, and the setup slack is TsuA;


step 1.2. gradually reducing the setup slack with ThdA as a fixed hold slack, where setup slack obtained when transistor-level simulation fails is minimum setup slack in the timing constraint range, and it is denoted in this case that the setup slack is TsuC;


step 1.3. searching for the value of the setup slack by using a binary method with ThdA as a fixed hold slack, where an interval in which the search is started is [TsuC, TsuA], performing simulation on the specific setup slack by using the transistor-level simulation tool to obtain Tcq, and setting a target value of Tcq to Bcq×Tcqmin, where Bcq is a first target coefficient of the setup slack, 1≤Bcq≤1.1, and the value of the setup slack found through binary search is denoted as TsuB;


step 1.4. gradually reducing the hold slack with TsuA as a fixed setup slack, where hold slack obtained when transistor-level simulation fails is minimum hold slack in the timing constraint range, and it is recorded in this case that the hold slack is ThdG;


step 1.5. searching for the value of the hold slack by using a binary method with TsuA as a fixed setup slack, where an interval in which the search is started is [ThdG, ThdA], performing simulation on the specific hold slack by using the transistor-level simulation tool to obtain the clock terminal-to-output terminal delay Tcq, and setting a target value of the clock terminal-to-output terminal delay Tcq to Fcq×Tcqmin, where Fcq is a first target coefficient of the hold slack, 1≤Fcq≤1.1, and the value of the hold slack found through binary search is denoted as ThdF; and


step 1.6. searching for the value of the hold slack by using a binary method with TsuB as a fixed setup slack, where an interval in which the search is started is [ThdF, ThdA], performing simulation on the specific hold slack by using the transistor-level simulation tool to obtain the clock terminal-to-output terminal delay Tcq, and setting the target value of the clock terminal-to-output terminal delay Tcq to Dcq×Tcqmin, where Dcq is a second target coefficient of the hold slack, Bcq≤Dcq≤1.1, and the value of the hold slack found through binary search is denoted as ThdD;


step 1.7. searching for the value of the setup slack by using a binary method with ThdF as a fixed hold slack, where an interval in which the search is started is [TsuB, TsuA], performing simulation on the specific setup slack by using the transistor-level simulation tool to obtain the clock terminal-to-output terminal delay Tcq, and setting the target value of the clock terminal-to-output terminal delay Tcq to Hcq×Tcqmin, where Hcq is a second target coefficient of the setup slack, Fcq≤Hcq≤1.1, and the value of the setup slack found through binary search is denoted as TsuH;


step 1.8. forming a constraint condition by using the following formulas for a simulation range of the pair of the hold slack Thd and the setup slack Tsu under the combination of SQ, Tdi, Tckj, and CLk:









{






T
hd
G



T
hd



T
hd
D








T
su
C



T
su



T
su
H










T
su

-

T
su
H




T
su
B

-

T
su
H







T
hd

-

T
hd
F




T
hd
D

-

T
hd
F












T
hd

-

T
hd
G




T
hd
F

-

T
hd
G







T
su

-

T
su
B




T
su
C

-

T
su
B







,





(
1
)







the foregoing formula is the timing constraint range of the model established in a case of the combination of SQ, Tdi, Tckj, and CLk.


Further, step 2 specifically includes the following steps:


step 2.1. setting that Tstep is the sampling interval of both setup slack and hold slack, extracting the N combination pairs of setup slack and hold slack with the set Tstep as intervals for both setup slack and hold slack, and performing simulation by using a transistor-level simulation tool to respectively obtain the N clock terminal-to-output terminal delays of the register, where in this case, the obtained each group of simulation data includes a total of seven parameters including the input terminal transition time, the clock terminal transition time, the output load capacitance, the setup slack, the hold slack, the output terminal state, and the clock terminal-to-output terminal delay;


step 2.2. giving that a threshold of the clock terminal-to-output terminal delay is Mth×Tcqmin, where Mth is a delay threshold coefficient, and 1≤Mth≤10; and eliminating these corresponding groups of simulation data when transistor-level simulation fails and the clock terminal-to-output terminal delay is greater than Mth×Tcqmin, storing data obtained after elimination as training and test samples of a neural network model, and repeating the foregoing process under each different combination of SQ, Tdi, Tckj, and CLk; and


step 2.3. subsequently combining all simulation data under all combinations of the output terminal state SQ, the input terminal transition time Tdi, the clock terminal transition time Tckj, and the output load capacitance CLk of the register together to obtain the Ns groups of model training sample data, where each group of training sample data includes the total of seven parameters including the input terminal transition time, the clock terminal transition time, the output load capacitance, the setup slack, the hold slack, the output terminal state, and the clock terminal-to-output terminal delay of the register.


Further, specific steps of the binary search in step 1.3 are as follows: an interval in which the search is started is [TsuC, TsuA], simulation is performed at a middle position (TsuC+TsuA)/2 of the search interval to obtain the clock terminal-to-output terminal delay, and if in this case, the clock terminal-to-output terminal delay is Bcq×Tcqmin, the search process ends; if in this case, the clock terminal-to-output terminal delay is greater than Bcq×Tcqmin, the search interval is updated to [(TsuC+TsuA)/2, TsuA]; if in this case, the clock terminal-to-output terminal delay is less than Bcq×Tcqmin, the search interval is updated to [TsuC, (TsuC+TsuA)/2]; then the foregoing process is repeated with the new search interval, the search interval is halved each time, and the search ends when a clock terminal-to-output terminal delay obtained through simulation by using the transistor-level simulation tool at a middle position in a search process is Bcq×Tcqmin; and when a middle position of the last binary search interval, that is, the clock terminal-to-output terminal delay, is Bcq×Tcqmin, the corresponding setup slack is denoted as TsuB.


Further, specific steps of the binary search in step 1.5 are as follows: an interval in which the search is started is [ThdG, ThdA], simulation is performed at a middle position (ThdG+ThdA)/2 of the search interval to obtain the clock terminal-to-output terminal delay, and if in this case, the clock terminal-to-output terminal delay is Fcq×Tcqmin, the search process ends; if in this case, the clock terminal-to-output terminal delay is greater than Fcq×Tcqmin, the search interval is updated to [(ThdG+ThdA)/2, ThdA]; if in this case, the clock terminal-to-output terminal delay is less than Fcq×Tcqmin, the search interval is updated to [ThdG, (ThdG+ThdA)/2]; then the foregoing process is repeated with the new search interval, the search interval is halved each time, and the search ends when a clock terminal-to-output terminal delay obtained through simulation by using the transistor-level simulation tool at a middle position in a search process is Fcq×Tcqmin; and when a middle position of the last binary search interval, that is, the clock terminal-to-output terminal delay, is Fcq×Tcqmin, the corresponding hold slack is denoted as ThdF.


Further, specific steps of the binary search in step 1.6 are as follows: an interval in which the search is started is [ThdF, ThdA], simulation is performed at a middle position (ThdF+ThdA)/2 of the search interval to obtain the clock terminal-to-output terminal delay, and if in this case, the clock terminal-to-output terminal delay is Dcq×Tcqmin, the search process ends; if in this case, the clock terminal-to-output terminal delay is greater than Dcq×Tcqmin, the search interval is updated to [(ThdF+ThdA)/2, ThdA]; if in this case, the clock terminal-to-output terminal delay is less than Dcq×Tcqmin, the search interval is updated to [ThdF, (ThdF+ThdA)/2]; then the foregoing process is repeated with the new search interval, and each time the search interval is halved, and the search ends when a clock terminal-to-output terminal delay obtained through simulation by using the transistor-level simulation tool at a middle position in a search process is Dcq×Tcqmin; and when a middle position of the last binary search interval, that is, the clock terminal-to-output terminal delay, is Dcq×Tcqmin, the corresponding hold slack is denoted as ThdD.


Further, specific steps of the binary search in step 1.7 are as follows: an interval in which the search is started is [TsuB, TsuA], simulation is performed at a middle position (TsuB+TsuA)/2 of the search interval to obtain the clock terminal-to-output terminal delay, and if in this case, the clock terminal-to-output terminal delay is Hcq×Tcqmin, the search process ends; if in this case, the clock terminal-to-output terminal delay is greater than Hcq×Tcqmin, the search interval is updated to [(TsuB+TsuA)/2, TsuA]; if in this case, the clock terminal-to-output terminal delay is less than Hcq×Tcqmin, the search interval is updated to [TsuB, (TsuB+TsuA)/2]; then the foregoing process is repeated with the new search interval, and each time the search interval is halved, and the search ends when a clock terminal-to-output terminal delay obtained through simulation by using the transistor-level simulation tool at a middle position in a search process is Hcq×Tcqmin; and when a middle position of the last binary search interval, that is, the clock terminal-to-output terminal delay, is Hcq×Tcqmin, the corresponding setup slack is denoted as TsuH.


A flexible modeling method for a timing constraint of a register of the present invention has the following advantages:


1. In a timing model of a register established in the present invention, a clock terminal-to-output terminal delay is modeled as a function of an input terminal transition time, a clock terminal transition time, an output load capacitance, setup slack, hold slack, and an output terminal state. A clock terminal-to-output terminal delay in a conventional timing constraint model of a register is a function of a clock terminal transition time, an output load capacitance, and an output terminal state. The register timing model established in the present invention can effectively represent correlation between setup slack, hold slack, and clock terminal-to-output terminal delay of a register, and takes the impact of an input terminal transition time on the clock terminal-to-output terminal delay into consideration, thereby describing a timing constraint of the register more comprehensively, overcoming the underestimation tendency of a conventional timing constraint model of the register, and helping to improve the precision of static timing analysis.


2. In the present invention, a simulation range of a flexible timing constraint model of a register keeps being reduced through a plurality of times of binary search, to effectively reduce simulation in a stable region, and avoid simulation in a metastable region, thereby effectively reducing simulation overheads, mitigating the problem of increased simulation overheads caused by flexible modeling of a timing constraint of a register, and benefiting the actual application of the modeling method to a static timing analysis procedure.





BRIEF DESCRIPTION OF THE DRAWINGS


FIG. 1 is a diagram of a mutually independent relationship between setup slack, hold slack, and a clock terminal-to-output terminal delay of a register in the prior art:



FIG. 2 is a schematic diagram of a simulation range required for a register flexible timing constraint model according to the present invention; and



FIG. 3 is a schematic structural diagram of a neural network model for obtaining a register clock terminal-to-output terminal delay Tcq through inference according to the present invention.





DETAILED DESCRIPTION

For better understanding of the objective, structure, and function of the present invention, a flexible modeling method for a timing constraint of a register of the present invention is further described below in detail with reference to the accompanying drawings.


A flexible modeling method for a timing constraint of a register of the present invention includes the following steps:


Step 1. Perform simulation in a case of each combination of SQ, Tdi, Tckj, and CLk respectively to obtain a timing constraint range for establishing a model, the timing constraint range being a polygon DHIJKE shown in FIG. 2, where SQ represents an output terminal state of a register; Tdi represents p types of input terminal transition time Td of the register, i is an integer, and 1≤i≤p; Tckj represents q types of clock terminal transition time Tck of the register, j is an integer, and 1≤j≤q; and CLk represents m types of output load capacitance CL of the register, k is an integer, and 1≤k≤m.


In a conventional timing constraint model of a register, it is assumed that a register operates in a region (that is, a stable region) with a constant register delay, that is, a clock terminal-to-output terminal delay Tcq. An assumed operating point of the register is obtained when the setup slack or the hold slack is sufficiently large. In this case, a corresponding clock terminal-to-output terminal delay is minimum Tcq of the register when the setup slack and the hold slack are changed, and is denoted as Tcqmin. In addition, when the hold slack is set to a sufficiently large value, the setup slack is gradually reduced. Generally, the setup slack when Tcq just reaches 110%×Tcqmin is set as the setup time, corresponding to setup slack at a point L in FIG. 2. Similarly, when the setup slack is set to a sufficiently large value, the hold slack is gradually reduced. Generally, the hold slack when Tcq just reaches 110%×Tcqmin is set as the hold time, corresponding to hold slack at a point O in FIG. 2.


Step 1 specifically includes the following steps:


Step 1.1. Under each combination of SQ, Tdi, Tckj, and CLk, perform simulation by using the transistor-level simulation tool first to obtain clock terminal-to-output terminal delays Tcq when the setup slack has a sufficiently large value Tsu(max) and the hold slack has a sufficiently large value Thd(max), where the sufficiently large value of the setup slack refers to that in this case, if Tsu continues to increase, Tcq no longer continues to decrease, and the sufficiently large value of the hold slack refers to that in this case, if Thd continues to increase, Tcq no longer continues to decrease, specifically, when the setup slack increases from Tsu(max) to δsu×Tsu(max) and the hold slack increases from Thd(max) to δhd×Thd(max), Tcq remains unchanged, where δsu is a setup slack verification coefficient, 1≤δsu≤1.1, δhd is a hold slack verification coefficient, 1≤δhd≤1.1, and in this case, the register operates in a stable region, and it is denoted in this case that Tcq is Tcqmin, the hold slack is ThdA, and the setup slack is TsuA, corresponding to a point A shown in FIG. 2.


Step 1.2. Gradually reduce the setup slack with ThdA as a fixed hold slack, where setup slack obtained when transistor-level simulation fails is minimum setup slack in the timing constraint range, and it is denoted in this case that the setup slack is TsuC, corresponding to a point C shown in FIG. 2.


Step 1.3. Search for the value of the setup slack by using a binary method with ThdA as a fixed hold slack, where an interval in which the search is started is [TsuC, TsuA], performing simulation on the specific setup slack by using the transistor-level simulation tool to obtain Tcq, and setting a target value of Tcq to Bcq×Tcqmin, where Bcq is a first target coefficient of the setup slack, 1≤Bcq≤1.1, and the value of the setup slack found through binary search is denoted as TsuB, corresponding to a point B shown in FIG. 2. Specific steps of the binary search are as follows: an interval in which the search is started is [TsuC, TsuA], simulation is performed at a middle position (TsuC+TsuA)/2 of the search interval to obtain the clock terminal-to-output terminal delay, and if in this case, the clock terminal-to-output terminal delay is Bcq×Tcqmin, the search process ends; if in this case, the clock terminal-to-output terminal delay is greater than Bcq×Tcqmin, the search interval is updated to [(TsuC+TsuA)/2, TsuA]; if in this case, the clock terminal-to-output terminal delay is less than Bcq×Tcqmin, the search interval is updated to [TsuC, (TsuC+TsuA)/2]; then the foregoing process is repeated with the new search interval, the search interval is halved each time, and the search ends when a clock terminal-to-output terminal delay obtained through simulation by using the transistor-level simulation tool at a middle position in a search process is Bcq×Tcqmin; and when a middle position of the last binary search interval, that is, the clock terminal-to-output terminal delay, is Bcq×Tcqmin, the corresponding setup slack is denoted as TsuB, corresponding to the point B shown in FIG. 2.


Step 1.4. Gradually reduce the hold slack with TsuA as a fixed setup slack, where hold slack obtained when transistor-level simulation fails is minimum hold slack in the timing constraint range, and it is recorded in this case that the hold slack is ThdG, corresponding to a point G shown in FIG. 2.


Step 1.5. Search for the value of the hold slack by using a binary method with TsuA as a fixed setup slack, where an interval in which the search is started is [ThdG, ThdA], perform simulation on the specific hold slack by using the transistor-level simulation tool to obtain the clock terminal-to-output terminal delay Tcq, and set a target value of the clock terminal-to-output terminal delay Tcq to Fcq×Tcqmin, where Fcq is a first target coefficient of the hold slack, 1≤Fcq≤1.1, and the value of the hold slack found through binary search is denoted as ThdF, corresponding to a point F shown in FIG. 2. Specific steps of the binary search are as follows: an interval in which the search is started is [ThdG, ThdA], simulation is performed at a middle position (ThdG+ThdA)/2 of the search interval to obtain the clock terminal-to-output terminal delay, and if in this case, the clock terminal-to-output terminal delay is Fcq×Tcqmin, the search process ends; if in this case, the clock terminal-to-output terminal delay is greater than Fcq×Tcqmin, the search interval is updated to [(ThdG+ThdA)/2, ThdA]; if in this case, the clock terminal-to-output terminal delay is less than Fcq×Tcqmin, the search interval is updated to [ThdG, (ThdG+ThdA)/2]; then the foregoing process is repeated with the new search interval, the search interval is halved each time, and the search ends when a clock terminal-to-output terminal delay obtained through simulation by using the transistor-level simulation tool at a middle position in a search process is Fcq×Tcqmin; and when a middle position of the last binary search interval, that is, the clock terminal-to-output terminal delay, is Fcq×Tcqmin, the corresponding hold slack is denoted as ThdF, corresponding to the point F shown in FIG. 2.


Step 1.6. Search for the value of the hold slack by using a binary method with TsuB as a fixed setup slack, where an interval in which the search is started is [ThdF, ThdA], perform simulation on the specific hold slack by using the transistor-level simulation tool to obtain the clock terminal-to-output terminal delay Tcq, and set the target value of the clock terminal-to-output terminal delay Tcq to Dcq×Tcqmin, where Dcq is a second target coefficient of the hold slack, Bcq≤Dcq≤1.1, and the value of the hold slack found through binary search is denoted as ThdD, corresponding to a point D shown in FIG. 2. Specific steps of the binary search are as follows: an interval in which the search is started is [ThdF, ThdA], simulation is performed at a middle position (ThdF+ThdA)/2 of the search interval to obtain the clock terminal-to-output terminal delay, and if in this case, the clock terminal-to-output terminal delay is Dcq×Tcqmin, the search process ends; if in this case, the clock terminal-to-output terminal delay is greater than Dcq×Tcqmin, the search interval is updated to [(ThdF+ThdA)/2, ThdA]; if in this case, the clock terminal-to-output terminal delay is less than Dcq×Tcqmin, the search interval is updated to [TddF, (ThdF+ThdA)/2]; then the foregoing process is repeated with the new search interval, and each time the search interval is halved, and the search ends when a clock terminal-to-output terminal delay obtained through simulation by using the transistor-level simulation tool at a middle position in a search process is Dcq×Tcqmin; and when a middle position of the last binary search interval, that is, the clock terminal-to-output terminal delay, is Dcq×Tcqmin, the corresponding hold slack is denoted as ThdD, corresponding to the point D shown in FIG. 2.


Step 1.7. Search for the value of the setup slack by using a binary method with ThdF as a fixed hold slack, where an interval in which the search is started is [TsuB, TsuA], performing simulation on the specific setup slack by using the transistor-level simulation tool to obtain the clock terminal-to-output terminal delay Tcq, and setting the target value of the clock terminal-to-output terminal delay Tcq to Hcq×Tcqmin, where Hcq, is a second target coefficient of the setup slack, Fcq≤Hcq≤1.1, and the value of the setup slack found through binary search is denoted as TsuH, corresponding to a point H shown in FIG. 2. Specific steps of the binary search are as follows: an interval in which the search is started is [TsuB, TsuA], simulation is performed at a middle position (TsuB+TsuA)/2 of the search interval to obtain the clock terminal-to-output terminal delay, and if in this case, the clock terminal-to-output terminal delay is Hcq×Tcqmin, the search process ends; if in this case, the clock terminal-to-output terminal delay is greater than Hcq×Tcqmin, the search interval is updated to [(TsuB+TsuA)/2, TsuA]; if in this case, the clock terminal-to-output terminal delay is less than Hcg×Tcqmin, the search interval is updated to [TsuB, (TsuB+TsuA)/2]; then the foregoing process is repeated with the new search interval, and each time the search interval is halved, and the search ends when a clock terminal-to-output terminal delay obtained through simulation by using the transistor-level simulation tool at a middle position in a search process is Hcq×Tcqmin; and when a middle position of the last binary search interval, that is, the clock terminal-to-output terminal delay, is Hcq×Tcqmin, the corresponding setup slack is denoted as TsuH, corresponding to the point H shown in FIG. 2.


Step 1.8. Form a constraint condition by using the following formulas for a simulation range of the pair of the hold slack Thd and the setup slack Tsu under the combination of SQ, Tdi, Tcjk, and CLk:









{






T
hd
G



T
hd



T
hd
D








T
su
C



T
su



T
su
H










T
su

-

T
su
H




T
su
B

-

T
su
H







T
hd

-

T
hd
F




T
hd
D

-

T
hd
F












T
hd

-

T
hd
G




T
hd
F

-

T
hd
G







T
su

-

T
su
B




T
su
C

-

T
su
B







,





(
1
)







the foregoing formula is the timing constraint range of the model established in a case of the combination of SQ, Tdi, Tckj, and CLk, that is, a region of the polygon DHIJKE shown in FIG. 2.


Step 2. Under the obtained timing constraint range under each combination of SQ, Tdi, Tckj, and CLk, set that Tstep is a sampling interval of both setup slack and hold slack, extract N combination pairs of setup slack and hold slack with the set Tstep as intervals for both setup slack and hold slack, where as shown in FIG. 2, the combination pairs of setup slack and hold slack are combinations of setup slack and hold slack corresponding to N intersections of transverse dotted lines and vertical dotted lines in the polygon DHIJKE shown in FIG. 2, perform simulation by using a transistor-level simulation tool to respectively obtain N clock terminal-to-output terminal delays of the register, and subsequently combining all simulation data under all combinations of SQ, Tdi, Tckj, and CLk together to obtain Ns groups of model training sample data, where each group of training sample data includes parameters including the input terminal transition time, the clock terminal transition time, the output load capacitance, the setup slack, the hold slack, the output terminal state, and the clock terminal-to-output terminal delay of the register.


Step 2 specifically includes the following steps:


Step 2.1. Set that Tstep is the sampling interval of both setup slack and hold slack, as shown in FIG. 2, extract the N combination pairs of setup slack and hold slack with the set Tstep as intervals for both setup slack and hold slack, and perform simulation by using a transistor-level simulation tool to respectively obtain the N clock terminal-to-output terminal delays of the register, where in this case, the obtained each group of simulation data includes a total of seven parameters including the input terminal transition time, the clock terminal transition time, the output load capacitance, the setup slack, the hold slack, the output terminal state, and the clock terminal-to-output terminal delay.


Step 2.2. Give that a threshold of the clock terminal-to-output terminal delay is Mth×Tcqmin, where Mth is a delay threshold coefficient, and 1≤Mth≤10; and eliminate these corresponding groups of simulation data when transistor-level simulation fails and the clock terminal-to-output terminal delay is greater than Mth×Tcqmin, store data obtained after elimination as training and test samples of a neural network model, and repeat the foregoing process under each different combination of SQ, Tdi, Tckj, and CLk.


Step 2.3. Subsequently combine all simulation data under all combinations of the output terminal state SQ, the input terminal transition time Tdi, the clock terminal transition time Tckj, and the output load capacitance CLk of the register together to obtain the Ns groups of model training sample data, where each group of training sample data includes the total of seven parameters including the input terminal transition time, the clock terminal transition time, the output load capacitance, the setup slack, the hold slack, the output terminal state, and the clock terminal-to-output terminal delay of the register.


Step 3. Use the input terminal transition time, the clock terminal transition time, the output load capacitance, the setup slack, the hold slack, and the output terminal state of the register as model features, use the corresponding clock terminal-to-output terminal delays of the register obtained in step 2 as model labels, perform training by using a neural network, and establish a mutually independent timing model of the register. The structure of the neural network model is shown in FIG. 3. Parameters of an input layer of a neural network includes the input terminal transition time, the clock terminal transition time, the output load capacitance, the setup slack, the hold slack, and the output terminal state of the register. The neural network in FIG. 3 includes two hidden layers (in fact, a quantity of hidden layers and a quantity of neurons in each hidden layer may be adjusted according to a specific case). An output layer is the register clock terminal-to-output terminal delay.


Step 4. Obtain timing constraints by using a static timing analysis tool, the timing constraints including the output terminal state, the input terminal transition time, the clock terminal transition time, and the output load capacitance of the register, and perform inference by using the mutually independent timing model of the register obtained in step 3 to obtain a clock terminal-to-output terminal delay of the register when the setup slack is Tsut and a clock terminal-to-output terminal delay of the register when the hold slack is Thdt. As shown in FIG. 3, the input terminal transition time, the clock terminal transition time, the output load capacitance, the setup slack, the hold slack, and the output terminal state of the register are used as inputs of the neural network model, and the clock terminal-to-output terminal delay is calculated and outputted by using the neural network.


It may be understood that the present invention is described by using a number of embodiments. It is known to those skilled in the art that various changes or equivalent substitutions can be made to these features and embodiments without departing from the spirit and scope of the present invention. Furthermore, under the teachings of the present invention, these features and embodiments can be modified to adapt to specific cases and materials without departing from the spirit and scope of the present invention. Accordingly, the present invention is not limited to the specific embodiments disclosed herein, and all embodiments falling within the scope of the claims of the present application fall within the scope protected by the present invention.

Claims
  • 1. A flexible modeling method for a timing constraint of a register, including the following steps: step 1. performing simulation in a case of each combination of SQ, Tdi, Tckj, and CLk respectively to obtain a timing constraint range for establishing a model, where SQ represents an output terminal state of a register; Tdi represents p types of input terminal transition time Td of the register, i is an integer, and 1≤i≤p; Tckj represents q types of clock terminal transition time Tck of the register, j is an integer, and 1≤j≤q; and CLk represents m types of output load capacitance CL of the register, k is an integer, and 1≤k≤m;step 2. under the obtained timing constraint range under each combination of SQ, Tdi, Tckj, and CLk, setting that Tstep is a sampling interval of both setup slack and hold slack, extracting N combination pairs of setup slack and hold slack with the set Tstep as intervals for both setup slack and hold slack, performing simulation by using a transistor-level simulation tool to respectively obtain N clock terminal-to-output terminal delays of the register, and subsequently combining all simulation data of under all combinations of SQ, Tdi, Tckj, and CLk together to obtain Ns groups of model training sample data, where each group of training sample data includes parameters including the input terminal transition time, the clock terminal transition time, the output load capacitance, the setup slack, the hold slack, the output terminal state, and the clock terminal-to-output terminal delay of the register;step 3. using the input terminal transition time, the clock terminal transition time, the output load capacitance, the setup slack, the hold slack, and the output terminal state of the register as model features, using the corresponding clock terminal-to-output terminal delays of the register obtained in step 2 as model labels, performing training by using a neural network, and establishing a mutually independent timing model of the register; andstep 4. obtaining timing constraints by using a static timing analysis tool, the timing constraints including the output terminal state, the input terminal transition time, the clock terminal transition time, and the output load capacitance of the register, and performing inference by using the mutually independent timing model of the register obtained in step 3 to obtain a clock terminal-to-output terminal delay of the register when the setup slack is Tsut and a clock terminal-to-output terminal delay of the register when the hold slack is Thdt.
  • 2. The flexible modeling method for a timing constraint of a register according to claim 1, where step 1 specifically includes the following steps: step 1.1. under each combination of SQ, Tdi, Tckj, and CLk, performing simulation by using the transistor-level simulation tool first to obtain clock terminal-to-output terminal delays Tcq when the setup slack has a sufficiently large value Tsu(max) and the hold slack has a sufficiently large value Thd(max), where the sufficiently large value of the setup slack refers to that in this case, if Tsu continues to increase, Tcq no longer continues to decrease, and the sufficiently large value of the hold slack refers to that in this case, if Thd continues to increase, Tcq no longer continues to decrease, that is, when the setup slack increases from Tsu(max) to δsu×Tsu(max) and the hold slack increases from Thd(max) to δhd×Thd(max), Tcq remains unchanged, where δsu is a setup slack verification coefficient, 1≤δsu≤1.1, δhd is a hold slack verification coefficient, 1≤δhd≤1.1, and in this case, the register operates in a stable region, and it is denoted in this case that Tcq is Tcqmin, the hold slack is ThdA, and the setup slack is TsuA;step 1.2. gradually reducing the setup slack with ThdA as a fixed hold slack, where setup slack obtained when transistor-level simulation fails is minimum setup slack in the timing constraint range, and it is denoted in this case that the setup slack is TsuC;step 1.3. searching for the value of the setup slack by using a binary method with ThdA as a fixed hold slack, where an interval in which the search is started is [TsuC, TsuA], performing simulation on the setup slack by using the transistor-level simulation tool to obtain Tcq, and setting a target value of Tcq to Bcq×Tcqmin, where Bcq is a first target coefficient of the setup slack, 1≤Bcq≤1.1, and the value of the setup slack found through binary search is denoted as TsuB;step 1.4. gradually reducing the hold slack with TsuA as a fixed setup slack, where hold slack obtained when transistor-level simulation fails is minimum hold slack in the timing constraint range, and it is recorded in this case that the hold slack is ThdG;step 1.5. searching for the value of the hold slack by using a binary method with TsuA as a fixed setup slack, where an interval in which the search is started is [ThdG, ThdA], performing simulation on the hold slack by using the transistor-level simulation tool to obtain the clock terminal-to-output terminal delay Tcq, and setting a target value of the clock terminal-to-output terminal delay Tcq to Fcq×Tcqmin, where Fcq is a first target coefficient of the hold slack, 1≤Fcq≤1.1, and the value of the hold slack found through binary search is denoted as ThdF; andstep 1.6. searching for the value of the hold slack by using a binary method with TsuB as a fixed setup slack, where an interval in which the search is started is [ThdF, ThdA], performing simulation on the hold slack by using the transistor-level simulation tool to obtain the clock terminal-to-output terminal delay Tcq, and setting the target value of the clock terminal-to-output terminal delay Tcq to Dcq×Tcqmin, where Dcq is a second target coefficient of the hold slack, Bcq≤Dcq≤1.1, and the value of the hold slack found through binary search is denoted as ThdD;step 1.7. searching for the value of the setup slack by using a binary method with ThdF as a fixed hold slack, where an interval in which the search is started is [TsuB, TsuA], performing simulation on the setup slack by using the transistor-level simulation tool to obtain the clock terminal-to-output terminal delay Tcq, and setting the target value of the clock terminal-to-output terminal delay Tcq to Hcq×Tcqmin, where Hcq is a second target coefficient of the setup slack, Fcq≤Hcq≤1.1, and the value of the setup slack found through binary search is denoted as TsuH;step 1.8. forming a constraint condition by using the following formulas for a simulation range of the pair of the hold slack Thd and the setup slack Tsu under the combination of SQ, Tdi, Tckj, and CLk:
  • 3. The flexible modeling method for a timing constraint of a register according to claim 1, where step 2 specifically includes the following steps: step 2.1. setting that Tstep is the sampling interval of both setup slack and hold slack, extracting the N combination pairs of setup slack and hold slack with the set Tstep as intervals for both setup slack and hold slack, and performing simulation by using a transistor-level simulation tool to respectively obtain the N clock terminal-to-output terminal delays of the register, where in this case, the obtained each group of simulation data includes a total of seven parameters including the input terminal transition time, the clock terminal transition time, the output load capacitance, the setup slack, the hold slack, the output terminal state, and the clock terminal-to-output terminal delay;step 2.2. giving that a threshold of the clock terminal-to-output terminal delay is Mth×Tcqmin, where Mth is a delay threshold coefficient, and 1≤Mth≤10; and eliminating these corresponding groups of simulation data when transistor-level simulation fails and the clock terminal-to-output terminal delay is greater than Mth×Tcqmin, storing data obtained after elimination as training and test samples of a neural network model, and repeating the foregoing process under each different combination of SQ, Tdi, Tckj, and CLk; andstep 2.3. subsequently combining all simulation data under all combinations of the output terminal state SQ, the input terminal transition time Tdi, the clock terminal transition time Tckj, and the output load capacitance CLk of the register together to obtain the Ns groups of model training sample data, where each group of training sample data includes the total of seven parameters including the input terminal transition time, the clock terminal transition time, the output load capacitance, the setup slack, the hold slack, the output terminal state, and the clock terminal-to-output terminal delay of the register.
  • 4. The flexible modeling method for a timing constraint of a register according to claim 1, where specific steps of the binary search in step 1.3 are as follows: an interval in which the search is started is [TsuC, TsuA], simulation is performed at a middle position (TsuC+TsuA)/2 of the search interval to obtain the clock terminal-to-output terminal delay, and if in this case, the clock terminal-to-output terminal delay is Bcq×Tcqmin, the search process ends; if in this case, the clock terminal-to-output terminal delay is greater than Bcq×Tcqmin, the search interval is updated to [(TsuC+TsuA)/2, TsuA]; if in this case, the clock terminal-to-output terminal delay is less than Bcq×Tcqmin, the search interval is updated to [TsuC, (TsuC+TsuA)/2]; then the foregoing process is repeated with the new search interval, the search interval is halved each time, and the search ends when a clock terminal-to-output terminal delay obtained through simulation by using the transistor-level simulation tool at a middle position in a search process is Bcq×Tcqmin; and when a middle position of the last binary search interval, that is, the clock terminal-to-output terminal delay, is Bcq×Tcqmin, the corresponding setup slack is denoted as TsuB.
  • 5. The flexible modeling method for a timing constraint of a register according to claim 1, where specific steps of the binary search in step 1.5 are as follows: an interval in which the search is started is [ThdG, ThdA], simulation is performed at a middle position (ThdG+ThdA)/2 of the search interval to obtain the clock terminal-to-output terminal delay, and if in this case, the clock terminal-to-output terminal delay is Fcq×Tcqmin, the search process ends; if in this case, the clock terminal-to-output terminal delay is greater than Fcq×Tcqmin, the search interval is updated to [(ThdG+ThdA)/2, ThdA]; if in this case, the clock terminal-to-output terminal delay is less than Fcq×Tcqmin, the search interval is updated to [ThdG, (ThdG+ThdA)/2]; then the foregoing process is repeated with the new search interval, the search interval is halved each time, and the search ends when a clock terminal-to-output terminal delay obtained through simulation by using the transistor-level simulation tool at a middle position in a search process is Fcq×Tcqmin; and when a middle position of the last binary search interval, that is, the clock terminal-to-output terminal delay, is Fcq×Tcqmin, the corresponding hold slack is denoted as ThdF.
  • 6. The flexible modeling method for a timing constraint of a register according to claim 1, where specific steps of the binary search in step 1.6 are as follows: an interval in which the search is started is [ThdF, ThdA], simulation is performed at a middle position (ThdF+ThdA)/2 of the search interval to obtain the clock terminal-to-output terminal delay, and if in this case, the clock terminal-to-output terminal delay is Dcq×Tcqmin, the search process ends; if in this case, the clock terminal-to-output terminal delay is greater than Dcq×Tcqmin, the search interval is updated to [(ThdF+ThdA)/2, ThdA]; if in this case, the clock terminal-to-output terminal delay is less than Dcq×Tcqmin, the search interval is updated to [ThdF, (ThdF+ThdA)/2]; then the foregoing process is repeated with the new search interval, and each time the search interval is halved, and the search ends when a clock terminal-to-output terminal delay obtained through simulation by using the transistor-level simulation tool at a middle position in a search process is Dcq×Tcqmin; and when a middle position of the last binary search interval, that is, the clock terminal-to-output terminal delay, is Dcq×Tcqmin, the corresponding hold slack is denoted as ThdD.
  • 7. The flexible modeling method for a timing constraint of a register according to claim 1, where specific steps of the binary search in step 1.7 are as follows: an interval in which the search is started is [TsuB, TsuA], simulation is performed at a middle position (TsuB+TsuA)/2 of the search interval to obtain the clock terminal-to-output terminal delay, and if in this case, the clock terminal-to-output terminal delay is Hcq×Tcqmin, the search process ends; if in this case, the clock terminal-to-output terminal delay is greater than Hcq×Tcqmin, the search interval is updated to [(TsuB+TsuA)/2, TsuA]; if in this case, the clock terminal-to-output terminal delay is less than Hcq×Tcqmin, the search interval is updated to [TsuB, (TsuB+TsuA)/2]; then the foregoing process is repeated with the new search interval, and each time the search interval is halved, and the search ends when a clock terminal-to-output terminal delay obtained through simulation by using the transistor-level simulation tool at a middle position in a search process is Hcq×Tcqmin; and when a middle position of the last binary search interval, that is, the clock terminal-to-output terminal delay, is Hcq×Tcqmin, the corresponding setup slack is denoted as TsuH.
Priority Claims (1)
Number Date Country Kind
202110835923.9 Jul 2021 CN national
PCT Information
Filing Document Filing Date Country Kind
PCT/CN2022/079941 3/9/2022 WO