Method, computer device and storage medium for optimizing digital logic circuit
Quickly evaluate timing margins through a dynamic tree structure, solving the problem of low timing optimization efficiency in digital logic circuit design, and achieving a significant reduction in circuit analysis and optimization time.
Patent Information
- Application Number
- CN202410784757.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-18
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-06-18
AI Technical Summary
In the existing digital logic circuit design, the timing optimization efficiency is low, which causes the EDA tool to repeatedly traverse a large number of nodes after the circuit is modified, resulting in long analysis and optimization time and affecting the design efficiency.
The arrival time influencing nodes in the Boolean logic network are represented by the dynamic tree in the dynamic forest to avoid repeated traversals, and the structure of the dynamic tree is used to quickly evaluate the timing margin and optimize the digital logic circuit.
It greatly shortens the analysis and optimization time of digital logic circuits with EDA tools, improves design efficiency, and avoids the problem of repeated traversal after node changes.
Smart Images

Figure CN118350325B
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of digital logic circuits, and in particular to a method, a computer device, and a storage medium for optimizing digital logic circuits. Background Art
[0002] As modern digital logic circuits become larger and more complex, users have higher and higher requirements for circuit timing, power consumption or area (Performance Power Area, PPA). Chip designers urgently need electronic design automation (EDA) tools for digital circuits to efficiently optimize the circuit at the global level. Therefore, how to efficiently analyze and optimize circuits has become an indispensable and important part of modern EDA tools. Summary of the invention
[0003] In view of this, the purpose of the present application is to propose a method, a computer device and a storage medium for optimizing a digital logic circuit, so as to solve or partially solve the above-mentioned problem.
[0004] Based on the above objectives, in a first aspect, the present application provides a method for optimizing a digital logic circuit, comprising:
[0005] Obtaining a Boolean logic network corresponding to the digital logic circuit;
[0006] Obtaining a dynamic forest corresponding to the Boolean logic network, wherein the dynamic forest includes a plurality of dynamic trees;
[0007] Determining a first node of the dynamic forest, the first node being a node with an increased arrival time;
[0008] Determining, according to the first node, a first dynamic tree with the first node as a root node in the dynamic forest;
[0009] Obtaining leaf nodes of the first dynamic tree;
[0010] Determining a second node in the Boolean logic network according to the transmission delay between the leaf node and the first node;
[0011] In response to the second node having a corresponding third node in the dynamic forest, a timing margin is obtained according to the third node, and the digital logic circuit is optimized based on the timing margin.
[0012] In a second aspect of the present application, a computer device is provided, including:
[0013] One or more processors, memory; and
[0014] one or more programs;
[0015] The one or more programs are stored in the memory and executed by the one or more processors, and the programs include instructions for executing the method as described in the first aspect.
[0016] According to a third aspect of the present application, a non-volatile computer-readable storage medium containing a computer program is provided. When the computer program is executed by one or more processors, the processors execute the method described in the first aspect.
[0017] As can be seen from the above, the present application provides a method, computer device and storage medium for optimizing digital logic circuits. The method determines the first node whose arrival time increases in the dynamic forest through a dynamic forest corresponding to the Boolean logic network, and determines the first dynamic tree with the first node as the root node in the dynamic forest according to the first node, and determines the second node in the Boolean logic network according to the leaf node of the first dynamic tree and the transmission delay of the output edge of the leaf node, in response to the second node having a corresponding third node in the dynamic forest, obtains the timing margin according to the third node, and optimizes the digital logic circuit based on the timing margin. The method characterizes the nodes whose arrival time is affected in the Boolean logic network through the dynamic tree in the dynamic forest, avoids the problem of repeatedly traversing the Boolean logic network after the nodes in the Boolean logic network are changed, and can greatly shorten the time for EDA tools to analyze and optimize digital logic circuits. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the present application or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0019] Figure 1 A schematic diagram of an exemplary Boolean logic network according to an embodiment of the present application is shown.
[0020] Figure 2A A schematic diagram of a Boolean logic network according to an embodiment of the present application is shown.
[0021] Figure 2B A schematic diagram of the structure of an exemplary dynamic tree 210 according to an embodiment of the present application is shown.
[0022] Figure 2C A schematic diagram of the structure of an exemplary dynamic tree 220 according to an embodiment of the present application is shown.
[0023] Figure 3AA schematic diagram of the structure of an exemplary dynamic tree 300 according to an embodiment of the present application is shown.
[0024] Figure 3B A schematic diagram of the structure of an exemplary dynamic tree 310 according to an embodiment of the present application is shown.
[0025] Figure 3C A schematic diagram of the structure of an exemplary dynamic tree 320 according to an embodiment of the present application is shown.
[0026] Figure 4A A schematic diagram of the structure of an exemplary Boolean logic network according to an embodiment of the present application is shown.
[0027] Figure 4B A schematic diagram of the structure of an exemplary dynamic tree 410 according to an embodiment of the present application is shown.
[0028] Figure 4C A schematic diagram of the structure of an exemplary dynamic forest according to an embodiment of the present application is shown.
[0029] Figure 4D A schematic structural diagram of another exemplary dynamic forest according to an embodiment of the present application is shown.
[0030] Figure 4E A schematic diagram of the structure of another exemplary dynamic forest according to an embodiment of the present application is shown.
[0031] Figure 4F A schematic diagram of the structure of an exemplary dynamic tree 428 according to an embodiment of the present application is shown.
[0032] Figure 5 A flow chart of an exemplary method for optimizing a digital logic circuit according to an embodiment of the present application is shown.
[0033] Figure 6 A schematic diagram of the structure of an exemplary computer device according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0034] In order to make the objectives, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.
[0035] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should be the usual meanings understood by people with ordinary skills in the field to which the present application belongs. The "first", "second" and similar words used in the embodiments of the present application do not represent any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing in front of the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0036] It is understandable that before using the technical solutions of each embodiment of the present application, the type, scope of use, usage scenarios, etc. of the personal information involved will be informed to the user in an appropriate manner, and the user's authorization will be obtained.
[0037] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly remind the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can independently choose whether to provide personal information to the electronic device, application, server, storage medium or other software or hardware that performs the operation of the technical solution of the present application according to the prompt message.
[0038] As an optional but non-limiting implementation, in response to receiving the user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0039] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation method of this application. Other methods that meet relevant laws and regulations may also be applied to the implementation method of this application.
[0040] To facilitate understanding, some concepts involved in the embodiments of the present application are described below.
[0041] 1. Boolean Network: A directed acyclic graph (DAG). The graph consists of a set of nodes. With directed edge sets Composition. Among them:
[0042] 1) A directed edge indicates the direction of signal transmission. For a directed edge, its starting node is defined as the tail node, and its pointing node (or end node) is defined as the head node.
[0043] 2) Input edge: for any node , all head nodes are The edges are called nodes The input edge of .
[0044] 3) Output edge: for any node , all tail nodes are The edges are called nodes In the Boolean logic network of the embodiment of the present application, all output edges correspond to the same logic signal, which is also called a node. The output signal.
[0045] 4) Direct preceding node and direct succeeding node: for any node ,like for , then there is a node with is the tail node, is the edge of the head node; if for The immediate predecessor node of for The immediate successor node.
[0046] 5) Input signal set: for any node , its input signal set represents the set of signals carried by its input edges.
[0047] 6) Each node of a Boolean logic network corresponds to a certain logic function, which describes the relationship between the output signal and the input signal set.
[0048] 7) Input interface node ( ):one A subset of , where the nodes in this set have no incoming edges.
[0049] 8) Output interface node ( ):one A subset of , where the nodes in this set have no outgoing edges.
[0050] 9) Topological sorting: directed acyclic Figure 1 There must be a topological sort. A topological sort is a sort of node set. The process of integer association. For a node Allocating a collection of integers A number in makes the numbers assigned to any two nodes different and the order of the assigned numbers is the same as the topological order between the nodes. Specifically, As integer The corresponding node, for any integer and , if there is a line on the Boolean logic network from arrive , then .
[0051] Since integer A node can be uniquely identified , without affecting understanding, To represent .
[0052] 2. Path: A sequence of nodes. In this node sequence, there is a directed edge between any two adjacent nodes, making the two nodes the tail node and the head node of the edge respectively.
[0053] 1) The first node in the sequence is the starting node of the path.
[0054] 2) The last node in the sequence is the terminal node of the path.
[0055] 3. Transitive fan-in cone: A special subnetwork (TFI) is a node A set of and satisfies: Any node in the set To Node There is a path; any path from PI to All paths pass through a node in a TFI set.
[0056] 4. Transitive fan-out cone: A special subnetwork (transitive fan-out cone, TFO) is a node A set of and satisfies: Any node in the set To Node There is a path; any The path to PO passes through at least one node in the TFI set.
[0057] 5. Delay: Each edge of the directed acyclic graph can be bound to a positive number, representing the signal transmission delay in the physical world. is an edge in a directed acyclic graph, then Represents the delay of this edge.
[0058] 6. Arrival time: The maximum time (max) for a signal to be transmitted from any PI to a node. Definition Represents a signal transmitted from any PI to a node The maximum time is formally defined as follows:
[0059] ,
[0060] Among them, when the node When it belongs to PI ,when When not a PI Use its predecessor node and delay Calculated recursively.
[0061] 7. Required time: The time required for the signal to arrive (usually the shortest arrival time (min)), generally defined on the set of PO nodes, let Represents the required time of the node, formally defined as follows:
[0062] ,
[0063] Among them, if the node Belongs to PO, then its required time is obtained from the user constraints. The required time of other nodes is determined by their successor nodes and delay Recursively calculate, for example, for nodes that do not belong to PO The required time can be determined by the node The successor node and delay Calculated. Usually , represents a clock cycle. The significance of the timing constraint of the digital circuit is that the signal is completed through the combinational logic gate operation and written into the register within one clock cycle.
[0064] 8. Timing margin (slack): For a node , its timing margin is .when When it is less than zero, it means the node There are timing violations.
[0065] Figure 1 FIG. 1 is a schematic diagram of an exemplary Boolean logic network 100 according to an embodiment of the present application.
[0066] like Figure 1As shown, the Boolean logic network 100 may include nodes 0 to 9, wherein nodes {0, 1, 2} are PIs and nodes {7, 8, 9} are POs. Assuming that the delay of each edge is 1, the arrival time of node 7 is 4.
[0067] As described in the background technology, as the scale of modern digital logic circuits becomes larger and larger, and the functions become more and more complex, users have higher and higher requirements for the timing, power consumption or area (Performance Power Area, PPA) of circuits. Chip designers urgently need electronic design automation (EDA) tools for digital circuits to efficiently optimize the circuit at the global level. Therefore, how to efficiently analyze and optimize circuits has become an indispensable and important part of modern EDA tools.
[0068] As the pursuit of digital circuit performance, power consumption, and area increases day by day, the scale of digital circuits is getting larger and larger, and the analysis and optimization problems of digital circuit design are becoming more and more complicated. The vast majority of analysis and optimization problems are NP-Hard problems, which refer to all NP problems (non-deterministic polynomial (NP)). In theory, EDA tools cannot ensure that the optimization results obtained are the optimal solutions within an acceptable turnaround time (the time from application submission to result (turn-around time, TAT)). Users usually use experts to perform manual tuning, namely user-defined editing (ECO) and open multiple rounds of automatic optimization based on heuristic algorithms.
[0069] Whether it is ECO or automatic optimization based on heuristic algorithms, the core operation is to change part of the circuit, then observe whether the PPA of the circuit is improved, and decide whether to apply this change based on this. However, these two steps will take up a major part of the design process time. Among them, ECO corresponds to a real-time interaction between the user and the EDA tool, which is a huge consumption of human energy. Heuristic optimization is a greedy optimization method, which also requires the EDA tool to quickly calculate each optimization change.
[0070] In summary, the core requirement of the above practical applications for EDA tools is to effectively evaluate the circuit changes and quickly return whether the current changes will affect PPA. Users or heuristic algorithms make decisions based on this feedback. Therefore, a fast evaluation algorithm can significantly improve TAT.
[0071] The basic process of commonly used analysis and optimization is to first abstract the target digital logic circuit into a Boolean logic network, and then obtain the timing state of the circuit by analyzing the paths and constraints of the Boolean logic network. The editing of the circuit can correspond to the modification of the Boolean logic network, for example, changing the implementation of the logic gate (changing the standard logic gate unit), moving the position of the logic gate (re-layout), changing the connection implementation of the logic gate (re-winding), rewriting the logic, etc.
[0072] When editing a Boolean logic network, users can quickly and relatively accurately estimate the power consumption and area changes for each change, but it is difficult to estimate the timing quickly and accurately at the same time. The reason is that the evaluation of power consumption and area often depends only on the change itself, while the evaluation of timing requires the impact of local changes to be transmitted to the global to obtain correct timing information. In addition, there are mutual influences between multiple local changes, which makes it more complicated to estimate the global timing changes.
[0073] In some embodiments, the methods for evaluating timing can be divided into two categories: one is to use a time-oriented algorithm, which propagates the impact of changes to a limited extent when changes occur. For example, a simple evaluation method is to use the current node The change in arrival time caused by the change is only reflected in the small range of adjacent nodes before and after the node. In this way, since the number of nodes involved in each evaluation is small, its running time is very small. However, since the scope of each evaluation is very small, the accuracy of the evaluation cannot be guaranteed. Therefore, the use of this evaluation method will lead to a decrease in the accuracy of the evaluation. ECO and heuristic optimization algorithms will make wrong decisions based on the evaluation results with low accuracy, resulting in a decrease in PPA. In order to fix the wrong decisions made, users have to further increase the number of optimization rounds of ECO and heuristic algorithms, which will lead to an increase in TAT.
[0074] The second is the algorithm that evaluates accuracy. This algorithm applies the changes to the global state every time a change is made. According to the calculation formula of arrival time, when a change to a node causes its own arrival time to change, the nodes that may be affected globally are In the worst case The set size is equal to the number of nodes in all directed acyclic graphs. In modern large-scale digital circuit design, the number of nodes may be tens of millions, and the number of changes may be millions. Therefore, the running time required for this algorithm is relatively long. Users will experience obvious freezes and delays when doing ECO in large-scale digital circuit design, so it will take a long time to perform automatic optimization using heuristic algorithms.
[0075] Figure 2A A schematic diagram of a Boolean logic network 200 according to an embodiment of the present application is shown.
[0076] like Figure 2A As shown, in the related art, when a node u is modified, in order to obtain a more accurate evaluation result, the change of the node u needs to be applied globally, that is, all nodes in the Boolean logic network 200 need to be traversed once. When a node v is modified, all nodes in the Boolean logic network 200 need to be traversed again. Therefore, in the Boolean logic network 200, there will be a problem that some nodes 202 are traversed multiple times and repeatedly. For large-scale digital circuit design, tens of millions of nodes are modified, or millions of node modifications will result in a large number of nodes that are repeatedly traversed. Such large-scale repeated traversals will result in a longer running time required for the algorithm, thereby reducing the evaluation and optimization efficiency of digital logic circuits.
[0077] In view of this, the present application provides a method, computer device and storage medium for optimizing digital logic circuits. The method determines the first node whose arrival time increases in the dynamic forest through a dynamic forest corresponding to a Boolean logic network, determines the first dynamic tree with the first node as the root node in the dynamic forest according to the first node, determines the second node in the Boolean logic network according to the leaf node of the first dynamic tree and the transmission delay of the output edge of the leaf node, and obtains the timing margin according to the third node in response to the second node having a corresponding third node in the dynamic forest, and optimizes the digital logic circuit based on the timing margin. The method characterizes the nodes whose arrival time is affected in the Boolean logic network through the dynamic tree in the dynamic forest, avoids the problem of repeatedly traversing the Boolean logic network after the nodes in the Boolean logic network are changed, and thus can greatly shorten the time for EDA tools to analyze and optimize the circuit without affecting the evaluation accuracy.
[0078] Link Cut Tree (LCT) is a tree-shaped data structure. Multiple dynamic trees can form a dynamic forest. Figure 2B A schematic diagram of the structure of an exemplary dynamic tree 210 according to an embodiment of the present application is shown.
[0079] like Figure 2B As shown, some operations can be performed on the dynamic tree 210 by calling functions. In some exemplary application scenarios, the parent function can be used to obtain the parent node of the dynamic tree where a node on a dynamic tree is currently located; the root function can be used to obtain the root node (root node) of the dynamic tree where a node on a dynamic tree is currently located; the cut function can be used to disconnect the link between the node and the parent node of the tree where it is currently located, and the node can be used as the root node of a new dynamic tree; the link function can be used to link the root node of a dynamic tree to the leaf node of another dynamic tree. The running time of the above operations is .
[0080] Figure 2C A schematic diagram of the structure of an exemplary dynamic tree 220 according to an embodiment of the present application is shown.
[0081] In some embodiments, after the cut function is called to perform a cut operation on the edge 206 between the node p and the node n on the dynamic tree 210, as shown in FIG. Figure 2B As shown, node n is used as the root node of the new dynamic tree (dynamic tree 220), and the link between node n and the parent node p of dynamic tree 210 is disconnected. In dynamic tree 220, node n is the root node of subtree 204. Subtree 204 may include multiple nodes, Figure 2C The number of nodes in the neutron tree 204 is only exemplary and is not limited in this application.
[0082] Figure 3A A schematic diagram of the structure of an exemplary dynamic tree 300 according to an embodiment of the present application is shown. Figure 3B A schematic diagram of the structure of an exemplary dynamic tree 310 according to an embodiment of the present application is shown.
[0083] like Figure 3A and 3B As shown, in some embodiments, the link function may be called to perform a link operation on the dynamic tree 300 and the dynamic tree 310. Node n is the root node of the dynamic tree 310, and node l is the leaf node of the dynamic tree 300.
[0084] Figure 3C A schematic diagram of the structure of an exemplary dynamic tree 320 according to an embodiment of the present application is shown.
[0085] like Figure 3C As shown, when the link function is called to perform the link operation on the dynamic tree 300 and the dynamic tree 310 , the node n will be linked to the node l through the edge 302 .
[0086] It should be noted that Figures 2A to 3C The circles in the figure represent nodes in the dynamic tree. Figures 2A to 3C The number of nodes in the dynamic tree is only exemplary and is not limited in this application.
[0087] Figure 4A A schematic structural diagram of an exemplary Boolean logic network 400 according to an embodiment of the present application is shown.
[0088] like Figure 4A As shown, in some embodiments, the Boolean logic network 400 may be obtained according to a digital logic circuit. The user's editing of the digital logic circuit may correspond to a modification of the Boolean logic network 400. When the Boolean logic network 400 is modified for the first time, a dynamic forest corresponding to the Boolean logic network 400 may be generated.
[0089] It should be noted that the number of nodes in the Boolean logic network 400 is only exemplary and is not limited in this application.
[0090] Figure 4B A schematic diagram of the structure of an exemplary dynamic tree 410 according to an embodiment of the present application is shown.
[0091] Combination Figure 4A and 4B In some embodiments, a dynamic forest corresponding to the Boolean logic network 400 can be constructed by a lookup table, and the lookup table can support returning the corresponding node in the dynamic forest given any node in the Boolean logic network. When a node u in the Boolean logic network 400 is modified, the modification of the node u will cause the arrival time of the node u to increase. If the arrival time of nodes u, v and w does not change before the modification of the node u, that is, the modification of the node u is the first modification of the Boolean logic network 400, there is no dynamic forest corresponding to the Boolean logic network 400, that is, there is no node in the dynamic forest corresponding to the node in the Boolean logic network 400 in the lookup table.
[0092] like Figure 4A As shown, when the Boolean logic network 400 is modified for the first time, in some embodiments, the change to node u causes the increase in the arrival time of node u to be propagated to the successor nodes v and w of node u. At this time, since the arrival time of node v is affected by the change to node u, the arrival time of node v increases. Therefore, the node v affected by the change to node u can be added to the lookup table, as shown in FIG. Figure 4B As shown, a node v' corresponding to the node v in the dynamic tree 410 is constructed. At the same time, when the node u is modified, a node u' corresponding to the node u can also be constructed in the dynamic tree 410. In the Boolean logic network 400, if the modification of the node u does not affect the arrival time of the node w, there is no need to construct a node corresponding to the node w in the dynamic tree 410 to save the space of the lookup table.
[0093] Figure 4C A schematic structural diagram of an exemplary dynamic forest 420 according to an embodiment of the present application is shown.
[0094] like Figure 4C As shown, in some embodiments, the dynamic forest 420 may be composed of nodes in the Boolean logic network 400 that are affected by the modification of the node u. The dynamic forest 420 may include multiple dynamic trees, for example, a dynamic tree with node u' as the root node and a dynamic tree with node v' as the root node.
[0095] Since the construction of dynamic forest 420 has traversed the nodes whose arrival times have changed due to the previous modification of node u, when the user makes changes to other nodes in Boolean logic network 400, it can be expanded based on dynamic forest 420, and then timing analysis and evaluation can be performed without traversing the corresponding nodes of dynamic forest 420 in Boolean logic network 400 again.
[0096] Figure 4D A schematic structural diagram of another exemplary dynamic forest 420 according to an embodiment of the present application is shown.
[0097] like Figure 4D As shown, when the arrival time of node v (e.g., the first node) is affected again and increased due to other nodes in the Boolean logic network 400, in some embodiments, node v and the first delay increment of node v can be determined. Taking the case where the arrival time of node v is affected again and increased due to the modification of node v as an example, in some embodiments, the first root node (e.g., node u') of the dynamic tree where the node v' corresponding to node v in the dynamic forest is currently located and the second delay increment of the first root node can be obtained. The second delay increment can be obtained by calling a first function (e.g., a delta function), and the first function can be used to return the arrival time increment caused by the modification of the preceding node of the node in the Boolean logic network corresponding to the root node on the dynamic tree.
[0098] Whether the node v' is affected by the node u' can be determined by the first delay increment and the second delay increment. In some embodiments, when the first delay increment is greater than the second delay increment, it can be determined that the arrival time of the node v' has been further increased, exceeding the arrival time increased by the change of the node u. Figure 4D As shown, in some embodiments, the link between node v' and node u' can be disconnected by the cut function, thereby obtaining a first dynamic tree 424 with node v' as the root node and a dynamic tree 422 with node u' as the root node. As an optional embodiment, when node u' and node v' are the same node, the first dynamic tree 424 can be obtained according to node v', without calling the cut function to disconnect the link between node v' and the root node. By comparing the first delay increment and the second delay increment, it can be determined whether the arrival time of the first node is still affected by the first root node, and then it can be determined whether it is necessary to disconnect the first node from the dynamic tree where it is currently located.
[0099] When the cut function is called to disconnect the link between the first dynamic tree 424 and the dynamic tree 422, in some embodiments, the leaf nodes in the dynamic tree may be allocated. Figure 4CAs shown, in a dynamic tree with node u' as the first root node, the first leaf node set of the dynamic tree where the first root node is currently located in the dynamic forest 420 can be obtained. Among them, a second function (for example, a leafs function) can be called to obtain the leaf nodes of the dynamic tree, and the second function can return the leaf node set in the same dynamic tree as the target node.
[0100] like Figure 4C As shown, in some embodiments, the first leaf node set may include node 1, node 2, and node 3. After disconnecting the link between node v' and node u', as shown in Figure 4D As shown, the dynamic tree to which the leaf node belongs can be determined based on the root node of the dynamic tree where the leaf node in the first leaf node set is located. In some embodiments, when the root node of the dynamic tree where node 2 and node 3 (for example, the fourth node) in the first leaf node set are currently located is node v', node 2 and node 3 can be added to the leaf node set of the first dynamic tree 424, thereby obtaining the first dynamic tree 424, realizing the redistribution of the dynamic tree leaf nodes after the link is disconnected.
[0101] Figure 4E A schematic structural diagram of another exemplary dynamic forest 420 according to an embodiment of the present application is shown.
[0102] like Figure 4E As shown, as an optional embodiment, if the further increase of the arrival time of node v' is caused by the change of node x', after obtaining the first dynamic tree 424, the link function can be called to link node v' to node x', thereby obtaining a dynamic tree 426. This can indicate that the source node of the current arrival time change of node v' is node x'.
[0103] As described above, when the user modifies other nodes in the Boolean logic network 400, it can be expanded based on the dynamic forest 420 to further perform timing analysis and evaluation.
[0104] Figure 4F FIG. 4 is a schematic diagram showing the structure of an exemplary dynamic tree 428 according to an embodiment of the present application. The dynamic tree 428 may be a second dynamic tree.
[0105] like Figure 4F As shown, after obtaining the first dynamic tree 424, the first dynamic tree 424 can be expanded starting from the leaf node of the first dynamic tree 424 based on the further increased arrival time of the node v', so that the nodes between the leaf node of the first dynamic tree 424 and the node v' do not need to be traversed again, thereby saving the running time of the EDA tool. In some embodiments, the leaf node of the first dynamic tree 424 can be obtained.
[0106] like Figure 4F As shown, in some embodiments, the leaf nodes of the first dynamic tree 424 obtained may include node 2 and node 3. According to node 2 and node 3 in the dynamic forest, the nodes corresponding to node 2 and node 3 in the Boolean logic network may be determined. Among them, a third function (e.g., dag_vertex function) may be called to determine the nodes corresponding to the nodes in the dynamic forest in the Boolean logic network.
[0107] The second node in the Boolean logic network can be determined based on the nodes corresponding to nodes 2 and 3 in the Boolean logic network and the transmission delay of the output edge of the node. The dynamic tree is expanded based on whether the second node has a corresponding third node in the dynamic forest.
[0108] like Figure 4F As shown, taking the third node corresponding to the second node in the dynamic forest as node 4 and node 5 as an example, in some embodiments, it can be determined whether the second root node of the dynamic tree where node 4 and node 5 are currently located in the dynamic forest is node v', so as to determine whether node 4 and node 5 belong to the same dynamic tree as node 2 and node 3. If the second root node of the dynamic tree where node 4 and node 5 are located is node v', in some embodiments, the timing margin for evaluating and optimizing the digital logic circuit can be obtained according to node 4 and node 5. When determining the timing margin, in some embodiments, the timing margin can be determined according to the difference between the clock cycle of the digital logic circuit and the arrival time of node 4 and node 5. The second node affected by the arrival time of the node change can be determined by the node corresponding to the leaf node of the dynamic tree in the Boolean logic network and the transmission delay of the output edge of the node, and then the corresponding third node can be found in the dynamic forest according to the second node. In this way, the corresponding node affected by the change of the arrival time is determined based on the leaf node of the dynamic tree, and the nodes between the leaf node and the root node in the dynamic tree do not need to be traversed again, thereby greatly shortening the time for EDA tools to analyze and optimize digital logic circuits.
[0109] As an optional embodiment, if the second root node of the dynamic tree where nodes 4 and 5 are located is not node v', it is necessary to determine whether it is necessary to disconnect the links between nodes 4 and 5 and the second root node based on the arrival time of nodes 4 and 5, so as to link nodes 4 and 5 to nodes 2 and 3, thereby expanding the first dynamic tree 424.
[0110] In some embodiments, a fourth function (e.g., aTree function) may be called to return the arrival time of node 4 and node 5. The arrival time of node 4 and node 5 may be the sum of the arrival time of the node corresponding to node 4 and node 5 in the Boolean logic network and the arrival time increment caused by the change of the preceding node of the node corresponding to the source node in the Boolean logic network of the arrival time change of node 4 and node 5. A fifth function (e.g., delta_source function) may be called to return the source node of the node arrival time change.
[0111] When the arrival time of node 4 and node 5 is less than the arrival time of node 2 and node 3 and the sum of the transmission delays of the nodes corresponding to node 2 and node 3 in the Boolean logic network, it can be determined that the arrival time of node 4 and node 5 is affected by node 2 and node 3. Since the dynamic tree where node 4 and node 5 are located is not the first dynamic tree 424 at this time, in some embodiments, the link between node 4 and node 5 and the second root node can be disconnected, thereby obtaining a second dynamic tree with node 4 and node 5 as the root nodes. After disconnecting the link, the link function can be called to link the second dynamic tree to node 2 and node 3, thereby obtaining a dynamic tree 428.
[0112] It should be noted that, in some embodiments, if there is no corresponding third node for the second node in the dynamic forest, it is necessary to create a node corresponding to the second node (for example, the fifth node) in the dynamic forest, that is, add the node corresponding to the second node in the lookup table, and use the node as the third node for subsequent dynamic tree expansion.
[0113] It should be noted that the number of nodes shown in the above figures is exemplary and is not limited in this application.
[0114] Figure 5 A flow chart of an exemplary method 500 for optimizing a digital logic circuit according to an embodiment of the present application is shown. The method 500 may include the following steps.
[0115] In step 502, a Boolean logic network (eg, Figure 4A Boolean logic network in 400).
[0116] In step 504, a dynamic forest corresponding to the Boolean logic network is obtained (for example, Figure 4C The dynamic forest 420 in FIG. 4 includes a plurality of dynamic trees (eg, Figure 4D Dynamic trees 422, 424 in.
[0117] In step 506, the first node of the dynamic forest is determined (eg, Figure 4CNode v' in ), the first node is a node whose arrival time increases.
[0118] In step 508, based on the first node, a first dynamic tree (eg, Figure 4D Dynamic tree 424 in.
[0119] In some embodiments, determining a first dynamic tree with the first node as a root node in the dynamic forest according to the first node further includes: obtaining a first delay increment of the first node; obtaining a first root node of the dynamic tree where the first node is currently located in the dynamic forest; determining a second delay increment of the first root node; in response to the first delay increment being greater than the second delay increment and the first node and the first root node being the same node, obtaining the first dynamic tree according to the first node. By comparing the first delay increment and the second delay increment, it can be determined whether the arrival time of the first node is still affected by the first root node.
[0120] In some embodiments, according to the first node, determining a first dynamic tree with the first node as a root node in the dynamic forest further comprises: in response to the first delay increment being greater than the second delay increment and the first node and the first root node (for example, Figure 4D The node u' in the first node is not the same node, and the link between the first node and the first root node is disconnected to obtain the first dynamic tree. By comparing the first delay increment and the second delay increment, it can be determined whether the arrival time of the first node is still affected by the first root node, and then it can be determined whether it is necessary to disconnect the first node from the dynamic tree where it is currently located.
[0121] In some embodiments, disconnecting the link between the first node and the first root node to obtain the first dynamic tree further includes: obtaining a first leaf node set (for example, Figure 4C ); disconnect the link between the first node and the first root node; in response to a fourth node in the first leaf node set (for example, Figure 4C The root node of the dynamic tree where the nodes 2 and 3 in the dynamic tree are currently located is the first node, and the fourth node is added to the leaf node set of the first dynamic tree to obtain the first dynamic tree. The above method realizes the redistribution of the leaf nodes of the dynamic tree after the link is disconnected, thereby obtaining the first dynamic tree.
[0122] In step 510, the leaf nodes of the first dynamic tree are obtained (for example, Figure 4DNode 2 and Node 3 in .
[0123] In step 512, a second node in the Boolean logic network is determined according to the leaf node and the transmission delay of the output edge corresponding to the leaf node in the Boolean logic network.
[0124] In step 514, in response to the second node having a corresponding third node in the dynamic forest (eg, Figure 4F 4 and 5 in the embodiment of the present invention), obtaining a timing margin according to the third node, and optimizing the digital logic circuit based on the timing margin.
[0125] In some embodiments, in response to the existence of a corresponding third node in the dynamic forest for the second node, obtaining the timing margin according to the third node further includes: in response to the existence of a corresponding third node in the dynamic forest for the second node, determining whether the second root node of the dynamic tree where the third node is currently located in the dynamic forest is the first node; in response to the second root node being the first node, obtaining the timing margin according to the third node. By determining whether the second root node is the first node, it can be determined whether the third node and the leaf node of the first dynamic tree belong to the same dynamic tree.
[0126] In some embodiments, the method further comprises: in response to the second node not having a corresponding third node in the dynamic forest, creating a fifth node in the dynamic forest, and using the fifth node as the third node. When there are nodes that are not affected by the first modification of the node and are not created as nodes in the dynamic forest, it is necessary to create corresponding nodes in the dynamic forest.
[0127] In some embodiments, the method further includes: in response to the second root node not being the first node and the arrival time of the third node being less than the sum of the arrival time of the leaf node and the transmission delay, disconnecting the link between the third node and the second root node to obtain a second dynamic tree, the root node of the second dynamic tree being the third node; linking the second dynamic tree to the leaf node, and obtaining the timing margin according to the third node. In this way, there is no need to traverse the nodes between the leaf node and the root node of the dynamic tree, and the expansion of the dynamic tree is achieved by linking the third node to the leaf node.
[0128] In some embodiments, obtaining a timing margin according to the third node and optimizing the digital logic circuit based on the timing margin further includes: acquiring the arrival time of the third node; obtaining the timing margin according to the difference between the clock period of the digital logic circuit and the arrival time of the third node; and optimizing the digital logic circuit based on the timing margin.
[0129] The present application provides a method, computer device and storage medium for optimizing digital logic circuits. The method determines the first node whose arrival time increases in the dynamic forest through a dynamic forest corresponding to a Boolean logic network, determines a first dynamic tree with the first node as the root node in the dynamic forest according to the first node, determines the second node in the Boolean logic network according to the leaf node of the first dynamic tree and the transmission delay of the output edge of the leaf node, and obtains the timing margin according to the third node in response to the second node having a corresponding third node in the dynamic forest, and optimizes the digital logic circuit based on the timing margin. The method characterizes the nodes whose arrival time is affected in the Boolean logic network through the dynamic tree in the dynamic forest, avoids the problem of repeatedly traversing the Boolean logic network after the nodes in the Boolean logic network are changed, and thus can greatly shorten the time for EDA tools to analyze and optimize digital logic circuits without affecting the evaluation accuracy.
[0130] It should be noted that the method of the embodiment of the present application can be performed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present application, and the multiple devices will interact with each other to complete the described method.
[0131] It should be noted that the above describes some embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0132] Figure 6 The schematic diagram of the structure of an exemplary computer device 600 according to an embodiment of the present application is shown. The computer device 600 may include: a processor 602, a memory 604, a network interface 606, a peripheral interface 608 and a bus 610. The processor 602, the memory 604, the network interface 606 and the peripheral interface 608 are connected to each other in communication within the device through the bus 610.
[0133] Processor 602 may be a central processing unit (CPU), an image processor, a neural network processor (NPU), a microcontroller (MCU), a programmable logic device, a digital signal processor (DSP), an application specific integrated circuit (ASIC), or one or more integrated circuits. Processor 602 may be used to perform functions related to the technology described in this application. In some embodiments, processor 602 may also include multiple processors integrated into a single logical component. Figure 6 As shown, processor 602 may include a plurality of processors 602a, 602b, and 602c.
[0134] The memory 604 may be configured to store data (eg, instruction sets, computer codes, intermediate data, etc.). Figure 6 As shown, the stored data may include program instructions (e.g., program instructions for implementing the technical solution of the present application) and data to be processed. The processor 602 may also access the stored program instructions and data, and execute the program instructions to operate on the data to be processed. The memory 604 may include a volatile storage device or a non-volatile storage device. In some embodiments, the memory 604 may include a random access memory (RAM), a read-only memory (ROM), an optical disk, a magnetic disk, a hard disk, a solid-state drive (SSD), a flash memory, a memory stick, etc.
[0135] The network interface 606 can be configured to provide the computer device 600 with communication with other external devices via a network. The network can be any wired or wireless network capable of transmitting and receiving data. For example, the network can be a wired network, a local wireless network (e.g., Bluetooth, WiFi, near field communication (NFC), etc.), a cellular network, the Internet, or a combination thereof. It is understood that the type of network is not limited to the above specific examples. In some embodiments, the network interface 606 can include any number of network interface controllers (NICs), radio frequency modules, transceivers, modems, routers, gateways, adapters, cellular network chips, etc., in any combination.
[0136] The peripheral interface 608 can be configured to connect the computer device 600 to one or more peripheral devices to achieve information input and output. For example, the peripheral devices can include input devices such as a keyboard, a mouse, a touch pad, a touch screen, a microphone, and various sensors, and output devices such as a display, a speaker, a vibrator, and an indicator light.
[0137] The bus 610 may be configured to transmit information between various components of the computer device 600 (e.g., the processor 602, the memory 604, the network interface 606, and the peripheral interface 608), such as an internal bus (e.g., a processor-memory bus), an external bus (USB port, PCI-E bus), etc.
[0138] It should be noted that, although the above device only shows the processor 602, the memory 604, the network interface 606, the peripheral interface 608 and the bus 610, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiment of the present application, and does not necessarily include all the components shown in the figure.
[0139] The computer device of the above embodiment is used to implement the corresponding method 500 in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0140] Based on the same technical concept, corresponding to any of the above-mentioned embodiments, the present application also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute method 500 described in any of the above embodiments.
[0141] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0142] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the method 500 described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0143] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments, the present application also provides a computer program product, which includes a computer program. In some embodiments, the computer program is executable by one or more processors so that the processors execute the described method 500. Corresponding to the execution subject corresponding to each step in each embodiment of the method 500, the processor that executes the corresponding step may belong to the corresponding execution subject.
[0144] The computer program product of the above embodiment is used to enable the processor to execute the method 500 described in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0145] A person skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present application (including the claims) is limited to these examples. In line with the concept of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.
[0146] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present application difficult to understand, the known power / ground connections to the integrated circuit (IC) chip and other components may or may not be shown in the provided drawings. In addition, the device may be shown in the form of a block diagram to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform on which the embodiments of the present application are to be implemented (that is, these details should be fully within the scope of understanding of those skilled in the art). Where specific details (e.g., circuits) are set forth to describe exemplary embodiments of the present application, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details or with changes in these specific details. Therefore, these descriptions should be considered illustrative rather than restrictive.
[0147] Although the present application has been described in conjunction with specific embodiments of the present application, many alternatives, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the discussed embodiments.
[0148] The embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the scope of protection of the present application.
Claims
1. A method for optimizing digital logic circuits, include: Obtaining a Boolean logic network corresponding to the digital logic circuit; Obtaining a dynamic forest corresponding to the Boolean logic network, wherein the dynamic forest includes a plurality of dynamic trees; Determining a first node of the dynamic forest, the first node being a node with an increased arrival time; Determining, according to the first node, a first dynamic tree with the first node as a root node in the dynamic forest; Obtaining leaf nodes of the first dynamic tree; Determine a second node in the Boolean logic network according to the leaf node and the transmission delay of the output edge corresponding to the leaf node in the Boolean logic network; In response to the second node having a corresponding third node in the dynamic forest, a timing margin is obtained according to the third node, and the digital logic circuit is optimized based on the timing margin.
2. The method according to claim 1, in, The determining, according to the first node, in the dynamic forest, a first dynamic tree with the first node as a root node further comprises: Obtaining a first delay increment of the first node; Obtain a first root node of a dynamic tree where the first node currently resides in the dynamic forest; determining a second delay increment of the first root node; In response to the first delay increment being greater than the second delay increment and the first node and the first root node being the same node, the first dynamic tree is obtained according to the first node.
3. The method according to claim 2, in, The determining, according to the first node, in the dynamic forest, a first dynamic tree with the first node as a root node further comprises: In response to the first delay increment being greater than the second delay increment and the first node and the first root node being not the same node, disconnecting the link between the first node and the first root node to obtain the first dynamic tree.
4. The method according to claim 1, in, In response to the second node having a corresponding third node in the dynamic forest, obtaining the timing margin according to the third node further includes: In response to the existence of a corresponding third node in the dynamic forest for the second node, determining whether a second root node of a dynamic tree where the third node is currently located in the dynamic forest is the first node; In response to the second root node being the first node, the timing margin is obtained according to the third node.
5. The method according to claim 4, in, The method further comprises: In response to the second root node not being the first node and the arrival time of the third node being less than the sum of the arrival time of the leaf node and the transmission delay, disconnecting the link between the third node and the second root node to obtain a second dynamic tree, the root node of the second dynamic tree being the third node; The second dynamic tree is linked to the leaf node, and the timing margin is obtained according to the third node.
6. The method according to claim 3, in, The disconnecting the link between the first node and the first root node to obtain the first dynamic tree further comprises: Obtain a first leaf node set of the dynamic tree where the first root node currently resides in the dynamic forest; Disconnecting the link between the first node and the first root node; In response to the root node of the dynamic tree where the fourth node in the first leaf node set currently resides being the first node, the fourth node is added to the leaf node set of the first dynamic tree to obtain the first dynamic tree.
7. The method according to claim 1, in, The obtaining a timing margin according to the third node and optimizing the digital logic circuit based on the timing margin further includes: Obtaining the arrival time of the third node; Obtaining the timing margin according to a difference between a clock cycle of the digital logic circuit and an arrival time of the third node; The digital logic circuit is optimized based on the timing margin.
8. The method according to claim 4, in, The method further comprises: In response to the second node not having a corresponding third node in the dynamic forest, a fifth node in the dynamic forest is created, and the fifth node is used as the third node.
9. A computer device, include: One or more processors, memory; as well as one or more programs; The one or more programs are stored in the memory and executed by the one or more processors, and the programs include instructions for executing the method according to any one of claims 1-8.
10. A non-volatile computer-readable storage medium containing a computer program, which, when executed by one or more processors, causes the processors to perform the method of any one of claims 1 to 8.
Citation Information
Patent Citations
Logic optimization method and device of integrated circuit, electronic equipment and readable medium
CN115204076A
Method for optimizing digital logic circuit and related equipment
CN116341441A
Analysis optimization method of digital logic circuit and related equipment
CN116822422A
Circuit design adjustment using redundant nodes
CN116976248A
Post-CTS clock tree restructuring
US11620428B1
