PCell code data enhancement method and system and storage medium

CN121029176APending Publication Date: 2025-11-28SHENZHEN HUADA EMPYREAN TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511120913.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-12
Publication Date
2025-11-28

Smart Images

  • Figure CN121029176A_ABST
    Figure CN121029176A_ABST
Patent Text Reader

Abstract

The invention relates to a PCell code data enhancement method and system and a storage medium, and belongs to the technical field of artificial intelligence training data construction.The PCell code data enhancement method comprises the steps that an LLM large model unit is constructed, and an interface key value pair vector database is constructed; retrieving a vector database and a process rule base based on the PCell code structure template and the code configuration information to generate a first PCell code sample; performing logic error correction on the first PCell code sample to obtain a second PCell code sample, and performing compilation error correction to obtain a third PCell code sample; and performing instantiation error correction on the third PCell code to obtain a fourth PCell code sample, and storing the fourth PCell code sample in a sample library. According to the method, PCell code samples of different types and models of devices can be automatically generated, a large number of high-quality PCell code samples can be generated through multiple error correction, and rapid amplification of PCell code sample data is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of artificial intelligence training data construction, and specifically relates to a PCell code data enhancement method and system and a storage medium. BACKGROUND

[0002] As a key technical information carrier in the semiconductor industry chain, PDK (Process Design Kit) is the core hub connecting integrated circuit design companies, wafer foundries and EDA (Electronic Design Automation) tool vendors. Its essence is a standardized process description file set systematically constructed by foundries based on a specific semiconductor process node, aiming to provide full-process process constraint and physical implementation support for chip design. The technical system of process manufacturability indicators delivered by foundries to IC design companies realizes full-process collaboration from circuit design, layout implementation to process manufacturing through deep integration with EDA tools, which is the core technical file to ensure the consistency of chip design and process manufacturing. PDK verification is a key link to ensure the accuracy, integrity and compatibility of semiconductor process data with EDA tools, directly affecting the manufacturability and performance consistency of chip design.

[0003] Pcell (Parameterized Cell) is an important part of PDK. PCell is generally a script code package supported by EDA software, which can generate a specific layout unit in EDA software based on given parameters. Pcell is very important in integrated circuit design because it allows designers to obtain geometric shapes and electrical properties that meet design rules by simply changing parameter values. However, the PCell code of each PDK is confidential and the number is small, and developers often need to debug parameters many times to design appropriate PCell instances, which greatly limits the design efficiency of developers.

[0004] LLM (Large Language Model) is an artificial intelligence large model. Through a large amount of text data training, it can understand natural language instructions to a certain extent and generate corresponding feedback information. Currently, there is a lack of a method for directly giving a corresponding PCell instance based on instructions using a large model.

[0005] The prior art lacks a large model that can directly generate PCell instances. If such a large model that can directly generate PCell instances is to be manufactured and trained, it is difficult to achieve due to the severe shortage of existing PCell code samples. Moreover, the efficiency of manually constructing PCell code samples is very low, and there is a lack of technology that can directly obtain a large number of PCell code samples for large model training. SUMMARY

[0006] To solve the problem of lack of PCell code sample training data, the first aspect of the present application provides a PCell code data enhancement method, comprising:

[0007] S1: constructing an LLM large model unit;

[0008] S2: processing the interface document supported by the EDA software into a key-value pair dictionary, and storing the key-value pair dictionary into a searchable vector database;

[0009] S3: constructing a PCell code structure template library and a process rule library;

[0010] S4: constructing PCell code configuration information;

[0011] S5: the LLM large model unit searches the vector database and the process rule library based on the PCell code structure template and the PCell code configuration information, and generates a first PCell code sample based on the search results;

[0012] S6: checking whether the first PCell code sample contains logical syntax errors, and if there are warnings or errors, instructing the LLM large model unit to correct errors until the warnings or errors are eliminated, to obtain a second PCell code sample;

[0013] S7: passing the second PCell code sample into the EDA software compilation system through an interface call for compilation, and if the compilation fails, instructing the LLM large model unit to correct errors based on the error information until the errors are eliminated, to obtain a third PCell code sample that can be correctly compiled;

[0014] S8: instantiating the third PCell code into a PCell layout instance, checking and determining whether the PCell layout instance is correct, and if not, instructing the LLM large model unit to adjust until the errors are eliminated, to obtain a fourth PCell code sample;

[0015] S9: labeling the fourth PCell code sample with a feature tag, and saving it into a sample library to form a PCell code sample dataset.

[0016] Further, the LLM large model is a Decoder-Only architecture Transformer large model, or a Decoder-Encoder architecture Transformer large model.

[0017] Further, the S2 step specifically comprises:

[0018] S2.1: reading the interface document to obtain an interface list;

[0019] S2.2: Obtain parameter information of each interface;

[0020] S2.3: Generate a key-value pair dictionary based on the interface parameter information;

[0021] S2.4: Store the key-value pair dictionary into a searchable vector database.

[0022] Further, the PCell code configuration information includes:

[0023] EDA software type, PCell code structure template used this time, process rules used this time, PCell class name, paramTable method, pcellEval method, createPCMPcell method.

[0024] Further, the step of generating a PCell layout instance further includes:

[0025] grabbing the parameter name and parameter type defined in the third PCell code sample to generate a random parameter combination set; and generating a specific PCell layout instance based on each group of parameter combinations in the random parameter combination set.

[0026] In a second aspect, the application provides a PCell code data enhancement system, comprising:

[0027] an LLM large model unit configured to process text information according to instructions input by other units and output results;

[0028] an interface document processing unit configured to process interface documents supported by EDA software into a key-value pair dictionary and store the key-value pair dictionary into a searchable vector database;

[0029] a vector database configured to save interface key-value pair dictionaries supported by EDA software and access the LLM large model unit as an interface data retrieval source;

[0030] a process rule library configured to store process rule information for retrieval and checking and access the LLM large model unit as a process rule data retrieval source;

[0031] a PCell code structure template library configured to store PCell code structure templates of different devices and different types of devices and access the LLM large model unit as a PCell code structure data retrieval source;

[0032] a configuration unit configured to generate PCell code configuration information;

[0033] The execution unit is used to send the PCell code configuration information to the LLM large model unit, instruct the LLM large model unit to search the vector database and the process rule base based on the PCell code structure template and the PCell code configuration information, instruct the LLM large model unit to generate a first PCell code sample based on the search results, and receive the first PCell code sample fed back by the LLM large model unit.

[0034] The logic error correction unit is used to check whether the first PCell code sample contains logical syntax errors. If there are warnings or errors, it instructs the LLM large model unit to perform error correction until the warnings or errors are eliminated, and the second PCell code sample is obtained.

[0035] The compilation and verification unit is used to pass the second PCell code sample to the EDA software compilation system through the call interface for compilation. If the compilation fails, the LLM large model unit is used to correct the error based on the error message until the error is eliminated and the third PCell code sample that can be compiled correctly is obtained.

[0036] The instantiation verification unit is used to instantiate the third PCell code into a PCell layout instance, verify whether the PCell layout instance is correct, and if it is incorrect, instruct the LLM large model unit to make adjustments until the error is eliminated and the fourth PCell code sample is obtained.

[0037] A labeling unit is used to add feature labels to the fourth PCell code sample;

[0038] The sample library unit is used to store the fourth PCell code sample and its feature labels.

[0039] Furthermore, the interface document processing unit reads the interface document, obtains the interface list, obtains the parameter information of each interface, generates a key-value pair dictionary based on the interface parameter information, and stores the key-value pair dictionary into a searchable vector database.

[0040] Furthermore, the PCell code configuration information includes:

[0041] EDA software type, PCell code structure template used in this project, process rules used in this project, PCell class name, paramTable method, pcellEval method, createPCMPcell method.

[0042] Furthermore, the instantiation verification unit captures the parameter names and parameter types defined in the third PCell code sample and generates a random parameter combination set; based on each parameter combination in the random parameter combination set, a specific PCell layout instance is generated.

[0043] A third aspect of the present invention provides a processor-readable storage medium storing a computer program, wherein when the processor executes the computer program, it implements a PCell code data augmentation method as described in the first aspect of the present invention.

[0044] The advantages of this invention compared to the prior art are:

[0045] This invention proposes a PCell code data augmentation method, system, and storage medium. Utilizing the LLM large language model and software technology, it integrates EDA software call interfaces and a specially designed retrieval database to automatically generate PCell code samples for different types and models of devices. The generated code samples undergo multiple error correction processes, including logic correction, compilation verification, and instantiation verification. This method can generate a large number of high-quality PCell code samples, enabling rapid expansion of PCell code sample data.

[0046] This invention is compatible with different EDA tools and processes, has a high degree of automation, and can help engineers save a lot of manual construction and annotation work. It can adapt to the technical requirements of different electronic design automation tasks.

[0047] This invention improves the efficiency of generating PCell code sample training data. The generated high-quality PCell code sample dataset can be used for LLM large model pre-training or fine-tuning tasks, improving LLM training performance and laying a solid foundation for creating large models that directly generate PCell instances. Attached Figure Description

[0048] Figure 1 This is a schematic diagram of the steps of a PCell code data augmentation method provided in an embodiment of the present invention.

[0049] Figure 2 This is a schematic diagram of a PCell code data augmentation system provided in an embodiment of the present invention. Detailed Implementation

[0050] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0051] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0052] Method Implementation Examples

[0053] This invention primarily addresses the problem of insufficient training data for PCell code samples.

[0054] In a first aspect, the present invention provides a PCell code data augmentation method, the flowchart of which is attached. Figure 1 As shown, it specifically includes:

[0055] S1: Construct large LLM model units.

[0056] The LLM (Large Model Unit) is used to process text information based on instructions input from other units and output results. The base model of the LLM can be a Transformer model.

[0057] Decoder-Only architectures are preferred, such as the GPT series and Qwen series. Decoder-Only architectures are currently widely used in various natural language processing, text generation, and other tasks.

[0058] The Decoder-Encoder architecture can also be used, but the Decoder-Encoder architecture has higher resource requirements for training and inference.

[0059] Large model units can be deployed on the server side, including but not limited to local deployment and cloud server deployment.

[0060] S2: Process the interface documents supported by the EDA software into a key-value pair dictionary, and store the key-value pair dictionary into a searchable vector database.

[0061] This step specifically includes:

[0062] S2.1: Read the API documentation and obtain the API list;

[0063] S2.2: Obtain parameter information for each interface through keyword matching, semantic matching, and other methods;

[0064] S2.3: Generate a key-value dictionary based on interface parameter information;

[0065] Specifically, based on the interface parameter information, an interface key-value pair dictionary is constructed, with the interface name as the key and the interface description as the value.

[0066] For example, taking the common built-in Python interface getcwd() as an example, the constructed interface key-value pair dictionary can be:

[0067]

[0068] S2.4: And store the key-value dictionary into a searchable vector database.

[0069] This step stores the key-value pair dictionary into a searchable vector database and connects it to the LLM large model unit as the interface data retrieval source.

[0070] S3: Build the PCell code structure template library and process rule library.

[0071] The PCell code structure template library stores PCell code structure templates for different devices and different models of devices, and connects to the LLM large model unit as the source for PCell code structure data retrieval.

[0072] The process rule base is used to store process rule information for retrieval and inspection, and it connects to the LLM large model unit as a source for process rule data retrieval. The process rule base stores the original or modified documents of the process platform.

[0073] For example, the PCell code structure template library contains typical PCell code structure templates for devices such as MOSFETs, Diodes, and Res. The PCell code structure template is a string file or a file that can be parsed into a string; it is important to ensure that the PCell code structure template is supported by the corresponding EDA software.

[0074] Taking pyAether EDA as an example, the PCell code structure it supports includes the following aspects:

[0075] 1) import module

[0076] 2) PCell class definition

[0077] 3) Definition of the paramTable list in the PCell class

[0078] 4) Definition of the pcellEval method in the PCell class

[0079] 5) Definition of the createPCMPcells method

[0080] For example, the PCell code structure template for pyAether EDA is as follows:

[0081] import pyAether

[0082] class Contact(object):

[0083] paramTable=[['layer','String',"CONT",'ContactLayer'],

[0084] ['width','Double',0.32,'ContactWidth']]

[0085] defpcellEval(self, design):

[0086] w = design.getParam("width")

[0087] box = [0, 0, w, w]

[0088] pyAether.dbCrtRect(design,box,design.getParam("layer"),"drawing")

[0089] S4: Build PCell code configuration information.

[0090] PCell code configuration information should include at least the following configuration parameters:

[0091] 1) EDA software type: This parameter can be selected directly from the EDA list;

[0092] 2) The PCell code structure template used in this example can be selected directly from the PCell code structure template library;

[0093] 3) The process rules used in this case can be directly selected from the process library;

[0094] 4) PCell class name: This parameter is entered by the user and represents the class name that reflects the characteristics of the device;

[0095] 5) paramTable: This parameter defines the paramTable in the PCell class, which enumerates all PCell variables in list form.

[0096] 6) pcellEval: This parameter defines the pcellEval method in the PCell class, which contains all the commands and procedures for generating the layout;

[0097] 7) createPCMPcell: This parameter defines the createPCMPcell method, which is contained in the specified lib and is a command to generate a cell based on the PCell class.

[0098] S5: The LLM large model unit searches the vector database and the process rule base based on the PCell code structure template and the PCell code configuration information, and generates the first PCell code sample based on the retrieved content.

[0099] The PCell code configuration information is sent to the LLM large model unit, which is then instructed to search the vector database and process rule base based on the PCell code structure template and the PCell code configuration information. The LLM large model unit is then instructed to generate a first PCell code sample based on the retrieved content, and the first PCell code sample is received from the LLM large model unit.

[0100] The preferred retrieval method for the LLM large model unit in the vector database is the vector comparison method. The input configuration information is compared with the vector database, and the content with the highest relevance is selected to construct the first PCell code sample.

[0101] S6: Check if the first PCell code sample contains logical syntax errors. If there are warnings or errors, instruct the LLM large model unit to perform error correction until the warnings or errors are eliminated, and obtain the second PCell code sample.

[0102] Check the first PCell code sample for syntax errors, including checking the interface name, parameter passing method, etc.

[0103] For example, interface comparison involves extracting interface information through keyword matching, semantic matching, etc., and checking whether the extracted interface information matches the selected EDA software type. If warnings or errors are found, the LLM large model unit is instructed to perform error correction until the errors are eliminated, resulting in a second PCell code sample.

[0104] For example, the PCell code sample for feedback from large LLM model units is as follows:

[0105] import pyAether

[0106] class Contact(object):

[0107] paramTable=[['layer','String',"CONT",'ContactLayer'],

[0108] ['width','Double',0.32,'ContactWidth']]

[0109] defpcellEval(self, design):

[0110] w = design.getParam("width")

[0111] box = [0, 0, w, w]

[0112] pyAether.dbCrt(design,box,design.getParam("layer"),"drawing")

[0113] defcreatePCMPcells(libName):

[0114] pyAether.createPythonPcell(libName,"Contact",Contact)

[0115] The three interfaces getParam, dbCrt, and createPythonPcell can be extracted by using regular expression matching: \w+\.(\w+)\(.*\). These three interfaces are then compared with the pre-prepared pyAether support list. Since dbCrt is not supported and there is an error, the LLM large model unit is instructed to correct the error until it is eliminated.

[0116] Alternatively, the AST (Abstract Syntax Tree) approach can also be used here to abstract the generated code into a syntax tree, obtain the method class nodes, and extract the interface information.

[0117] S7: The second PCell code sample is passed to the EDA software compilation system through the call interface for compilation. If the compilation fails, the LLM large model unit is used to correct the error based on the error message until the error is eliminated and the third PCell code sample that can be compiled correctly is obtained.

[0118] This step verifies that the second PCell code sample is compilable. Specifically, the second PCell code sample is passed to the EDA software compilation system via an interface call for compilation. If the compilation is successful without errors, it proves that the PCell code logic is correct. If the compilation fails, the error message is used to instruct the LLM large model unit to perform error correction until the error is eliminated, thus obtaining the third PCell code sample.

[0119] S8: Instantiate the third PCell code into a PCell layout, verify whether the PCell layout instance is correct. If it is incorrect, instruct the LLM large model unit to adjust until the error is eliminated and obtain the fourth PCell code sample.

[0120] A third PCell code sample is needed for further instantiation and verification. Specifically, this step generates a random set of parameter combinations by extracting the parameter names and types defined in the third PCell code sample. Based on each parameter combination in the random parameter combination set, a specific layout instance is generated. The layout instance can be verified manually, by scripts, and by relevant software to determine its correctness. If it is incorrect, the LLM large model unit is instructed to adjust it until the error is eliminated, thus obtaining the fourth PCell code sample.

[0121] S9: Add feature labels to the fourth PCell code sample and save it to the sample library to form the PCell code sample dataset.

[0122] After the aforementioned steps, a fourth PCell code sample that is logically and syntactically correct, compileable, and instantiable can be obtained.

[0123] This step involves adding feature labels to the fourth PCell code sample and saving it to the sample library to form the PCell code sample dataset. This PCell code sample dataset can be used for large model pre-training or fine-tuning tasks.

[0124] The above methods are beneficial for generating a large amount of high-quality PCell code sample data. They are highly automated and can help engineers save a lot of manual construction and annotation work, thereby improving the development efficiency of PCell to generate LLM.

[0125] A second aspect of the present invention provides a PCell code data augmentation system, as shown in the appendix. Figure 2 As shown, it specifically includes:

[0126] The LLM large model unit is used to process text information according to the instructions input from other units and output the results;

[0127] The interface document processing unit is used to process the interface documents supported by EDA software into a key-value pair dictionary and store the key-value pair dictionary into a searchable vector database.

[0128] The vector database is used to store the key-value pair dictionary of the interfaces supported by EDA software and is connected to the LLM large model unit as the source of interface data retrieval.

[0129] The process rule library is used to store process rule information for retrieval and inspection, and is connected to the LLM large model unit as the source of process rule data retrieval;

[0130] The PCell code structure template library is used to store PCell code structure templates for different devices and different models of devices, and connects to the LLM large model unit as the source of PCell code structure data retrieval.

[0131] Configuration unit, used to generate PCell code configuration information;

[0132] The execution unit is used to send the PCell code configuration information to the LLM large model unit, instruct the LLM large model unit to search the vector database and the process rule base based on the PCell code structure template and the PCell code configuration information, instruct the LLM large model unit to generate a first PCell code sample based on the search results, and receive the first PCell code sample fed back by the LLM large model unit.

[0133] The logic error correction unit is used to check whether the first PCell code sample contains logical syntax errors. If there are warnings or errors, it instructs the LLM large model unit to perform error correction until the warnings or errors are eliminated, and the second PCell code sample is obtained.

[0134] The compilation and verification unit is used to pass the second PCell code sample to the EDA software compilation system through the call interface for compilation. If the compilation fails, the LLM large model unit is used to correct the error based on the error message until the error is eliminated and a third PCell code sample that can be compiled correctly is obtained.

[0135] The instantiation verification unit is used to instantiate the third PCell code into a PCell layout instance, verify whether the PCell layout instance is correct, and if it is incorrect, instruct the LLM large model unit to make adjustments until the error is eliminated and the fourth PCell code sample is obtained.

[0136] A labeling unit is used to add feature labels to the fourth PCell code sample;

[0137] The sample library unit is used to store the fourth PCell code sample and its feature labels.

[0138] Furthermore, the base model of the large LLM model unit can be a Transformer model, preferably a Decoder-Only architecture, such as the GPT series and Qwen series. The Decoder-Only architecture is currently widely used in various natural language processing and text generation tasks. A Decoder-Encoder architecture can also be used, but its training and inference require higher resource consumption.

[0139] Large model units can be deployed on the server side, including but not limited to local deployment and cloud server deployment.

[0140] Furthermore, the interface document processing unit performs the following functions:

[0141] S2.1: Read the API documentation and obtain the API list;

[0142] S2.2: Obtain parameter information for each interface through keyword matching, semantic matching, and other methods;

[0143] S2.3: Generate a key-value dictionary based on interface parameter information;

[0144] Specifically, based on the interface parameter information, an interface key-value pair dictionary is constructed, with the interface name as the key and the interface description as the value.

[0145] For example, taking the common built-in Python interface getcwd() as an example, the constructed interface key-value pair dictionary can be:

[0146]

[0147]

[0148] S2.4: Store the interface key-value pair dictionary in a vector database and connect it to the LLM large model unit as the interface data retrieval source.

[0149] For example, the PCell code structure template library contains typical PCell code structure templates for devices such as MOSFETs, Diodes, and Res. The PCell code structure template is a string file or a file that can be parsed into a string; it is important to ensure that the PCell code structure template is supported by the corresponding EDA software.

[0150] Taking pyAether EDA as an example, the PCell code structure it supports includes the following aspects:

[0151] 1) import module

[0152] 2) PCell class definition

[0153] 3) Definition of the paramTable list in the PCell class

[0154] 4) Definition of the pcellEval method in the PCell class

[0155] 5) Definition of the createPCMPcells method

[0156] For example, the PCell code structure template for pyAether EDA is as follows:

[0157] import pyAether

[0158] class Contact(object):

[0159] paramTable=[['layer','String',"CONT",'ContactLayer'],

[0160] ['width','Double',0.32,'ContactWidth']]

[0161] defpcellEval(self, design):

[0162] w = design.getParam("width")

[0163] box = [0, 0, w, w]

[0164] pyAether.dbCrtRect(design,box,design.getParam("layer"),"drawing")

[0165] Furthermore, the configuration unit can configure at least the following parameters:

[0166] 1) EDA software type: This parameter can be selected directly from the EDA list;

[0167] 2) The PCell code structure template used in this example can be selected directly from the PCell code structure template library;

[0168] 3) The process rules used in this case can be directly selected from the process library;

[0169] 4) PCell class name: This parameter is entered by the user and represents the class name that reflects the characteristics of the device;

[0170] 5) paramTable: This parameter defines the paramTable in the PCell class, which enumerates PCell variables in list form.

[0171] 6) pcellEval: This parameter defines the pcellEval method in the PCell class, which contains all the commands and procedures for generating the layout;

[0172] 7) createPCMPcell: This parameter defines the createPCMPcell method, which is contained in the specified lib and is a command to generate a cell based on the PCell class.

[0173] Furthermore, the LLM large model unit preferably uses vector comparison method to retrieve data from the vector database. The input configuration information is compared with the vector database, and the content with the highest relevance is selected to construct the first PCell code sample.

[0174] Furthermore, the logic error correction unit checks whether the first PCell code sample contains logical or syntax errors, as well as checks on interface names, parameter passing methods, and other aspects.

[0175] For example, interface comparison involves extracting interface information through keyword matching, semantic matching, etc., and checking whether the extracted interface information matches the selected EDA software type. If warnings or errors are found, the LLM large model unit is instructed to perform error correction until the errors are eliminated, resulting in a second PCell code sample.

[0176] For example, the PCell code sample for feedback from large LLM model units is as follows:

[0177] import pyAether

[0178] class Contact(object):

[0179] paramTable=[['layer','String',"CONT",'ContactLayer'],

[0180] ['width','Double',0.32,'ContactWidth']]

[0181] defpcellEval(self, design):

[0182] w = design.getParam("width")

[0183] box = [0, 0, w, w]

[0184] pyAether.dbCrt(design,box,design.getParam("layer"),"drawing")

[0185] defcreatePCMPcells(libName):

[0186] pyAether.createPythonPcell(libName,"Contact",Contact)

[0187] The three interfaces getParam, dbCrt, and createPythonPcell can be extracted by using regular expression matching: \w+\.(\w+)\(.*\). These three interfaces are then compared with the pre-prepared pyAether support list. dbCrt is not supported, indicating an error. The logical error correction unit (LLM) instruction is then used to correct the error until it is eliminated.

[0188] Alternatively, the AST (Abstract Syntax Tree) approach can also be used here to abstract the generated code into a syntax tree, obtain the method class nodes, and extract the interface information.

[0189] Furthermore, the instantiation verification unit generates a random set of parameter combinations by extracting the parameter names and types defined in the third PCell code sample. Based on each parameter combination in the random parameter combination set, a specific layout instance is generated. The layout instance is verified through manual verification, script verification, and relevant software verification to determine its correctness. If it is incorrect, the LLM large model unit is instructed to adjust it until the error is eliminated, and the fourth PCell code sample is obtained.

[0190] A third aspect of the present invention provides a processor-readable storage medium storing a computer program, wherein when the processor executes the computer program, it implements a PCell code data augmentation method as described in the first aspect of the present invention.

[0191] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A PCell code data augmentation method, characterized in that, include: S1: Construct large LLM model units; S2: Process the interface documents supported by the EDA software into a key-value pair dictionary, and store the key-value pair dictionary into a searchable vector database; S3: Construct a PCell code structure template library and a process rule library; S4: Build PCell code configuration information; S5: The LLM large model unit searches the vector database and the process rule base based on the PCell code structure template and the PCell code configuration information, and generates the first PCell code sample based on the search results; S6: Check if the first PCell code sample contains logical syntax errors. If there are warnings or errors, instruct the LLM large model unit to perform error correction until the warnings or errors are eliminated, and obtain the second PCell code sample. S7: The second PCell code sample is passed to the EDA software compilation system through the call interface for compilation. If the compilation fails, the LLM large model unit is used to correct the error based on the error message until the error is eliminated and the third PCell code sample that can be compiled correctly is obtained. S8: Instantiate the third PCell code into a PCell layout instance, verify whether the PCell layout instance is correct, if not, instruct the LLM large model unit to adjust until the error is eliminated and obtain the fourth PCell code sample. S9: Add feature labels to the fourth PCell code sample and save it to the sample library to form the PCell code sample dataset.

2. The PCell code data augmentation method according to claim 1, characterized in that, The LLM large model is either a Decoder-Only architecture Transformer large model or a Decoder-Encoder architecture Transformer large model.

3. The PCell code data augmentation method according to claim 1, characterized in that, The S2 step specifically includes: S2.1: Read the API documentation and obtain the API list; S2.2: Obtain parameter information for each interface; S2.3: Generate a key-value dictionary based on interface parameter information; S2.4: Store the key-value dictionary into a searchable vector database.

4. The PCell code data augmentation method according to claim 1, characterized in that, The PCell code configuration information includes: EDA software type, PCell code structure template used in this project, process rules used in this project, PCell class name, paramTable method, pcellEval method, createPCMPcell method.

5. A PCell code data augmentation method according to claim 4, characterized in that, In step S8, the step of generating a PCell layout instance further includes: Extract the parameter names and parameter types defined in the third PCell code sample to generate a random set of parameter combinations; generate a specific PCell layout instance based on each parameter combination in the random parameter combination set.

6. A PCell code data augmentation system, characterized in that, include: The LLM large model unit is used to process text information according to the instructions input from other units and output the results; The interface document processing unit is used to process the interface documents supported by EDA software into a key-value pair dictionary and store the key-value pair dictionary into a searchable vector database. The vector database is used to store the key-value pair dictionary of the interfaces supported by EDA software and is connected to the LLM large model unit as the source of interface data retrieval. The process rule library is used to store process rule information for retrieval and inspection, and is connected to the LLM large model unit as the source of process rule data retrieval; The PCell code structure template library is used to store PCell code structure templates for different devices and different models of devices, and connects to the LLM large model unit as the source of PCell code structure data retrieval. Configuration unit, used to generate PCell code configuration information; The execution unit is used to send the PCell code configuration information to the LLM large model unit, instruct the LLM large model unit to search the vector database and the process rule base based on the PCell code structure template and the PCell code configuration information, instruct the LLM large model unit to generate a first PCell code sample based on the search results, and receive the first PCell code sample fed back by the LLM large model unit. The logic error correction unit is used to check whether the first PCell code sample contains logical syntax errors. If there are warnings or errors, it instructs the LLM large model unit to perform error correction until the warnings or errors are eliminated, and the second PCell code sample is obtained. The compilation and verification unit is used to pass the second PCell code sample to the EDA software compilation system through the call interface for compilation. If the compilation fails, the LLM large model unit is used to correct the error based on the error message until the error is eliminated and the third PCell code sample that can be compiled correctly is obtained. The instantiation verification unit is used to instantiate the third PCell code into a PCell layout instance, verify whether the PCell layout instance is correct, and if it is incorrect, instruct the LLM large model unit to make adjustments until the error is eliminated and the fourth PCell code sample is obtained. A labeling unit is used to add feature labels to the fourth PCell code sample; The sample library unit is used to store the fourth PCell code sample and its feature labels.

7. A PCell code data augmentation system according to claim 6, characterized in that: The interface document processing unit reads the interface document, obtains the interface list, obtains the parameter information of each interface, generates a key-value pair dictionary based on the interface parameter information, and stores the key-value pair dictionary into a searchable vector database.

8. A PCell code data augmentation method according to claim 6, characterized in that, The PCell code configuration information includes: EDA software type, PCell code structure template used in this project, process rules used in this project, PCell class name, paramTable method, pcellEval method, createPCMPcell method.

9. A PCell code data augmentation method according to claim 6, characterized in that: The instantiation verification unit captures the parameter names and parameter types defined in the third PCell code sample and generates a set of random parameter combinations; based on each parameter combination in the set of random parameter combinations, it generates a specific PCell layout instance.

10. A processor-readable storage medium, characterized in that, The processor-readable storage medium stores a computer program, and when the processor executes the computer program, it implements a PCell code data augmentation method as described in any one of claims 1 to 5.

Citation Information

Cited By

  • Process track-based EDA training data set construction method, decision method and device

    CN122527717A