Method, computer device and storage medium for optimizing digital logic circuit

By constructing a Boolean logic network of digital logic circuits and a zero-suppression decision diagram, the problem of poor optimization results in the existing technology is solved, and more efficient optimization results and faster convergence are achieved.

CN118410752BActive Publication Date: 2024-09-24X TIMES DESIGN AUTOMATION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410876551.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-02
Publication Date
2024-09-24
Estimated Expiration
2044-07-02

AI Technical Summary

Technical Problem

Modern digital logic circuits are large in scale and have complex functions, and users have high requirements on timing, power consumption, and area. However, existing electronic design automation tools cannot ensure that the optimization results are optimal solutions, resulting in poor optimization results.

Method used

By obtaining the Boolean logic network of the digital logic circuit, determining the atomic transformation of the current node and the set of previous nodes, and using the zero-suppression decision graph to construct a solution space that contains a large number of different solutions, thereby obtaining the optimal optimization result.

Benefits of technology

It achieves finding the optimal solution among a large number of solutions, improves the quality of the optimization results, overcomes the problem of insufficient solution space exploration in the existing technology, and reduces the dependence on fast and accurate evaluation methods to achieve faster convergence.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118410752B
    Figure CN118410752B
Patent Text Reader

Abstract

The present application provides a method, computer device and storage medium for optimizing digital logic circuits. The method includes: obtaining a Boolean logic network corresponding to the digital logic circuit, determining a first atomic transformation with the current node of the Boolean logic network as the root, determining a set of preceding nodes of the first atomic transformation, and obtaining a solution space for optimizing the digital logic circuit according to the set of preceding nodes and a second atomic transformation, wherein the second atomic transformation is an atomic transformation of the current node. The solution space obtained by the above method can accommodate a large number of different solutions, so that the optimal solution can be obtained among a large number of different solutions, thereby obtaining the best optimization result.
Need to check novelty before this filing date? Find Prior Art

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). At the same time, as the problems of digital circuit design and implementation become more and more complex, electronic design automation (EDA) tools cannot ensure that the optimization results obtained are the optimal solution, and thus cannot obtain the best optimization results. 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] determining a first atomic transformation rooted at a current node of the Boolean logic network;

[0007] Determine a preceding node set of the first atomic transformation;

[0008] A solution space for optimizing the digital logic circuit is obtained according to the preceding node set and a second atomic transformation, wherein the second atomic transformation is an atomic transformation of the current node.

[0009] In a second aspect of the present application, a computer device is provided, including:

[0010] one or more processors, memory; and

[0011] one or more programs;

[0012] 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.

[0013] 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.

[0014] From the above, it can be seen that the present application provides a method, computer device and storage medium for optimizing digital logic circuits. The method includes: obtaining a Boolean logic network corresponding to the digital logic circuit, determining a first atomic transformation with the current node of the Boolean logic network as the root, determining a set of preceding nodes of the first atomic transformation, and obtaining a solution space for optimizing the digital logic circuit according to the set of preceding nodes and a second atomic transformation, wherein the second atomic transformation is an atomic transformation of the current node. The solution space obtained by the above method can accommodate a large number of different solutions, so that the optimal solution can be obtained among a large number of different solutions, thereby obtaining the best optimization result. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] 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.

[0016] Figure 1 A schematic structural diagram of an exemplary first Boolean logic network 100 according to an embodiment of the present application is shown.

[0017] Figure 2A A schematic structural diagram of an exemplary second Boolean logic network 200a according to an embodiment of the present application is shown.

[0018] Figure 2B A schematic structural diagram of an exemplary third Boolean logic network 200b according to an embodiment of the present application is shown.

[0019] Figure 2C A schematic structural diagram of an exemplary fourth Boolean logic network 200c according to an embodiment of the present application is shown.

[0020] Figure 3A A schematic structural diagram of an exemplary first data structure 300 according to an embodiment of the present application is shown.

[0021] Figure 3B A schematic structural diagram of an exemplary fifth Boolean logic network 310 according to an embodiment of the present application is shown.

[0022] Figure 3C A schematic structural diagram of an exemplary sixth Boolean logic network 320 according to an embodiment of the present application is shown.

[0023] Figure 3D A schematic diagram of an exemplary second data structure 330 according to an embodiment of the present application is shown.

[0024] Figure 3EA schematic diagram of an exemplary third data structure 340 according to an embodiment of the present application is shown.

[0025] Figure 3F A schematic diagram of an exemplary fourth data structure 350 according to an embodiment of the present application is shown.

[0026] Figure 3G A schematic diagram of an exemplary fifth data structure 360 ​​according to an embodiment of the present application is shown.

[0027] Figure 4 FIG. 4 is a flow chart of an exemplary method 400 for optimizing a digital logic circuit according to an embodiment of the present application.

[0028] Figure 5 A schematic structural diagram of an exemplary computer device 500 according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0029] 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.

[0030] 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.

[0031] 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.

[0032] 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.

[0033] 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.

[0034] 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.

[0035] To facilitate understanding, some concepts involved in the embodiments of the present application are described below.

[0036] 1. Boolean Network: A directed acyclic graph (DAG). The graph consists of a set of nodes. With directed edge sets Composition. Among them:

[0037] 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.

[0038] 2) Input edge: for any node , all head nodes are The edges are called nodes The input edge of .

[0039] 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.

[0040] 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.

[0041] 5) Input signal set: for any node , its input signal set represents the set of signals carried by its input edges.

[0042] 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.

[0043] 7) Input interface node ( ):one A subset of , where the nodes in this set have no incoming edges.

[0044] 8) Output interface node ( ):one A subset of , where the nodes in this set have no outgoing edges.

[0045] 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 .

[0046] Since integer A node can be uniquely identified , without affecting understanding, To represent .

[0047] 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.

[0048] 1) The first node in the sequence is the starting node of the path.

[0049] 2) The last node in the sequence is the terminal node of the path.

[0050] 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.

[0051] 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.

[0052] 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.

[0053] 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:

[0054] ,

[0055] Among them, when the node When it belongs to PI ,when When not a PI Use its predecessor node and delay Calculated recursively.

[0056] 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:

[0057] ,

[0058] 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.

[0059] 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.

[0060] 9. Zero-Suppressed Binary Decision Diagram (ZDD): An evolution of the binary decision diagram (BDD) that can easily express sets. Any path from the root node to a leaf node in the ZDD constitutes any element of the set expressed in the ZDD.

[0061] 10. Cartesian product: It is a set operation defined between two sets. ,gather .but is defined as the Cartesian product of these two sets, where Represents an integer.

[0062] Figure 1 A schematic structural diagram of an exemplary first Boolean logic network 100 according to an embodiment of the present application is shown.

[0063] like Figure 1 As shown, the first Boolean logic network 100 may include nodes 0, 1, 2, 3, 4, 5, 6, 7, 8 and 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.

[0064] As described in the background art, 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 the circuits. At the same time, as the problems of digital circuit design implementation become more and more complex, electronic design automation (EDA) tools cannot ensure that the optimization results obtained are the optimal solutions, and thus cannot obtain the best optimization results.

[0065] Most optimization problems in digital circuit design are NP-Hard. NP-Hard problems refer to all NP problems (non-deterministic polynomials (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 to result (turn-around time, TAT)). Therefore, users usually adopt two types of optimization strategies to improve PPA: one is heuristic algorithm optimization, which combines a series of local optimization transformations based on a certain heuristic strategy. Heuristic algorithm optimization is the cornerstone of the entire optimization process. Heuristic algorithm is a greedy optimization method. Its core operation is to change the local part of the circuit, and then observe whether the PPA of the circuit is improved, and then decide whether to apply this change based on this. This type of algorithm not only requires a carefully designed optimization process and optimization sequence, but also requires additional means to quickly and accurately monitor the transformation of PPA.

[0066] In terms of running time, existing heuristic algorithms have two major disadvantages: First, it is difficult to determine the number of iterations. If you want to reduce the number of iterations, you need to make a wise choice of heuristic strategies, and often you need to adjust different strategies for different designs to achieve the goal of a reasonable convergence time. Second, you need the support of fast and accurate PPA dynamic evaluation. If the dynamic evaluation is particularly time-consuming, it will lead to a decrease in the efficiency of each iteration. If the dynamic evaluation is not accurate enough, the heuristic algorithm may make wrong decisions and lead to an increase in the number of iterations. Heuristic algorithms are the cornerstone of the entire optimization process. Users will require EDA tools to provide an efficient heuristic algorithm with excellent optimization results. This will reduce the time of manual intervention.

[0067] The second is manual tuning by experts, that is, user-defined editing (ECO). The basic process of commonly used optimization is to first abstract the target digital circuit into a Boolean logic network (a directed acyclic graph), and obtain the timing state of the circuit by analyzing the paths and constraints of the Boolean logic network. The optimization of the circuit can be equivalent to the optimization of the Boolean logic network. The core operation of the circuit optimization method is a local circuit change (for example, changing the standard cell used by a logic gate), which is equivalent to changing the area, power consumption and delay at the corresponding nodes and edges of the Boolean logic network. This operation is an atomic operation (also called atomic transformation), especially for the current mainstream digital chip design based on semi-custom standard cell libraries. The logic gate and its corresponding standard cell are the minimum changeable objects.

[0068] Heuristic algorithms are a greedy optimization method. The core operation is to change a part of the circuit, and then observe whether the PPA of the circuit is improved, and then decide whether to apply this change based on this. This type of algorithm not only requires a carefully designed optimization process and optimization sequence, but also requires additional means to quickly and accurately monitor the changes in PPA.

[0069] In terms of running time, heuristic algorithms have two major disadvantages: First, it is difficult to determine the number of iterations. If you want to reduce the number of iterations, you need to make a wise choice of heuristic strategies, and often you need to adjust different strategies for different designs to achieve the goal of a reasonable convergence time. Second, you need the support of fast and accurate PPA dynamic evaluation. If the dynamic evaluation is particularly time-consuming, it will lead to a decrease in the efficiency of each iteration. If the dynamic evaluation is not accurate enough, the heuristic algorithm may make wrong decisions, resulting in an increase in the number of iterations.

[0070] In terms of running results, heuristic algorithms can often only make decisions based on the changes in PPA when a local single atomic transformation is applied alone, which makes it difficult to guarantee the optimization results. The direct reason is that the scale of digital integrated circuits is huge, and the number of atomic transformations is also particularly large. It is usually extremely difficult to consider all combinations of atomic transformations. In essence, the solution space constructed by the heuristic algorithm has a limited capacity and cannot include a large number of different solutions in the evaluation. A large number of different solutions can include excellent solutions. If a large number of different solutions cannot be included in the evaluation, excellent solutions will be lost.

[0071] If the algorithm can explore a larger solution space, the optimization result of the algorithm will be closer to the optimal solution. However, the inventors of this application found that the solution space corresponding to the optimization problem of large-scale digital circuits is extremely large (far larger than the number of atoms in the universe), and unreasonable expressions will require huge memory, making it infeasible to construct a global solution space in practice. This is also the reason why there is currently a lack of a method that can effectively approximate the global solution space.

[0072] In view of this, the present application provides a method, computer device and storage medium for optimizing digital logic circuits. The method includes: obtaining a Boolean logic network corresponding to the digital logic circuit, determining a first atomic transformation with the current node of the Boolean logic network as the root, determining a set of preceding nodes of the first atomic transformation, and obtaining a solution space for optimizing the digital logic circuit according to the set of preceding nodes and a second atomic transformation, wherein the second atomic transformation is an atomic transformation of the current node. The solution space obtained by the above method can accommodate a large number of different solutions, so that the optimal solution can be obtained among a large number of different solutions, thereby obtaining the best optimization result.

[0073] A digital logic network can be abstracted into a directed acyclic graph (DAG). Changes to the circuit can be mapped one-to-one to changes to the DAG. The final result of the change is a new digital logic network, but it must satisfy a hard constraint: the modified DAG is logically equivalent to the original DAG.

[0074] Since all changes are composed of local atomic transformations, the transformation from the original network to the newly modified network can be described by a series of changes. In practice, the original network is equivalent to the current network by the following principles: first, all atomic transformations applied locally will not destroy logical equivalence; second, all non-PI nodes have signal sources.

[0075] Figure 2A A schematic structural diagram of an exemplary second Boolean logic network 200a according to an embodiment of the present application is shown.

[0076] like Figure 2A As described, the second Boolean logic network 200a may include node 0, node 1, node 2, node 3 and node 4, wherein node 0 and node 1 are PI nodes, node 2 includes signals from node 1 and node 0, node 3 includes signals from node 2 and node 1, and node 4 includes signals from node 2.

[0077] Figure 2B A schematic structural diagram of an exemplary third Boolean logic network 200b according to an embodiment of the present application is shown.

[0078] like Figure 2B As shown, the third Boolean logic network 200b may include nodes 0, 1, 2, node 3 and node 4. As mentioned above, one of the principles that the original network is equivalent to the modified network is that all non-PI nodes have signal sources. Figure 2B As shown, if the user modifies nodes 0, 1 and 2, for example, merges nodes 0, 1 and 2, and node 3 loses the signal from node 1, the modified third Boolean logic network 200b is not equivalent to the original second Boolean logic network 200a.

[0079] Figure 2C A schematic structural diagram of an exemplary fourth Boolean logic network 200c according to an embodiment of the present application is shown.

[0080] like Figure 2C As shown, the fourth Boolean logic network 200c may include nodes 0, 1, 2, node 1, node 3 and node 4. In order to make the modified network equivalent to the original network, as shown in FIG. Figure 2CAs shown, the signal from node 1 needs to be retained for node 3. At this time, the signal source of node 3 in the fourth Boolean logic network 200c is the same as the signal source of the second Boolean logic network 200a, and the modified fourth Boolean logic network 200c is equivalent to the original second Boolean logic network 200a.

[0081] According to the above description, a change (a feasible solution to an optimization problem) can be equivalent to a series of local atomic transformations. In large-scale digital circuits, the number of all feasible solutions is exponential. Due to the huge amount of data, it is impossible to keep these data in memory, making it infeasible to construct a global solution space in practice.

[0082] Zero-suppressed Decision Diagram (ZDD) is a graphical data structure used to represent sets and functions. By expressing the elements in a set as paths, it can be used in Units of memory expressed path, thus expressing In this way, the solution space constructed using ZDD can accommodate more solutions, and thus better optimization results can be obtained from more solutions.

[0083] Figure 3A FIG. 3 is a schematic diagram showing a structure of an exemplary first data structure 300 according to an embodiment of the present application. The first data structure 300 may be a zero suppression decision diagram.

[0084] like Figure 3A As shown, the first data structure 300 may include node a, node b, node 0 and node 1. The first data structure 300 may represent the set {ab, b}. The first data structure 300 is also a DAG. Two PO nodes may be included in the first data structure 300, for example, node 0 (first leaf node) and node 1 (second leaf node). In the first data structure 300, node a is the root node, and there are two outgoing edges for non-leaf nodes, for example, high edge 302 (hi-edge) and low edge 304 (lo-edge). Any node in the first data structure 300 corresponds to a variable, which represents the basic atoms that constitute the elements of the set. The variables of the nodes in any path to the leaf node are in non-increasing order, wherein the path along the low edge 304 represents that the basic atom corresponding to this node is not constituted in the element corresponding to the current path; the path along the high edge 302 represents that the basic atom corresponding to this node is constituted in the element corresponding to the current path.

[0085] Figure 3BThe schematic diagram of the structure of the exemplary fifth Boolean logic network 310 according to the embodiment of the present application is shown. The fifth Boolean logic network 310 can be obtained according to the digital logic circuit. The user's editing of the digital logic circuit can correspond to the modification of the fifth Boolean logic network 310.

[0086] like Figure 3B As shown, in some embodiments, the fifth Boolean logic network 310 may include nodes ,node and nodes Among them, each node can be transformed by two atoms that are only related to itself.

[0087] Figure 3C A schematic structural diagram of an exemplary sixth Boolean logic network 320 according to an embodiment of the present application is shown.

[0088] like Figure 3C As shown, the sixth Boolean logic network 320 may include nodes ,node ,node ,node ,node and nodes In some embodiments, the node The root atomic transformation may include atomic transformation 322 and atomic transformation 324. Among them, atomic transformation 322 represents node The transformation of the node The atomic transformation 324 represents the node The atomic transformation of the root (i.e., node and nodes , transformations together).

[0089] Different transformations have different target gain values ​​and corresponding sets of preceding nodes. Figure 3C As shown, the node The preceding node of its own transformation is the node and y, while the node With Node , The preceding node of the transformation is the node , and .node The partial solution of is equal to the solution set of its two atomic transformations (atomic transformation 322 and atomic transformation 324). Under the premise of self-transformation, the node The solution set is the node Partial solution set and nodes The Cartesian product of the partial solution set plus the node The transformation itself. At the same time, changing the node With Node , When the node The solution set is the node The partial solution set of node Partial solution set and nodes The Cartesian product of the partial solution set plus the node The transformation itself.

[0090] In order to accommodate more solutions in the solution space, in some embodiments, ZDD can be used to represent the solution space of the Boolean logic network. ZDD has rigid constraints on the order of variables and has very high requirements on the order of variables. A bad variable order will cause the nodes in the ZDD to increase exponentially. In view of this, in some embodiments, the topological order of the DAG can be determined, and the ZDD variables of the atomic transformations corresponding to the nodes of the DAG can be calculated. The solution space is recursively constructed based on each node in the topological order. In view of the characteristics of ZDD and combined with the actual DAG optimization problem, efficient variable encoding can be achieved through the method described in the above embodiment.

[0091] The topological order of a DAG is an excellent ZDD order, which can express all paths in the DAG in memory linear in the size of the DAG. The maximum topological order of a DAG is In some embodiments, a depth-first search (DFS) topological order of the DAG can be calculated, and each node can be traversed based on the DFS traversal order. This order can support the construction of a solution set in constant time in the special case of the DAG as a tree.

[0092] Taking the fifth Boolean logic network 310 represented by ZDD as an example, in some embodiments, the traversal may be started from the PO node of the fifth Boolean logic network 310. In the fifth Boolean logic network 310, the node The atomic transformation can include the atomic transformation (Atomic Transformation Can be the current node The second atomic transformation) and the atomic transformation (Atomic Transformation Can be based on the current node is the first atomic transformation of the root).

[0093] In the fifth Boolean logic network 310, since the node and nodes For Node When constructing the solution space, in some embodiments, the preceding node set and the node The transformation of itself (i.e., the second atomic transformation) obtains the second set represented by ZDD, and thus the solution space is obtained according to the second set. Depends on node and nodes In some embodiments, the pre-order node (node and nodes )’s solution space.

[0094] Figure 3D A schematic diagram of an exemplary second data structure 330 according to an embodiment of the present application is shown. Figure 3E A schematic diagram of an exemplary third data structure 340 according to an embodiment of the present application is shown.

[0095] Combination Figure 3D and Figure 3E In some embodiments, the node The solution in the node set (e.g., the first preceding node set) may include the nodes and nodes , where the node and nodes The high edges 332 and 334 point to node 1, and the node The lower edge 336 points to the node ,node The low edge 338 of points to node 0. The solution in the node set (e.g., the second preceding node set) may include the nodes and nodes The second data structure 330 is a node represented by ZDD. The third data structure 340 is a node represented by ZDD. In the third data structure 340, the node The high edges 342 and 344 can point to node 1, node The lower edge 346 can point to the node ,node The low edge 348 of can point to node 0.

[0096] In the build node and nodes When the solution space is , the Cartesian product of the first pre-order node set and the second pre-order node set can be calculated to obtain the first set.

[0097] When calculating the Cartesian product, the Cartesian product of the first pre-order node set and the second pre-order node set can be calculated by a non-recursive method. In some embodiments, ordered pairs can be obtained based on the elements in the first pre-order node set and the elements in the second pre-order node set, and the ordered pairs can be stored in a stack, and the ordered pairs in the stack can be looped from the top of the stack to obtain the first set. Computational resources can be saved by non-recursive (stack-friendly) efficient Cartesian product operations.

[0098] Figure 3F A schematic diagram of an exemplary fourth data structure 350 according to an embodiment of the present application is shown.

[0099] like Figure 3F As shown, the fourth data structure 350 may include nodes ,node ,node ,node , node 0 and node 1. The first set can be represented by ZDD. and nodes In some embodiments, after taking the Cartesian product of the first pre-order node set and the second pre-order node set, the nodes and nodes The high edges 342 and 344 point to the node .

[0100] Figure 3G FIG. 3 is a schematic diagram of an exemplary fifth data structure 360 ​​according to an embodiment of the present application. The fifth data structure 360 ​​may be a second set.

[0101] like Figure 3G As shown, the fifth data structure 360 ​​may include nodes ,node ,node ,node ,node ,node , node 0 and node 1.

[0102] After constructing the first set, in some embodiments, the first set can be combined with the second atomic transformation and the first atomic transformation (that is, the first set and the node and nodes ), thereby obtaining a fifth data structure 360. In the fifth data structure 360, the node The high edges 362 and 364 can point to the node ,node The lower edge 366 can point to the node ,node The low edge 368 of can point to node 0.

[0103] It should be noted that the number of nodes and the number of data structures in the above embodiment are only exemplary. In practical applications, more nodes and data structures may also be included, and this application does not limit this. The above-mentioned union operation can also be implemented by non-recursive (stack-friendly) operation, thereby saving computing resources.

[0104] The fifth data structure 360 ​​is a structure represented by ZDD corresponding to the fifth Boolean logic network 310. In some embodiments, the data structures of other nodes in the Boolean logic network can also be constructed using the above embodiments. After multiple data structures of the Boolean logic network are constructed, the multiple data structures can be combined to obtain the solution space of the Boolean logic network. By introducing ZDD as a carrier for effectively (approximately) representing the solution space of the Boolean logic network in a global scope, the constructed solution space can accommodate more solutions, which is conducive to obtaining a better solution.

[0105] When performing a union of multiple data structures, in some embodiments, the output interface node set of the Boolean logic network may be traversed, and the second set and the output interface node set may be merged to obtain a solution space of the Boolean logic network.

[0106] In order to further optimize the memory of the solution space, in some embodiments, according to the second set (fifth data structure 360), traverse along the low edge from the root node to node 0 (for example, the first leaf node) to obtain multiple target nodes. Calculate the target paths from the multiple target nodes to node 1 (for example, the second leaf node), and calculate the number of nodes with a reference count of one in the multiple target nodes, and obtain the solution space according to the target paths and the number of nodes.

[0107] In some embodiments, the ratio calculation deletes the benefit ratio, selects the node with the highest benefit ratio (for example, the target node may include a first target node and a second target node, and if the benefit ratio of the first target node is greater than the benefit ratio of the second target node, the first target node is deleted) and deletes it. After the node with the highest benefit ratio is deleted, the low edge of the previous node of the node with the highest benefit ratio is pointed to the next node of the node with the highest benefit ratio, thereby obtaining a solution space after memory optimization. In this way, the memory of the solution space can be optimized by deleting the node with the highest benefit ratio in the solution space.

[0108] As an optional embodiment, nodes with reference counts of zero in the Boolean logic network may also be deleted to optimize the memory of the solution space of the Boolean logic network.

[0109] The solution space constructed by the method described in the above embodiment can overcome the disadvantage of insufficient exploration of the solution space. At the same time, it can also reduce the dependence on fast and accurate evaluation methods when constructing the solution space, thereby achieving better (closer to the optimal solution) optimization results and faster convergence.

[0110] Figure 4 A flow chart of an exemplary method 400 for optimizing a digital logic circuit according to an embodiment of the present application is shown. The method 400 may include the following steps.

[0111] In step 402, a Boolean logic network (eg, Figure 3B The fifth Boolean logic network 310 in FIG.

[0112] In step 404, it is determined that the current node of the Boolean logic network (eg, Figure 3B Nodes in ) is the first atomic transformation of the root (for example, Figure 3B Atomic transformations in ).

[0113] In step 406, a preceding node set of the first atomic transformation is determined. In view of the characteristics of ZDD and in combination with the reality of the DAG optimization problem, efficient variable encoding can be achieved through the method described in the above embodiment.

[0114] In step 408, according to the preceding node set and the second atomic transformation (for example, Figure 3B Atomic transformations in ), obtains a solution space for optimizing the digital logic circuit, and the second atomic transformation is the atomic transformation of the current node.

[0115] In some embodiments, the step of obtaining a solution space for optimizing the digital logic circuit according to the preceding node set and the second atomic transformation further comprises: obtaining a second set (for example, Figure 3G The fifth data structure 360 ​​in FIG. 3 is a fifth data structure 360 ​​in FIG. 3 ), wherein the second set is represented by a zero-suppressed binary decision diagram; and the solution space is obtained according to the second set. By introducing ZDD as a carrier for effectively (approximately) representing the solution space of the Boolean logic network in a global scope, the constructed solution space can accommodate more solutions, thereby facilitating obtaining a better solution.

[0116] In some embodiments, the pre-order node set includes at least a first pre-order node set and a second pre-order node set, and obtaining the second set according to the pre-order node set and the second atomic transformation further includes: calculating the first pre-order node set (for example, Figure 3D Midpoint ) and the second preceding node set (for example, Figure 3E Midpoint The Cartesian product of the node sets of the first and second atoms is obtained to obtain a first set; and the second set is obtained according to the first set and the second atomic transformation.

[0117] In some embodiments, the calculating of the Cartesian product of the first pre-order node set and the second pre-order node set to obtain the first set further comprises: obtaining an ordered pair according to the elements in the first pre-order node set and the elements in the second pre-order node set; and obtaining the first set based on the ordered pair. Computational resources can be saved by non-recursive (stack-friendly) and efficient Cartesian product operations.

[0118] In some embodiments, obtaining the solution space according to the second set further includes: traversing the output interface node set of the Boolean logic network; and merging the second set and the output interface node set to obtain the solution space.

[0119] In some embodiments, the method further includes: deleting nodes in the Boolean logic network whose reference counts are zero to further optimize the memory of the solution space.

[0120] In some embodiments, the zero-suppression binary decision graph includes a root node (e.g., Figure 3A Node a in the first leaf node (for example, Figure 3A Node 0 in ), the second leaf node (for example, Figure 3A 0) and the lower edge (e.g. Figure 3A The low edge 304 in the ZDD), the obtaining of the solution space according to the second set further includes: according to the second set, traversing from the root node to the first leaf node along the low edge to obtain multiple target nodes; calculating the target paths from the multiple target nodes to the second leaf node; calculating the number of nodes with a reference count of one in the multiple target nodes; and obtaining the solution space according to the target path and the number of nodes. By traversing the nodes in the ZDD along the low edge to find nodes that can be optimized, the memory of the solution space is saved.

[0121] In some embodiments, the multiple target nodes include at least a first target node and a second target node, the target path includes a first target path corresponding to the first target node and a second target path corresponding to the second target node, and obtaining the solution space according to the target path and the number of nodes further includes: obtaining a first benefit ratio of the first target node according to the first target path and the number of nodes; obtaining a second benefit ratio of the second target node according to the second target path and the number of nodes; and in response to the first benefit ratio being greater than the second benefit ratio, deleting the first target node to obtain the solution space. In this way, the memory of the solution space can be optimized by deleting the node with the highest benefit ratio in the solution space.

[0122] The present application provides a method, computer device and storage medium for optimizing digital logic circuits. The method includes: obtaining a Boolean logic network corresponding to the digital logic circuit, determining a first atomic transformation with the current node of the Boolean logic network as the root, determining a set of preceding nodes of the first atomic transformation, and obtaining a solution space for optimizing the digital logic circuit based on the set of preceding nodes and a second atomic transformation, wherein the second atomic transformation is an atomic transformation of the current node. The solution space obtained by the above method can accommodate a large number of different solutions, so that the optimal solution can be obtained among a large number of different solutions, thereby obtaining the best optimization result.

[0123] 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.

[0124] 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.

[0125] Figure 5The schematic diagram of the structure of an exemplary computer device 500 according to an embodiment of the present application is shown. The computer device 500 may include: a first processor 502, a memory 504, a network interface 506, a peripheral interface 508 and a bus 510. The first processor 502, the memory 504, the network interface 506 and the peripheral interface 508 are connected to each other in communication within the device through the bus 510.

[0126] The first processor 502 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. The first processor 502 may be used to perform functions related to the technology described in this application. In some embodiments, the first processor 502 may also include multiple processors integrated into a single logical component. Figure 5 As shown, the first processor 502 may include multiple processors, for example, a second processor 502a, a third processor 502b, and a fourth processor 502c.

[0127] The memory 504 may be configured to store data (eg, instruction sets, computer codes, intermediate data, etc.). Figure 5 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 first processor 502 may also access the stored program instructions and data, and execute the program instructions to operate on the data to be processed. The memory 504 may include a volatile storage device or a non-volatile storage device. In some embodiments, the memory 504 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.

[0128] The network interface 506 can be configured to provide the computer device 500 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 506 can include any number of network interface controllers (NICs), radio frequency modules, transceivers, modems, routers, gateways, adapters, cellular network chips, etc., in any combination.

[0129] The peripheral interface 508 can be configured to connect the computer device 500 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.

[0130] The bus 510 may be configured to transmit information between various components of the computer device 500 (e.g., the first processor 502, the memory 504, the network interface 506, and the peripheral interface 508), such as an internal bus (e.g., a processor-memory bus), an external bus (USB port, PCI-E bus), etc.

[0131] It should be noted that, although the above device only shows the first processor 502, the memory 504, the network interface 506, the peripheral interface 508 and the bus 510, 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.

[0132] 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.

[0133] 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 400 described in any of the above embodiments.

[0134] 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.

[0135] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the method 400 described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0136] 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.

[0137] 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.

[0138] 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.

[0139] 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; determining a first atomic transformation rooted at a current node of the Boolean logic network; Determine a preceding node set of the first atomic transformation; Obtaining a solution space for optimizing the digital logic circuit according to the preceding node set and a second atomic transformation, wherein the second atomic transformation is an atomic transformation of the current node; The atomic transformations are operations that change the area, power consumption, and delay at corresponding nodes and edges of the Boolean logic network; Wherein, the step of obtaining a solution space for optimizing the digital logic circuit according to the preceding node set and the second atomic transformation further comprises: Constructing a solution space of the pre-order nodes in the pre-order node set; Taking a union of the solution space of the preceding node, the second atomic transformation and the first atomic transformation to obtain a second set, wherein the second set is represented by a zero-suppressed binary decision graph; Traversing the output interface node set of the Boolean logic network; The second set and the output interface node set are combined to obtain the solution space.

2. The method according to claim 1, in, The pre-order node set includes at least a first pre-order node set and a second pre-order node set, and the second set is obtained according to the pre-order node set and the second atomic transformation further includes: Calculating the Cartesian product of the first pre-order node set and the second pre-order node set to obtain a first set, where the first set represents a solution space of the pre-order nodes; The second set is obtained according to the first set and the second atomic transformation.

3. The method according to claim 2, in, The calculating the Cartesian product of the first pre-order node set and the second pre-order node set to obtain a first set further includes: Obtaining an ordered pair according to the elements in the first pre-order node set and the elements in the second pre-order node set; Based on the ordered pairs, the first set is obtained.

4. The method according to claim 1, in, The method further comprises: Nodes in the Boolean logic network whose reference counts are zero are deleted.

5. The method according to claim 1, in, The zero-suppression binary decision graph includes a root node, a first leaf node, a second leaf node, and a low edge, and obtaining the solution space according to the second set further includes: According to the second set, traverse along the low edge from the root node to the first leaf node to obtain multiple target nodes; Calculate target paths from the multiple target nodes to the second leaf node; Calculating the number of nodes having a reference count of one among the plurality of target nodes; The solution space is obtained according to the target path and the number of nodes.

6. The method according to claim 5, in, The multiple target nodes include at least a first target node and a second target node, the target path includes a first target path corresponding to the first target node and a second target path corresponding to the second target node, and obtaining the solution space according to the target path and the number of nodes further includes: Obtaining a first revenue ratio of the first target node according to the first target path and the number of nodes; Obtaining a second revenue ratio of the second target node according to the second target path and the number of nodes; In response to the first benefit ratio being greater than the second benefit ratio, deleting the first target node to obtain the solution space.

7. 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 to 6.

8. 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 according to any one of claims 1 to 6.