A circuit standard unit pre-training method based on multimodal data

By utilizing multimodal data of standard units and using self-supervised training of graph neural networks and natural language models, the problem that traditional methods cannot effectively distinguish and describe standard unit variants is solved, and the prediction performance of downstream models is improved.

CN118862000BActive Publication Date: 2025-02-07SUZHOU SILINTECH INC
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The traditional circuit standard unit feature construction method has flaws, and it is impossible to effectively distinguish the variants of the same type of standard unit, and at the same time lose the correlation between the variants.

Method used

By utilizing multimodal data of standard units, self-supervised training of large-scale graph neural network models and natural language models is used to provide high-quality standard unit representation vectors for downstream models. Specific steps include preprocessing multimodal data, designing graph neural networks and natural language model structures, conducting self-supervised training and inferring characterization vectors.

Benefits of technology

It improves the prediction performance of downstream models, can effectively distinguish and describe variants of standard units, and retains the correlation between variants.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118862000B_ABST
    Figure CN118862000B_ABST
Patent Text Reader

Abstract

The present invention discloses a circuit standard cell pre-training method based on multimodal data, comprising the steps of: S1, pre-processing a multimodal data set of standard cells to construct pre-training data; S2, designing a graph neural network model and a natural language model structure; S3, using the pre-processed data set for self-supervised training; S4, performing model inference on all standard cells to obtain a representation vector. The present invention utilizes the multimodal data of standard cells, and through self-supervised training of a large-scale graph neural network model and a natural language model, provides a high-quality standard cell representation vector for a downstream model, thereby improving the prediction performance of the downstream model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to circuit standard unit training, and in particular to a circuit standard unit pre-training method based on multi-modal data. Background Art

[0002] In chip reverse engineering, large-scale circuit analysis plays an important role in understanding and designing chips, including the extraction and classification of circuit modules, layout and routing of chip layouts, etc. Circuits are composed of standard cells, and circuit analysis requires feature construction and modeling of standard cells first. However, there are many types of standard cells, and the naming rules of different manufacturers are different, which brings great challenges to the feature construction of standard cells.

[0003] Traditional category features have obvious flaws. If we only focus on the major categories, then the variants of the same type of standard unit will be indistinguishable; if different variants are treated as independent categories, then the correlation between the variants will be lost.

[0004] The present invention utilizes the multimodal data of standard cells, and provides high-quality representation vectors for downstream models through self-supervised training of large-scale graph neural network models and natural language models, thereby improving the prediction performance of downstream models. First, the category of the standard cell can be inferred from the name, and standard cells with similar functions have the same prefix; second, its logical expression or truth table describes the operation logic of the standard cell, which essentially determines the function; in addition, similar standard cells have similar internal topological structures, which can be characterized by graph data structures. Therefore, the feature construction of the standard cell can utilize the multimodal data of the standard cell, integrate its name, logical expression, truth table and internal topological structure, and mine its essential characteristics. In particular, the present invention uses a graph neural network model to embed the physical structure of the standard cell, and uses a natural language model to embed the name, pin, logical expression and truth table. Through multiple self-supervised tasks such as representation fusion, output prediction of the truth table, and mutual translation of the name and logical expression, the pre-training of the standard cell is realized, and the representation vector of the standard cell is provided for use by downstream tasks. Summary of the invention

[0005] The purpose of the present invention is to provide a circuit standard cell pre-training method based on multimodal data, which provides high-quality standard cell representation vectors for downstream models through self-supervised training of large-scale graph neural network models and natural language models, thereby improving the prediction performance of downstream models.

[0006] The technical solution of the present invention is:

[0007] A circuit standard unit pre-training method based on multimodal data comprises the following steps:

[0008] S1, preprocess the standard unit multimodal dataset and construct pre-training data;

[0009] S2. Design graph neural network model and natural language model structure;

[0010] S3. Use the preprocessed dataset for self-supervised training;

[0011] S4. Perform model inference on all standard units to obtain the representation vector.

[0012] Preferably, step S1 specifically includes:

[0013] S1-1, parsing the names and pins of the standard cells; wherein the names are divided by characters, and each character is added with a unified prefix to form a vocabulary of the standard cell names; and each pin name is added with a unified prefix to form a vocabulary of the pins;

[0014] S1-2, parse the logic expression; identify the logic words, brackets, and logic operators to form the vocabulary of the logic expression; identify the pin names in the expression and add the pin prefix;

[0015] S1-3, parse the truth table; convert the input value into a matrix; treat the 0 and 1 output values ​​as characters and add a unified prefix to form a Boolean vocabulary consisting of 2 words;

[0016] S1-4, merge the name vocabulary, pin vocabulary, logical expression vocabulary and Boolean vocabulary in S1-1 to S1-3 into one vocabulary, and number the words; replace the words in the names, pins, logical expressions and truth table outputs with numbers to complete the vectorization operation of the characters in the data set;

[0017] S1-5. Construct the pin feature matrix and pin adjacency matrix of the standard unit for the graph neural network model;

[0018] Step S1-4 constructs the pre-training data for the natural language model, and S1-5 constructs the self-supervised pre-training data for the graph neural network model.

[0019] Preferably, the step S2 specifically includes:

[0020] Build a large model consisting of a graph neural network model and a natural language model;

[0021] Each standard unit is a graph; the pins are nodes in the graph, and the circuit connections between the pins are edges in the graph; the graph neural network model consists of an input layer, a graph propagation layer, and an output layer; the input layer converts the category feature vector of the standard unit pins into an embedding vector; the graph propagation layer uses a graph neural network module; after information is transmitted through the graph propagation layer, the output layer produces an aggregate representation vector for each pin;

[0022] The natural language model consists of two generative sub-modules, and the generative model selected in the generative sub-module is not limited.

[0023] Preferably, the two generative submodules adopt the BART generative model;

[0024] The first BART generation model is used to generate logical expressions. It consists of an encoder and a decoder. The encoder uses a bidirectional attention mechanism. Its input is the word number vector of the standard unit name and the graph neural network representation vector of the pin. Its output is the hidden state vector of each word. The decoder uses a unidirectional attention mechanism. Its input is the output vector of the encoder and its output is the predicted logical expression.

[0025] The function of the second BART generation model is to predict the output value of the truth table. It consists of 1 encoder and 1 decoder. The encoder uses a bidirectional attention mechanism. The input is the mean vector of the last layer of hidden states of the first BART encoder and the input value of the truth table. The output is the last layer of hidden state vector of each truth table input value. The decoder uses a unidirectional attention mechanism. The input is the encoder output vector, and the output is the predicted truth table output value.

[0026] Preferably, the step S3 specifically includes:

[0027] The loss function of self-supervised training is composed of the sum of three sub-loss functions; the first loss function is the difference between the predicted logical expression and the true expression; the second loss function is the difference between the predicted truth table output value and the true output value; the third loss function is the self-supervised loss obtained by the graph neural network through masking and prediction;

[0028] The training data is divided into training set, validation set and test set; the model with the highest BLEU index on the validation set is selected and saved.

[0029] Preferably, the step S4 specifically includes:

[0030] Load the model with the highest BLEU index saved in step S3, and infer all standard units to obtain representation vectors. First, for each standard unit, input the pin category feature vector and adjacency matrix into the graph neural network to obtain the representation vector of the pin. Then, input the word number vector of the name and the graph neural network representation vector of the pin into the encoder of the first BART generation model, extract the mean vector of the last layer of hidden states as the representation vector of the standard unit, and save it.

[0031] The advantages of the present invention are:

[0032] The present invention utilizes the multimodal data of standard units and provides high-quality standard unit representation vectors for downstream models through self-supervised training of large-scale graph neural network models and natural language models, thereby improving the prediction performance of downstream models. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] The present invention will be further described below in conjunction with the accompanying drawings and embodiments:

[0034] Figure 1 This is a diagram of the structure of a large model combining a graph neural network model and a natural language model in the present invention;

[0035] Figure 2 is a truth table of the standard unit AOI21 in an embodiment of the present invention;

[0036] Figure 3 It is the projection of the characteristic vector of the standard unit in the embodiment of the present invention on the two-dimensional plane. DETAILED DESCRIPTION

[0037] The circuit standard unit pre-training method based on multimodal data proposed by the present invention comprises the following steps:

[0038] S1, preprocess the standard unit multimodal dataset and construct pre-training data;

[0039] S2. Design graph neural network model and natural language model structure;

[0040] S3. Use the preprocessed dataset for self-supervised training;

[0041] S4. Perform model inference on all standard units to obtain the representation vector.

[0042] Table 1 lists relevant data information of some standard cells in the standard cell library. The following uses the data in Table 1 as an example to explain the above steps in detail.

[0043] Table 1 Some instance types in the standard cell library

[0044]

[0045] The specific methods for preprocessing the standard unit multimodal dataset and constructing pre-training data include:

[0046] S1-1. Parse the names and pins of standard cells. The names are divided by characters, and each character is prefixed with a uniform prefix “c_” to form a vocabulary of standard cell names; for example, “AOI21” => (“c_A”, “c_O”, “c_I”, “c_2”, “c_1”).

[0047] Concatenate the pin name and IO type, and add a unified prefix "p_" before each pin name to form a pin vocabulary; for example, A0:I => "p_A0_I".

[0048] S1-2. Parse the logic expression; identify the logic words such as "assign" and "module" in the RTL (register transfer level) code, as well as brackets and logical operators to form the vocabulary of the logic expression; identify the pin names in the expression and add the pin prefix;

[0049] Use the above pin new words to replace the pin names in the formula, and separate the remaining operators (“(”, “)”, “~”, “&”, “|”, “XOR”, etc.) into separate words, such as “Y = ~ ((A0&A1) | B0)” =>[“p_Y_O”, “=”, “~”,“(”, “(”, “p_A0_I”, “&”, “p_A1_I”, “)”, “|”, “p_B0_I”, “)”].

[0050] S1-3, parse the truth table; convert the input value into a matrix; treat the 0 and 1 output values ​​as characters and add a unified prefix to form a Boolean vocabulary consisting of 2 words;

[0051] For example, Figure 2 The truth table in is divided into two parts: input and output. For the input part, we use the embedding represented by 0 / 1 as the input of the encoder, without word segmentation. For the output part, "b_0" and "b_1" are used in the vocabulary to represent 0 and 1 respectively.

[0052] S1-4, merge the name vocabulary, pin vocabulary, logical expression vocabulary and Boolean vocabulary in S1-1 to S1-3 into one vocabulary, and number the words; replace the words in the names, pins, logical expressions and truth table outputs with numbers to complete the vectorization operation of the characters in the data set;

[0053] S1-5. Construct the pin feature matrix and pin adjacency matrix of the standard unit for the graph neural network model;

[0054] The graph structure is constructed with pins as nodes and the connection relationships between pins as edges. The feature matrix of nodes is constructed with the pin category information, and the feature matrix of edges is constructed with the connection types between pins.

[0055] Step S1-4 constructs the pre-training data for the natural language model, and S1-5 constructs the self-supervised pre-training data for the graph neural network model.

[0056] The step S2 specifically includes:

[0057] Build a large model consisting of a graph neural network model and a natural language model;

[0058] Each standard unit is a graph; the pins are nodes in the graph, and the circuit connections between the pins are edges in the graph; the graph neural network model consists of an input layer, a graph propagation layer, and an output layer; the input layer converts the category feature vector of the standard unit pins into an embedding vector; the graph propagation layer uses a graph neural network module; after information is transmitted through the graph propagation layer, the output layer produces an aggregate representation vector for each pin;

[0059] The natural language model consists of two generative sub-modules. The generative model used in the generative sub-module is not limited. Here, the BART generative model is used as an example to describe this module in detail. The model structure is as follows: Figure 1 .

[0060] The first BART generation model is used to generate logical expressions. It consists of an encoder and a decoder. The encoder uses a bidirectional attention mechanism. Its input is the word number vector of the standard unit name and the graph neural network representation vector of the pin. Its output is the hidden state vector of each word. The decoder uses a unidirectional attention mechanism. Its input is the output vector of the encoder and its output is the predicted logical expression.

[0061] The function of the second BART generation model is to predict the output value of the truth table. It consists of 1 encoder and 1 decoder. The encoder uses a bidirectional attention mechanism. Its input is the mean vector of the last layer of hidden states of the first BART encoder and the input value of the truth table (where the input value of the truth table is composed of the graph neural network representation vector of the pin and the learnable vector corresponding to 0 / 1). The output is the last layer of hidden state vector of each truth table input value. The decoder uses a unidirectional attention mechanism. Its input is the encoder output vector, and its output is the predicted truth table output value.

[0062] The step S3 specifically includes:

[0063] The loss function of self-supervised training is composed of the sum of three sub-loss functions:

[0064] loss = a*bart1_out.loss + b*bart2_out.loss + (1-ab)*gnn_out.loss

[0065] Among them, the first loss function bart1_out.loss is the difference between the predicted logical expression and the true expression; the second loss function bart2_out.loss is the difference between the predicted truth table output value and the true output value; the third loss function gnn_out.loss is the self-supervised loss obtained by the graph neural network through masking and prediction.

[0066] The training data is divided into training set, validation set and test set; the model with the highest BLEU index on the validation set is selected and saved.

[0067] The step S4 specifically includes:

[0068] Load the model with the highest BLEU index saved in step S3, and infer all standard units to obtain representation vectors. First, for each standard unit, input the pin category feature vector and adjacency matrix into the graph neural network to obtain the representation vector of the pin. Then, input the word number vector of the name and the graph neural network representation vector of the pin into the encoder of the first BART generation model, extract the mean vector of the last layer of hidden states as the representation vector of the standard unit, and save it.

[0069] like Figure 3 , project the characterization vector of the standard cell obtained in step S4 onto a two-dimensional plane. It can be seen that the characterization vectors of standard cells of different categories are distributed in different areas, such as AOI category and ADD category; in the same category of standard cells, the characterization vectors of different variants are distributed in similar areas, such as AOI211 and AOI31. It can be seen that the method provided by the present invention can obtain a relatively high-quality characterization vector.

[0070] The above embodiments are only for illustrating the technical concept and features of the present invention, and their purpose is to enable people familiar with the technology to understand the content of the present invention and implement it accordingly, and they cannot be used to limit the protection scope of the present invention. Any modifications made according to the spirit of the main technical solution of the present invention should be included in the protection scope of the present invention.

Claims

1. A circuit standard unit pre-training method based on multimodal data, characterized in that: Includes steps: S1, preprocess the standard unit multimodal dataset and construct pre-training data; S2. Design graph neural network model and natural language model structure; S3. Use the preprocessed dataset for self-supervised training; S4, perform model inference on all standard units to obtain representation vectors; Step S1 specifically includes: S1-1, parsing the names and pins of the standard cells; wherein the names are divided by characters, and a unified prefix is ​​added to each character to form a vocabulary of the standard cell names; and a unified prefix is ​​added to each pin name to form a vocabulary of the pins; S1-2, parse the logic expression; identify the logic words, brackets, and logic operators to form the vocabulary of the logic expression; identify the pin names in the expression and add the pin prefix; S1-3, parse the truth table; convert the input value into a matrix; treat the 0 and 1 output values ​​as characters and add a unified prefix to form a Boolean vocabulary consisting of 2 words; S1-4, merge the name vocabulary, pin vocabulary, logical expression vocabulary and Boolean vocabulary in S1-1 to S1-3 into one vocabulary, and number the words; replace the words in the names, pins, logical expressions and truth table outputs with numbers to complete the vectorization operation of the characters in the data set; S1-5. Construct the pin feature matrix and pin adjacency matrix of the standard unit for the graph neural network model; Step S1-4 constructs pre-training data for the natural language model, and S1-5 constructs self-supervised pre-training data for the graph neural network model; The step S2 specifically includes: Build a large model consisting of a graph neural network model and a natural language model; Each standard unit is a graph; the pins are nodes in the graph, and the circuit connections between the pins are edges in the graph; the graph neural network model consists of an input layer, a graph propagation layer, and an output layer; the input layer converts the category feature vector of the standard unit pins into an embedding vector; the graph propagation layer uses a graph neural network module; after information is transmitted through the graph propagation layer, the output layer produces an aggregate representation vector for each pin; The natural language model consists of two generative sub-modules, and the generative model selected in the generative sub-module is not limited.

2. The circuit standard unit pre-training method based on multimodal data according to claim 1, characterized in that: The two generative submodules adopt the BART generative model; The first BART generation model is used to generate logical expressions. It consists of an encoder and a decoder. The encoder uses a bidirectional attention mechanism. Its input is the word number vector of the standard unit name and the graph neural network representation vector of the pin. Its output is the hidden state vector of each word. The decoder uses a unidirectional attention mechanism. Its input is the output vector of the encoder and its output is the predicted logical expression. The function of the second BART generation model is to predict the output value of the truth table. It consists of 1 encoder and 1 decoder. The encoder uses a bidirectional attention mechanism. The input is the mean vector of the last layer of hidden states of the first BART encoder and the input value of the truth table. The output is the last layer of hidden state vector of each truth table input value. The decoder uses a unidirectional attention mechanism. The input is the encoder output vector, and the output is the predicted truth table output value.

3. The circuit standard unit pre-training method based on multimodal data according to claim 2, characterized in that: The step S3 specifically includes: The loss function of self-supervised training is composed of the sum of three sub-loss functions; the first loss function is the difference between the predicted logical expression and the true expression; the second loss function is the difference between the predicted truth table output value and the true output value; the third loss function is the self-supervised loss obtained by the graph neural network through masking and prediction; Divide the training data into training set, validation set and test set; select the model with the highest BLEU index on the validation set and save it.

4. The circuit standard unit pre-training method based on multimodal data according to claim 3 is characterized in that: The step S4 specifically includes: Load the model with the highest BLEU index saved in step S3, and infer all standard units to obtain representation vectors. First, for each standard unit, input the pin category feature vector and adjacency matrix into the graph neural network to obtain the representation vector of the pin. Then, input the word number vector of the name and the graph neural network representation vector of the pin into the encoder of the first BART generation model, extract the mean vector of the last layer of hidden states as the representation vector of the standard unit, and save it.

Citation Information

Patent Citations

  • Intelligent session method and system based on graph neural network, and medium

    CN113239147A

  • Molecular multi-modal model training and application method, storage medium and chip

    CN116168775A