Clock tree synthesis method and device, equipment, storage medium and product

By traversing from the root node of the initial clock tree and balancing nodes, the clock signal delay and power consumption analysis deviation caused by the abstract description of clock network in integrated circuit design is solved, and accurate power consumption analysis and design in the early stages are achieved. sex.

CN118966093AActive Publication Date: 2024-11-15INNODA (CHENGDU) ELECTRONIC TECH CO LTD

Patent Information

Application Number
CN202411427863.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-14
Publication Date
2024-11-15
Estimated Expiration
2044-10-14

AI Technical Summary

Technical Problem

In the early stages of integrated circuit design, the clock network was described in the form of abstract point-to-point connections, and the actual delay and power consumption of the clock signal were not accurately predicted, resulting in a serious deviation from the power consumption analysis results in the early stages.

Method used

Through a clock tree synthesis method, traversal starts from the root node of the initial clock tree, node balance is performed for non-leaf nodes, including fan-out balance and delay balance, until the root node, a clock tree that meets the consistent signal delay of each leaf node is built. , to achieve accurate power consumption analysis in the early stages.

Benefits of technology

This method can accurately build a clock tree in the early stages of integrated circuit design, predict the actual delay and power consumption of the clock signal, avoid deviations from the power consumption analysis results in the early stage and improve the accuracy and reliability of the design.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118966093A_ABST
    Figure CN118966093A_ABST
Patent Text Reader

Abstract

The invention discloses a clock tree synthesis method and device, equipment, a storage medium and a product. The method comprises the following steps: traversing from a root node of an initial clock tree; the traversed non-leaf nodes comprise non-traversed child nodes, and continuing to traverse the child nodes; if not, non-leaf nodes are balanced according to the number of the sub-nodes and node delay information, and non-leaf nodes are not traversed; when the non-leaf nodes are not traversed, the parent nodes of the balanced non-leaf nodes are traced back, non-traversed child nodes of the parent nodes continue to be traversed, and node balancing is carried out on the non-leaf nodes in the traversing process until the parent nodes do not contain the non-traversed child nodes; and taking the father node as a new non-leaf node based on the node delay information corresponding to the child nodes contained in the father node, and returning to the step of performing node balancing on the non-leaf node according to the number of the child nodes and the node delay information until the father node is a root node. According to the invention, the clock tree can be comprehensively constructed through the clock tree.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of integrated circuit design technology, and in particular to a clock tree synthesis method, device, equipment, storage medium and product. Background Art

[0002] Electronic design automation (EDA) refers to the use of computer-aided design software to complete the functional design, synthesis, verification, physical design (including layout, routing, layout, design rule checking, etc.) of very large scale integrated circuit (VLSI) chips.

[0003] The clock tree is a circuit structure in digital circuits. The delay from the clock root node to each clock leaf node (the clock pins of the flip-flop and memory) can be kept consistent. By constructing the clock tree, relatively accurate clock tree power consumption information can be obtained.

[0004] Clock Tree Synthesis (CTS) is an important step in integrated circuit design. It balances the clock signal delays on each branch by inserting buffers (including buffers and inverters) on each branch of the clock signal, and makes the same clock signal arrive at each leaf node at the same time as much as possible. In related technologies, clock tree synthesis is usually performed in the PR stage (placement and routing stage) of chip design.

[0005] However, in the early stages of integrated circuit design, the clock network was not visualized, but abstracted as a point-to-point connection relationship. For example, in the RTL (Register-Transfer level) stage, it is represented as a simple point-to-point connection in HDL (Hardware Description Language). This abstract description cannot reflect the physical layout of the circuit, resulting in the inability to accurately predict the actual delay and power consumption of the clock signal. Therefore, it is necessary to propose a technical solution that can construct the power consumption of the clock tree, so that the power consumption analysis results of the clock tree can be obtained more accurately in the early design stage, avoiding serious deviations between the power consumption analysis results in the early stage and the actual power consumption in the later stage. Summary of the invention

[0006] The embodiments of the present application provide a clock tree synthesis method, apparatus, device, storage medium and product, which can improve the technical problem in the related art that a clock tree cannot be constructed and the actual delay and power consumption of a clock signal cannot be determined in the early design stage.

[0007] In a first aspect, an embodiment of the present application provides a clock tree synthesis method, the method comprising: Get the initial clock tree and traverse it from the root node of the initial clock tree; In the case where the traversed non-leaf node contains untraversed child nodes, the child nodes of the non-leaf node continue to be traversed; wherein the untraversed child nodes include non-leaf nodes for which node balancing has not been completed; In the case that the traversed non-leaf node does not contain untraversed child nodes, node balancing is performed on the traversed non-leaf node according to the number of child nodes contained in the traversed non-leaf node and the node delay information corresponding to each child node; Backtrack to the parent node of the balanced non-leaf node. If the parent node contains untraversed child nodes, continue to traverse the untraversed child nodes of the parent node, and balance each non-leaf node that does not contain untraversed child nodes during the traversal process until the parent node does not contain untraversed child nodes. Based on the child nodes contained in the parent node and the node delay information corresponding to each child node, the parent node is used as a new non-leaf node, and the return step is: according to the number of child nodes contained in the traversed non-leaf node and the node delay information corresponding to each child node, the traversed non-leaf nodes are balanced until the parent node is the root node.

[0008] Optionally, traversal is performed starting from the root node of the initial clock tree, including: Starting from the root node of the initial clock tree, a depth-first traversal algorithm is used to traverse the tree, and each non-leaf node traversed and its corresponding child node data are sequentially stored in the node information table.

[0009] Optionally, when the traversed non-leaf node contains untraversed child nodes, the child nodes of the non-leaf node are further traversed, including: In the case where the traversed child node is a leaf node, the child node data corresponding to the traversed non-leaf node is updated in the node information table; wherein the child node data includes node identification information and node delay information of each child node; When the traversed child node is an untraversed non-leaf node, the untraversed non-leaf node is stored in the node information table, and the child nodes of the untraversed non-leaf node are continued to be traversed until the traversed non-leaf node does not contain the untraversed non-leaf node.

[0010] Optionally, when the traversed non-leaf node does not contain untraversed child nodes, node balancing is performed on the traversed non-leaf node according to the number of child nodes contained in the traversed non-leaf node and node delay information corresponding to each child node, including: When the traversed non-leaf node does not contain untraversed child nodes, the child node data corresponding to the traversed non-leaf node is obtained from the node information table; Determine the number of child nodes of the traversed non-leaf node and the node delay information corresponding to each child node according to the child node data; When the number of child nodes is greater than the corresponding fan-out threshold, fan-out balancing is performed on the traversed non-leaf nodes; When the node delay information corresponding to at least two child nodes is inconsistent, delay balancing is performed on the traversed non-leaf nodes.

[0011] Optionally, when the number of child nodes is greater than the corresponding fan-out threshold, fan-out balancing is performed on the traversed non-leaf nodes, including: When the number of child nodes is greater than the corresponding fan-out threshold, the traversed child nodes are grouped to obtain multiple child node groups; wherein the number of child nodes in each child node group is not greater than the fan-out threshold; Insert a fan-out buffer between each child node group and the traversed non-leaf node; When the number of inserted fan-out buffers is greater than the corresponding fan-out threshold, the inserted fan-out buffers are further grouped as first-level fan-out buffers to obtain multiple fan-out buffer groups, and second-level fan-out buffers are further inserted between each fan-out buffer group and the traversed non-leaf nodes until the number of inserted fan-out buffers at the same level is no greater than the corresponding fan-out threshold.

[0012] Optionally, the fan-out threshold includes a first fan-out threshold, a second fan-out threshold and a third fan-out threshold, wherein the first fan-out threshold is a fan-out threshold corresponding to a case where multiple child nodes include at least one leaf node, the second fan-out threshold is a fan-out threshold corresponding to a case where multiple child nodes do not include a leaf node, and the third fan-out threshold is a fan-out threshold corresponding to a case where the traversed non-leaf node is a root node; wherein, The first fan-out threshold is greater than or equal to the second fan-out threshold, and the second fan-out threshold is greater than or equal to the third fan-out threshold.

[0013] Optionally, when the number of child nodes is greater than a corresponding fan-out threshold, the traversed child nodes are grouped to obtain multiple child node groups, including; When the number of child nodes is greater than the corresponding fan-out threshold, the traversed child nodes are divided into multiple groups until the remaining child nodes meet the balance condition; wherein the number of child nodes contained in each group is the corresponding fan-out threshold, and the balance condition is that the number of remaining child nodes is greater than the fan-out threshold and less than or equal to twice the fan-out threshold; Divide the remaining child nodes evenly into two groups.

[0014] Optionally, after inserting a fan-out buffer between each child node group and the traversed non-leaf node, the method further includes: The inserted fan-out buffer is used as a new child node of the traversed non-leaf node, and the node identification information and node delay information of each child node of the traversed non-leaf node are updated.

[0015] Optionally, when the node delay information corresponding to at least two child nodes is inconsistent, delay balancing is performed on the traversed non-leaf nodes, including: Based on the node delay information corresponding to the multiple child nodes of the traversed non-leaf node, the minimum delay value and the second minimum delay value are obtained; wherein the minimum delay value is the value of the last position in the ordered array after the multiple node delay information is sorted in descending order, and the second minimum delay value is the value of the second last position in the ordered array; When the minimum delay value and the second minimum delay value are inconsistent, a delay buffer is inserted between the child node corresponding to the minimum delay value and the traversed non-leaf node; The node delay information of the corresponding child node is updated based on the inserted delay buffer, and the step of returning to: based on the node delay information corresponding to the multiple child nodes of the traversed non-leaf node, the minimum delay value and the second minimum delay value are obtained until the minimum delay value and the second minimum delay value are consistent; Based on the minimum delay value, the node delay information of the traversed non-leaf node is updated in the node information table; wherein the node delay information of the traversed non-leaf node is the child node data corresponding to the parent node of the traversed non-leaf node.

[0016] Optionally, inserting a delay buffer between the child node corresponding to the minimum delay value and the traversed non-leaf node includes: Calculate the delay difference between the minimum delay value and the second minimum delay value; determining a first number of delay buffers to insert based on the delay difference; A first number of delay buffers are inserted between the child node corresponding to the minimum delay value and the traversed non-leaf node.

[0017] Optionally, a fan-out buffer is inserted between each child node group and the traversed non-leaf node, further comprising: Get the device type of the inserted fanout buffer; When the device type of the fan-out buffer is not an inverter, insert the fan-out buffer between the child node group and the traversed non-leaf node; In the case where the device type of the fan-out buffer is an inverter, a fan-out buffer is inserted between the child node group and the traversed non-leaf node, and a polarity transformation is performed on the polarity variable corresponding to the fan-out buffer in the node information table; wherein the polarity variable corresponding to the fan-out buffer is the child node data corresponding to the parent node of the fan-out buffer; When the node delay information corresponding to at least two child nodes is inconsistent, before performing delay balancing on the traversed non-leaf nodes, the method further includes: When the number of polarity changes of at least one child node of the traversed non-leaf node is an odd number, a polarity buffer is inserted between the child node with the odd number of polarity changes and the traversed non-leaf node.

[0018] Optionally, after inserting the polarity buffer between the child node with an odd number of polarity changes and the traversed non-leaf node, the method further includes: The node delay information of each child node of the traversed non-leaf node is updated based on the inserted polarity buffer.

[0019] Optionally, until the parent node is the root node, it also includes: Based on the synthesized clock tree, a comprehensive quality evaluation index of the clock tree is determined; wherein the comprehensive quality evaluation index includes a delay index and a power consumption index.

[0020] In a second aspect, an embodiment of the present application provides a clock tree synthesis device, including: The initial module is used to obtain the initial clock tree and traverse from the root node of the initial clock tree; A traversal module, used for continuing to traverse the child nodes of the non-leaf node when the traversed non-leaf node contains untraversed child nodes; wherein the untraversed child nodes include non-leaf nodes for which node balancing has not been completed; A node balancing module is used to balance the traversed non-leaf nodes according to the number of child nodes contained in the traversed non-leaf nodes and the node delay information corresponding to each child node when the traversed non-leaf nodes do not contain untraversed child nodes; A backtracking module is used to backtrack to the parent node of the balanced non-leaf node, and when the parent node contains untraversed child nodes, continue to traverse the untraversed child nodes of the parent node, and perform node balancing on each non-leaf node that does not contain untraversed child nodes during the traversal process until the parent node does not contain untraversed child nodes; The recursive module is used to take the parent node as a new non-leaf node based on the child nodes contained in the parent node and the node delay information corresponding to each child node, and return to execute the steps of the traversal module until the parent node is the root node.

[0021] In a third aspect, an embodiment of the present application provides an electronic device, including: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the steps of the clock tree synthesis method of the first aspect are implemented.

[0022] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the steps of the clock tree synthesis method of the first aspect are implemented.

[0023] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a computer program. When the instructions in the computer program product are executed by a processor, the steps of the clock tree synthesis method of the first aspect are implemented.

[0024] The clock tree synthesis method, device, equipment, storage medium and product of the embodiment of the present application can traverse to each node of the clock tree by traversing from the root node based on the initial clock tree. For each non-leaf node traversed, node balancing can be performed on it. After each child node completes node balancing, node balancing can continue to be performed on the common parent node until the parent node is traced back to the root node. After node balancing is completed on the root node, the clock tree synthesis process is completed to obtain the clock tree. In the early stages of integrated circuit design, the clock network is usually described in the form of a point-to-point connection. Through the clock tree synthesis method, a clock tree that satisfies the signal delay of each leaf node to remain consistent can be constructed, so as to facilitate power consumption analysis in the early stage based on the clock tree. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0026] Figure 1 It is a flowchart of a clock tree synthesis method provided by an embodiment of the present application; Figure 2 It is a schematic diagram of clock tree synthesis of an initial clock tree provided by an embodiment of the present application; Figure 3 is a flowchart of a clock tree synthesis method provided by another embodiment of the present application; Figure 4 is a flowchart of a clock tree synthesis method provided by another embodiment of the present application; Figure 5 This is one of the partial flow diagrams of the clock tree synthesis method provided in yet another embodiment of the present application; Figure 6 This is a schematic diagram of the grouping of sub-nodes provided in an embodiment of the present application; Figure 7 This is a second partial flow chart of a clock tree synthesis method provided in yet another embodiment of the present application; Figure 8 It is a schematic diagram of fan-out balancing of a part of the paths of the clock tree provided by an embodiment of the present application; Fig. 9 It is a schematic diagram of delay balancing of a partial path of a clock tree provided by an embodiment of the present application; Fig.10 is a structural diagram of a clock tree synthesis device provided in an embodiment of the present application; Fig.11 It is a schematic diagram of the structure of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0027] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.

[0028] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0029] Electronic design automation (EDA) refers to the use of computer-aided design software to complete the functional design, synthesis, verification, physical design (including layout, routing, layout, design rule checking, etc.) of very large scale integrated circuit (VLSI) chips.

[0030] The clock tree is a circuit structure in digital circuits. The delay from the clock root node to each clock leaf node (the clock pins of the flip-flop and memory) can be kept consistent. By constructing the clock tree, relatively accurate clock tree power consumption information can be obtained.

[0031] Clock Tree Synthesis (CTS) is an important step in integrated circuit design. It balances the clock signal delays on each branch by inserting buffers (including buffers and inverters) on each branch of the clock signal, and makes the same clock signal arrive at each leaf node at the same time as much as possible. In related technologies, clock tree synthesis is usually performed in the PR stage (placement and routing stage) of chip design.

[0032] However, in the early stages of integrated circuit design, the clock network was not visualized, but abstracted as a point-to-point connection relationship. For example, in the RTL (Register-Transfer level) stage, it is represented as a simple point-to-point connection in HDL (Hardware Description Language). This abstract description cannot reflect the physical layout of the circuit, resulting in the inability to accurately predict the actual delay and power consumption of the clock signal. Therefore, it is necessary to propose a technical solution that can construct the power consumption of the clock tree, so that the power consumption analysis results of the clock tree can be obtained more accurately in the early design stage, avoiding serious deviations between the power consumption analysis results in the early stage and the actual power consumption in the later stage.

[0033] In order to solve at least one of the above technical problems, the embodiments of the present application provide a clock tree synthesis method, apparatus, device, storage medium and product. The clock tree synthesis method provided by the embodiments of the present application is first introduced below.

[0034] Figure 1 A schematic diagram of a clock tree synthesis method provided by an embodiment of the present application is shown. The method may include the following steps: S110, obtaining an initial clock tree, and traversing the tree starting from the root node of the initial clock tree; S120, when the traversed non-leaf node includes an untraversed child node, continue to traverse the child nodes of the non-leaf node; wherein the untraversed child node includes a non-leaf node for which node balancing has not been completed; S130, when the traversed non-leaf node does not contain untraversed child nodes, perform node balancing on the traversed non-leaf node according to the number of child nodes contained in the traversed non-leaf node and node delay information corresponding to each child node; S140, backtracking to the parent node of the balanced non-leaf node, and if the parent node contains untraversed child nodes, continuing to traverse the untraversed child nodes of the parent node, and performing node balancing on each non-leaf node that does not contain an untraversed child node during the traversal process, until the parent node contains no untraversed child nodes; S150, based on the child nodes contained in the parent node and the node delay information corresponding to each child node, take the parent node as a new non-leaf node, and return to step: according to the number of child nodes contained in the traversed non-leaf node and the node delay information corresponding to each child node, perform node balance on the traversed non-leaf nodes until the parent node is the root node.

[0035] The clock tree is a circuit structure in digital circuits that aims to provide equal delay from the clock root to the clock leaves (clock pins of triggers and memories). By constructing the clock tree, relatively accurate clock tree power consumption information can be obtained. The clock tree can be constructed by obtaining an initial clock tree in which the signal delays from the clock root to the leaves of each clock tree are different. On the basis of the initial clock tree, by inserting appropriate buffers, inverters and other devices in each branch, the signal delays of the clock leaves under each branch can be adjusted so that the signal delays from the clock root to the leaves of each clock tree are kept as consistent as possible. Figure 2 As shown in the figure, node ① in the initial clock tree is the root node, nodes ②, ③, ④, ⑤, ⑦, ⑧, ⑨, ⑩ are leaf nodes, and node ⑥ is a non-leaf node. After clock tree synthesis, the added nodes to For logic gate devices such as buffers, the signal delay of the clock signal from the root node to each leaf node can be kept consistent or as close as possible, and the number of child nodes connected to any node meets the preset constraints and will not be too large. In the related art, clock tree synthesis is usually performed in the PR (placement and routing) stage of the integrated circuit. In the early stages of circuit design, such as the RTL (register-transfer level) stage, the integrated circuit is described in the form of an abstract model. In this form of existence, it is impossible to accurately obtain the actual delay and power consumption information of the clock signal in each branch of the clock tree. Therefore, in the RTL stage, if it is necessary to determine the delay and power consumption of the clock signal on each branch, it is necessary to construct the corresponding clock tree through clock tree synthesis.

[0036] In this embodiment, based on the initial clock tree, each node of the clock tree can be traversed by traversing from the root node. For each non-leaf node traversed, node balancing can be performed on it. After each child node completes node balancing, node balancing can continue to be performed on the common parent node until the parent node is traced back to the root node. After node balancing is completed on the root node, the clock tree synthesis process is completed to obtain the clock tree. In the early stages of integrated circuit design, the clock network is usually described in the form of point-to-point connection. Through the clock tree synthesis method, a clock tree that satisfies the signal delay of each leaf node to remain consistent can be constructed, so as to realize power consumption analysis in the early stage based on the clock tree.

[0037] The specific implementation methods of the above steps are introduced below.

[0038] In S110, an initial clock tree without clock tree synthesis is obtained, wherein the initial clock tree includes a clock root and all clock leaves, and multiple branches of the clock root can connect the clock root to each clock leaf. It is understandable that when clock tree synthesis is not performed, although the initial clock tree includes the clock root and all clock leaves, the signal delays corresponding to the clock signal propagating from the clock root to each clock leaf are not completely consistent.

[0039] Please continue to refer to Figure 2 In the initial clock tree, node ① is the clock root, that is, the root node of the clock tree. The clock root is usually the clock input pin in the top-level design or the pin that creates the clock through a specific command. Node ⑥ is an existing instance, that is, a non-leaf node of the clock tree, which is usually a node other than the clock root and leaf nodes, including CGIC, buffer BUF, inverter INV, or other complex gate logic that defines the clock can pass through. Nodes ②, ③, ④, ⑤, ⑦, ⑧, ⑨, and ⑩ are leaf sequential nodes, that is, leaf nodes of the clock tree, which are usually clock input pins of devices such as flip-flops, latches, and memories.

[0040] After the initial clock tree is obtained, the clock root in the initial clock tree can be used as a root node, and each clock leaf can be used as a plurality of leaf nodes, and node traversal can be performed starting from the root node of the initial clock tree.

[0041] In some embodiments, the traversal starting from the root node of the initial clock tree may include: S210 , starting from the root node of the initial clock tree, traversing using a depth-first traversal algorithm, and storing each traversed non-leaf node and its corresponding child node data in a node information table in sequence.

[0042] In this embodiment, the node traversal from the root node of the initial clock tree may be performed by sequentially traversing each branch of the initial clock tree using a depth-first traversal algorithm DFS. Through the depth-first traversal algorithm, all nodes under all branches of the initial clock tree can be traversed.

[0043] The nodes other than the root node and the leaf node of the initial clock tree are non-leaf nodes. During the traversal process, each time a non-leaf node is traversed, the traversed non-leaf node and its corresponding child node data can be stored in the node information table. The storage order of the data information of each non-leaf node in the node information table can be the traversal order of each non-leaf node. That is, the non-leaf node traversed first can be stored in the node information table first, and the non-leaf node traversed later can be stored in the node information table later.

[0044] As an optional implementation, the node information table may be a stack structure, starting from the root node, each time a non-leaf node is traversed, the non-leaf node may be pushed into the stack structure. That is, the top node of the stack structure is the most recently traversed non-leaf node.

[0045] It is understandable that, for each non-leaf node, the leaf node corresponding to the non-leaf node can also be stored in the child node set of each non-leaf node in the stack structure. That is, after each non-leaf node is pushed into the stack structure, if there is a leaf node in the child node of the non-leaf node, the leaf node is stored in the child node set of the non-leaf node as the child node data of the non-leaf node. If the child node of the non-leaf node is still a non-leaf node, under depth-first traversal, new non-leaf nodes can continue to be pushed into the stack structure, and the child nodes of the new non-leaf node are traversed and identified. After all branch paths of the non-leaf node corresponding to the top node of the stack structure are traversed, all child nodes corresponding to the non-leaf node are stored in the child node set of the non-leaf node.

[0046] In S120, during the traversal process starting from the root node, if the traversed node is a non-leaf node, it can be determined whether the non-leaf node contains untraversed child nodes. Among them, the untraversed bytes include non-leaf nodes that have not completed node balance. That is, when a certain node is traversed to be a non-leaf node, the child nodes of the non-leaf node can be obtained, and it can be determined whether there are non-leaf nodes that have not completed node balance in the child nodes. If there are non-leaf nodes that have not completed node balance in the child nodes, it is determined that the non-leaf node contains untraversed child nodes.

[0047] Correspondingly, if the child nodes contained in the traversed non-leaf node are all leaf nodes, or there is a non-leaf node among the child nodes contained in the traversed non-leaf node, but the non-leaf node has completed node balancing, it is determined that the traversed non-leaf node does not contain untraversed child nodes.

[0048] When it is determined that the traversed non-leaf node contains untraversed child nodes, the depth-first traversal may continue to be performed on the child nodes of the non-leaf node.

[0049] Please refer to Figure 3 In some embodiments, the above S120 may include: S310, when the traversed child node is a leaf node, updating the child node data corresponding to the traversed non-leaf node in the node information table; wherein the child node data includes node identification information and node delay information of each child node; S320, when the traversed child node is an untraversed non-leaf node, the untraversed non-leaf node is stored in the node information table, and the child nodes of the untraversed non-leaf node are continued to be traversed until the traversed non-leaf node does not contain the untraversed non-leaf node.

[0050] In this embodiment, when the child node of the traversed non-leaf node is a leaf node, it means that the branch path reaches the terminal node. At this time, the node identification information and node delay information of the child node can be updated to the child node data of the corresponding non-leaf node in the node information table. When the child node of the traversed non-leaf node is still a non-leaf node, the non-leaf node can be stored in the node information table, and the traversal of the child nodes can be continued from the non-leaf node until the child nodes of the traversed non-leaf node do not contain untraversed non-leaf nodes, that is, the child nodes of the non-leaf node are leaf nodes or non-leaf nodes that have completed balancing.

[0051] In S310, after determining that the non-leaf node is a non-leaf node that contains untraversed child nodes, in the process of continuing to traverse the child nodes of the non-leaf node, if the child node that continues to be traversed is a leaf node, the child node data corresponding to the non-leaf node is updated in the node information table. The child node data includes node identification information and node delay information of each child node.

[0052] As an optional implementation, when the node information table is a stack structure, if the three child nodes contained in a non-leaf node are all leaf nodes, the node identification information of the three child nodes and the node delay information of the three child nodes can be updated to the child node data of the non-leaf node in the stack structure.

[0053] In S320, if the child node traversed further is an untraversed non-leaf node, the untraversed non-leaf node is stored in the node information table, and the child nodes of the untraversed non-leaf node are continued to be traversed until the traversed non-leaf node does not contain any untraversed non-leaf nodes.

[0054] In the above implementation, taking the node information table as a stack structure as an example, when the child node that continues to be traversed is a non-leaf node that has not been traversed, the non-leaf node that has not been traversed can be pushed into the stack structure as a new top node. The child nodes of the new top node in the stack structure are continued to be traversed, and when the child node that is traversed is a non-leaf node that has not been traversed, the non-leaf node that has not been traversed is continued to be pushed into the stack structure as a new top node, until the traversed non-leaf nodes do not contain non-leaf nodes that have not been traversed, that is, the child nodes contained in the traversed non-leaf nodes are all leaf nodes, all traversed non-leaf nodes, or a mixture of leaf nodes and traversed non-leaf nodes.

[0055] As an optional implementation, if a non-leaf node contains three child nodes, which are two leaf nodes and one non-leaf node, and the traversal order is leaf node, non-leaf node, and leaf node, then during the traversal process, the node identification information and node delay information of the first leaf node can be stored in the stack structure as the child node data of the non-leaf node of the top node. When traversing to the second child node, that is, the non-leaf node that has not been traversed, the non-leaf node can be pushed into the stack structure as the new top node, and the traversal of its child nodes can be continued based on the new top node. After all branch paths of the new top node are traversed, the traversal of the third leaf node can be continued, and the node identification information and node delay information of the third leaf node can be stored in the stack structure.

[0056] It is understandable that in the process of traversing all branch paths of the second child node, node balancing operations are performed on the non-leaf nodes on each branch. After traversing all branch paths of the second child node, it is equivalent to completing node balancing for all non-leaf nodes below the second child node. At this time, the leaf nodes on each branch path under the second child node have the same signal delay after node balancing, and the signal delay can be used as the node delay information corresponding to the second child node. That is, when the three child nodes contained in a non-leaf node are 2 leaf nodes and 1 non-leaf node, for the two leaf nodes, the node delay information of the two leaf nodes can be directly obtained and stored in the child node data of the non-leaf node; and for one non-leaf node, it is necessary to complete the traversal of all branch paths of the non-leaf node and realize the node balancing of the non-leaf nodes on all branch paths below the non-leaf node, so that all leaf nodes connected to the non-leaf node have the same node delay information, and the node delay information is stored as the node delay information of one non-leaf node in the child node data of the non-leaf node.

[0057] In S130, during the traversal process, if the traversed non-leaf node does not contain untraversed child nodes, the traversed non-leaf node can be node balanced according to the number of child nodes contained in the non-leaf node and the node delay information corresponding to each child node.

[0058] The non-leaf nodes traversed above do not contain untraversed child nodes. It can be that the child nodes contained in the non-leaf node are all leaf nodes, or the child nodes contained in the non-leaf node are all non-leaf nodes that have completed node balancing, or the child nodes contained in the non-leaf node are a mixture of leaf nodes and non-leaf nodes that have completed node balancing.

[0059] The above-mentioned method of performing node balancing on the traversed non-leaf nodes can be to determine whether the non-leaf node meets the requirements in terms of fan-out quantity, signal delay and polarity maintenance, and perform one or more of fan-out balancing, delay balancing and polarity balancing on the non-leaf nodes that do not meet the requirements. It is understandable that if a non-leaf node meets the requirements in terms of fan-out quantity, signal delay and polarity maintenance, node balancing may not be performed on the non-leaf node, and the non-leaf node may be directly determined as a non-leaf node that has completed node balancing.

[0060] Please refer to Figure 4 In some embodiments, the above S130 may include: S410, when the traversed non-leaf node does not contain untraversed child nodes, obtaining child node data corresponding to the traversed non-leaf node from the node information table; S420, determining the number of child nodes of the traversed non-leaf node and node delay information corresponding to each child node according to the child node data; S430, when the number of child nodes is greater than the corresponding fan-out threshold, fan-out balancing is performed on the traversed non-leaf nodes; S440: When the node delay information corresponding to at least two child nodes is inconsistent, delay balancing is performed on the traversed non-leaf nodes.

[0061] In this embodiment, when a non-leaf node does not contain untraversed child nodes, fan-out balancing and delay balancing can be performed on the non-leaf node based on the number of child nodes and node delay information. Fan-out balancing can ensure that the number of child nodes connected to a single node does not exceed the fan-out threshold, thereby avoiding excessive load on the clock signal and affecting signal integrity. Delay balancing can ensure that the signal delay of the clock signal from the node to different leaf nodes on each branch path remains consistent or as close as possible, so as to facilitate signal capture and processing within the circuit.

[0062] In S410, when it is determined that the traversed non-leaf node does not contain untraversed child nodes, it means that the child node of the non-leaf node is a leaf node or a non-leaf node that has completed node balancing. When the child node is a leaf node, the child node data of the leaf node can be obtained from the node information table; and when the child node is a non-leaf node that has completed node balancing, the child node data of the non-leaf node that has completed node balancing can also be obtained from the node information table. That is, when the non-leaf node does not contain untraversed child nodes, regardless of whether the child node contains a leaf node or a non-leaf node that has completed node balancing or a mixture of the two, the corresponding child node data can be obtained from the node information table.

[0063] In S420, the number of child nodes of the traversed non-leaf node can be determined based on the obtained child node data. The number of child node data obtained is the number of child nodes contained in the non-leaf node. From each child node data, the node delay information corresponding to the child node can be determined, and the node delay information is the signal delay corresponding to the clock signal from the traversed non-leaf node to the leaf node of the branch path under the branch path corresponding to the child node.

[0064] In S430, after obtaining the number of child nodes of the non-leaf node, the number of child nodes can be compared with the preset fan-out threshold. When the number of child nodes is less than or equal to the fan-out threshold, it can be determined that the number of child nodes connected to the non-leaf node meets the fan-out requirement. When the number of child nodes is greater than the fan-out threshold, it can be determined that the number of child nodes connected to the non-leaf node is too large, which will result in too many triggers or registers driven by a single clock driver, making it impossible to achieve stable driving of the triggers or registers. Therefore, when the number of bytes of a non-leaf node is greater than the corresponding fan-out threshold, it is necessary to perform fan-out balancing on the non-leaf node.

[0065] It should be noted that the fan-out thresholds corresponding to non-leaf nodes at different positions in the clock tree may be different.

[0066] Please refer to Figure 5 In some embodiments, the above S430 may include: S510, when the number of child nodes is greater than the corresponding fan-out threshold, grouping the traversed child nodes to obtain multiple child node groups; wherein the number of child nodes in each child node group is not greater than the fan-out threshold; S520, inserting a fan-out buffer between each child node group and the traversed non-leaf node; S530, when the number of inserted fan-out buffers is greater than the corresponding fan-out threshold, the inserted fan-out buffers are further grouped as first-level fan-out buffers to obtain multiple fan-out buffer groups, and the second-level fan-out buffers are continuously inserted between each fan-out buffer group and the traversed non-leaf nodes until the number of inserted fan-out buffers of the same level is no greater than the corresponding fan-out threshold.

[0067] In this embodiment, when a non-leaf node has a large number of child nodes, multiple child node groups can be obtained by grouping, and a fan-out buffer can be inserted between each child node group and the non-leaf node to avoid excessive number of child nodes directly connected to the non-leaf node. When the number of inserted fan-out buffers is still too high, they can be grouped as fan-out buffers of the first level, and the fan-out buffers of the second level can be inserted. Through the insertion of fan-out buffers of each level, the number of fan-out buffers of the last level is not greater than the fan-out threshold, and the non-leaf node can be directly connected to the fan-out buffers of the last level.

[0068] In S510, when it is determined that the number of child nodes of a non-leaf node is greater than the corresponding fan-out threshold, the child nodes of the non-leaf node may be grouped to obtain multiple child node groups. The number of child nodes included in each child node group is not greater than the fan-out threshold.

[0069] In some embodiments, the above S510 may include: S610, when the number of child nodes is greater than the corresponding fan-out threshold, divide the traversed child nodes into multiple groups until the remaining child nodes meet the balance condition; wherein the number of child nodes contained in each group is the corresponding fan-out threshold, and the balance condition is that the number of remaining child nodes is greater than the fan-out threshold and less than or equal to twice the fan-out threshold; S620: Evenly divide the remaining child nodes into two groups.

[0070] In this embodiment, when grouping multiple subnodes, the subnodes may be divided into multiple groups in sequence according to the fan-out threshold until the number of remaining subnodes meets the balance condition. The remaining subnodes may be directly divided into two new groups.

[0071] In S610, when it is determined that the number of child nodes of a non-leaf node is greater than the corresponding fan-out threshold, the way to group the child nodes of the non-leaf node may be to divide the traversed child nodes of the non-leaf node into multiple groups, and the number of child nodes contained in each group is consistent with the corresponding fan-out threshold, so that the number of remaining undivided child nodes meets the balance condition. The balance condition may be that the number of remaining child nodes is greater than the fan-out threshold and less than or equal to twice the fan-out threshold.

[0072] Please refer to Figure 6 , as an alternative implementation, taking the number of children of a non-leaf node as 18 and the corresponding fan-out threshold as 4 as an example, divide the 18 children into multiple groups, with each group containing 4 children, such that the number of remaining ungrouped children is greater than 4 and less than or equal to 8. According to the above method, 12 out of the 18 children can be divided into 3 groups. The first group contains children ① - ④, the second group contains children ⑤ - ⑧, and the third group contains children ⑨ - . The number of remaining ungrouped children is 6, which is between the fan-out threshold of 4 and twice the fan-out threshold of 8, satisfying the balance condition.

[0073] It can be understood that the method of dividing multiple children into multiple groups can be as follows: obtain the current number F of children and the fan-out threshold E. When F ≤ E, the grouping process can end; when E < F ≤ 2E, it can be determined that the remaining children satisfy the balance condition; when F > 2E, a group with a quantity of E is drawn out, and at this time the current number F of children is updated to F - E. After each time a group of children corresponding to the fan-out threshold is divided into a group, determine whether the number of remaining children satisfies the balance condition. For example, taking 18 children as an example, since 18 > 2 * 4, a group with a quantity of 4 can be drawn out. After the first time 4 children are divided into a group, the number of remaining children is updated to 18 - 4 = 14. At this time, 14 > 2 * 4, which does not satisfy the balance condition of being greater than the fan-out threshold and less than or equal to twice the fan-out threshold; after the second time 4 children are divided into a group, the number of remaining children is 10. At this time, 10 > 2 * 4, and the balance condition is still not satisfied. After dividing 4 children into a group again, the number of remaining children is 6. At this time, 4 < 6 ≤ 2 * 4, satisfying the balance condition.

[0074] In S620, when the remaining children satisfy the balance condition, the remaining children can be evenly divided into two groups.

[0075] Taking the non-leaf node containing 18 children shown above Figure 6 as an example, when the corresponding fan-out threshold is 4, 12 children can be divided into three groups, with each group containing 4 children. The remaining 6 ungrouped children - are then evenly divided into the other two groups, and the other two groups each contain 3 children. That is, node - is divided into one group, and node - is divided into another group.

[0076] It can be understood that if the number n of remaining child nodes is an even number, the remaining child nodes can be divided into two groups, each group contains n / 2 child nodes; if the number n of remaining child nodes is an odd number, the two groups contain (n+1) / 2 child nodes and (n-1) / 2 child nodes respectively.

[0077] It should be noted that if the number of child nodes of a non-leaf node initially meets the equilibrium condition, that is, the number of child nodes contained in the non-leaf node is between the fan-out threshold and twice the fan-out threshold, the child nodes can be directly evenly divided into two groups.

[0078] In S520, after the plurality of child nodes of the non-leaf node are divided into a plurality of child node groups, a fan-out buffer may be inserted between each child node group and the traversed non-leaf node. After the fan-out buffer is inserted, the fan-out buffer may be connected to the network of each child node of the corresponding child node group, and the fan-out buffer may be connected to the network of the non-leaf node.

[0079] In some embodiments, after the above S520, the following steps may also be included: S710 , using the inserted fan-out buffer as a new child node of the traversed non-leaf node, and updating the node identification information and node delay information of each child node of the traversed non-leaf node.

[0080] In this embodiment, for each child node group, after a fan-out buffer is inserted between each child node of the child node group and the non-leaf node, the non-leaf node is connected to each child node of the child node group through the fan-out buffer. At this time, the fan-out buffer becomes a new child node of the non-leaf node.

[0081] After inserting the fan-out buffer, the signal delay of the clock signal from the non-leaf node to the original child node will increase. For example, if the original signal delay of a child node is 1 unit, after adding the fan-out buffer, the signal delay of the clock signal from the non-leaf node to the child node after passing through the fan-out buffer may become 2 units. Therefore, after adding the fan-out buffer as a new child node, the node identification information and node delay information of each child node of the non-leaf node need to be updated in the node information table.

[0082] After inserting the fan-out buffer, the child nodes connected to the non-leaf node are changed from the original 4 child nodes to the fan-out buffer. At this time, from the child node set of the non-leaf node, the node identification information of the original 4 child nodes is replaced with the node identification information of the inserted fan-out buffer, and the node delay information of the original 4 child nodes is updated to the node delay information after the fan-out buffer is inserted.

[0083] As an optional implementation, without considering the delay on the transmission line, the signal delay of the clock signal on each branch path reaching the terminal node (i.e., leaf node) is associated with the number of logic gates on the path. That is, if the root node is directly connected to the leaf node, the corresponding signal delay is 1 unit. If the root node is connected to the leaf node through a branch path, and the total number of logic gate devices such as intermediate nodes and buffers on the branch path is n, the corresponding signal delay is n+1 units. Therefore, if the node delay information of the original 4 child nodes is x, then after inserting the fan-out buffer, the node delay information stored in the non-leaf node child node set is updated from x to x+1.

[0084] In S530, after dividing into a plurality of child node groups, for each child node group, a fan-out buffer is inserted between the child node group and the non-leaf node. When the number of inserted fan-out buffers is still greater than the corresponding fan-out threshold, the inserted fan-out buffers can be used as the fan-out buffers of the first level, and the grouping is continued to obtain a plurality of fan-out buffer groups.

[0085] After obtaining multiple fan-out buffer groups, the second-level fan-out buffers can continue to be inserted between each fan-out buffer group and the traversed non-leaf node. After inserting multiple second-level fan-out buffers, if the number of second-level fan-out buffers is still greater than the corresponding fan-out threshold, the second-level fan-out buffers continue to be grouped, and the third-level fan-out buffers continue to be inserted until the number of inserted fan-out buffers of the same level is not greater than the corresponding fan-out threshold.

[0086] As an optional implementation, taking a non-leaf node including 64 child nodes as an example, after the 64 child nodes are divided into 16 child node groups and 16 first-level fan-out buffers are inserted accordingly, the number of the first-level fan-out buffers is greater than the corresponding fan-out threshold of 4. At this time, it is necessary to divide the 16 first-level fan-out buffers into 4 fan-out buffer groups, and insert 4 second-level fan-out buffers to be connected between the corresponding fan-out buffer groups and the non-leaf nodes. At this time, since the number of the second-level fan-out buffers is consistent with the corresponding fan-out threshold of 4, it does not exceed the fan-out threshold. The 4 second-level fan-out buffers can be directly connected to the non-leaf node. In another case, if the number of the second-level fan-out buffers is still greater than the corresponding fan-out threshold, it is necessary to continue to insert the third-level fan-out buffers.

[0087] like Figure 6As shown in the figure, the green node is the fan-out buffer leaf. The pink node is the fan-out buffer middle, and the purple node is the root node. After the 18 child nodes are grouped and 5 fan-out buffer leafs are inserted, since the number of fan-out buffer leafs is still greater than the fan-out threshold, the 5 fan-out buffer leafs can be grouped as the first-level fan-out buffers. The two groups contain 3 fan-out buffer leafs and 2 fan-out buffer leafs respectively. By inserting 2 second-level fan-out buffer middles, which are connected between the two groups of fan-out buffers and the root node root, the number of child nodes connected to each node does not exceed the fan-out threshold.

[0088] It should be noted that after each level of fan-out buffer is inserted, the child node set of non-leaf nodes in the node information table needs to be updated, the node identification information of multiple previous levels of fan-out buffers needs to be updated to the node identification information of the next level of fan-out buffers, and the delay information of each node needs to be updated accordingly.

[0089] In some embodiments, the fan-out threshold includes a first fan-out threshold, a second fan-out threshold and a third fan-out threshold, the first fan-out threshold is the fan-out threshold corresponding to the case where multiple child nodes include at least one leaf node, the second fan-out threshold is the fan-out threshold corresponding to the case where multiple child nodes do not include a leaf node, and the third fan-out threshold is the fan-out threshold corresponding to the case where the traversed non-leaf node is a root node; the first fan-out threshold is greater than or equal to the second fan-out threshold, and the second fan-out threshold is greater than or equal to the third fan-out threshold.

[0090] Non-leaf nodes at different positions of the clock tree may correspond to different fan-out thresholds.

[0091] When there is at least one leaf node among the multiple child nodes included in the non-leaf node, the fan-out threshold corresponding to the non-leaf node may be the first fan-out threshold.

[0092] When all the child nodes included in the non-leaf node are non-leaf nodes, that is, when no leaf node is included, the fan-out threshold corresponding to the non-leaf node may be the second fan-out threshold.

[0093] When the non-leaf node is a root node, the fan-out threshold corresponding to the non-leaf node may be the third fan-out threshold.

[0094] The magnitude relationship among the first fan-out threshold Fanout1, the second fan-out threshold Fanout2, and the third fan-out threshold Fanout3 may be: Fanout1≥Fanout2≥Fanout3; By setting different fan-out thresholds for non-leaf nodes at different positions of the clock tree, corresponding load constraints can be set according to different positions of the clock tree to avoid excessive load caused by too many connected child nodes. In addition, by designing different constraint configurations, clock trees with different topological structures can be generated through clock tree synthesis. Among them, clock tree synthesis can include cross-layer clock tree synthesis and non-cross-layer clock tree synthesis.

[0095] As an optional implementation, according to the three types of non-leaf nodes mentioned above, not only can the corresponding fan-out thresholds be set respectively, but also different buffers can be selected as fan-out buffers. For example, when the non-leaf node corresponds to the first fan-out threshold, the inserted fan-out buffer may be the first type of fan-out buffer Buffer1; when the non-leaf node corresponds to the second fan-out threshold, the inserted fan-out buffer may be the second type of fan-out buffer Buffer2; when the non-leaf node corresponds to the third fan-out threshold, the inserted fan-out buffer may be the third type of fan-out buffer Buffer3. The larger the fan-out threshold, the corresponding fan-out buffer may be a buffer with smaller driving capability. For example, when Fanout1≥Fanout2≥Fanout3, the driving capability of the corresponding fan-out buffer may be: Buffer1≤Buffer2≤Buffer3.

[0096] In S440, after determining the number of child nodes of the traversed non-leaf node and the node delay information corresponding to each child node, the node delay information of each child node may be compared.

[0097] If the node delay information of each child node is consistent, then there is no need to perform delay balancing on the non-leaf node. If the node delay information of each child node is inconsistent, then there is a need to perform delay balancing on the non-leaf node.

[0098] Please refer to Figure 7 In some embodiments, the above S440 may include: S810, based on the node delay information corresponding to the multiple child nodes of the traversed non-leaf node, obtain the minimum delay value and the second minimum delay value; wherein the minimum delay value is the value of the last position in the ordered array after the multiple node delay information is sorted in descending order, and the second minimum delay value is the value of the second last position in the ordered array; S820, when the minimum delay value and the second minimum delay value are inconsistent, insert a delay buffer between the child node corresponding to the minimum delay value and the traversed non-leaf node; S830, updating the node delay information of the corresponding child node based on the inserted delay buffer, and returning to S810 until the minimum delay value and the second minimum delay value are consistent; S840, based on the minimum delay value, updating the node delay information of the traversed non-leaf node in the node information table; wherein the node delay information of the traversed non-leaf node is the child node data corresponding to the parent node of the traversed non-leaf node.

[0099] In this embodiment, the minimum delay value and the second smallest delay value can be determined based on the node delay information of each child node of the non-leaf node. If the two are inconsistent, a delay buffer can be inserted between the child node corresponding to the minimum delay value and the non-leaf node, so that the signal delay of all child nodes corresponding to the minimum delay value is increased to be consistent with the second smallest delay value. At this time, the second smallest delay value is the new minimum delay value. By continuously repeating the above process, the signal delays of all child nodes are eventually kept consistent. After completing the delay balance, the child node data corresponding to the non-leaf node can be updated under the parent node of the non-leaf node based on the delay values ​​of each child node of the non-leaf node.

[0100] In S810, after determining the node delay information of each child node of the traversed non-leaf node, the minimum delay value and the second minimum delay value may be obtained according to the node delay information of each child node.

[0101] The minimum delay value is the minimum value among the multiple node delay information, and can be selected from the ordered array after sorting the multiple node delay information in descending order, and the value at the penultimate position is selected as the minimum delay value. Similarly, the second smallest delay value can be the second smallest value among the multiple node delay information, and the acquisition method can be to select the value at the penultimate position from the ordered array as the second smallest delay value.

[0102] It should be noted that, in multiple node delay information, the child nodes corresponding to the minimum delay value and the second smallest delay value may be one or more. For example, when the multiple node delay information are 1, 1, 2, 2, 2, 3 respectively, the minimum delay value is 1 and the second smallest delay value is 2. The number of child nodes corresponding to the minimum delay value is 2, and the number of child nodes corresponding to the second smallest delay value is 3.

[0103] In S820, after the minimum delay value and the second minimum delay value are obtained, if the two are inconsistent, a delay buffer may be inserted between the child node corresponding to the minimum delay value and the traversed non-leaf node.

[0104] In some embodiments, the above S820 may include: S910, calculating the delay difference between the minimum delay value and the second minimum delay value; S920, determining a first number of delay buffers to be inserted based on the delay difference; S930: Insert a first number of delay buffers between the child node corresponding to the minimum delay value and the traversed non-leaf node.

[0105] In this embodiment, the number of delay buffers to be inserted can be determined based on the delay difference between the minimum delay value and the second smallest delay value. By inserting a corresponding number of delay buffers, the signal delay of the sub-nodes corresponding to the minimum delay value is increased to be consistent with the second smallest delay value.

[0106] In S910, when the minimum delay value is inconsistent with the second smallest delay value, the delay difference between the second smallest delay value and the minimum delay value may be calculated. For example, when the minimum delay value is 1 and the second smallest delay value is 2, the corresponding delay difference is 1.

[0107] In S920, a first number of delay buffers to be inserted may be determined according to the calculated delay difference.

[0108] As an optional implementation, when the line delay is ignored, the signal delay of a single logic gate can be 1 unit, that is, a single delay buffer can achieve a signal delay of 1 unit. Therefore, after calculating the delay difference, the first number of delay buffers to be inserted can be determined. For example, if the delay difference between the minimum delay value and the second minimum delay value is 6, the first number of delay buffers to be inserted is 6.

[0109] In S930, after the first number is determined, a first number of delay buffers may be inserted between the child node corresponding to the minimum delay value and the traversed non-leaf node.

[0110] As an optional implementation, if there are multiple child nodes whose node delay information is the minimum delay value, it is necessary to insert a first number of delay buffers between each child node and the non-leaf node.

[0111] As another optional implementation, if there are multiple child nodes whose node delay information is the minimum delay value, the lowest common parent node of the multiple child nodes can be found, and the first number of delay buffers can be inserted into the lowest common parent node, thereby reducing the number of inserted buffers and reducing device costs.

[0112] In S830, after inserting a delay buffer between the child node corresponding to the minimum delay value and the non-leaf node, the node delay information of the corresponding child node can be updated based on the inserted delay buffer. For example, if the minimum delay value is 1 and the number of inserted delay buffers is 1, then after inserting the delay buffer, the node delay information of the child node corresponding to the minimum delay value can be +1 operated. For example, when the node delay information of 6 child nodes is 1, 1, 2, 2, 2, 3 respectively, 1 delay buffer can be inserted into each of the 2 child nodes with the minimum delay value of 1. After inserting the delay buffer, the node delay information of the 2 child nodes can be updated, and the node delay information of the updated 6 child nodes is 2, 2, 2, 2, 2, 3 respectively.

[0113] After completing the update of the node delay information, the minimum delay value and the second smallest delay value can be reacquired based on the updated node delay information of each child node, and the delay buffer can be inserted according to whether there is a difference between the minimum delay value and the second smallest delay value. For example, when the node delay information of the 6 child nodes after the update is 2, 2, 2, 2, 2, 3 respectively, the new minimum delay value is 2 and the second smallest delay value is 3. At this time, the minimum delay value is still inconsistent with the second smallest delay value, and the difference between the second smallest delay value and the minimum delay value can continue to be calculated, and the delay buffer can continue to be inserted between the 5 child nodes corresponding to the minimum delay value of 2 and the non-leaf node. After inserting the delay buffer and updating the node delay information of each child node, the node delay information of the 6 child nodes is 3, 3, 3, 3, 3, 3 respectively. At this time, the minimum delay value is consistent with the second smallest delay value, and the non-leaf node completes delay balance.

[0114] In S840, after the delay balance of the non-leaf node is completed, the node delay information of the terminal node (i.e., the leaf node) of any branch path under the non-leaf node remains consistent, that is, all are the updated minimum delay values. Based on the minimum delay value, the node delay information of the non-leaf node can be updated in the node information table. Among them, the node delay information of the non-leaf node refers to the child node data corresponding to the parent node of the non-leaf node. For example, taking a non-leaf node in a stack structure as an example, if the non-leaf node includes 6 child nodes, and the minimum delay value after the delay balance is completed is 3, then in the child node set of the non-leaf node, the node delay information of the 6 child nodes is 3. At this time, for the non-leaf node, the parent node of the non-leaf node can be determined from the stack structure, and the node delay information of the non-leaf node is stored in the child node set of the parent node. Since the node delay information stored in the child node set of the non-leaf node is 3, correspondingly, the node delay information stored in the child node set of the parent node of the non-leaf node can be updated to 4.

[0115] Please refer to Figure 8 and Fig. 9 . Figure 8 FIG. 4 is a schematic diagram showing the fan-out balancing of each non-leaf node of the initial clock tree, wherein pink nodes ① to ⑥ are inserted fan-out buffers. Fig. 9 FIG. 4 is a schematic diagram showing the delay balancing of each non-leaf node of the initial clock tree, where blue nodes ① to ④ are inserted delay buffers.

[0116] As an optional implementation, Figure 8 As shown in the figure, when the fan-out buffer⑤ is not inserted, the node It includes 5 sub-nodes, namely - When the fan-out threshold is 3, the 5 child nodes can be divided into two groups, each containing 3 child nodes. , , And contains 2 child nodes , After inserting the fan-out buffer⑤, the three child nodes , , Through the fan-out buffer⑤ and the node In the aforementioned implementation, the child node and can be achieved by inserting another fan-out buffer with the node However, in this embodiment, the child nodes and Can directly communicate with node Connection, at this time the node The three connected child nodes are , and fan-out buffer⑤, which does not exceed the limit of the fan-out threshold and meets the fan-out demand.

[0117] It should be noted that in the above implementation, due to the child node , , Through the fan-out buffer⑤ and the node connection, its signal delay will be greater than that of the child node and Therefore, in the subsequent delay balancing process, you can , With Node Insert a delay buffer between the child nodes and Through the delay buffer and node Connect so that the nodes The signal delay of the clock signal reaching each leaf node remains consistent.

[0118] In the above implementation, the child node and With Node In the process of clock tree synthesis, usually a large number of fan-out buffers are set. At this time, the above implementation method can be considered to reduce the number of fan-out buffers and use delay buffers instead, so as to avoid too many single devices and avoid material impact.

[0119] As an optional implementation, please refer to Fig. 9, taking the branch path where node ⑨ is located as an example. Before the blue delay buffer ① is inserted, the clock signal of node ⑨ reaches node , , The signal delay is 2 and reaches the node , The signal delay of node ⑨ is 3. Therefore, in order to achieve delay balance of each leaf node, a blue delay buffer ① can be inserted so that the clock signal of node ⑨ reaches node , , The signal delay increases to 3. It is understandable that although Fig. 9 This is not shown, but the node , , It is also necessary to set up a corresponding delay buffer to increase the signal delay to 3.

[0120] In some embodiments, the above S520 may include: S1010, obtaining a device type of the inserted fan-out buffer; S1020, when the device type of the fan-out buffer is not an inverter, insert a fan-out buffer between the child node group and the traversed non-leaf node; S1030, when the device type of the fan-out buffer is an inverter, insert the fan-out buffer between the child node group and the traversed non-leaf node, and perform a polarity transformation on the polarity variable corresponding to the fan-out buffer in the node information table; wherein the polarity variable corresponding to the fan-out buffer is the child node data corresponding to the parent node of the fan-out buffer; Before the above S440, the following may also be included: S1040: When the number of polarity changes of at least one child node of the traversed non-leaf node is an odd number, insert a polarity buffer between the child node with the odd number of polarity changes and the traversed non-leaf node.

[0121] In this embodiment, the type of the fan-out buffer is determined when setting the constraint conditions of the clock tree synthesis, so the fan-out buffer may be an inverter. When inserting the inverter, the polarity variable needs to be transformed, and the number of transformations of the polarity variable determines whether the polarity buffer needs to be inserted, so that the polarity does not change before and after the buffer is inserted.

[0122] In S1010 , before inserting the fan-out buffer, the device type of the fan-out buffer to be inserted may be obtained.

[0123] It should be noted that different buffer units can be stored in the cell library file or design file of the project. When inserting a fan-out buffer, delay buffer or polarity buffer, the buffer unit information needs to be read. Users can set the buffer unit in the cell library file or design file according to actual needs, and select the corresponding buffer for insertion according to design needs.

[0124] In S1020, when the device type of the fan-out buffer to be inserted is not an inverter, the fan-out buffer can be directly inserted between the subnode group and the traversed non-leaf node, that is, each subnode in the subnode group is connected to the non-leaf node through the fan-out buffer.

[0125] In S1030, when the device type of the fan-out buffer to be inserted is an inverter, the fan-out buffer may be inserted between the child node group and the traversed non-leaf node, and a polarity conversion is performed on the polarity variable corresponding to the fan-out buffer in the node information table.

[0126] The polarity variable corresponding to the fan-out buffer may be the child node data corresponding to the parent node of the fan-out buffer. Since the parent node of the fan-out buffer is the traversed non-leaf node, the polarity variable of the fan-out buffer is stored in the child node set of the non-leaf node.

[0127] In S1040, before delay balancing is performed on the non-leaf node, the child node data of the non-leaf node can be obtained. That is, from the child node set of the non-leaf node, the polarity variable of each child node is obtained, and the polarity variable is compared with the initial polarity variable to determine the number of polarity changes corresponding to the child node. For example, if the polarity variable is consistent with the initial polarity variable, the number of polarity changes corresponding to the child node can be 0 or an even number; if the polarity variable is consistent with the initial polarity variable, the number of polarity changes corresponding to the child node can be an odd number.

[0128] When there is a child node among multiple child nodes of a non-leaf node whose corresponding polarity change times is an odd number, a polarity buffer may be inserted between the child node whose polarity change times is an odd number and the traversed non-leaf node.

[0129] In some embodiments, after the above S1040, the following steps may also be included: S1050: Update node delay information of each child node of the traversed non-leaf node based on the inserted polarity buffer.

[0130] In this embodiment, after the polarity buffer is inserted, it acts as a logic gate device and will also affect the signal delay of the leaf node on the branch path where it is located. Therefore, after the polarity buffer is inserted, the node delay information of each child node of the non-leaf node can be updated. For example, when the non-leaf node includes multiple child nodes, if a polarity buffer is inserted between a child node and the non-leaf node, the node delay information of the child node can be +1 operated.

[0131] As an optional implementation, the fan-out balancing process can be set before the delay balancing process, and the polarity balancing process can be set before the delay balancing process, and the polarity balancing process is to ensure that the inverter inserted in the fan-out balancing process does not affect the signal polarity on the branch path. Therefore, the order of the above three node balancing can be fan-out balancing → polarity balancing → delay balancing.

[0132] In S140, after the traversed non-leaf node is node balanced through the above implementation, the non-leaf node is a balanced non-leaf node. At this time, the parent node of the balanced non-leaf node can be traced back. Obviously, the parent node is also a non-leaf node.

[0133] As an optional implementation, taking the node information table as a stack structure as an example, after the non-leaf nodes of the top node of the stack are balanced, the top node of the stack can be popped out. At this time, the new top node of the stack is the parent node of the balanced non-leaf node.

[0134] When the parent node contains untraversed child nodes, the untraversed child nodes of the parent node can be further traversed, and node balancing can be performed on non-leaf nodes that do not contain untraversed child nodes during the traversal process. For example, when both child nodes contained in the parent node are non-leaf nodes, and after node balancing is completed for one of the non-leaf nodes, if the other non-leaf node has not completed node balancing, the other non-leaf node is an untraversed child node, and the untraversed child node can be further traversed until a non-leaf node that does not contain untraversed child nodes is traversed, and node balancing can be performed on the non-leaf node that does not contain untraversed child nodes. On all branch paths of another non-leaf node, node balancing can be continuously performed on non-leaf nodes that have not completed node balancing.

[0135] After all child nodes of another non-leaf node have completed node balancing, another non-leaf node can be node balanced. At this time, both child nodes contained in the parent node are balanced non-leaf nodes, and the parent node does not contain untraversed child nodes.

[0136] In S150, when the parent node does not contain untraversed child nodes, the parent node can be used as a new non-leaf node. Based on the child nodes contained in the parent node and the node delay information corresponding to each child node, the process can return to S130 to perform node balancing on the new non-leaf node.

[0137] After completing the node balancing of the parent node, you can continue to backtrack to the parent node of the parent node and continue to balance the non-leaf nodes until the backtracked parent node is the root node. In the stack structure, when the top node of the stack is the root node, after balancing the root node, the root node can be popped out. At this time, the stack is empty, indicating that the balancing of all nodes has been completed.

[0138] It should be noted that when the parent node traced back is the root node, the root node does not contain untraversed child nodes, but the node delay information of each child node contained in the root node may still be different. Therefore, the root node needs to be treated as a non-leaf node for node balancing so that all leaf nodes under the root node have the same signal delay, thereby completing clock tree synthesis.

[0139] In some embodiments, after the above S150, the following steps may also be included: Based on the synthesized clock tree, a comprehensive quality evaluation index of the clock tree is determined; wherein the comprehensive quality evaluation index includes a delay index and a power consumption index.

[0140] In this embodiment, after clock tree synthesis is performed, a corresponding comprehensive quality evaluation index can be determined based on the synthesized clock tree, and the comprehensive quality evaluation index may include a delay index and a power consumption index. Based on the comprehensive quality evaluation index, a power consumption estimation result that is substantially consistent with the actual PR stage (placement and routing stage) can be calculated in the RTL stage of integrated circuit design.

[0141] Based on the same inventive concept, the present application also provides a clock tree synthesis device. Fig.10 Provide detailed explanation.

[0142] Fig.10 1 is a schematic diagram of the structure of a clock tree synthesis device 1000 provided in an embodiment of the present application.

[0143] like Fig.10 As shown, the clock tree synthesis device 1000 may include: An initial module 1001 is used to obtain an initial clock tree and traverse the initial clock tree starting from the root node; A traversal module 1002 is used to continue traversing the child nodes of the non-leaf node when the traversed non-leaf node contains untraversed child nodes; wherein the untraversed child nodes include non-leaf nodes for which node balancing has not been completed; The node balancing module 1003 is used to perform node balancing on the traversed non-leaf nodes according to the number of child nodes contained in the traversed non-leaf nodes and the node delay information corresponding to each child node when the traversed non-leaf nodes do not contain untraversed child nodes; The backtracking module 1004 is used to backtrack to the parent node of the balanced non-leaf node, and if the parent node contains untraversed child nodes, continue to traverse the untraversed child nodes of the parent node, and perform node balancing on each non-leaf node that does not contain untraversed child nodes during the traversal process until the parent node does not contain untraversed child nodes; The recursive module 1005 is used to take the parent node as a new non-leaf node based on the child nodes contained in the parent node and the node delay information corresponding to each child node, and return to execute the steps of the traversal module until the parent node is the root node.

[0144] The clock tree synthesis device 1000 is described in detail below, as shown below: In some embodiments, the initial module 1001 may include: The depth traversal unit is used to traverse from the root node of the initial clock tree using a depth-first traversal algorithm, and store each traversed non-leaf node and its corresponding child node data in the node information table in sequence.

[0145] In some embodiments, the traversal module 1002 may include: A leaf node traversal unit, used to update the child node data corresponding to the traversed non-leaf node in the node information table when the traversed child node is a leaf node; wherein the child node data includes node identification information and node delay information of each child node; The non-leaf node traversal unit is used to store the untraversed non-leaf nodes in the node information table when the traversed child nodes are untraversed non-leaf nodes, and continue to traverse the child nodes of the untraversed non-leaf nodes until the traversed non-leaf nodes do not contain untraversed non-leaf nodes.

[0146] In some embodiments, the node balancing module 1003 may include: An information acquisition unit, used for acquiring child node data corresponding to the traversed non-leaf node from the node information table when the traversed non-leaf node does not contain untraversed child nodes; A delay acquisition unit, used to determine the number of child nodes of the traversed non-leaf node and the node delay information corresponding to each child node according to the child node data; A fan-out balancing unit is used to perform fan-out balancing on the traversed non-leaf nodes when the number of child nodes is greater than the corresponding fan-out threshold; The delay balancing unit is used to perform delay balancing on the traversed non-leaf nodes when the node delay information corresponding to at least two child nodes is inconsistent.

[0147] In some embodiments, the fan-out balancing unit may include: A grouping subunit, used to group the traversed subnodes to obtain multiple subnode groups when the number of subnodes is greater than the corresponding fan-out threshold; wherein the number of subnodes in each subnode group is not greater than the fan-out threshold; A fan-out insertion subunit, used for inserting a fan-out buffer between each child node group and the traversed non-leaf node; A multi-layer insertion sub-unit is used to continue grouping the inserted fan-out buffers as the first-level fan-out buffers to obtain multiple fan-out buffer groups when the number of inserted fan-out buffers is greater than the corresponding fan-out threshold, and continue inserting the second-level fan-out buffers between each fan-out buffer group and the traversed non-leaf node until the number of inserted fan-out buffers at the same level is no greater than the corresponding fan-out threshold.

[0148] In some embodiments, the above-mentioned grouping subunit may include: A balancing grouping subunit, used to divide the traversed child nodes into multiple groups when the number of child nodes is greater than the corresponding fan-out threshold, until the remaining child nodes meet the balancing condition; wherein the number of child nodes contained in each group is the corresponding fan-out threshold, and the balancing condition is that the number of remaining child nodes is greater than the fan-out threshold and less than or equal to twice the fan-out threshold; The remaining grouping sub-unit is used to evenly divide the remaining child nodes into two groups.

[0149] In some embodiments, the fan-out balancing unit may further include: The updating subunit is used to update the node identification information and node delay information of each child node of the traversed non-leaf node by taking the inserted fan-out buffer as a new child node of the traversed non-leaf node.

[0150] In some embodiments, the delay balancing unit may include: A delay value acquisition subunit is used to acquire a minimum delay value and a second minimum delay value based on the node delay information corresponding to multiple child nodes of the traversed non-leaf node; wherein the minimum delay value is the value of the last position in the ordered array after the multiple node delay information is sorted in descending order, and the second minimum delay value is the value of the second last position in the ordered array; A delay insertion subunit, used for inserting a delay buffer between the child node corresponding to the minimum delay value and the traversed non-leaf node when the minimum delay value and the second minimum delay value are inconsistent; A first delay updating subunit, used to update the node delay information of the corresponding child node based on the inserted delay buffer, and return the delay value obtaining subunit until the minimum delay value and the second minimum delay value are consistent; The second delay update sub-unit is used to update the node delay information of the traversed non-leaf node in the node information table based on the minimum delay value; wherein the node delay information of the traversed non-leaf node is the child node data corresponding to the parent node of the traversed non-leaf node.

[0151] In some embodiments, the delay insertion subunit may include: A difference calculation subunit, used for calculating a delay difference between a minimum delay value and a second minimum delay value; a quantity calculation subunit, configured to determine a first quantity of inserted delay buffers based on the delay difference; The delay buffer subunit is used to insert a first number of delay buffers between the child node corresponding to the minimum delay value and the traversed non-leaf node.

[0152] In some embodiments, the fan-out plug-in subunit may include: A type acquisition subunit, used to acquire the device type of the inserted fan-out buffer; A non-inverting insertion subunit, used for inserting a fan-out buffer between the child node group and the traversed non-leaf node when the device type of the fan-out buffer is not an inverter; The inversion insertion subunit is used to insert the fan-out buffer between the child node group and the traversed non-leaf node when the device type of the fan-out buffer is an inverter, and to perform a polarity conversion on the polarity variable corresponding to the fan-out buffer in the node information table; wherein the polarity variable corresponding to the fan-out buffer is the child node data corresponding to the parent node of the fan-out buffer; The node balancing module 1003 may further include: The polarity insertion unit is used to insert a polarity buffer between the child node with an odd number of polarity changes and the traversed non-leaf node when the number of polarity changes of at least one child node of the traversed non-leaf node is an odd number.

[0153] The node balancing module 1003 may further include: The polarity updating unit is used to update the node delay information of each child node of the traversed non-leaf node based on the inserted polarity buffer.

[0154] Fig.11 The hardware structure diagram of the electronic device provided in the embodiment of the present application is shown. The electronic device can be at least one of a computer, a server and a document generation dedicated device. The electronic device includes a processor 1101 and a memory 1102 storing computer program instructions.

[0155] Specifically, the processor 1101 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0156] The memory 1102 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 1102 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. Where appropriate, the memory 1102 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 1102 may be inside or outside the electronic device. In a particular embodiment, the memory 1102 is a non-volatile solid-state memory.

[0157] The memory 1102 may include a read-only memory (ROM), a flash memory device, a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, an electrical, optical or other physical / tangible memory storage device. Thus, typically, the memory 1102 includes a tangible (non-transitory) computer-readable storage medium (e.g., a memory device) of one or more software that may be encoded with computer-executable instructions and that, when executed (e.g., by one or more processors), is operable to perform the operations described with reference to the methods according to the above aspects of the present disclosure.

[0158] The processor 1101 implements any one of the clock tree synthesis methods in the above embodiments by reading and executing computer program instructions stored in the memory 1102 .

[0159] In one example, the electronic device may further include a communication interface 1103 and a bus 1110. Fig.11 As shown, the processor 1101, the memory 1102, and the communication interface 1103 are connected via a bus 1110 and communicate with each other.

[0160] The communication interface 1103 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.

[0161] The bus 1110 includes hardware, software or both, coupling the components of the electronic device to each other. For example and not limitation, the bus may include an accelerated graphics port (AGP) or other graphics bus, an enhanced industry standard architecture (EISA) bus, a front-side bus (FSB), a hypertransport (HT) interconnect, an industry standard architecture (ISA) bus, an infinite bandwidth interconnect, a low pin count (LPC) bus, a memory bus, a microchannel architecture (MCA) bus, a peripheral component interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a serial advanced technology attachment (SATA) bus, a video electronics standard association local (VLB) bus or other suitable bus or a combination of two or more of these. Where appropriate, the bus 1110 may include one or more buses. Although the present application embodiment describes and illustrates a specific bus, the present application considers any suitable bus or interconnect.

[0162] The electronic device can be based on the clock tree synthesis method, thereby combining Figures 1 to 10 A clock tree synthesis method and apparatus are described.

[0163] In addition, in combination with the clock tree synthesis method in the above embodiment, the embodiment of the present application can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any clock tree synthesis method in the above embodiment is implemented.

[0164] In addition, an embodiment of the present application also provides a computer program product, including a computer program, which can implement the steps and corresponding contents of the aforementioned method embodiment when executed by a processor.

[0165] In addition, the term "and / or" in this article is only a description of the association relationship between the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0166] It should be understood that in the embodiment of the present application, "B corresponding to A" means that B is associated with A, and B can be determined according to A. However, it should also be understood that determining B according to A does not mean determining B only according to A, and B can also be determined according to A and / or other information.

[0167] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A clock tree synthesis method, characterized in that: include: Obtain an initial clock tree, and traverse from the root node of the initial clock tree; In the case where the traversed non-leaf node contains untraversed child nodes, continue to traverse the child nodes of the non-leaf node; wherein the untraversed child nodes include non-leaf nodes for which node balancing has not been completed; In the case that the traversed non-leaf node does not contain untraversed child nodes, node balancing is performed on the traversed non-leaf node according to the number of child nodes contained in the traversed non-leaf node and the node delay information corresponding to each child node; Tracing back to the parent node of the balanced non-leaf node, if the parent node contains untraversed child nodes, continue traversing the untraversed child nodes of the parent node, and perform node balancing on each non-leaf node that does not contain an untraversed child node during the traversal process until the parent node contains no untraversed child nodes; Based on the child nodes contained in the parent node and the node delay information corresponding to each child node, the parent node is used as a new non-leaf node, and the step of returning to: according to the number of child nodes contained in the traversed non-leaf nodes and the node delay information corresponding to each child node, the traversed non-leaf nodes are balanced until the parent node is the root node.

2. The clock tree synthesis method according to claim 1, characterized in that: The traversing from the root node of the initial clock tree includes: Starting from the root node of the initial clock tree, a depth-first traversal algorithm is used to traverse the tree, and each non-leaf node traversed and its corresponding child node data are sequentially stored in the node information table.

3. The clock tree synthesis method according to claim 2, characterized in that: When the traversed non-leaf node includes an untraversed child node, continuing to traverse the child nodes of the non-leaf node includes: In the case where the traversed child node is a leaf node, the child node data corresponding to the traversed non-leaf node is updated in the node information table; wherein the child node data includes node identification information and node delay information of each child node; When the traversed child node is an untraversed non-leaf node, the untraversed non-leaf node is stored in the node information table, and the child nodes of the untraversed non-leaf node are continued to be traversed until the traversed non-leaf node does not contain the untraversed non-leaf node.

4. The clock tree synthesis method according to claim 3, characterized in that: In the case that the traversed non-leaf node does not contain untraversed child nodes, node balancing is performed on the traversed non-leaf node according to the number of child nodes contained in the traversed non-leaf node and node delay information corresponding to each child node, including: When the traversed non-leaf node does not contain untraversed child nodes, obtaining child node data corresponding to the traversed non-leaf node from the node information table; Determine the number of child nodes of the traversed non-leaf node and node delay information corresponding to each child node according to the child node data; When the number of child nodes is greater than the corresponding fan-out threshold, fan-out balancing is performed on the traversed non-leaf nodes; When the node delay information corresponding to at least two child nodes is inconsistent, delay balancing is performed on the traversed non-leaf nodes.

5. The clock tree synthesis method according to claim 4, characterized in that: When the number of child nodes is greater than the corresponding fan-out threshold, fan-out balancing is performed on the traversed non-leaf nodes, including: In the case where the number of child nodes is greater than the corresponding fan-out threshold, the traversed child nodes are grouped to obtain multiple child node groups; wherein the number of child nodes in each child node group is not greater than the fan-out threshold; Insert a fan-out buffer between each child node group and the traversed non-leaf node; When the number of inserted fan-out buffers is greater than the corresponding fan-out threshold, the inserted fan-out buffers are further grouped as first-level fan-out buffers to obtain multiple fan-out buffer groups, and second-level fan-out buffers are further inserted between each fan-out buffer group and the traversed non-leaf nodes until the number of inserted fan-out buffers at the same level is no greater than the corresponding fan-out threshold.

6. The clock tree synthesis method according to claim 5, characterized in that: The fan-out threshold includes a first fan-out threshold, a second fan-out threshold and a third fan-out threshold, wherein the first fan-out threshold is a fan-out threshold corresponding to a case where multiple child nodes include at least one leaf node, the second fan-out threshold is a fan-out threshold corresponding to a case where multiple child nodes do not include a leaf node, and the third fan-out threshold is a fan-out threshold corresponding to a case where the traversed non-leaf node is a root node; wherein The first fan-out threshold is greater than or equal to the second fan-out threshold, and the second fan-out threshold is greater than or equal to the third fan-out threshold.

7. The clock tree synthesis method according to claim 5, characterized in that: In the case where the number of child nodes is greater than the corresponding fan-out threshold, the traversed child nodes are grouped to obtain multiple child node groups, including: In the case where the number of child nodes is greater than the corresponding fan-out threshold, the traversed child nodes are divided into multiple groups until the remaining child nodes meet the balance condition; wherein the number of child nodes contained in each group is the corresponding fan-out threshold, and the balance condition is that the number of remaining child nodes is greater than the fan-out threshold and less than or equal to twice the fan-out threshold; Divide the remaining child nodes evenly into two groups.

8. The clock tree synthesis method according to claim 5, characterized in that: After inserting the fan-out buffer between each child node group and the traversed non-leaf node, the method further includes: The inserted fan-out buffer is used as a new child node of the traversed non-leaf node, and the node identification information and node delay information of each child node of the traversed non-leaf node are updated.

9. The clock tree synthesis method according to claim 4, characterized in that: When the node delay information corresponding to at least two child nodes is inconsistent, delay balancing is performed on the traversed non-leaf nodes, including: Based on the node delay information corresponding to the multiple child nodes of the traversed non-leaf node, the minimum delay value and the second minimum delay value are obtained; wherein the minimum delay value is the value of the last position in the ordered array after the multiple node delay information is sorted in descending order, and the second minimum delay value is the value of the second last position in the ordered array; In the case where the minimum delay value and the second smallest delay value are inconsistent, inserting a delay buffer between the child node corresponding to the minimum delay value and the traversed non-leaf node; The node delay information of the corresponding child node is updated based on the inserted delay buffer, and the step of returning to: based on the node delay information corresponding to the multiple child nodes of the traversed non-leaf node, a minimum delay value and a second minimum delay value are obtained until the minimum delay value and the second minimum delay value are consistent; Based on the minimum delay value, the node delay information of the traversed non-leaf node is updated in the node information table; wherein the node delay information of the traversed non-leaf node is the child node data corresponding to the parent node of the traversed non-leaf node.

10. The clock tree synthesis method according to claim 9, characterized in that: The inserting a delay buffer between the child node corresponding to the minimum delay value and the traversed non-leaf node comprises: Calculate the delay difference between the minimum delay value and the second minimum delay value; determining a first number of delay buffers to insert based on the delay difference; A first number of delay buffers are inserted between the child node corresponding to the minimum delay value and the traversed non-leaf node.

11. The clock tree synthesis method according to claim 5, characterized in that: The inserting of a fan-out buffer between each child node group and the traversed non-leaf node also includes: Get the device type of the inserted fanout buffer; When the device type of the fan-out buffer is not an inverter, inserting a fan-out buffer between the child node group and the traversed non-leaf node; In the case where the device type of the fan-out buffer is an inverter, a fan-out buffer is inserted between the child node group and the traversed non-leaf node, and a polarity transformation is performed on the polarity variable corresponding to the fan-out buffer in the node information table; wherein the polarity variable corresponding to the fan-out buffer is the child node data corresponding to the parent node of the fan-out buffer; Before performing delay balancing on the traversed non-leaf nodes when the node delay information corresponding to at least two child nodes is inconsistent, the method further includes: When the number of polarity changes of at least one child node of the traversed non-leaf node is an odd number, a polarity buffer is inserted between the child node with the odd number of polarity changes and the traversed non-leaf node.

12. The clock tree synthesis method according to claim 11, characterized in that: After inserting the polarity buffer between the child node with an odd number of polarity changes and the traversed non-leaf node, the method further includes: The node delay information of each child node of the traversed non-leaf node is updated based on the inserted polarity buffer.

13. The clock tree synthesis method according to any one of claims 1 to 12, characterized in that: The method further includes: Determine a comprehensive quality evaluation index of the clock tree based on the synthesized clock tree; wherein the comprehensive quality evaluation index includes a delay index and a power consumption index.

14. A clock tree synthesis device, characterized in that: include: An initial module, used to obtain an initial clock tree and traverse from the root node of the initial clock tree; A traversal module, used for continuing to traverse the child nodes of the non-leaf node when the traversed non-leaf node contains untraversed child nodes; wherein the untraversed child nodes include non-leaf nodes for which node balancing has not been completed; A node balancing module is used to balance the traversed non-leaf nodes according to the number of child nodes contained in the traversed non-leaf nodes and the node delay information corresponding to each child node when the traversed non-leaf nodes do not contain untraversed child nodes; A backtracking module, used for backtracking to the parent node of the balanced non-leaf node, and when the parent node contains untraversed child nodes, continuing to traverse the untraversed child nodes of the parent node, and performing node balancing on each non-leaf node that does not contain untraversed child nodes during the traversal process, until the parent node contains no untraversed child nodes; A recursive module is used to take the parent node as a new non-leaf node based on the child nodes contained in the parent node and the node delay information corresponding to each child node, and return to execute the steps of the traversal module until the parent node is the root node.

15. An electronic device, characterized in that: include: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the steps of the clock tree synthesis method according to any one of claims 1 to 13 are implemented.

16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the steps of the clock tree synthesis method according to any one of claims 1 to 13 are implemented.

17. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor, the steps of the clock tree synthesis method according to any one of claims 1 to 13 are implemented.

Citation Information

Patent Citations

  • Clock tree synthesis method and device, electronic equipment and computer readable storage medium

    CN116167330A

  • Clock tree optimization by moving instances toward core route

    US10769345B1

  • Clock tree synthesizer for balancing reconvergent and crossover clock trees

    US6763513B1

Cited By

  • Data demand modeling system based on machine learning

    CN119557289A

  • Scene description implementation method and device, electronic equipment and storage medium

    CN120852424A

  • Timing sequence driven clock tree synthesis method based on key node pair and product

    CN121212041A

  • A key node pair based timing driven clock tree synthesis method and product

    CN121212041B

  • Clock tree synthesis method and system

    CN121279243A