A DRC rule compiling generation method, device and equipment and storage medium
By parsing and compiling natural language DRC rules through a pre-trained semantic parsing model to generate structured semantic fields, the problem of long DRC Deck development cycle and high maintenance cost in CMOS integrated circuit photomask manufacturing is solved, and efficient design rule checking is achieved.
Patent Information
- Application Number
- CN202611376371.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-04
- Publication Date
- 2026-11-24
AI Technical Summary
In the existing technology, during the manufacturing process of CMOS integrated circuit photomasks, the frame cell design rule check suffers from ambiguity in natural language rules and frequent errors in human translation, resulting in a long development cycle and high cost of DRC Deck. Furthermore, repeated debugging is required when the process node is updated, leading to high maintenance costs.
A pre-trained semantic parsing model is used to perform semantic parsing on natural language DRC rules, generating structured semantic fields, and compiling them into executable script files for EDA tools based on DRC standard library statement templates.
The development and debugging process of DRC script files is automated, which significantly shortens the development cycle, reduces maintenance costs, and improves the efficiency of design rule checking.
Smart Images

Figure CN123159255A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of semiconductor technology, and more specifically, to a method, apparatus, device, and storage medium for compiling and generating DRC rules. Background Technology
[0002] In the CMOS (Complementary Metal-Oxide-Semiconductor) integrated circuit photomask manufacturing process, frame cells need to be drawn around the core area of the chip. These frames include layouts of auxiliary manufacturing areas such as scribing lines, sealing rings, alignment marks, and test structures. Checking the design rules of the frame cells is a critical step in ensuring photomask manufacturability and chip yield.
[0003] Currently, the wafer fab process engineer team first writes design rule tables in natural language and schematic diagrams based on process capabilities. Then, the DRC (Design Rule Check) coders translate these natural language rules into executable script code for specific EDA (Electronic Design Automation) tools, i.e., the DRC Deck, based on their subjective understanding of the design rule tables.
[0004] However, the above approach has several problems. First, natural language rules lack formalized semantics and syntax, often resulting in ambiguity, incompleteness, or vagueness. Different coders may produce different code implementations for the same rule. Second, human translation inevitably introduces errors. Early versions of the DRC Deck typically require multiple rounds of iterative debugging, which is time-consuming, costly, and may still leave residual errors. Furthermore, whenever the process node is updated or the PDK (Process Design Kit) version is iterated, the aforementioned human translation and debugging process needs to be re-executed, leading to extremely high maintenance costs for the DRC Deck. Summary of the Invention
[0005] This application provides a method, apparatus, device, and storage medium for compiling and generating DRC rules, which can shorten the development cycle of DRC script files.
[0006] In a first aspect, embodiments of this application provide a method for compiling and generating DRC rules, the method comprising: Obtain natural language DRC rules; A pre-trained semantic parsing model is used to perform semantic parsing on the natural language DRC rules to obtain the semantic fields of the natural language DRC rules; The semantic fields are filled into a preset DRC structured template to obtain an intermediate semantic representation of the DRC. Based on the DRC semantic intermediate representation and the preset DRC standard library statement template, the DRC script file corresponding to the target EDA tool is compiled and generated.
[0007] Optionally, before employing the pre-trained semantic parsing model, the method further includes: The natural language DRC rules are labeled to obtain a set of labeled natural language DRC rule samples, and each natural language DRC rule in the sample set is labeled with a corresponding semantic label; The initial semantic parsing model is fine-tuned and trained based on the sample set to obtain the pre-trained semantic parsing model.
[0008] Optionally, the step of fine-tuning the initial semantic parsing model based on the sample set to obtain the pre-trained semantic parsing model includes: Data augmentation is performed on each of the natural language DRC rules in the sample set to obtain an augmented training set; The enhanced training set is input into the initial semantic parsing model for fine-tuning training to obtain the fine-tuned semantic parsing model; The performance of the fine-tuned semantic parsing model is evaluated using the sample set, and the fine-tuned semantic parsing model with the best performance is saved as the pre-trained semantic parsing model.
[0009] Optionally, the step of employing a pre-trained semantic parsing model to perform semantic parsing on the natural language DRC rules to obtain the semantic fields of the natural language DRC rules includes: The natural language DRC rule is segmented into text to obtain a sequence of semantic units of the natural language DRC rule; The semantic unit sequence is input into the pre-trained semantic parsing model, and the pre-trained semantic parsing model predicts the semantic label corresponding to each semantic unit in the semantic unit sequence; Based on the semantic tags corresponding to each semantic unit, the semantic fields corresponding to the natural language DRC rules are extracted from the sequence of semantic units.
[0010] Optionally, after filling the semantic fields into a preset DRC structured template to obtain the intermediate semantic representation of the DRC, the method further includes: The intermediate semantic representation of the DRC is reviewed; If the review fails, a correction operation is obtained for the DRC semantic intermediate representation. The DRC semantic intermediate representation is updated according to the correction operation, and the review is carried out again until the review is passed, so as to obtain the approved DRC semantic intermediate representation.
[0011] Optionally, the step of compiling and generating a DRC script file corresponding to the target EDA tool based on the DRC semantic intermediate representation and a preset DRC standard library statement template includes: Based on the check type corresponding to each rule record in the DRC semantic intermediate representation, the corresponding statement template is matched from the DRC standard library statement template; Extract the semantic field values of each rule record, and populate the statement template to generate the statement corresponding to each rule record; The statements are arranged according to the requirements of the target EDA tool to obtain the DRC script file.
[0012] Optionally, the semantic field values of each rule record are extracted, and the statement template is filled to generate the statement corresponding to each rule record, specifically including: Step 1: Determine whether the logical layer name in the rule record is a derived layer; if the logical layer name is a derived layer, generate a derived layer definition statement; if the logical layer name is not a derived layer, do not generate the derived layer definition statement. Step 2: After completing Step 1, determine whether the exclusion layer field in the rule record is not empty; if the exclusion layer field is not empty, generate an exclusion statement; if the exclusion layer field is empty, do not generate the exclusion statement. Based on the results of step one and step two, and the semantic field values, the statement template is populated to generate statements corresponding to each rule record.
[0013] Secondly, embodiments of this application also provide a DRC rule compilation and generation apparatus, the apparatus comprising: The acquisition module is used to acquire natural language DRC rules; The parsing module is used to perform semantic parsing on the natural language DRC rules using a pre-trained semantic parsing model to obtain the semantic fields of the natural language DRC rules; The construction module is used to fill the semantic fields into a preset DRC structured template to obtain an intermediate semantic representation of DRC. The compilation module is used to compile and generate the DRC script file corresponding to the target EDA tool based on the DRC semantic intermediate representation and the preset DRC standard library statement template.
[0014] Thirdly, embodiments of this application also provide an electronic device, including: a processor, a memory, and a bus, wherein the memory stores program instructions executable by the processor, and when the electronic device is running, the processor communicates with the memory via the bus, and the processor executes the program instructions to perform the steps of the DRC rule compilation and generation method as described in any of the first aspects. Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the DRC rule compilation and generation method as described in any of the first aspects.
[0015] This application provides a method, apparatus, device, and storage medium for compiling and generating DRC rules. First, natural language DRC rules are acquired. Then, a pre-trained semantic parsing model is used to perform semantic parsing on the natural language DRC rules, obtaining semantic fields. Based on this, the semantic fields are filled into a preset DRC structured template to obtain an intermediate DRC semantic representation. Finally, based on the intermediate DRC semantic representation and a preset DRC standard library statement template, a DRC script file corresponding to the target EDA tool is compiled and generated. Through this processing method, design rules written in natural language can be automatically converted into executable script files for EDA tools. This effectively avoids rule ambiguity and coding errors caused by subjective differences in understanding in traditional manual translation methods, significantly shortens the development and debugging cycle of DRC script files, and significantly reduces the maintenance cost of repeatedly writing scripts due to process node updates. This improves the automation level and compilation efficiency of design rule checking in integrated circuit photomask manufacturing. Attached Figure Description
[0016] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 A flowchart illustrating a DRC rule compilation and generation method provided in this application embodiment; Figure 2 A flowchart illustrating the process of obtaining a pre-trained semantic parsing model in a DRC rule compilation and generation method provided in this application embodiment; Figure 3 A flowchart illustrating the fine-tuning training of an initial semantic parsing model in a DRC rule compilation and generation method provided in this application embodiment; Figure 4 A flowchart illustrating the process of obtaining semantic fields in a DRC rule compilation and generation method provided in this application embodiment; Figure 5 This is a schematic diagram illustrating the process of generating a DRC script file in a DRC rule compilation and generation method provided in an embodiment of this application. Figure 6A schematic diagram of the preprocessing of the derived layer and exclusion layer in a DRC rule compilation and generation method provided in this application embodiment; Figure 7 This is a flowchart illustrating the review of intermediate DRC semantic representations in a DRC rule compilation and generation method provided in an embodiment of this application. Figure 8 A schematic diagram of a DRC rule compilation and generation apparatus provided in an embodiment of this application; Figure 9 This is a schematic diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0019] Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0020] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0021] Before providing a detailed explanation of this application, let's first introduce its application scenarios.
[0022] In the semiconductor manufacturing industry, as process nodes continue to evolve towards smaller dimensions, the number and complexity of design rules are increasing exponentially. A design rule table for an advanced process node typically contains thousands of rules. When wafer foundries release a new process node or update a PDK version, they need to simultaneously convert these design rules into DRC script files to support chip design customer needs. However, design rules are presented in natural language, while DRC Deck must adhere to the syntax specifications of specific EDA tools (such as Calibre), creating a significant language gap. Currently, this conversion process relies entirely on DRC engineers manually translating and repeatedly debugging each rule. The development cycle for a single DRC script file often takes weeks or even months, becoming a critical bottleneck restricting efficiency in the photomask manufacturing process.
[0023] Based on this, embodiments of this application provide a method, apparatus, device, and storage medium for compiling and generating DRC rules. First, natural language DRC rules are obtained; then, a pre-trained semantic parsing model is used to perform semantic parsing on the natural language DRC rules to obtain semantic fields of the natural language DRC rules; based on this, the semantic fields are filled into a preset DRC structured template to obtain an intermediate DRC semantic representation; then, according to the intermediate DRC semantic representation and the preset DRC standard library statement template, a DRC script file corresponding to the target EDA tool is compiled and generated. This significantly shortens the development and debugging cycle of DRC script files, significantly reduces the maintenance cost of repeatedly writing scripts due to process node updates, and thus improves the automation level and compilation efficiency of design rule checking in integrated circuit photomask manufacturing.
[0024] The following explanation, in conjunction with the accompanying drawings, uses several embodiments to illustrate the points discussed.
[0025] The DRC rule compilation and generation method provided in this application can be implemented by a computer device pre-installed with a preset DRC rule compilation and generation algorithm or software, by running the algorithm or software. The computer device can be, for example, a server or a terminal, and the terminal can be a user computer.
[0026] Figure 1 This is a flowchart illustrating a DRC rule compilation and generation method provided in an embodiment of this application, as shown below. Figure 1 As shown, the method for compiling and generating DRC rules includes steps S101-S104: S101, Obtain Natural Language DRC Rules.
[0027] Among them, the Natural Language DRC rules are design rules written by the wafer fab process engineer team based on process capabilities. They are defined in the form of natural language and diagrams, such as "AA min. width≥0.18μm" and "SAB space tounrelated AA≥0.10μm". The design rule description adopts a free language form, lacks formal semantic and grammatical structure, and often has problems such as ambiguity, incompleteness or ambiguity.
[0028] First, obtain the natural language DRC rules to be compiled. Optionally, the natural language DRC rules can be derived from the design rule table (DR Table) provided by the wafer foundry, or from the rule description file included in the process design kit (PDK) document.
[0029] Specifically, natural language DRC rules are acquired through a pre-defined rule acquisition interface. During the acquisition process, the rule text undergoes preliminary cleaning and format standardization, including removing redundant whitespace characters, standardizing punctuation formats, and identifying and retaining rule numbers and hierarchical structure information to ensure that subsequent semantic parsing steps obtain standardized input data.
[0030] S102 uses a pre-trained semantic parsing model to perform semantic parsing on natural language DRC rules, obtaining the semantic fields of natural language DRC rules.
[0031] After obtaining the natural language DRC rules, they need to be converted into structured semantic information that can be used by the downstream compilation process. Since the natural language DRC rules are described in free text form, they cannot be directly understood and processed by the compilation system. Therefore, a pre-trained semantic parsing model is needed to perform semantic understanding and information extraction on the rule text, and extract structured semantic fields from it.
[0032] Among them, the pre-trained semantic parsing model is a neural network model obtained through pre-training.
[0033] To more clearly illustrate the training process of the pre-trained semantic parsing model described above, the following section combines... Figures 2 to 3 The illustrated embodiment provides a detailed explanation of the training process for this model.
[0034] Figure 2 This is a schematic diagram illustrating the process of obtaining a pre-trained semantic parsing model in a DRC rule compilation and generation method provided in an embodiment of this application. Figure 2 As shown, before S102 above, before using a pre-trained semantic parsing model to perform semantic parsing on the natural language DRC rules and obtain the semantic fields of the natural language DRC rules, the method in this embodiment further includes steps S210-S220: S210, annotate the natural language DRC rules to obtain an annotated natural language DRC rule sample set.
[0035] Each natural language DRC rule in the sample set is labeled with a corresponding semantic tag.
[0036] Among them, the labeled natural language DRC rule sample set is a set of labeled data used to train the semantic parsing model. Semantic labels are used to identify the semantic category corresponding to each word in the rule text.
[0037] To construct a sample set suitable for DRC rule semantic parsing tasks, it is first necessary to design an annotation system for DRC rule semantic elements. This application provides a BIO (Begin-Inside-Outside) annotation system to define which words in the rule text belong to entities and what type of entity they belong to. This BIO annotation system specifically includes the following tag categories: The B-MAIN_LAYER and I-MAIN_LAYER tags are used to annotate entities in the main inspection layer, identifying the main logical layer names involved in the rule, such as "Poly", "AA", "Metal1", etc. B-MAIN_LAYER marks the starting word of the entity, while I-MAIN_LAYER marks the subsequent words of the entity.
[0038] The B-2ND_LAYER and I-2ND_LAYER tags are used to annotate entities in the second inspection layer. They are mainly used to identify auxiliary inspection layers in two-layer inspection rules. For example, in the "Poly to AA spacing" rule, AA is the second inspection layer.
[0039] The B-CHECK and I-CHECK tags are used to mark the entity type to be checked, indicating the type of check performed by the rule, including but not limited to Width, Space, Area, Enclosure, etc.
[0040] The B-LIMIT and I-LIMIT tags are used to annotate constraint direction entities, identifying the constraint direction description in the rule, such as "min" or "max".
[0041] The B-VALUE and I-VALUE labels are used to annotate numerical entities and identify numerical limits in rules, such as "0.18" and "0.10".
[0042] The B-LIMIT_SYMBOL and I-LIMIT_SYMBOL tags are used to annotate constraint symbol entities and identify comparison symbols in rules, such as "≥", "≤", ">", "<", etc.
[0043] The 'O' tag is used to mark irrelevant words, identifying words in the rule text that do not belong to any entity category.
[0044] After the annotation system is designed, the natural language DRC rules to be annotated are obtained. The annotators then use the BIO annotation system to annotate the semantic tags of each word in each natural language DRC rule, thus obtaining a sample set of annotated natural language DRC rules.
[0045] Taking a natural language DRC rule "Poly width must be ≥0.12 µm" as an example, after annotators annotate it according to the aforementioned BIO annotation system, they obtain the corresponding semantic label sequence. Specifically, the semantic sequence of this natural language DRC rule is ["Poly", "width", "must", "be", "≥", "0.12", "µm"], and the corresponding label sequence is [B-MAIN_LAYER, B-CHECK, O, O, B-LIMIT_SYMBOL, B-VALUE, O]. Among them, "Poly" is labeled as the starting word of the main inspection layer, "width" is labeled as the inspection type, "≥" is labeled as the constraint symbol, "0.12" is labeled as a numerical value, and the remaining words are labeled as irrelevant words. Associating the semantic label sequence obtained after annotating each rule with the corresponding natural language DRC rule text constitutes the annotated natural language DRC rule sample set.
[0046] S220, Fine-tune the initial semantic parsing model based on the sample set to obtain a pre-trained semantic parsing model.
[0047] The initial semantic parsing model is a language model pre-trained on a large-scale general corpus. The pre-trained semantic parsing model is a model obtained after fine-tuning and training on a DRC rule sample set, which can accurately identify semantic elements in DRC rule text.
[0048] In one possible implementation, RoBERTa (a pre-trained language model) is used as the main framework of the initial semantic parsing model. A token-level linear classification layer is added on top of it, and semantic element extraction of DRC rule text is achieved through sequence labeling. The fine-tuning training process is as follows: First, the rule text in the labeled natural language DRC rule sample set is segmented to obtain the token sequence for each rule. Since RoBERTa uses a subword segmentation strategy, the original words may be split into multiple subword tokens (for example, "Poly" may be split into "Pol" and "##y"). Therefore, it is necessary to map the original word-level BIO tags to the subword level to ensure that each token corresponds to the correct semantic tag.
[0049] Then, the token sequences for each rule are input into the RoBERTa backbone network. After encoding the input token sequences, the top linear classification layer outputs the predicted probability of each token for each label category. A preset loss function is used to calculate the loss between the predicted results and the true labels, and the AdamW optimizer is used in conjunction with the Warmup learning rate scheduling strategy to update the parameters. At the same time, a gradient pruning strategy is used to prevent gradient explosion, completing the fine-tuning training of the initial semantic parsing model and obtaining the pre-trained semantic parsing model.
[0050] In this embodiment, by acquiring a set of labeled natural language DRC rules and fine-tuning the initial semantic parsing model, a supervision signal is provided for the semantic parsing model, thereby improving the accuracy of semantic parsing.
[0051] In the above Figure 2 Based on the corresponding embodiments, in order to more clearly demonstrate the specific implementation process of fine-tuning the initial semantic parsing model, this application also provides a possible implementation method for fine-tuning the initial semantic parsing model in the DRC rule compilation and generation method. Figure 3 This is a schematic diagram illustrating the process of fine-tuning the initial semantic parsing model in a DRC rule compilation and generation method provided in an embodiment of this application. Figure 3 As shown, in S220 above, the initial semantic parsing model is fine-tuned and trained based on the sample set to obtain the pre-trained semantic parsing model, which specifically includes: S310 performs data augmentation on each natural language DRC rule in the sample set to obtain the augmented training set.
[0052] Data augmentation is the process of transforming original training samples to generate diverse training samples, thereby expanding the scale of training data and improving the model's generalization ability. Data augmentation includes at least one of synonym substitution, anonymous substitution, and numerical perturbation.
[0053] Synonym substitution refers to replacing specific words in DRC rule text with their synonyms to simulate the diverse ways in which rule text can be expressed. For example, replacing "minimum" with "min", "maximum" with "max", "spacing" with "space" or "distance", and "width" with "length", etc. Through synonym substitution, the initial semantic parsing model can learn how different wordings express the same semantic rule, enhancing its adaptability to lexical diversity.
[0054] Anonymous substitution refers to replacing specific layer names, values, etc., in the DRC rule text with other entities of the same type. This enhances the initial semantic parsing model's ability to recognize the semantic roles of entities themselves, rather than its ability to memorize specific entity names. For example, replacing "Poly" with "AA" in the rule "Poly width≥0.18" yields "AA width≥0.18", or replacing "Metal1" with "Metal2", etc. Through anonymous substitution, the initial semantic parsing model can focus more on the semantic roles of words in the rules rather than the meaning of the specific words themselves, avoiding overfitting to specific layer names or values while ignoring their semantic structure.
[0055] Numerical perturbation refers to fine-tuning or unit conversion of the numerical limits in the DRC rules to enhance the model's ability to recognize different numerical expressions. For example, changing "180 nm" to "0.18 μm" or "0.18", or fine-tuning "0.10" to "0.12", etc. Through numerical perturbation, the initial semantic parsing model can learn different expressions of the same semantics under different unit systems, improving the model's ability to generalize and recognize numerical entities.
[0056] Specifically, for each natural language DRC rule in the sample set, at least one of synonym substitution, anonymization substitution, and numerical perturbation is selected to process the natural language DRC rule, generating one or more augmented training samples. All augmented training samples constitute the augmented training set.
[0057] Through the above data augmentation processing, the diversity and coverage of training samples can be effectively expanded without increasing the cost of manual annotation, enabling the initial semantic parsing model to access richer sentence expressions and word combinations under limited labeled data conditions.
[0058] S320: Input the enhanced training set into the initial semantic parsing model for fine-tuning training to obtain the fine-tuned semantic parsing model.
[0059] Specifically, the token sequences and their corresponding semantic labels obtained by segmenting the natural language DRC rule text in the enhanced training set are input into the initial semantic parsing model. This initial semantic parsing model uses RoBERTa (a pre-trained language model) as its main framework and adds a token-level linear classification layer on top. After semantically encoding the token sequences, the initial semantic parsing model outputs the predicted probability of each token corresponding to each label category. It uses a pre-defined loss function to calculate the difference between the predicted results and the true labels, and uses the AdamW optimizer with a Warmup learning rate scheduling strategy to update the parameters. Simultaneously, a gradient pruning strategy is employed to prevent gradient explosion, completing the fine-tuning training of the initial semantic parsing model. The model obtained after fine-tuning is then used as the fine-tuned semantic parsing model.
[0060] S330 uses a sample set to evaluate the performance of the fine-tuned semantic parsing model and saves the best-performing fine-tuned semantic parser as a pre-trained semantic parsing model.
[0061] During the model fine-tuning training process, it is necessary to evaluate the model performance in order to monitor the training effect of the model and select the optimal model parameters.
[0062] The sample set consists of labeled natural language DRC rule samples, including each natural language DRC rule and its corresponding manually annotated semantic labels. The sample set is used to evaluate the model's generalization performance during training. Performance evaluation refers to measuring the model's semantic parsing accuracy by calculating evaluation metrics across the entire sample set.
[0063] Specifically, after each training epoch or every preset number of training steps, the natural language DRC rule text from the sample set is input into the current fine-tuned semantic parsing model, which then outputs semantic label prediction results. The semantic labels predicted by the current fine-tuned semantic parsing model are compared with the manually labeled real labels in the sample set, and evaluation metrics such as accuracy and F1 score are calculated. Accuracy measures the proportion of correct predictions made by the model overall, while the F1 score is the harmonic mean of precision and recall, used to comprehensively measure the model's prediction performance across different label categories. When the evaluation results meet preset conditions or reach the current optimal performance, the parameters of the current fine-tuned semantic parsing model are saved as a candidate model.
[0064] If the current candidate model's evaluation result is better than the previously saved best model, then the current candidate model replaces the previously saved model as the new best model. If the evaluation results of the candidate models do not improve after several consecutive rounds, an early stopping mechanism is triggered to terminate training and prevent overfitting. After training is complete, the best-performing fine-tuned semantic parsing model is determined as the final pre-trained semantic parsing model.
[0065] In this embodiment, by performing data augmentation on each natural language DRC rule in the sample set, the diversity and coverage of the training samples can be expanded without increasing the cost of manual annotation, thereby improving the model's adaptability to diverse expressions of DRC rules. At the same time, by using the sample set for performance evaluation and saving the best-performing fine-tuned semantic parsing model as a pre-trained semantic parsing model, the reliability of the pre-trained semantic parsing model in terms of semantic parsing performance can be ensured.
[0066] After training the pre-trained semantic parsing model, it can be applied to the semantic parsing step in S102.
[0067] The semantic field is structured data that describes the core semantic elements of the DRC rule, including at least one or more of the following: main inspection layer, inspection type, constraint conditions, numerical values, and constraint symbols.
[0068] Specifically, the natural language DRC rule text is input into a pre-trained semantic parsing model, which performs semantic parsing on the rule text. The pre-trained semantic parsing model has been specifically trained using DRC rule sample data, fully learning the unique expression patterns and knowledge structures of DRC rules, and can accurately distinguish the semantic roles of each word in the rule text (i.e., which words belong to layer names, which words belong to inspection types, which words belong to numerical values, etc.). The pre-trained semantic parsing model encodes the input rule text word by word and, through methods such as sequence labeling or reading comprehension, locates and extracts semantic elements from the rule text, including the main inspection layer involved in the rule (such as logical layer names like "Poly" and "AA"), the inspection types performed by the rule (such as width inspection, space inspection, area inspection, etc.), the constraint directions in the rule, and the corresponding numerical limits (such as "≥0.18" and "≤0.10").
[0069] Taking the rule text "Poly width must be ≥0.12 µm" as an example, after processing by the pre-trained semantic parsing model, the extracted semantic fields include: the main checking layer is "Poly", the checking type is "Width", the constraint symbol is "≥", and the value is "0.12". These semantic fields are output in the form of a structured dictionary for use by the downstream IR (Intermediate Representation) layer.
[0070] By employing a pre-trained semantic parsing model to perform semantic parsing on natural language DRC rules, natural language text can be automatically and efficiently converted into structured semantic fields, improving the automation level and processing efficiency of the DRC script generation process.
[0071] To more clearly demonstrate the specific implementation process of obtaining semantic fields using the pre-trained semantic parsing model, the following section combines... Figure 4 The illustrated embodiment provides a detailed description of one possible implementation of S102.
[0072] Figure 4 This is a flowchart illustrating the process of obtaining semantic fields in a DRC rule compilation and generation method provided in an embodiment of this application. For example... Figure 4 As shown in S102 above, a pre-trained semantic parsing model is used to perform semantic parsing on the natural language DRC rules, resulting in semantic fields of the natural language DRC rules, including: S410, perform text segmentation on the natural language DRC rules to obtain the semantic unit sequence of the natural language DRC rules.
[0073] Specifically, the natural language DRC rule text is input into the word segmenter of the pre-trained semantic parsing model for word segmentation and tagging. The word segmenter segments the rule text according to the vocabulary used by the pre-trained semantic parsing model in the pre-training stage, converting the continuous natural language text into a discrete sequence of semantic units.
[0074] It should be noted that a semantic unit is the smallest input unit when a pre-trained semantic parsing model processes text, and this application does not limit the specific granularity of the semantic unit. For example, a semantic unit can be a character-level unit, i.e., a single character; a word-level unit, i.e., a complete vocabulary; or a sub-word-level unit, i.e., a sub-word fragment after word segmentation. Taking a pre-trained semantic parsing model using a subword segmentation strategy as an example, this model uses sub-word-level units as semantic units, i.e., tokens. The segmenter segments the natural language DRC rule text according to the subword vocabulary of the pre-trained semantic parsing model during the pre-training stage, converting continuous natural language text into a token sequence, and inputting this token sequence as a semantic unit sequence into the model.
[0075] S420, input the semantic unit sequence into the pre-trained semantic parsing model, and the pre-trained semantic parsing model predicts the semantic label corresponding to each semantic unit in the semantic unit sequence.
[0076] Specifically, the semantic unit sequence is input into a pre-trained semantic parsing model. In one possible implementation, the pre-trained semantic parsing model employs an architecture based on a pre-trained language model plus a linear classification layer. For example, RoBERTa (a pre-trained language model) can be used as the main framework of the pre-trained semantic parsing model, with a token-level linear classification layer added on top. The pre-trained semantic parsing model first performs contextual semantic encoding on the semantic unit sequence; subsequently, the linear classification layer at the top of the pre-trained semantic parsing model performs a linear transformation on the encoded representation of each semantic unit, outputting the probability distribution of each semantic label category corresponding to that semantic unit. The pre-trained semantic parsing model selects the label category with the highest probability value as the prediction result for that semantic unit, ultimately outputting the semantic label corresponding to each semantic unit in the semantic unit sequence.
[0077] It should be noted that the pre-trained semantic parsing model and the aforementioned initial semantic parsing model are different stages of the same model architecture. The initial semantic parsing model refers to the model state after pre-training on a general corpus and before fine-tuning with DRC domain data; the pre-trained semantic parsing model refers to the model state obtained after fine-tuning and training with a natural language DRC rule sample set based on the initial semantic parsing model. Both have the same model architecture; the difference lies in the fact that the latter has acquired the semantic parsing capability for DRC rule texts through fine-tuning training with DRC domain data.
[0078] S430: Based on the semantic tags corresponding to each semantic unit, extract the semantic fields corresponding to the natural language DRC rules from the semantic unit sequence.
[0079] Specifically, the semantic unit sequence and its corresponding semantic tags are traversed, and semantic fields are extracted according to preset post-processing rules. Here, the post-processing rules refer to the transformation rules that restore the semantic unit sequence and its corresponding semantic tags to structured semantic fields.
[0080] In one possible implementation, semantic tags employ the BIO (Browser-Integer Identification) tagging system. Each semantic unit's tag indicates its position within an entity. Specifically, a B- tag indicates the unit is the starting unit of the entity, an I- tag indicates it is a subsequent unit within the same entity, and an O tag indicates it does not belong to any entity. During post-processing, semantic units starting with "B-" are used as the starting units of the entity. Subsequent semantic units labeled with the same entity category "I-" are sequentially appended to this starting unit until a tag from a different entity category is encountered, thus restoring the complete entity to its corresponding semantic field values. After traversing all semantic units and completing the appending operation, the semantic field values are organized according to preset field names to form a structured semantic field dictionary.
[0081] For example, taking a token as a semantic unit implementation: the semantic tag sequence corresponding to the token sequence ["Pol", "##y", "width", "≥", "0.18"] is [B-MAIN_LAYER, I-MAIN_LAYER, B-CHECK, B-LIMIT_SYMBOL, B-VALUE]. In post-processing, "Pol" corresponding to B-MAIN_LAYER and "##y" corresponding to I-MAIN_LAYER are concatenated to restore "Poly", which is extracted as the main check layer field; "width" corresponding to B-CHECK is extracted as the check type field; "≥" corresponding to B-LIMIT_SYMBOL is extracted as the constraint symbol field; and "0.18" corresponding to B-VALUE is extracted as the numeric field. The final output semantic field dictionary is {"main_layer": "Poly", "check": "Width", "symbol": "≥", "value": "0.18"}.
[0082] During the extraction process, it is also necessary to standardize the units of the numerical fields, converting the different unit formats that may appear in the rule text into preset standard units. For example, "180 nm" is uniformly converted into "0.18 μm" to ensure that the downstream compilation and generation stage obtains numerical input with a consistent format.
[0083] In this embodiment, semantic unit sequences are obtained by segmenting and tagging natural language DRC rules. The semantic labels of each semantic unit are predicted by a pre-trained semantic parsing model. Then, semantic fields are extracted from the semantic unit sequence based on the semantic labels. This realizes the automatic conversion from natural language rule text to structured semantic fields, reduces the dependence on manual parsing, and improves the automation level of the entire DRC script generation.
[0084] In one possible implementation, when training data is insufficient or difficult to obtain, a semantic parsing of natural language DRC rules can be performed using information extraction based on a Large Language Model (LLM). Specifically, by constructing a prompt containing a task description, output format constraints, and a few examples, the natural language DRC rule text and the prompt are input into the LLM. The LLM, understanding the rule's semantics, outputs the corresponding semantic fields according to a specified structured format. For example, inputting the prompt "Please extract the main checking layer, checking type, constraint symbol, and value from the following DRC rule and output it in JSON format: AA min. width ≥ 0.18 μm" into the LLM, the model outputs semantic fields in the form of "{"main_layer": "AA", "check": "Width","symbol": "≥", "value": "0.18"}". This method does not require pre-constructing a sample set or training a dedicated model and is suitable for scenarios with a small number of rules or frequently changing rule patterns.
[0085] In another possible implementation, when the number of rules is small or the accuracy of parsing is extremely critical, the semantic fields of the natural language DRC rules can be obtained by manually filling in a form. Specifically, engineers read through each natural language DRC rule in a pre-defined DRC Excel template and manually fill in the semantic fields such as the main inspection layer, inspection type, constraints, and values according to the pre-defined field specifications. This method can completely avoid semantic understanding biases that may be introduced by automatic parsing, ensuring the accuracy of the semantic fields, and is suitable for scenarios with a small number of rules or extremely high requirements for parsing quality.
[0086] S103, fill the semantic fields into the preset DRC structured template to obtain the DRC semantic intermediate representation.
[0087] Since semantic fields are scattered information oriented towards individual rules and do not yet have a unified storage format for rule sets, and different EDA tools have significant differences in their syntax requirements for DRC scripts, it is necessary to organize semantic fields into a standardized intermediate representation that is independent of any specific EDA tool.
[0088] The preset DRC structured template is a predefined standard field system template used to carry the complete semantic information of DRC rules. The DRC semantic intermediate representation is a standardized data structure generated based on the DRC structured template, which uses a structured field system to completely describe the semantic information of DRC rules.
[0089] In one possible implementation, the DRC structured template is represented as an Excel spreadsheet, with each row corresponding to a DRC rule and each column corresponding to a semantic field. The field system of the DRC structured template includes the following fields: The Layer field is used to record the name of the underlying logical layer involved in the rule, such as "Poly", "AA", "Metal1", etc. This field is the main identifier layer of the rule.
[0090] The Main Layer field is used to record information about the main inspection layer. It can record not only a single logical layer name, but also a derived layer expression containing Boolean operations. For example, "AA AND (GATE)" indicates that the inspection object is a composite layer obtained by ANDing the AA layer and the GATE layer.
[0091] The 2nd Layer field records information about the second inspection layer, primarily serving two-layer inspection rules (such as spacing checks between different layers). This field is empty when the rule only involves a single-layer inspection.
[0092] The Except Layer field is used to record exclusion layer information, identifying the regions that should be skipped during DRC checks. For example, “SEAL” indicates that the sealing ring region is not included in the current rule's check.
[0093] The Check field is used to record the type of check, including but not limited to Width check, Space check, Area check, and Enclosure check.
[0094] The Limit and Symbol fields are used to record the constraint direction and constraint symbol. The Symbol field records comparison symbols such as "≥", "≤", ">", and "<", while the Limit field records constraint direction descriptions such as "min" and "max".
[0095] The Value field is used to record the numerical limit corresponding to the rule, such as "0.18" or "0.10".
[0096] The GDS NO. and Data type fields are used to record the GDS physical layer number and data type corresponding to the logical layer, establishing a mapping relationship between the logical layer name and the physical layout data. For example, "28 / 0" means that the GDS layer number is 28 and the data type is 0.
[0097] The Description field is used to retain the original description text of the natural language DRC rule, such as "AA to AAspacing ≥ 0.18 μm", which facilitates engineers' traceability and verification.
[0098] Specifically, each semantic field is filled into its corresponding column according to the field specifications of the DRC structured template, forming the DRC semantic intermediate representation record for the current rule. Each rule record is written to an Excel spreadsheet, and finally, the semantic fields of all rules are integrated into a complete DRC semantic intermediate representation table. This table organizes each DRC rule by row and each semantic dimension by column, forming a structured digital representation of the entire rule set.
[0099] The DRC semantic intermediate representation fully describes the semantic information of DRC rules using a standardized field system, independent of the syntax format of any specific EDA tool. Even if the target EDA tool changes, there is no need to re-execute the semantic parsing process; only the statement template for the corresponding tool needs to be changed in the downstream compilation stage, significantly reducing the repetitive labor costs during process node migration or tool replacement. Furthermore, using an Excel spreadsheet as the carrier of the DRC semantic intermediate representation allows engineers to directly open, view, and edit rule information without the need for a specialized programming environment.
[0100] S104: Based on the intermediate semantic representation of DRC and the preset DRC standard library statement template, compile and generate the DRC script file corresponding to the target EDA tool.
[0101] Because the scripting languages of different EDA tools (such as Mentor Calibre's SVRF syntax, KLayout's DRC DSL syntax, etc.) have significant differences in syntax structure, keyword definition, statement format, etc., it is impossible to directly convert the DRC semantic intermediate representation into the script files of each tool in a unified way. Therefore, it is necessary to use the preset DRC standard library statement template to complete the compilation and generation from the intermediate representation to the target code.
[0102] The DRC standard library statement templates are a pre-built collection of code templates, organized along two dimensions: inspection type (e.g., Width, Space, Area, Enclosure) and target EDA tool (e.g., Calibre, Assura, KLayout). Each inspection type corresponds to at least one statement template for each target EDA tool. Each statement template contains the standard statement structure for the corresponding inspection type and reserves parameter placeholders for later filling. The target EDA tool is the DRC inspection tool that the current compilation is targeting, such as Calibre, Assura, or KLayout.
[0103] Specifically, the process begins by obtaining the DRC semantic intermediate representation and determining the target EDA tool type for the current compilation. Then, each rule record in the DRC semantic intermediate representation is read sequentially. For each rule record, based on the check type fields (such as Width, Space, Area, etc.) in the record, a matching statement template corresponding to that check type is found in the DRC standard library statement templates. Upon successful matching, the semantic fields (such as layer name, value, constraint symbols, etc.) of the rule record in the DRC semantic intermediate representation are filled into the corresponding parameter placeholders in the matched statement template, completing the conversion of a single rule from the intermediate representation to the target script code.
[0104] Simultaneously, during the compilation and generation process, adaptation processing is required based on the field information in the DRC semantic intermediate representation. For rules containing derived layer semantics, corresponding layer definition statements need to be generated based on the Boolean expressions of the derived layer; for rules containing exclusion layer semantics, corresponding exclusion region definition statements need to be generated based on the exclusion layer fields, so that the final generated DRC script file can fully express the complete semantics of the original rule.
[0105] Finally, all the compiled statements are arranged according to the script organization structure and statement order required by the target EDA tool to generate a complete DRC script file. The DRC script file can be run directly in the target EDA tool to perform DRC checks on the chip layout.
[0106] The DRC standard library statement templates enable the same DRC semantic intermediate representation to be compiled into DRC script files suitable for different EDA tools by matching the template libraries of different tools, avoiding the repetitive work of writing separate scripts for each tool. At the same time, compared with the traditional manual coding method, the template-based compilation method significantly reduces the risk of errors caused by unfamiliarity with syntax rules or coding oversights, and improves the quality and consistency of DRC script generation.
[0107] To more clearly demonstrate the specific implementation process of compiling and generating DRC script files based on the DRC semantic intermediate representation and DRC standard library statement templates, the following section combines... Figures 5 to 6 The illustrated embodiment provides a detailed description of one possible implementation of S104.
[0108] In the above Figure 1 Based on the corresponding embodiments, in order to more clearly demonstrate the specific implementation process of generating DRC script files, this application also provides a possible implementation method for generating DRC script files in the DRC rule compilation and generation method. Figure 5 This is a schematic diagram illustrating the process of generating a DRC script file in a DRC rule compilation and generation method provided in an embodiment of this application. Figure 5As shown, in S104 above, based on the DRC semantic intermediate representation and the preset DRC standard library statement template, the DRC script file corresponding to the target EDA tool is compiled and generated, including: S510: Based on the check type corresponding to each rule record in the DRC semantic intermediate representation, match the corresponding statement template from the DRC standard library statement template.
[0109] Specifically, the target EDA tool type for the current compilation is first determined, and the corresponding template set for that tool is loaded from the DRC standard library statement templates. Then, each rule record in the DRC semantic intermediate representation is read one by one. For each rule record, its check type field is extracted, and using this check type as an index, the corresponding statement template is matched from the loaded template set. If a match is successful, the statement template is used as the compilation template for the current rule record, and the process proceeds to the subsequent population steps; if a match fails, an exception message is recorded and an indication that the check type is not supported.
[0110] S520: Extract the semantic field values of each rule record, fill the statement template to generate the statement corresponding to each rule record.
[0111] Specifically, for each rule record, the semantic field values in the DRC semantic intermediate representation are extracted item by item, including layer name, value, constraint symbol, GDS layer number, and data type. The extracted field values are then filled into the corresponding parameter placeholders in the statement template according to the parameter mapping relationship defined in the statement template. For example, if the statement template is "INTERNAL..." <layer> <value>If the layer name field of the current rule record is "Metal1" and the value field is "0.18", then after filling, the statement "INTERNAL Metal1 0.18" will be obtained. Each rule record in the DRC semantic intermediate representation is traversed one by one, and the statement template corresponding to each rule record is filled in separately until all rule records are processed, generating the statement corresponding to each rule record.
[0112] S530: Arrange the statements according to the requirements of the target EDA tool to obtain the DRC script file.
[0113] Specifically, all generated statements are arranged according to the script organization structure and statement order required by the target EDA tool. Different EDA tools have different requirements for the format of DRC scripts, including the statement organization structure, statement order, and the order of layer definition sections and rule checking sections. Following the syntax specifications of the target EDA tool, the generated statements are arranged sequentially, and necessary script headers, script footers, and other structural statements are added to generate a complete DRC script file. The DRC script file can be directly run in the target EDA tool to perform DRC checks on the chip layout.
[0114] In this embodiment, template matching ensures the flexibility and scalability of the compilation process. When adding a new inspection type or supporting a new target EDA tool, only the template library needs to be expanded without modifying the compilation process. Furthermore, the same DRC semantic intermediate representation can be compiled into DRC script files suitable for different EDA tools by matching the template libraries of different tools, reducing the maintenance cost when changing tools.
[0115] Figure 6 This is a schematic diagram illustrating the preprocessing flow of the derived layer and exclusion layer in a DRC rule compilation and generation method provided in an embodiment of this application. Figure 6 As shown, S520 above extracts the semantic field values of each rule record and fills the statement template to generate the statement corresponding to each rule record, specifically including: Step one is used to determine whether the logical layer name in the current rule record is a derived layer, in order to decide whether a derived layer definition statement needs to be generated. Specifically, it includes steps S610-S630: S610, determine whether the logical layer name in the rule record is a derived layer.
[0116] The derived layer refers to a composite layer consisting of multiple basic logic layers connected by Boolean operations, such as expressions like "AA AND (GATE)", "METAL1 OR METAL2", and "(METAL1 AND VIA1) NOT POLY". Boolean operations include AND, OR, NOT, and combinations of parentheses, used to express complex design rule checks.
[0117] Specifically, each rule record in the DRC semantic intermediate representation is read sequentially, and the main layer field of the current rule record is extracted. The content of this field is parsed to determine whether it contains preset Boolean operator identifiers. Preset Boolean operator identifiers include "AND", "OR", "NOT" and parentheses "()", etc. If the main layer field contains any of the above Boolean operator identifiers, then the logical layer is determined to be a derived layer.
[0118] For example, if the main check layer field of a rule record in the DRC semantic intermediate representation is "AA AND (GATE)", it is determined to be a derived layer because it contains the "AND" operator and parentheses; if the main check layer field is "Poly", it does not contain any Boolean operators and is determined to be a non-derived layer.
[0119] S620, if the logical layer is named a derived layer, generate the derived layer definition statement.
[0120] Among them, the derived layer definition statement is a script statement that can be recognized by the target EDA tool and is used to define the composition relationship of the composite logic layer. The derived layer definition statement decomposes the Boolean expression of the derived layer and converts it into the layer definition expression of the target EDA tool syntax format.
[0121] Specifically, the complete Boolean expression of the main check layer field in the current rule record is extracted. Combined with the basic layer information in the GDS physical layer mapping field (GDS layer number and data type), derived layer definition statements are generated according to the syntax specifications of the target EDA tool. For example, if the main check layer field in the DRC semantic intermediate representation is "AA AND (GATE)", then according to the syntax format of the target EDA tool, a sequence of derived layer definition statements in the form of "LAYER NAA=AA AND GATE" is compiled, defining the composition relationship of the composite logic layer in a way that the target EDA tool can recognize. The generated derived layer definition statements will be stored and used as a reference source for layer parameters in subsequent template filling, followed by the judgment in step two.
[0122] S630: If the logical layer name is not a derived layer, then no derived layer definition statement will be generated.
[0123] If the main check layer field contains only a single layer name (such as "Poly", "AA", "Metal1", etc.) and does not contain any Boolean operators, it is determined to be a non-derived layer (i.e., a normal layer). If the logical layer name is not a derived layer, that is, the main check layer field in the current rule record does not contain any Boolean operators, it is itself a directly referenced base layer, and there is no need to generate an additional layer definition statement. Therefore, no derived layer definition statement is generated, and the process proceeds to step two.
[0124] Step two, after completing step one, determines whether the exclusion layer fields in the current rule record are not null, in order to decide whether an exclusion statement needs to be generated. Specifically, this includes steps S640-S660: S640, determine whether the exclusion layer field in the rule record is not empty.
[0125] Regardless of the result of the derived layer judgment in step one, the exclusion layer judgment in step two must continue to be executed.
[0126] The exclusion layer refers to the areas that should be skipped during the DRC check and are not included in the check, such as the seal ring area and the scribe line area. In the DRC check of the frame cell, certain areas do not require specific design rule checks. The exclusion layer mechanism allows the check tool to avoid these areas and prevent false alarms.
[0127] Specifically, the Exclude Layer field is extracted from the rule record, and it is checked whether the field contains valid layer name information. If the Exclude Layer field is not empty (i.e., it contains at least one valid layer name), then the current rule record is determined to contain exclude layer semantics.
[0128] S650, if the exclusion layer field is not empty, generate an exclusion statement accordingly.
[0129] The exclusion statement is a script statement that the target EDA tool can recognize and is used to define the exclusion regions to be checked. The exclusion statement maps the exclusion layer to a region exclusion declaration in the syntax format of the target EDA tool.
[0130] Specifically, the layer name information of the exclusion layer field in the current rule record is extracted, and combined with the GDS layer number and data type corresponding to the exclusion layer in the GDS physical layer mapping field, an exclusion statement is generated according to the syntax specification of the target EDA tool. For example, if the exclusion layer field is "SEAL", and its corresponding GDS physical layer mapping is GDS layer number 10 / data type 0, then according to the syntax format of the target EDA tool, an exclusion statement of the form "LAYER EXCLUDE = SEAL" is compiled, instructing the EDA tool to skip the sealing ring region when executing the current inspection rule. The generated exclusion statement will be stored and used as a limiting condition for the inspection scope in subsequent template filling.
[0131] S660: If the exclusion layer field is empty, no exclusion statement will be generated.
[0132] If the exclusion layer field is empty, it is determined that the current rule record does not contain exclusion layer semantics, that is, the current rule record does not specify the region layer to be excluded, and there is no need to introduce additional region limitation conditions. Therefore, no exclusion statement is generated, and the process proceeds to the subsequent template filling stage.
[0133] S670. Based on the results of steps one and two, as well as the semantic field values, populate the statement template to generate the statements corresponding to each rule record.
[0134] The results of step one include: either a derived layer definition statement was generated, or no derived layer definition statement was generated. The results of step two include: either an exclusion statement was generated, or no exclusion statement was generated. Based on the combinations of these two results, there are four possible filling scenarios: In the first scenario, if the logical layer is named the derived layer and the exclusion layer field is not empty, the derived layer name defined in the derived layer definition statement is used as a layer parameter to fill the statement template, the exclusion statement is introduced into the template as a limiting condition for the scope of the check, and the semantic field value is filled into the corresponding parameter placeholder in the template.
[0135] In the second scenario, if the logical layer is named a derived layer and the exclusion layer field is empty, the derived layer name defined in the derived layer definition statement will be used as a layer parameter to fill the statement template. No exclusion conditions will be introduced, and the semantic field value will be filled into the corresponding parameter placeholder in the template.
[0136] In the third scenario, if the logical layer name is not a derived layer and the exclusion layer field is not empty, the original logical layer name in the rule record is used as a layer parameter to fill the statement template, the exclusion statement is introduced into the template as a limiting condition for the scope of inspection, and the semantic field value is filled into the corresponding parameter placeholder in the template.
[0137] In the fourth scenario, if the logical layer name is not a derived layer and the exclusion layer field is empty, the original logical layer name in the rule record will be used as a layer parameter to fill the statement template. No exclusion conditions will be introduced, and the semantic field value will be filled into the corresponding parameter placeholder in the template.
[0138] After generating all the derived layer definition statements, exclusion statements, and templates for all rule records, all generated statements are arranged according to the script organization structure and statement order required by the target EDA tool to generate a complete DRC script file, which can be run directly in the target EDA tool.
[0139] Based on the aforementioned derived layer and exclusion layer determinations, a derived layer determination is performed on the logical layer name and a non-empty determination is performed on the exclusion layer fields before template filling. First, based on the derived layer determination result, it is selected whether to generate a derived layer definition statement or not. Then, based on the exclusion layer determination result, it is selected whether to generate an exclusion statement or not. Finally, based on the combination of the above two determination results, the generated derived layer definition statement and / or exclusion statement are used together with the semantic field value to fill the statement template. This allows the derived layer Boolean expression semantics and exclusion layer semantics in the DRC semantic intermediate representation to be accurately converted into script statements that the target EDA tool can recognize. This eliminates logical errors that are easily generated when manually writing Boolean operation expressions, and avoids DRC false alarms or missed alarms caused by incorrect processing of exclusion areas, thus improving the quality and reliability of script generation.
[0140] In this embodiment, design rules written in natural language can be automatically converted into script files executable by EDA tools. This effectively avoids rule ambiguity and coding errors caused by subjective differences in understanding in traditional manual translation methods, significantly shortens the development and debugging cycle of DRC script files, and significantly reduces the maintenance cost of repeatedly writing scripts due to process node updates. This improves the automation level of design rule checking and compilation efficiency in integrated circuit photomask manufacturing.
[0141] In the above Figure 1 Based on the corresponding embodiments, in order to more clearly demonstrate the specific implementation process of the audit DRC semantic intermediate representation, this application also provides a possible implementation method of the audit DRC semantic intermediate representation in the DRC rule compilation and generation method. Figure 7 This is a schematic diagram illustrating the process of reviewing intermediate representations of DRC semantics in a DRC rule compilation and generation method provided in an embodiment of this application. Figure 7 As shown, after filling the semantic fields into the preset DRC structured template in S103 to obtain the intermediate semantic representation of DRC, before S104, the method of this embodiment further includes: S710, audits the intermediate semantic representation of DRC.
[0142] Specifically, the DRC semantic intermediate representation is presented to auditors for review. In one possible implementation, since the DRC semantic intermediate representation is presented as an Excel spreadsheet, auditors can directly open the DRC semantic intermediate representation file in an Excel environment and check the accuracy of each field in each rule record line by line. The review content includes, but is not limited to: whether the fields of the main inspection layer are consistent with the layer names in the original rule description, whether the Boolean expressions of the derived layer correctly express the logical operation relationship, whether the layer number and data type correspond accurately, whether the inspection type field is correctly identified, whether the combination of constraint symbols and values conforms to the original meaning of the rule, and whether the exclusion layer fields are complete, etc.
[0143] If the auditors find errors or incompleteness in the semantic fields of a rule record during the review process, the rule will be deemed unsuccessful in the review; if all fields of all rule records are verified and confirmed to be correct, the review will be deemed successful.
[0144] S720, if the review fails, obtain the correction operation for the DRC semantic intermediate representation, update the DRC semantic intermediate representation according to the correction operation, and re-examine until the review is passed, and obtain the approved DRC semantic intermediate representation.
[0145] Specifically, when the review fails, the reviewers directly modify the erroneous fields in the Excel spreadsheet of the DRC semantic intermediate representation. For example, they might complete missing derived-level Boolean expressions, change the error detection type from "Width" to "Space," or uniformly change the numerical unit from "nm" to "µm." After the corrections are complete, the updated DRC semantic intermediate representation is saved, and the review process is restarted to re-check the corrected content item by item.
[0146] If errors are still found in other fields after re-audit, the above correction and auditing operations are repeated until all fields of all rule records in the DRC semantic intermediate representation have been verified and confirmed by the auditors item by item, and there are no errors or omissions. At this point, the current version of the DRC semantic intermediate representation is determined as the approved DRC semantic intermediate representation and used as input for the downstream compilation and generation stage.
[0147] In this embodiment of the application, by introducing a manual review process after the DRC semantic intermediate representation is generated, engineers can directly check and correct the semantic fields in the DRC semantic intermediate representation, thereby improving the reliability of DRC script generation.
[0148] The following describes the DRC rule compilation and generation apparatus and electronic device provided in this application for execution. The specific implementation process and technical effects are described above and will not be repeated below.
[0149] Figure 8 A schematic diagram of a DRC rule compilation and generation apparatus provided in an embodiment of this application is shown below. Figure 8 As shown, the DRC rule compilation and generation device includes: Module 1000 is used to obtain natural language DRC rules.
[0150] The parsing module 2000 is used to perform semantic parsing on natural language DRC rules using a pre-trained semantic parsing model to obtain the semantic fields of the natural language DRC rules.
[0151] Module 3000 is used to fill semantic fields into a preset DRC structured template to obtain an intermediate semantic representation of DRC.
[0152] The compilation module 4000 is used to compile and generate the DRC script file corresponding to the target EDA tool based on the DRC semantic intermediate representation and the preset DRC standard library statement template.
[0153] Optionally, the DRC rule compilation and generation device further includes an annotation module 5000, which is used to annotate the natural language DRC rules to obtain an annotated natural language DRC rule sample set; each natural language DRC rule in the sample set is annotated with a corresponding semantic label.
[0154] Optionally, the DRC rule compilation and generation device further includes a training module 6000, which is used to fine-tune the initial semantic parsing model based on the sample set to obtain a pre-trained semantic parsing model.
[0155] Optionally, the training module 6000 is specifically used to perform data augmentation processing on each natural language DRC rule in the sample set to obtain an augmented training set; input the augmented training set into the initial semantic parsing model for fine-tuning training to obtain a fine-tuned semantic parsing model; use the sample set to evaluate the performance of the fine-tuned semantic parsing model, and save the best-performing fine-tuned semantic parsing model as a pre-trained semantic parsing model.
[0156] Optionally, the parsing module 2000 is specifically used to perform text segmentation on the natural language DRC rules to obtain a sequence of semantic units of the natural language DRC rules; input the sequence of semantic units into a pre-trained semantic parsing model, and have the pre-trained semantic parsing model predict the semantic label corresponding to each semantic unit in the sequence of semantic units; and extract the semantic field corresponding to the natural language DRC rules from the sequence of semantic units based on the semantic label corresponding to each semantic unit.
[0157] Optionally, the DRC rule compilation and generation device further includes an audit module 7000, which is used to audit the DRC semantic intermediate representation; if the audit fails, the DRC semantic intermediate representation is corrected, the DRC semantic intermediate representation is updated according to the correction operation, and the audit is performed again until the audit passes, so as to obtain the audited DRC semantic intermediate representation.
[0158] Optionally, the compilation module 4000 is specifically used to match the corresponding statement template from the DRC standard library statement template according to the check type corresponding to each rule record in the DRC semantic intermediate representation; extract the semantic field values of each rule record, fill the statement template to generate the statement corresponding to each rule record; and arrange the statement according to the requirements of the target EDA tool to obtain the DRC script file.
[0159] Optionally, the compilation module 4000 is specifically used for: Step 1: Determining whether the logical layer name in the rule record is a derived layer; if the logical layer name is a derived layer, generating a derived layer definition statement; if the logical layer name is not a derived layer, not generating a derived layer definition statement; Step 2: After completing Step 1, determining whether the exclusion layer field in the rule record is not empty; if the exclusion layer field is not empty, generating an exclusion statement; if the exclusion layer field is empty, not generating an exclusion statement; based on the results of Step 1 and Step 2, and the semantic field value, filling the statement template to generate the statements corresponding to each rule record.
[0160] These modules can be one or more integrated circuits configured to implement the above methods, such as one or more Application Specific Integrated Circuits (ASICs), one or more digital signal processors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs). Alternatively, when a module is implemented using processing element scheduler code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. Furthermore, these modules can be integrated together as a system-on-a-chip (SOC).
[0161] Figure 9 This is a schematic diagram of an electronic device provided in an embodiment of this application. The device may be a computing device or a server with computing processing capabilities.
[0162] The electronic device 10 includes a processor 11, a storage medium 12, and a bus 13. The storage medium 12 stores program instructions executable by the processor 11. When the electronic device 10 is executed, the processor 11 communicates with the storage medium 12 via the bus 13, and the processor 11 executes the program instructions to perform the above-described method embodiment. The specific implementation and technical effects are similar and will not be described in detail here.
[0163] Optionally, this application also provides a program product, such as a computer-readable storage medium, including a program that, when executed by a processor, performs the above-described method embodiments.
[0164] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0165] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0166] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in a combination of hardware and software functional units.
[0167] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0168] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.< / value> < / layer>
Claims
1. A method for compiling and generating DRC rules, characterized in that, The method includes: Obtain natural language DRC rules; A pre-trained semantic parsing model is used to perform semantic parsing on the natural language DRC rules to obtain the semantic fields of the natural language DRC rules; The semantic fields are filled into a preset DRC structured template to obtain an intermediate semantic representation of the DRC. Based on the DRC semantic intermediate representation and the preset DRC standard library statement template, the DRC script file corresponding to the target EDA tool is compiled and generated.
2. The method according to claim 1, characterized in that, Before employing the pre-trained semantic parsing model, the method further includes: The natural language DRC rules are labeled to obtain a set of labeled natural language DRC rule samples, and each natural language DRC rule in the sample set is labeled with a corresponding semantic label; The initial semantic parsing model is fine-tuned and trained based on the sample set to obtain the pre-trained semantic parsing model.
3. The method according to claim 2, characterized in that, The step of fine-tuning the initial semantic parsing model based on the sample set to obtain the pre-trained semantic parsing model specifically includes: Data augmentation is performed on each of the natural language DRC rules in the sample set to obtain an augmented training set; The enhanced training set is input into the initial semantic parsing model for fine-tuning training to obtain the fine-tuned semantic parsing model; The performance of the fine-tuned semantic parsing model is evaluated using the sample set, and the fine-tuned semantic parsing model with the best performance is saved as the pre-trained semantic parsing model.
4. The method according to claim 1, characterized in that, The pre-trained semantic parsing model is used to perform semantic parsing on the natural language DRC rules to obtain the semantic fields of the natural language DRC rules, including: The natural language DRC rule is segmented into text to obtain a sequence of semantic units of the natural language DRC rule; The semantic unit sequence is input into the pre-trained semantic parsing model, which predicts the semantic label corresponding to each semantic unit in the semantic unit sequence. Based on the semantic tags corresponding to each semantic unit, the semantic fields corresponding to the natural language DRC rules are extracted from the sequence of semantic units.
5. The method according to claim 1, characterized in that, After filling the semantic fields into a preset DRC structured template to obtain the intermediate semantic representation of the DRC, the method further includes: The intermediate semantic representation of the DRC is reviewed; If the review fails, a correction operation is obtained for the DRC semantic intermediate representation. The DRC semantic intermediate representation is updated according to the correction operation, and the review is carried out again until the review is passed, so as to obtain the approved DRC semantic intermediate representation.
6. The method according to claim 1, characterized in that, The step of compiling and generating the DRC script file corresponding to the target EDA tool based on the DRC semantic intermediate representation and the preset DRC standard library statement template includes: Based on the check type corresponding to each rule record in the DRC semantic intermediate representation, the corresponding statement template is matched from the DRC standard library statement template; Extract the semantic field values of each rule record, and populate the statement template to generate the statement corresponding to each rule record; The statements are arranged according to the requirements of the target EDA tool to obtain the DRC script file.
7. The method according to claim 6, characterized in that, The step of extracting the semantic field values of each rule record and filling the statement template to generate the statement corresponding to each rule record specifically includes: Step 1: Determine whether the logical layer name in the rule record is a derived layer; if the logical layer name is a derived layer, generate a derived layer definition statement; if the logical layer name is not a derived layer, do not generate the derived layer definition statement. Step 2: After completing Step 1, determine whether the exclusion layer field in the rule record is not empty; if the exclusion layer field is not empty, generate an exclusion statement; if the exclusion layer field is empty, do not generate the exclusion statement. Based on the results of step one and step two, and the semantic field values, the statement template is populated to generate statements corresponding to each rule record.
8. A DRC rule compilation and generation apparatus, characterized in that, The device includes: The acquisition module is used to acquire natural language DRC rules; The parsing module is used to perform semantic parsing on the natural language DRC rules using a pre-trained semantic parsing model to obtain the semantic fields of the natural language DRC rules; The construction module is used to fill the semantic fields into a preset DRC structured template to obtain an intermediate semantic representation of DRC. The compilation module is used to compile and generate the DRC script file corresponding to the target EDA tool based on the DRC semantic intermediate representation and the preset DRC standard library statement template.
9. An electronic device, characterized in that, include: The device includes a processor, a memory, and a bus. The memory stores program instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus, and the processor executes the program instructions to perform the steps of the DRC rule compilation and generation method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which is executed by a processor to produce the DRC rule compilation method as described in any one of claims 1-7.
