Function estimation method and function estimation program
A two-stage R-GCN-based method improves function estimation accuracy and generalizability for LSI netlists by refining initial estimates through clustering and matrix generation, enabling estimation of complex circuits.
Patent Information
- Application Number
- JP2022058108
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2022-03-31
- Publication Date
- 2025-10-20
- Estimated Expiration
- 2042-03-31
AI Technical Summary
Existing methods for function estimation in LSI netlists, such as those using R-GCNs, struggle with improving estimation performance on complex circuits and lack generalizability.
A two-stage function estimation method using a first and second GNN, specifically R-GCN, where the first stage generates a graph representation and performs initial function estimation, followed by clustering and generating new matrices for input into a second R-GCN to refine the estimation, enabling hierarchical function estimation.
Enhances the generalizability and accuracy of function estimation for LSI netlists by leveraging the output of the first stage for training in subsequent stages, allowing estimation of more complex and large-scale circuits.
Smart Images

Figure 0007756590000001 
Figure 0007756590000002 
Figure 0007756590000003
Abstract
Description
[Technical Field]
[0001] The present disclosure relates to a function estimation method and a function estimation program for performing function estimation based on a netlist used in the logic design of an LSI, using a GNN (Graph Neural Network), which is a network having a graph structure. [Background technology]
[0002] As a design technology for semiconductor integrated circuits (hereinafter referred to as LSI), a hardware description language (HDL) is often used, which has good development efficiency and is not limited to semiconductor vendors.
[0003] In this case, logic synthesis is used to automatically convert the circuit design into a netlist that represents the connections between the components to be implemented in the circuit after the circuit design is completed using HDL. The HDL description level at which logic synthesis is possible is called the Register Transfer Level (RTL).
[0004] In response to this, there is a demand for extracting functions implemented in netlists or converting netlists to RTL, with the aim of utilizing past design assets for which RTL does not exist.However, there is no established technology that can automatically abstract and convert the descriptions of netlists, which differ for each semiconductor vendor, rather than simply converting the language, and so netlists have mainly been read and interpreted manually while referring to documentation.
[0005] To address this issue, there is a method for estimating functions implemented in RTL (see, for example, Patent Document 1). Patent Document 1 introduces a method in which a neural network (hereinafter referred to as NN) is used to learn a judgment function, then function estimation is performed, and the circuit data of the matching function is replaced.
[0006] However, Patent Document 1 focuses on the estimation of functions learned as conversion rules and circuit replacement. Therefore, there is no mechanism for estimating functions that are combinations of learned functions. Therefore, it is necessary to manually train each function to be judged.
[0007] In order to solve such problems, the present applicant has proposed a function estimation method and a function estimation program that can efficiently perform function estimation on an LSI netlist (see, for example, Patent Document 2). [Prior art documents] [Patent documents]
[0008] [Patent Document 1] Japanese Patent Application Publication No. 4-199369 [Patent Document 2] Patent Publication No. 2021-89722 Summary of the Invention [Problem to be solved by the invention]
[0009] In Patent Document 2, a circuit function estimation method is proposed by graphing a gate-level netlist and inputting it into R-GCN, and function estimation is realized for combinational circuits composed of simple arithmetic operation functions such as adders, subtractors, multipliers, and multiplexers.
[0010] Here, R-GCN (Relational Graph Convolutional Network) is a type of GNN, a type of convolutional neural network model that targets graph structures consisting of nodes and edges, and has the characteristic that it can input directed graphs.
[0011] However, with regard to the technique disclosed in Patent Document 2, it is desired to improve the estimation performance so that function estimation can be performed on more complex circuits.
[0012] The present disclosure has been made to solve such problems, and aims to provide a function estimation method and a function estimation program that can improve the generalizability of function estimation for LSI netlists compared to conventional techniques. [Means for solving the problem]
[0013] A function estimation method according to the present disclosure is a function estimation method executed by a computer to estimate a function based on a netlist used in the logic design of an LSI using a GNN, which is a network having a graph structure, and includes a first estimation step of performing a first function estimation by using a first GNN based on the netlist, and a second estimation step of performing a second function estimation by using a second GNN based on the estimation result of the first estimation step, in which the second estimation step performs clustering on each node of an output graph, which is the estimation result of the first estimation step, and generates a matrix representing the type of each node after clustering as input data for the second GNN, and performs the second function estimation. The first estimation step includes a first step of generating a graphed netlist by converting the netlist into a graph representation consisting of nodes and edges; a second step of generating a feature matrix that expresses the type of each node in the graphed netlist and an adjacency matrix that expresses the connection relationships at each node in the netlist; a third step of inputting the feature matrix and the adjacency matrix into a first GNN and performing a calculation using the connection relationships of the nodes and edges to perform a first function estimation, and generating, as an estimation result, an output graph that reflects node classification according to the result of the first function estimation for each node in the graphed netlist; and the second estimation step includes a fourth step of clustering each node in the output graph that is the estimation result, and generating, as input data to be input into a second GNN, a new feature matrix that expresses the type of each node after clustering and a new adjacency matrix that expresses the connection relationships at each node after clustering; and a fifth step of inputting the new feature matrix and the new adjacency matrix into the second GNN and performing a calculation using the connection relationships of the nodes and edges after clustering to perform a second function estimation. It is something. Furthermore, a function estimation method according to the present disclosure is a function estimation method executed by a computer to estimate a function based on a netlist used in the logic design of an LSI using a GNN, which is a network having a graph structure, and includes a first estimation step of performing a first function estimation using a first GNN based on the netlist, and a second estimation step of performing a second function estimation using a second GNN based on the estimation result of the first estimation step, wherein the second estimation step performs clustering on each node of an output graph that is the estimation result of the first estimation step, generates a matrix representing the type of each node after clustering as input data for the second GNN, and performs the second function estimation, and when an R-GCN, which is a network with a folded graph structure, is used as the GNN, the first estimation step of performing the first function estimation using the first R-GCN as the first GNN based on the netlist includes a first step of generating a graphed netlist by converting the netlist into a graph representation consisting of nodes and edges, and a feature matrix representing the type of each node in the graphed netlist. a second step of generating three types of adjacency matrices that represent the connection relationships and input / output relationships at each node in the netlist; a third step of inputting the feature matrix and the three types of adjacency matrices into a first R-GCN and performing a graph convolution operation using the connection relationships of the nodes and edges to perform a first function estimation, and generating an output graph as an estimation result that reflects the node classification according to the result of the first function estimation for each node in the graphed netlist; and a second step of performing a second function estimation by using the second R-GCN as a second GNN based on the estimation result of the first estimation step, in which clustering is performed on each node of the output graph that is the estimation result, and generating a new feature matrix that represents the type of each node after clustering and three new types of adjacency matrices that represent the connection relationships and input / output relationships at each node after clustering as input data to be input to the second R-GCN; and a fourth step of inputting the new feature matrix and the new three types of adjacency matrices into the second R-GCN and performing a graph convolution operation using the connection relationships of the nodes and edges after clustering,and a fifth step of executing a second function estimation, wherein the three types of adjacency matrices generated in the second step are composed of a first adjacency matrix indicating the connection relationships between nodes in the graphed netlist regarding inputs, a second adjacency matrix indicating an identity matrix with each node in the graphed netlist as an element, and a third adjacency matrix indicating the connection relationships between nodes in the graphed netlist regarding outputs, and the three new types of adjacency matrices generated in the fifth step are composed of a new first adjacency matrix indicating the connection relationships between nodes in the inputs of each node after clustering, a new second adjacency matrix indicating an identity matrix with each node after clustering as an element, and a new third adjacency matrix indicating the connection relationships between nodes in the clustered nodes regarding outputs. In addition, the function estimation method of the present disclosure is a function estimation method executed by a computer to estimate functions based on a netlist used in the logic design of an LSI using a GNN, which is a network having a graph structure, and includes a first estimation process of performing a first function estimation using a first GNN based on the netlist, and a second estimation process of performing a second function estimation using a second GNN based on the estimation result of the first estimation process, in which the second estimation process performs clustering for each node of the output graph that is the estimation result of the first estimation process, generates a matrix representing the type at each node after clustering as input data for the second GNN, and performs the second function estimation, in which the computer estimates arithmetic operation functions included in the netlist as the first function estimation in the first estimation process, and estimates upper-level circuit functions as the second function estimation in the second estimation process based on the estimation result of the arithmetic operation functions.
[0014] Furthermore, a function estimation program according to the present disclosure is a function estimation program executed by a computer to estimate a function based on a netlist used in the logic design of an LSI by using a GNN, which is a network having a graph structure, and causes the computer to function as a first estimation means for performing a first function estimation by using a first GNN based on the netlist, and a second estimation means for performing a second function estimation by using a second GNN based on an estimation result of the first estimation means, the first estimation means including a first step of generating a graphed netlist by converting the netlist into a graph representation consisting of nodes and edges, a second step of generating a feature matrix representing the type of each node in the graphed netlist and an adjacency matrix representing the connection relationship at each node in the netlist, and a second step of generating a feature matrix and an adjacency matrix representing the connection relationship at each node in the netlist. The second estimation means has a third step of inputting the tangent matrix into a first GNN and performing an operation using the connection relationships of the nodes and edges to perform a first function estimation, and generating an output graph as an estimation result that reflects the node classification based on the results of the first function estimation for each node in the graphed netlist; the second estimation means has a fourth step of clustering each node in the output graph that is the estimation result, and generating a new feature matrix that represents the type of each node after clustering and a new adjacency matrix that represents the connection relationships of each node after clustering, as input data to be input to the second GNN; and a fifth step of inputting the new feature matrix and the new adjacency matrix into the second GNN and performing an operation using the connection relationships of the nodes and edges after clustering to perform a second function estimation. [Effects of the Invention]
[0015] According to the present disclosure, it is possible to obtain a function estimation method and a function estimation program that can improve the generalizability of function estimation for an LSI netlist compared to conventional techniques. [Brief explanation of the drawings]
[0016] [Figure 1]FIG. 2 is an explanatory diagram showing a processing flow of the function estimation method according to the first embodiment of the present disclosure. [Figure 2] FIG. 2 is a diagram showing an overall flow of two different processing flows in the function estimation method according to the first embodiment of the present disclosure. [Figure 3] FIG. 2 is an explanatory diagram showing input, processing, and output related to an R-GCN2 when two R-GCNs are connected in series in the first embodiment of the present disclosure. [Figure 4] FIG. 10 is an explanatory diagram showing the merits of estimation accuracy when two R-GCNs are connected in series in the first embodiment of the present disclosure. [Figure 5] FIG. 10 is an explanatory diagram showing a method for generating an input graph that serves as a basis for a matrix used in R-GCN2 when instances are present, in the first embodiment of the present disclosure. [Figure 6] FIG. 10 is an explanatory diagram illustrating an image of taking a majority vote within each instance for the estimation results obtained by node classification using R-GCN1 in the first embodiment of the present disclosure. [Figure 7] FIG. 2 is an explanatory diagram showing a method for generating an instance matrix S prior to calculating a new adjacency matrix A′ in the first embodiment of the present disclosure. [Figure 8] FIG. 2 is an explanatory diagram showing a method for generating a new adjacency matrix A′ using an instance matrix S in the first embodiment of the present disclosure. [Figure 9] FIG. 2 is an explanatory diagram showing a method for generating a new feature matrix X′ from a clustered graph in the first embodiment of the present disclosure. [Figure 10] FIG. 2 is an explanatory diagram showing a method for generating a new correct matrix Y′ from the application of a circuit shown in a graph after clustering in the first embodiment of the present disclosure. [Figure 11] FIG. 10 is an explanatory diagram showing a method for generating an input graph for R-GCN2 when there are no instances in the first embodiment of the present disclosure. [Figure 12] FIG. 2 is an explanatory diagram relating to a merge process according to the first embodiment of the present disclosure. [Figure 13]FIG. 2 is a diagram illustrating a first specific example of a connection configuration according to the first embodiment of the present disclosure. [Figure 14] FIG. 10 illustrates a second specific example of a connection configuration according to the first embodiment of the present disclosure. DETAILED DESCRIPTION OF THE INVENTION
[0017] Hereinafter, preferred embodiments of the function estimation method and the function estimation program of the present disclosure will be described with reference to the drawings. The present disclosure relates to a technology related to deep learning in general that handles graphs, and is characterized by performing classification at the node level in a GNN.
[0018] In the following first embodiment, a function estimation method executed by a computer will be described, using an R-GCN as a GCN, which is a network with a convoluted graph structure, as a specific example of a GNN, to estimate functions based on a netlist used in the logic design of an LSI. In particular, the present disclosure provides a method for performing further function estimation in a later stage by utilizing the results of function estimation in a previous stage, thereby improving the generalizability of function estimation for LSI netlists.
[0019] Embodiment 1 Fig. 1 is an explanatory diagram showing a processing flow of a function estimation method according to the first embodiment of the present disclosure. A function estimation method for an application netlist using an R-GCN according to the first embodiment will be described with reference to Fig. 1. Fig. 1 shows a series of flows from the application netlist to the final estimation of the application's function.
[0020] As shown in Fig. 1, the function estimation method according to the first embodiment is roughly divided into a first estimation step 10 and a second estimation step 20 that uses the estimation result from the first estimation step 10. The first estimation step 10 performs a first function estimation by using a first R-GCN based on a netlist. More specifically, the first estimation step 10 includes the following steps:
[0021] First step: A graph-based netlist is generated by converting the netlist into a graph representation consisting of nodes and edges. Second step: A step of generating a feature matrix that represents the type of each node in the graphed netlist, and three types of adjacency matrices that represent the connection relationships and input / output relationships at each node in the netlist.
[0022] Third step: The feature matrix and the three types of adjacency matrices are input into the first R-GCN, and a graph convolution operation is performed using the node and edge connectivity relationships to perform the first function estimation, and an output graph is generated as the estimation result, reflecting the node classification based on the results of the first function estimation for each node in the graphed netlist.
[0023] The detailed processing contents of this first estimation step 10 are disclosed in Patent Document 2, and a detailed description thereof will be omitted here.
[0024] The second estimation step 20 performs a second function estimation by using a second R-GCN based on the estimation result of the first estimation step 10. This second estimation step 20 is a step newly added in the present disclosure to improve the generalizability of the function estimation, and includes the following steps.
[0025] Fourth step: Clustering is performed for each node in the output graph, which is the estimation result, and a new feature matrix and three new adjacency matrices are generated as input data to be input into the second R-GCN. Fifth step: The new feature matrix and the three new adjacency matrices are input into the second R-GCN, and a graph convolution operation is performed using the node and edge connections after clustering to perform second function estimation.
[0026] The new feature matrix is a matrix that represents the type of each node after clustering, and the new three types of adjacency matrices are matrices that represent the connection relationships and input / output relationships of each node after clustering, and details will be described later.
[0027] 1 illustrates a case in which an arithmetic operation function included in a netlist is estimated as a first function estimation in a first estimating step 10, and an application function as a circuit function in a higher layer is estimated as a second function estimation based on the estimation result of the arithmetic operation function in a second estimating step 20. Note that the functions estimated in the first estimating step 10 and the functions estimated in the second estimating step 20 are not limited to this example.
[0028] 2 is a diagram showing the overall flow of two different processing flows in the function estimation method according to the first embodiment of the present disclosure. Note that in FIGS. 1 and 2, the notation R-GCN1 refers to the first R-GCN used in the first estimation step 10, and the notation R-GCN2 refers to the second R-GCN used in the second estimation step 20.
[0029] According to the function estimation method of the first embodiment shown in FIGS. 1 and 2, by connecting multiple R-GCNs in series, it is possible to perform function estimation of a netlist of a more complex and large-scale LSI, which was not possible with conventional techniques.
[0030] In Figure 2, two processing flows are shown for connecting R-GCN1 and R-GCN2 in series: with and without instances. Here, with instances means that functions have already been separated into modules. In other words, the clustering process merely determines boundaries according to the instance names written in the gate-level netlist.
[0031] On the other hand, "without instances" means that the functions are not segmented in module units. Therefore, it is impossible to distinguish the function boundaries just by looking at the netlist.
[0032] In the function estimation method according to the first embodiment, when inputting the estimation result of the previous R-GCN1 to the subsequent R-GCN2, it is characterized by automatically discriminating (clustering) the function boundaries. Therefore, first, the merits of connecting two R-GCNs in series will be explained, and then a series of processes including the clustering process in the case of having instances and a series of processes including the clustering process in the case of not having instances will be explained.
[0033] <Regarding the merits of connecting two R-GCNs in series> FIG. 3 is an explanatory diagram showing the input, processing, and output related to R-GCN2 when two R-GCNs are connected in series in the first embodiment of the present disclosure. In FIG. 3(A), the state where the estimation result of the arithmetic operation function by the first-stage R-GCN1 is subjected to clustering and converted into an input graph to R-GCN2 is shown. Details of this conversion process will be described later.
[0034] In FIG. 3(A), ADD, MUL, and FF are estimated as three arithmetic operation functions by the first-stage R-GCN1, and an input graph obtained by clustering the estimation results is shown. Specifically, as a result of clustering, a state aggregated into 13 nodes and connection relationships is shown.
[0035] In FIG. 3(B), the input graph shown in FIG. 3(A) is input to the second-stage R-GCN2, and an application function as a higher-level circuit function is estimated based on the estimation result of the arithmetic operation function, and the state where Result2 is obtained as the output is shown. Specifically, for 13 nodes, a state where FIR, IIR, and FFT are estimated as three application functions is shown.
[0036] Figure 3(C) shows the state in which FIR is finally obtained as the estimated circuit function of the upper layer by taking a majority vote for the 13 nodes in Result2 shown in Figure 3(B).
[0037] As shown in Figure 3, connecting two R-GCNs in series has the advantage of enabling hierarchical function estimation. Furthermore, connecting R-GCNs in series also has the advantage of improving estimation accuracy, which will be explained using Figure 4.
[0038] 4A and 4B are explanatory diagrams showing the merits of the estimation accuracy when two R-GCNs are connected in series in the first embodiment of the present disclosure. FIG. 4A shows Result1, which is the estimation result by R-GCN1 in the first stage. FIG. 4B shows the result of clustering Result1 shown in FIG. 4A.
[0039] Figure 4(B) shows an example in which, of the 13 nodes, node n1 is originally MUL but is clustered as ADD, and node n2 is originally ADD but is clustered as MUL, resulting in misjudgments in two places in the input graph obtained by clustering.
[0040] Figure 4(C) shows Result2, which is the estimation result obtained by the second-stage R-GCN2 using the input graph of 13 nodes in Result1 after clustering shown in Figure 4(B) as input. Specifically, it shows the state in which Result2 is obtained as the estimation result by performing learning by the second-stage R-GCN2 for each misclassified result included in the input graph.
[0041] As shown in Figure 4, the estimation result (Result1) in the first stage had some misjudgments in the estimation of arithmetic operation functions such as MUL and ADD. However, by training these misjudgments in the R-GCN2 in the second stage, it is expected that the estimation accuracy of the final application functions will improve.
[0042] In other words, by linking the output of each layer with the label of the upper layer, it is possible to take into account the quirks of the function estimation method in the first stage and perform training in the second stage. As a result, by connecting R-GCNs in multiple stages in series, even if the estimation result in the previous stage is incorrect, the incorrect result can be used as training data in the subsequent stage, making it possible to improve accuracy end-to-end.
[0043] <Regarding the series of processes in the second estimation step when instances are present> Next, a detailed description will be given of the second inference step 20 in which a second function is inferred by using the R-GCN2 based on the inference result of the first inference step 10 using the R-GCN1 when an instance is present.
[0044] 5A and 5B are explanatory diagrams showing a method for generating an input graph that is the basis of a matrix used in R-GCN2 when instances are present, according to the first embodiment of the present disclosure. Fig. 5A shows a state in which the range of each arithmetic operation circuit is written as an instance name in a gate-level netlist.
[0045] Figure 5(B) shows the state where logic gates are classified into seven instances based on the instance names in the netlist. Specifically, Figure 5(B) shows the state where seven circuits, FF1, FF2, MUL1, MUL2, MUL3, ADD1, and ADD2, are estimated as instances as the estimation result of R-GCN1, and each instance contains multiple nodes as logic gates.
[0046] Figure 5(C) shows the state in which an input graph with arithmetic operation circuits as nodes is obtained by clustering the estimation results by R-GCN1 shown in Figure 5(B). Specifically, Figure 5(C) shows the input graph clustered into seven nodes consisting of two FFs, three MULs, and two ADDs.
[0047] Note that the nodes contained in each instance in Figure 5(B) are not necessarily unified into one type. Therefore, by taking a majority vote on the nodes classified in each instance and assigning the same classification to all nodes in each instance, the input graph shown in Figure 5(C) can be obtained.
[0048] An image of taking a majority vote will be described with reference to Fig. 6. Fig. 6 is an explanatory diagram showing an image of taking a majority vote within each instance for the estimation results obtained by node classification using R-GCN1 in the first embodiment of the present disclosure.
[0049] In Figure 6(A), the nodes are classified into five circuits, ADD1, ADD2, MUL1, SUB1, and FF1, based on the instance names written in the netlist, and for the three nodes, nodes 3 to 5, classified as MUL1, nodes 3 and 4 are estimated as MUL, and node 5 is estimated as ADD.
[0050] Figure 6(B) shows that node 5 has changed from ADD to MUL by taking a majority vote among the three nodes classified into instance MUL1. By performing this majority vote process, the nodes within each instance in the inference results classified by R-GCN1 are unified as a single arithmetic operation with the same function.
[0051] Next, we will explain how to generate the new adjacency matrix A', the new feature matrix X', and the new correct matrix Y' as three types of matrices used in R-GCN2. Here, we will explain a specific example in which the three types of matrices are generated based on the graph after the majority vote process shown in Figure 6(B).
[0052] 7 is an explanatory diagram showing a method for generating an instance matrix S prior to calculating a new adjacency matrix A' in the first embodiment of the present disclosure. Here, the instance matrix S corresponds to a matrix describing the instance to which each node belongs. FIG. 7(A) shows the graph after the majority voting process shown in FIG. 6(B). Specifically, the graph shows a total of nine nodes classified into five instances, ADD1, ADD2, MUL1, SUB1, and FF1.
[0053] Figure 7(B) shows an instance matrix S with five instances in the columns and nine nodes in the rows. For example, ADD1 includes nodes 1 and 2, so in the first column of the instance matrix S, the first and second rows are set to 1, and the other rows are set to 0.
[0054] Next, a method for generating a new adjacency matrix A' will be described. FIG. 8 is an explanatory diagram showing a method for generating a new adjacency matrix A' using the instance matrix S in the first embodiment of the present disclosure. In FIG. 8(A), the output adjacency matrix Aout used in the R-GCN1 in the first stage and the instance matrix S shown in FIG. 7(B) are used to generate a new adjacency matrix A'. S T ×Aout×S The method for obtaining new adjacency matrices Aout', Ain', and Aown' based on the matrices obtained as a result of the above calculation is shown. Here, the new adjacency matrix Ain' corresponds to a new first adjacency matrix, the new adjacency matrix Aown' corresponds to a new second adjacency matrix, and the new adjacency matrix Aout' corresponds to a new third adjacency matrix.
[0055] Specifically, in FIG. 8(A), S T A new adjacency matrix Aout' is generated by rewriting the matrix obtained as a result of the operation ×Aout ×S, setting the diagonal elements to 0 and all non-diagonal elements other than 0 to 1. A new adjacency matrix Ain' is generated by transposing the new adjacency matrix Aout'. Furthermore, a new adjacency matrix Aown' is generated by setting only the diagonal elements to 1 as a unit matrix.
[0056] Figure 8(B) shows the graph after the majority voting process shown in Figure 6(B) and Figure 7(A). Figure 8(C) shows the state in which a graph obtained after clustering from the graph in Figure 8(B) corresponds to the new adjacency matrix Aout', new adjacency matrix Ain', and new adjacency matrix Aown' shown in Figure 8(A). In this way, by performing the processes shown in Figures 7 and 8, a new adjacency matrix A' consisting of the three matrices, new adjacency matrix Aout', new adjacency matrix Ain', and new adjacency matrix Aown', is generated.
[0057] Next, a method for generating the new feature matrix X' will be described. Fig. 9 is an explanatory diagram showing a method for generating the new feature matrix X' from a clustered graph in the first embodiment of the present disclosure. Fig. 9(A) shows the clustered graph shown in Fig. 8(C) above.
[0058] Figure 9(B) shows a state in which a new feature matrix X' has been generated from the clustered graph shown in Figure 9(A). Specifically, the new feature matrix X' is generated by setting the five arithmetic operations ADD, SUB, MUL, MUX, and FF as columns and node 1' to node 5', which are the five nodes in the clustered graph, as rows, and setting 1 to the elements corresponding to the clustered graph shown in Figure 9(A).
[0059] Next, a method for generating the correct matrix Y' will be described. Fig. 10 is an explanatory diagram showing a method for generating a new correct matrix Y' from the application of the circuit shown in the graph after clustering in the first embodiment of the present disclosure. Fig. 10(A) shows the graph after clustering shown in Fig. 8(C) above.
[0060] Fig. 10(B) shows a state in which a new correct matrix Y' is generated as an FIR from the application of the circuit shown in the graph after clustering shown in Fig. 9(A). Note that a specific method for generating the new correct matrix Y' is disclosed in Patent Document 2, and a detailed description thereof will be omitted.
[0061] As described above, the computer can execute the second estimation step in the case where instances are present by executing the series of processes described with reference to Figures 5 to 10. Specifically, based on the estimation results from the first estimation step 10, the computer inputs a new feature matrix X' and three new adjacency matrices Aout', Ain', and Aown' into the second R-GCN, and executes a graph convolution operation using the connection relationships of the nodes and edges after clustering, thereby executing the second function estimation.
[0062] <Regarding the series of processes in the second estimation step when there are no instances> Next, a detailed description will be given of the second inference step 20 in which a second function is inferred by using the R-GCN2 based on the inference result of the first inference step 10 using the R-GCN1 when there are no instances.
[0063] When there are no instances, an input graph that serves as input for R-GCN2 is generated by performing clustering processing based on the output graph, which is the node classification result obtained by R-GCN1, and three matrices used in R-GCN2, namely a new adjacency matrix A', a new feature matrix X', and a new correct answer matrix Y', are generated based on the input graph. In other words, a new adjacency matrix A', a new feature matrix X', and a new correct answer matrix Y' are generated as matrices that represent the types of each node after clustering.
[0064] 11 is an explanatory diagram showing a method for generating an input graph for R-GCN2 when there are no instances in the first embodiment of the present disclosure. Note that in FIG. 11, for the sake of simplicity, an undirected graph is shown between nodes, but the smoothing process and merging process described below can also be applied to a directed graph.
[0065] To generate an input graph for R-GCN2 when there are no instances, a smoothing process is performed as a preprocessing on the output graph, which is the node classification result obtained by R-GCN1, and then a clustering process is performed on the smoothed graph.
[0066] Fig. 11(A) shows an example of an output graph that is the node classification result obtained by R-GCN1, showing that 12 nodes are classified into one of four types of arithmetic operations. Furthermore, in Fig. 11(A), three nodes n1 to n3, which have arithmetic operations different from any of their neighboring nodes and are classified as arithmetic operations that are isolated from their surroundings, are identified as isolated nodes by using squares.
[0067] Figure 11(B) shows the graph after smoothing processing has been performed on the three isolated nodes included in the graph shown in Figure 11(A). The smoothing processing corresponds to the process of removing isolated nodes based on a comparison of the functions of adjacent nodes, and is performed according to the following two rules 1 and 2. Rule 1: By taking a majority vote on the classification results of the nodes adjacent to itself, the classification of the isolated node is rewritten to the most popular classification, thereby performing smoothing. Rule 2: If the rule does not allow a single classification with the same function to be identified by majority vote, the classification of the isolated node will remain as it is.
[0068] In FIG. 11(B), rule 1 holds for node n1, so a smoothing process is performed to rewrite the node classification, while rule 2 holds for nodes n2 and n3, so the node classification remains the same.
[0069] Figure 11(C) shows the graph after merging the nodes with the same function as the graph after the smoothing process shown in Figure 11(B) has been performed. The merging process is performed according to Rule 3 below. Rule 3: Adjacent nodes that are classified into the same function are merged.
[0070] In FIG. 11(C), the 12 nodes after the smoothing process in FIG. 11(B) are merged in accordance with Rule 3, and are consolidated into a graph consisting of 6 nodes.
[0071] The merge process will be further described with reference to Fig. 12. Fig. 12 is an explanatory diagram of the merge process according to the first embodiment of the present disclosure. The merge process is executed in accordance with the following steps 1 to 4.
[0072] Step 1: Find one pair of adjacent nodes that have the same classification. Step 2: Add one equivalent node to one node pair having the same classification obtained in step 1, and add the connection relationship with the adjacent node in the one node pair having the same classification. Step 3: Delete one node pair that has the same classification obtained in step 1. Step 4: Repeat steps 1 to 3 for adjacent nodes until there are no more node pairs with the same classification.
[0073] 12(A) shows an example of an output graph that is a node classification result obtained by R-GCN1, which is the same graph as that shown in FIG. 11(A), with numbers 1 to 12 added to identify the 12 nodes. Furthermore, FIG. 12(A) shows a case where, by performing procedure 1, node 1 and node 2 are determined as a node pair having the same classification.
[0074] FIG. 12(B) shows a state in which step 2 is performed, and a node 1' equivalent to the node pair is added.
[0075] FIG. 12(C) shows a state in which, as a result of step 3 being executed, the node pair of node 1 and node 2 having the same classification is deleted and replaced with node 1'.
[0076] Figure 12(D) shows the final state where the merge process of steps 1 to 3 is repeated according to step 4, resulting in six nodes, which is the same as the graph shown in Figure 11(C) above.
[0077] As a result of repeating steps 1 to 4, as shown in Figure 12(D), nodes 1 to 4 are merged as node 4', nodes 5 and 6 are merged as node 6', nodes 7 and 8 are merged as node 7', and nodes 9 and 10 are merged as node 9', while nodes 11 and 12 remain as they are because they do not form a node pair with the same classification as their adjacent nodes.
[0078] As described above, according to the first embodiment, a first function estimation is performed using a first R-GCN in a first estimation step, which is the first stage, and a second function estimation is performed using a second R-GCN in a second estimation step, which is the subsequent stage, based on the estimation result of the first estimation step. With such a configuration, it is possible to estimate circuit functions in higher layers, thereby realizing hierarchical function estimation.
[0079] Furthermore, by linking the output of each layer with the label of the upper layer, it is possible to take into account the quirks of the function estimation method in the first stage and perform training in the second stage. In other words, by adopting a configuration in which R-GCNs are connected in series in multiple stages, even if the estimation result in the previous stage is incorrect, the incorrect result can be used as training data in the subsequent stage, making it possible to improve accuracy end-to-end.
[0080] In other words, by connecting multiple R-GCNs in series, it becomes possible to perform functional estimation of netlists for more complex and large-scale LSIs, which was not possible with conventional technology.
[0081] Furthermore, according to the function estimation method of the present disclosure, it is possible to perform clustering processing on the estimation results of the first estimation step, both in the case where there are instances whose cluster boundaries are known from the netlist, and in the case where there are no instances whose cluster boundaries are unknown from the netlist. In particular, even in the case where there are no instances, it is possible to automatically determine the boundaries of functions based on the output graph of the previous stage and perform clustering.
[0082] Therefore, according to the first embodiment, it is possible to realize a function estimation method and a function estimation program that can improve the generalizability of function estimation for an LSI netlist compared to the conventional techniques.
[0083] In the first embodiment described above, a two-layer connection configuration in which two R-GCNs are connected in series has been described, but the function estimation method and function estimation program according to the present disclosure are not limited to a two-layer connection configuration. Fig. 13 is a diagram showing a first specific example of a connection configuration according to the first embodiment of the present disclosure.
[0084] Fig. 13 shows an example of a serial connection configuration in which two layers are expanded to n layers, which is three or more layers. The specific example shown in Fig. 13 has an n-layer configuration in which layers 1 to n are stacked in order. When i is an integer greater than or equal to two, an input data set for the ith layer R-GCN is created from the output of the (i-1)th layer R-GCN, thereby achieving the same effect as that obtained with the two-layer connection configuration.
[0085] Fig. 14 is a diagram illustrating a second specific example of a connection configuration according to the first embodiment of the present disclosure. As shown in Fig. 14, even when a series-parallel configuration is adopted in which a plurality of hierarchical series connection configurations are connected in parallel, it is possible to achieve the same effect as that obtained by the two-tier connection configuration.
[0086] Furthermore, in the above-mentioned first embodiment, a function estimation method including a first estimation step and a second estimation step has been described in detail, but it is also possible to realize a function estimation program that causes a computer to function as a first estimation means that performs a first function estimation by using a first R-GCN based on a netlist, and a second estimation means that performs a second function estimation by using a second R-GCN based on the estimation result of the first estimation means.
[0087] In addition, in the above-described first embodiment, a specific example has been described in which an R-GCN is used as a GCN, which is a network with a convoluted graph structure. However, the present disclosure is applicable to deep learning in general that handles graphs, and is characterized by performing classification at the node level in a GNN, which is a higher-level concept that includes a GCN. [Explanation of symbols]
[0088] 10 first estimation step, 20 second estimation step, S instance matrix, Ain' new adjacency matrix (new first adjacency matrix), Aown' new adjacency matrix (new second adjacency matrix), Aout' new adjacency matrix (new third adjacency matrix).
Claims
1. A function estimation method executed by a computer for estimating a function based on a netlist used in an LSI logic design using a GNN, which is a network having a graph structure, comprising: a first estimation step of performing a first function estimation by using a first GNN based on the netlist; a second estimation step of performing a second function estimation by using a second GNN based on the estimation result of the first estimation step; Equipped with The second estimation step Clustering is performed on each node of the output graph that is the estimation result of the first estimation step, a matrix representing the type of each node after clustering is generated as input data for the second GNN, and the second function estimation is performed; The first estimation step includes: a first step of generating a graphed netlist by converting the netlist into a graph representation consisting of nodes and edges; a second step of generating a feature matrix representing the type of each node in the graphed netlist and an adjacency matrix representing the connection relationship of each node in the netlist; a third step of inputting the feature matrix and the adjacency matrix into the first GNN, and executing a calculation using the connection relationships between the nodes and the edges to execute the first function estimation, and generating, as the estimation result, an output graph that reflects node classification according to the result of the first function estimation for each node in the graphed netlist; and The second estimation step includes: A fourth step of performing clustering on each node of the output graph, which is the estimation result, and generating, as the input data to be input to the second GNN, a new feature matrix representing the type of each node after clustering and a new adjacency matrix representing the connection relationship of each node after clustering; a fifth step of inputting the new feature matrix and the new adjacency matrix into the second GNN and performing an operation using the connection relationships of the nodes and edges after clustering, thereby performing the second function estimation; A function estimation method having the following.
2. When the boundaries of the clusters are known from the netlist, the computer: In the fourth step, The clustering is performed by taking a majority vote of the estimation results of each node for each cluster based on the netlist for the node classification results of the output graph, thereby assigning the same classification to all nodes in each cluster, generating the new adjacency matrix, and generating a new feature matrix representing the type of each node in the matrix. The function estimation method according to claim 1 .
3. If the boundaries of the clusters are unknown from the netlist, the computer: In the fourth step, For each node in the output graph, perform a smoothing process that removes isolated nodes based on a functional comparison of adjacent nodes; The clustering is performed by performing a merge process on adjacent nodes with the same function for each node of the output graph after the smoothing process is performed; Generate the new feature matrix that represents the type of each node after the clustering, and the new adjacency matrix that represents the connection relationship of each node after the clustering. The function estimation method according to claim 1 .
4. A function estimation method executed by a computer for estimating a function based on a netlist used in an LSI logic design using a GNN, which is a network having a graph structure, comprising: a first estimation step of performing a first function estimation by using a first GNN based on the netlist; a second estimation step of performing a second function estimation by using a second GNN based on the estimation result of the first estimation step; Equipped with The second estimation step Clustering is performed on each node of the output graph that is the estimation result of the first estimation step, a matrix representing the type of each node after clustering is generated as input data for the second GNN, and the second function estimation is performed; When an R-GCN, which is a network with a folded graph structure, is used as the GNN, The first estimation step of performing the first function estimation by using a first R-GCN as the first GNN based on the netlist includes: a first step of generating a graphed netlist by converting the netlist into a graph representation consisting of nodes and edges; a second step of generating a feature matrix representing the type of each node in the graphed netlist, and three types of adjacency matrices representing the connection relationships and input / output relationships of each node in the netlist; a third step of inputting the feature matrix and the three types of adjacency matrices into the first R-GCN, and executing a graph convolution operation using the connection relationships between the nodes and the edges to execute the first function estimation, and generating an output graph as the estimation result, which reflects node classification according to the result of the first function estimation for each node in the graphed netlist; and The second estimation step of performing the second function estimation by using a second R-GCN as the second GNN based on the estimation result of the first estimation step includes: a fourth step of clustering each node of the output graph, which is the estimation result, and generating, as the input data to be input to the second R-GCN, a new feature matrix representing the type of each node after clustering and three new adjacency matrices representing the connection relationship and input / output relationship of each node after clustering; a fifth step of inputting the new feature matrix and the new three types of adjacency matrices into the second R-GCN and performing a graph convolution operation using the connection relationships of the nodes and edges after clustering, thereby performing the second function estimation; and the three types of adjacency matrices generated in the second step are composed of a first adjacency matrix indicating a connection relationship between nodes in the graphed netlist with respect to inputs, a second adjacency matrix indicating an identity matrix with each node in the graphed netlist as an element, and a third adjacency matrix indicating a connection relationship between nodes in the graphed netlist with respect to outputs, The three new adjacency matrices generated in the fifth step are composed of a new first adjacency matrix indicating the connection relationships between nodes regarding inputs at each node after the clustering, a new second adjacency matrix indicating an identity matrix with each node after the clustering as an element, and a new third adjacency matrix indicating the connection relationships between nodes regarding outputs at each node after the clustering. Functional estimation methods.
5. When the boundaries of the clusters are known from the netlist, the computer: In the fourth step, assigning the same classification to all nodes in each cluster by taking a majority vote of the estimation results of each node for each cluster based on the netlist for the node classification results of the output graph; An instance matrix S describing the instance to which each node belongs is generated, and the third adjacency matrix Aout generated in the second step is used to obtain the following equation: S T ×Aout×S The clustering is performed by generating a matrix according to Regarding the matrix, the diagonal elements are set to 0, and elements other than 0 in the elements other than the diagonal elements are rewritten to 1 to generate the new third adjacency matrix, the new first adjacency matrix is generated by transposing the new third adjacency matrix, the new second adjacency matrix is generated by setting all diagonal elements to 1 and all elements other than the diagonal elements to 0, and a new feature matrix representing the type of each node in the matrix is generated. The function estimation method according to claim 4 .
6. If the boundaries of the clusters are unknown from the netlist, the computer: In the fourth step, For each node in the output graph, perform a smoothing process that removes isolated nodes based on a functional comparison of adjacent nodes; The clustering is performed by performing a merge process on adjacent nodes with the same function for each node of the output graph after the smoothing process is performed; Generate the new feature matrix that represents the type of each node after the clustering, and the new three types of adjacency matrices that represent the connection relationship and input / output relationship of each node after the clustering. The function estimation method according to claim 4 .
7. The computer In the first estimation step, an arithmetic operation function included in the netlist is estimated as the first function estimation; In the second estimation step, a circuit function of an upper layer is estimated as the second function estimation based on the estimation result of the arithmetic operation function. The function estimation method according to claim 1 .
8. A function estimation method executed by a computer for estimating a function based on a netlist used in an LSI logic design using a GNN, which is a network having a graph structure, comprising: a first estimation step of performing a first function estimation by using a first GNN based on the netlist; a second estimation step of performing a second function estimation by using a second GNN based on the estimation result of the first estimation step; Equipped with The second estimation step Clustering is performed on each node of the output graph that is the estimation result of the first estimation step, a matrix representing the type of each node after clustering is generated as input data for the second GNN, and the second function estimation is performed; The computer In the first estimation step, an arithmetic operation function included in the netlist is estimated as the first function estimation; In the second estimation step, a circuit function of an upper layer is estimated as the second function estimation based on the estimation result of the arithmetic operation function. Functional estimation methods.
9. A function estimation program executed by a computer to estimate a function based on a netlist used in the logic design of an LSI using a GNN, which is a network having a graph structure, comprising: The computer a first estimation means for performing a first function estimation by using a first GNN based on the netlist; a second estimation means for performing a second function estimation by using a second GNN based on the estimation result of the first estimation means; and make it work, The first estimation means a first step of generating a graphed netlist by converting the netlist into a graph representation consisting of nodes and edges; a second step of generating a feature matrix representing the type of each node in the graphed netlist and an adjacency matrix representing the connection relationship of each node in the netlist; a third step of inputting the feature matrix and the adjacency matrix into the first GNN, and executing a calculation using the connection relationships between the nodes and the edges to execute the first function estimation, and generating, as the estimation result, an output graph that reflects node classification according to the result of the first function estimation for each node in the graphed netlist; and The second estimation means A fourth step of clustering each node of the output graph, which is the estimation result, and generating a new feature matrix representing the type of each node after clustering and a new adjacency matrix representing the connection relationship of each node after clustering as input data to be input to the second GNN; a fifth step of inputting the new feature matrix and the new adjacency matrix into the second GNN and performing an operation using the connection relationships of the nodes and edges after clustering, thereby performing the second function estimation; A function estimation program with
Citation Information
Patent Citations
Circuit optimization system
JP1992199369A
Method and device for separately evaluating logic circuit, method and device for preparing product specification data base, method and device for estimating product specification and method and device for automatically generating logic circuit hierarchy
JP1994203106A
Graph representation transforming method and its device, and automatic rearranging method and its device
JP2000200298A
Function estimation method, function estimation device, and function estimation program
JP2021089722A
System and automated method for mixed-signal circuit functional analysis
US20150268300A1