File generation method and device, storage medium and electronic equipment
Patent Information
- Application Number
- CN202610871971.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-16
- Publication Date
- 2026-08-28
AI Technical Summary
[0004]有鉴于此,本申请提供了一种文件生成方法、装置、存储介质及电子设备,主要目的在于解决相关方案中验证规则文件生成效率低、准确性差的技术问题
[0015]By employing the above technical solution, this application provides a document generation method, apparatus, storage medium, and electronic device. Specifically, it involves obtaining a design rule document to be parsed; performing structured parsing on the design rule document to obtain layer mapping information, metal layer configuration information, and design rule information; performing file conversion processing on the layer mapping information, metal layer configuration information, and design rule information respectively to generate corresponding structured data files; generating layer definition code, design rule framework, and design rule code for the design rule document based on the structured data files; and generating a verification rule file corresponding to the design rule document based on the layer definition code, design rule framework, and design rule code. By applying the technical solution of this application, there is no need for manual parsing of design rule documents and writing of code, which improves the generation efficiency of design rule check files, avoids syntax errors in the manual writing process, and improves the accuracy of verification rule files.
Smart Images

Figure CN122655686A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of chip electronic design automation technology, specifically to a document generation method, apparatus, storage medium, and electronic device. Background Technology
[0002] In the field of chip design, the Standard Verification Rule Format (SVRF) design rule check file is the core of ensuring chip design compliance, and its generation depends on the extraction of various information from the Design Rule Manual (DRM).
[0003] In related technologies, the process of generating chip design rule check files often relies on manual parsing of DRM documents sentence by sentence, manually organizing layer information, design rules and metal configuration parameters, and then manually writing rule code in SVRF format. This method is not only cumbersome and inefficient, but also prone to syntax errors due to manual coding, resulting in poor accuracy of the generated verification rule files. Summary of the Invention
[0004] In view of this, this application provides a document generation method, apparatus, storage medium and electronic device, the main purpose of which is to solve the technical problems of low efficiency and poor accuracy in generating verification rule documents in related solutions.
[0005] Firstly, this application provides a document generation method, including: Obtain the design rule document to be parsed, perform structured parsing on the design rule document, and obtain the layer mapping information, metal layer configuration information and design rule information of the design rule document; The layer mapping information, metal layer configuration information, and design rule information are respectively processed by file conversion to generate corresponding structured data files; Based on the structured data file, the layer definition code of the design rule document, the design rule framework of the design rule document, and the design rule code of the design rule document are generated; Based on the layer definition code, the design rule framework, and the design rule code, a verification rule file corresponding to the design rule document is generated.
[0006] Optionally, the design rule document is subjected to structured parsing to obtain the layer mapping information, metal layer configuration information, and design rule information of the design rule document, including: Perform content recognition on the design rule document to obtain the document content information in the design rule document; The layout of the design rules document is parsed to obtain the document structure information of the design rules document; Based on the document content information and the document structure information, determine the layer mapping information, metal layer configuration information, and design rule information of the design rule document.
[0007] Optionally, the structured data file includes a layer data file corresponding to the layer mapping information, a metal layer configuration file corresponding to the metal layer configuration information, and a design rule data file corresponding to the design rule information. The step of generating the layer definition code for the design rule document, the design rule framework for the design rule document, and the design rule code for the design rule document based on the structured data file includes: The layer definition code for the design rule document is generated based on the layer definition information in the layer data file; Based on the metal layer configuration file, conditional compilation instructions are generated to construct the design rule framework of the design rule document; The design rule code of the design rule document is generated based on the layer data file and the design rule data file.
[0008] Optionally, the design rule code for generating the design rule document based on the layer data file and the design rule data file includes: The target syntax information corresponding to the design rule data file is determined based on the rule syntax knowledge base; The target syntax information, the basic layer information in the layer data file, and the rule association information in the design rule data file are input into the target code generation model to generate the design rule code of the design rule document.
[0009] Optionally, based on the layer definition code, the design rule framework, and the design rule code, a validation rule file corresponding to the design rule document is generated, including: The design rule code is syntax-checked, and the design rule code is corrected based on the check results; If the syntax of the design rule code passes the validation, a validation rule file corresponding to the design rule document is generated based on the layer definition code, the design rule framework, and the revised design rule code.
[0010] Optionally, the design rule code is subjected to syntax validation, and the design rule code is corrected based on the validation results, including: The layout verification tool is invoked to perform syntax validation on the design rule code. Based on the syntax error information in the verification results returned by the layout verification tool, the design rule code is corrected.
[0011] Optionally, based on the layer definition code, the design rule framework, and the revised design rule code, a verification rule file corresponding to the design rule document is generated, including: Obtain the configuration information for the layout verification tool; Based on the configuration information, the layer definition code, the design rule framework, and the revised design rule code, a verification rule file corresponding to the design rule document is generated.
[0012] Secondly, this application provides a document generation apparatus, comprising: The acquisition module is configured to acquire the design rule document to be parsed, perform structured parsing on the design rule document, and obtain the layer mapping information, metal layer configuration information and design rule information of the design rule document; The processing module is configured to perform file conversion processing on the layer mapping information, metal layer configuration information and design rule information respectively, and generate corresponding structured data files; The first generation module is configured to generate, based on the structured data file, the layer definition code of the design rule document, the design rule framework of the design rule document, and the design rule code of the design rule document; The second generation module is configured to generate a verification rule file corresponding to the design rule document based on the layer definition code, the design rule framework, and the design rule code.
[0013] Thirdly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect.
[0014] Fourthly, this application provides an electronic device including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor executes the computer program to implement the method described in the first aspect.
[0015] By employing the above technical solution, this application provides a document generation method, apparatus, storage medium, and electronic device. Specifically, it involves obtaining a design rule document to be parsed; performing structured parsing on the design rule document to obtain layer mapping information, metal layer configuration information, and design rule information; performing file conversion processing on the layer mapping information, metal layer configuration information, and design rule information respectively to generate corresponding structured data files; generating layer definition code, design rule framework, and design rule code for the design rule document based on the structured data files; and generating a verification rule file corresponding to the design rule document based on the layer definition code, design rule framework, and design rule code. By applying the technical solution of this application, there is no need for manual parsing of design rule documents and writing of code, which improves the generation efficiency of design rule check files, avoids syntax errors in the manual writing process, and improves the accuracy of verification rule files.
[0016] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description
[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 A flowchart illustrating a document generation method provided in an embodiment of this application is shown; Figure 2 This illustration shows a schematic diagram of design rule information provided in an embodiment of this application; Figure 3 A schematic diagram of the code for design rule information provided in an embodiment of this application is shown; Figure 4 An example of fine-tuning data for domain knowledge provided in an embodiment of this application is shown; Figure 5 This application provides an example of fine-tuning data for SVRF code generation. Figure 6A flowchart illustrating a document generation method provided in an embodiment of this application is shown; Figure 7 A schematic diagram of the structure of a document generation apparatus provided in an embodiment of this application is shown. Detailed Implementation
[0020] To better understand the above-mentioned objectives, features, and advantages of this application, the solution of this application will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.
[0021] The document generation method in this application can be applied to chip integrated circuit design and development scenarios, such as semiconductor process rule compilation, layout design compliance verification, and batch generation of chip automation rule scripts. The execution subject of this method can be a local terminal device, a cloud server, or a chip design automation platform.
[0022] To address the technical problems of low efficiency and poor accuracy in verification rule files in related solutions, this embodiment provides a file generation method, such as... Figure 1 As shown, Figure 1 This illustration shows a flowchart of a file generation method provided in an embodiment of this application. The method includes: Step 101: Obtain the design rule document to be parsed, perform structured parsing on the design rule document, and obtain the layer mapping information, metal layer configuration information and design rule information of the design rule document; In one embodiment, the design rule document refers to the basic document used to generate verification rules, which may be a process manual or design specification document in the field of chip design.
[0023] In one embodiment, structured parsing refers to parsing out the valid information in the document, eliminating redundant content, and finally filtering out three types of core information: layer mapping, metal configuration, and design rules.
[0024] In one embodiment, layer mapping information refers to layer parameters, usage descriptions, and other content related to chip design; metal layer configuration information refers to the stacking method, process parameters, and hierarchical relationships of metal layers in chip design; and design rule information refers to various specifications and requirements that chip design must follow.
[0025] In one embodiment, the design rule document can be obtained by importing a local file; it can also be obtained by calling a network interface; or it can be obtained by reading from external storage. This application does not limit the scope of the application.
[0026] In one embodiment, the design rule document can be structured and parsed using an Optical Character Recognition (OCR) algorithm to obtain the layer mapping information, metal layer configuration information, and design rule information of the design rule document.
[0027] In one embodiment, in addition to performing structured parsing of the design rule document using an OCR algorithm, an image recognition algorithm can also be combined to perform structured parsing of the design rule document, automatically distinguishing between tables and text, so as to obtain the layer mapping information, metal layer configuration information and design rule information of the design rule document.
[0028] In one embodiment, based on the parsed information, the layer mapping information, metal layer configuration information, and design rule information of the design rule document can be obtained by filtering according to preset fields (such as layer, metal configuration, and design rule); alternatively, the keywords corresponding to the layer, metal configuration, and design rule can be determined first, and the keywords can be used to match the parsed information to obtain the layer mapping information, metal layer configuration information, and design rule information of the design rule document.
[0029] Step 102: Perform file conversion processing on the layer mapping information, metal layer configuration information, and design rule information respectively to generate corresponding structured data files; In one embodiment, the file conversion process refers to converting the parsed layer mapping information, metal layer configuration information, and design rule information into standardized data formats that are machine-recognizable and readable. The layer mapping information corresponds to the generation of a layer file, which stores information such as layer name, process parameters, and purpose. The metal layer configuration information corresponds to the generation of a metal file, which stores information such as metal layer stacking and process parameters. The design rule information corresponds to the generation of a rule file, which stores information such as rule name, parameters, and thresholds.
[0030] In one embodiment, the structured data file can be in CSV or JSON format, and can be directly recognized and called by the code generation process.
[0031] Step 103: Generate the layer definition code of the design rule document, the design rule framework of the design rule document, and the design rule code of the design rule document based on the structured data file; In one embodiment, the layer definition code is generated from the structured data file corresponding to the layer mapping, and is used to determine the core parameters and specifications of the layers in the chip design; the design rule framework is generated from the structured data file corresponding to the metal layer configuration, and is used to standardize the logical boundaries of code generation; the design rule code is generated from the structured data file corresponding to the design rules.
[0032] In one embodiment, the generation process of design rule code can incorporate professional standards from the domain knowledge base to avoid syntax errors and ensure code accuracy.
[0033] Step 104: Generate the verification rule file corresponding to the design rule document based on the layer definition code, the design rule framework, and the design rule code.
[0034] In one embodiment, the verification rule file is in SVRF format, which integrates layer definition code, design rule framework and design rule code, and can be directly recognized by chip design verification tools for compliance checks of chip design.
[0035] In one embodiment, the code details in the layer definition code or design rule code can be adjusted according to the specific scenario of the chip design, and then combined with the design rule framework to generate the verification rule file corresponding to the design rule document.
[0036] In one embodiment, a verification rule file corresponding to the design rule document is generated based on the layer definition code, the design rule framework, and the design rule code. This file can be directly used for syntax verification in chip design without additional format conversion, thus improving chip design efficiency and reducing the workload of manual inspection.
[0037] This embodiment acquires the design rule document to be parsed, performs structured parsing on the design rule document to obtain layer mapping information, metal layer configuration information, and design rule information; performs file conversion processing on the layer mapping information, metal layer configuration information, and design rule information respectively to generate corresponding structured data files; generates layer definition code, design rule framework, and design rule code for the design rule document based on the structured data files; and generates a verification rule file corresponding to the design rule document based on the layer definition code, design rule framework, and design rule code. By applying the technical solution of this application, there is no need for manual parsing of design rule documents and writing of code, which improves the efficiency of generating design rule check files, avoids syntax errors in the manual writing process, and improves the accuracy of verification rule files.
[0038] Furthermore, based on the above embodiments, the design rule document is subjected to structured parsing to obtain the layer mapping information, metal layer configuration information, and design rule information of the design rule document, including: Perform content recognition on the design rule document to obtain the document content information in the design rule document; In one embodiment, content recognition of the design rule document refers to the process of recognizing information such as text characters, process parameters, constraint values, and professional symbols within the design rule document. The document content information includes text content, parameter data, rule clauses, layer names, and process annotations contained in the design rule document.
[0039] In one embodiment, a native text reading method can be used to directly read the design rule document and complete content recognition based on the full text and parameter content. Alternatively, optical character recognition can be used to complete text and data recognition on paper scans and image format design rule documents. Multimodal text recognition can also be used to recognize special content such as regular text, professional process symbols, unit identifiers, and limited values to complete content recognition.
[0040] The layout of the design rules document is parsed to obtain the document structure information of the design rules document; In one embodiment, page layout parsing of the design rule document refers to the process of identifying the page layout, information block division, table row and column layout, text and image distribution, and chapter hierarchy of the design rule document.
[0041] In one embodiment, document structure information is used to characterize the internal composition of the design rule document, including layout features such as table structure, text and image distribution, chapter division, data row and column arrangement, and information block division.
[0042] In one embodiment, different information blocks of a document can be divided by an outline area to distinguish text paragraph areas, data table areas, and annotation areas, so as to obtain the document structure information of the design rule document.
[0043] In one embodiment, a table structure detection algorithm can also be used to identify all rule data tables and layer reference tables within the design rule document, determine the row and column layout structure, and obtain the document structure information of the design rule document.
[0044] In one embodiment, such as Figure 2 As shown, Figure 2 This illustration shows a schematic diagram of design rule information provided in an embodiment of this application. Figure 2 The design constraints for different layers (such as LAYER_A to LAYER_E) are listed in tabular form, including four columns: Rule ID, rule description, value, and unit. They cover a variety of DRC rules such as line width, spacing, density, shape, and interlayer relationships. For example, there are fixed diameters for LAYER_A, maximum length and density limits for LAYER_C, and the non-overlapping requirement between LAYER_E and LAYER_B. This presents the various process specifications that integrated circuit layout design must follow.
[0045] In one embodiment, it can be based on the foregoing Figure 2 The design rule information generates SVRF code for design rule checking, such as... Figure 3 As shown, Figure 3 The diagram illustrates a design rule information code provided in an embodiment of this application. Through recognizable SVRF syntax, process constraints of each layer (such as the diameter and spacing of LAYER_A, the linewidth / length / density of LAYER_C, the pitch and shape of LAYER_D, the mutual exclusion relationship between LAYER_E and LAYER_B, etc.) are converted into executable inspection instructions one by one, covering various rules such as dimensional verification, interlayer relationship verification, and density analysis.
[0046] Based on the document content information and the document structure information, determine the layer mapping information, metal layer configuration information, and design rule information of the design rule document.
[0047] In one embodiment, information category keywords can be preset, and the layer mapping information, metal layer configuration information, and design rule information of the design rule document can be determined based on the document content information and the document structure information.
[0048] For example, based on a design rule document, content recognition can be used to completely capture all text, parameters, process annotations, and other content in the document to form document content information; then, layout analysis can be used to divide the document into tables, paragraphs, text and graphics to form document structure information; finally, the semantic content is matched with the layout position to decompose the layer correspondence content, metal layer combination configuration content, and various process constraint rules content scattered in different areas of the document to obtain layer mapping information, metal layer configuration information, and design rule information.
[0049] This embodiment obtains the document content information by performing content recognition on the design rule document; it then obtains the document structure information by performing layout parsing on the design rule document; based on the document content information and the document structure information, it determines the layer mapping information, metal layer configuration information, and design rule information of the design rule document. This approach can analyze both the document text content and the layout structure, avoiding information confusion and classification errors that can occur with single-text recognition, thereby improving the accuracy of information recognition.
[0050] In one embodiment, based on the above embodiments, the structured data file includes a layer data file corresponding to the layer mapping information, a metal layer configuration file corresponding to the metal layer configuration information, and a design rule data file corresponding to the design rule information. The step of generating the layer definition code for the design rule document, the design rule framework for the design rule document, and the design rule code for the design rule document based on the structured data file includes: The layer definition code for the design rule document is generated based on the layer definition information in the layer data file; In one embodiment, the layer data file is a structured file converted from layer mapping information, containing layer definition information such as layer name, layer number, and purpose; the metal layer configuration file is a structured file converted from metal layer configuration information, used to describe the metal layer stacking method, process configuration, switch configuration, etc.; and the design rule data file is a structured file converted from design rule information, containing information such as rule name, rule description, inspection parameters, and threshold.
[0051] In one embodiment, layer definition code is generated based on the layer name, layer number, layer purpose, layer type, and other definition information in the layer data file, following the syntax format of the verification rule file.
[0052] Specifically, In one embodiment, layer definition code can be generated by traversing each line of layer information in the layer data file using a script and concatenating them according to a fixed syntax; alternatively, layer definition code can be generated by filling the layer information into a preset layer definition template based on a template engine; or, after reading the layer data file, layer definition code that conforms to the specifications can be generated by a code generation model trained based on historical layer definition code data.
[0053] Based on the metal layer configuration file, conditional compilation instructions are generated to construct the design rule framework of the design rule document; In one embodiment, the conditional compilation instructions are macro definitions and switch judgment instructions generated based on the metal configuration, used to enable or disable rules under different process configurations.
[0054] In one embodiment, the design rule framework is a code structure composed of conditional compilation instructions, used to carry the design rule code.
[0055] In one embodiment, conditional compilation instructions such as DEFINE, IFDEF, and ENDIF are generated based on configuration items in the metal layer configuration file (such as 1M / 2M / 3M, front-end process (FRONT_MTSK) / back-end process (BACK_MTSK)) to form a rule framework with switchable configuration.
[0056] Specifically, In one embodiment, the switch items in the metal layer configuration file can be read to directly generate corresponding macro definition instructions and branch judgment instructions; a multi-layer nested conditional compilation framework can also be generated according to the metal layer stacking structure; and conditional compilation instructions that enable or disable some rules can also be generated according to different process modes.
[0057] The design rule code of the design rule document is generated based on the layer data file and the design rule data file.
[0058] In one embodiment, layer information from the layer data file is combined with rule content from the design rule data file, and executable design rule check code is generated according to the validation rule syntax.
[0059] In one embodiment, the corresponding code template can be matched according to the rule type, and the layer information and rule content can be substituted to generate rule code; alternatively, the target syntax can be retrieved through the rule syntax knowledge base, and the rule code can be generated by combining the layer information and rule content; alternatively, the layer information and rule information can be input into a trained rule code generation model to obtain rule code that conforms to the specification.
[0060] In one embodiment, based on the above embodiments, generating design rule code for the design rule document based on the layer data file and the design rule data file includes: The target syntax information corresponding to the design rule data file is determined based on the rule syntax knowledge base; In one embodiment, the rule syntax knowledge base is a pre-built professional knowledge resource library that stores various design rule standards, syntax, command formats, parameter usage, and writing examples, which is used to match and generate compliance verification code.
[0061] In one embodiment, the target grammar information is retrieved and matched from the rule grammar knowledge base, and includes standard grammar formats, command statements, parameter filling specifications, and writing examples that are compatible with the current design rules.
[0062] In one embodiment, the various design constraint rules recorded in the design rule data file are used as the retrieval basis to complete the matching search in the rule syntax knowledge base, filter out the standard syntax content that can be used to write such rules, and determine the appropriate target syntax information.
[0063] Specifically, In one embodiment, constraint type keywords can be extracted from the design rule data file and matched with corresponding standard grammar content in the rule grammar knowledge base; alternatively, the overall constraint semantics of the rule can be identified first, and the appropriate grammar specification in the rule grammar knowledge base can be obtained through semantic similarity comparison; alternatively, all rules in the design rule data file and the grammar in the rule grammar knowledge base can be pre-classified with type labels, and the corresponding target grammar information can be matched based on the labels.
[0064] The target syntax information, the basic layer information in the layer data file, and the rule association information in the design rule data file are input into the target code generation model to generate the design rule code of the design rule document.
[0065] In one embodiment, the basic layer information refers to the layer name and layer description information contained in the layer data file.
[0066] In one embodiment, the rule association information is information related to rule verification, such as the rule constraint type, verification threshold, size limit, constraint object, and decision logic recorded in the design rule data file.
[0067] In one embodiment, the target code generation model refers to a computational model with text understanding, information fusion, and code arrangement capabilities, which can output design rule code that conforms to industry standards based on multiple types of input information.
[0068] In one embodiment, the rule constraint content in the design rule data file can be extracted first. Based on the rule syntax knowledge base, the target syntax information that matches it can be obtained by retrieval and matching. According to the layer name and layer description information in the layer data file, as well as the rule association information such as constraint type and verification threshold in the design rule data file, the target syntax information, layer basic information, and rule association information are fed into the target code generation model. The above information is integrated, and the code is written according to the target syntax information. Finally, the design rule code is output.
[0069] For example, such as Figure 4 As shown, Figure 4 This document illustrates an example of domain knowledge fine-tuning data provided in an embodiment of this application. It presents a JSON-formatted text data explanatory note on the "SVRF language." The "instruction" field poses the question "What is the SVRF language?", while the "output" field provides a detailed definition, introducing the full name of SVRF, its development entities, application scenarios (integrated circuit DRC / LVS verification), and its role in the chip physical design flow.
[0070] Furthermore, such as Figure 5 As shown, Figure 5This application provides an example of fine-tuning data for SVRF code generation. Figure 5 The given JSON text data contains an SVRF code example for the "Minimum Spacing Between Layers A" rule in the Integrated Circuit Layout Design Rule Check (DRC). The "instruction" field specifies the requirement of "minimum spacing between Layers A," and the "output" field provides the corresponding SVRF code, defining that the spacing between Layer A graphics must not be less than 2.64 units; otherwise, it will be marked as an error. It also includes constraints such as angles and regions.
[0071] This embodiment determines the target syntax information corresponding to the design rule data file based on a rule syntax knowledge base. The target syntax information, the basic layer information in the layer data file, and the rule association information in the design rule data file are input into a target code generation model to generate the design rule code for the design rule document. Obtaining standard syntax from the rule syntax knowledge base avoids syntax errors and inconsistent formatting issues that occur when manually writing code, thereby improving the compliance of the rule code. Furthermore, based on the basic layer information and rule association information, the generated code is bound to actual process layers and constraint requirements, resulting in higher code usability and matching accuracy. Moreover, relying on the target code generation model to complete the code generation work replaces the traditional manual writing of rule code line by line, reducing code writing time and improving document generation efficiency.
[0072] In one embodiment, based on the above embodiments, a verification rule file corresponding to the design rule document is generated according to the layer definition code, the design rule framework, and the design rule code, including: The design rule code is syntax-checked, and the design rule code is corrected based on the check results; In one embodiment, syntax verification refers to checking whether the design rule code statement format, instruction usage, parameter matching, and hierarchical logic are compliant and legal in accordance with the general writing specifications of the verification rule file and industry syntax standards.
[0073] In one embodiment, the verification result refers to the judgment conclusion obtained after the syntax verification is completed. The verification result may include different types such as grammatically correct, instruction error, parameter abnormality, format disorder, and improper hierarchy.
[0074] In one embodiment, correcting the design rule code based on the verification results refers to adjusting, rewriting, supplementing, or deleting problematic design rule code according to the error type and error location feedback from the syntax verification, so as to make it conform to the standard writing format.
[0075] In one embodiment, the design rule code can be syntax-checked based on rule matching, that is, based on a syntax error comparison table, the code statements are compared line by line to identify non-standard instructions and erroneous parameters and mark the error locations.
[0076] In one embodiment, the design rule code can also be syntax-checked based on a tool interface, such as by calling a professional design rule checking tool interface, uploading the code to be checked, and using the tool's built-in checking logic to complete the syntax check and obtain corresponding correction suggestions.
[0077] In one embodiment, intelligent model verification can also be used to perform syntax verification on the design rule code. For example, the syntax verification model can be used to identify code syntax vulnerabilities, logic vulnerabilities, and error types.
[0078] In one embodiment, the design rule code can be divided into header statements, constraint body statements, and closing decision statements. Syntax checks are performed on the header statements, constraint body statements, and closing decision statements respectively to achieve syntax checks on the design rule code.
[0079] If the syntax of the design rule code passes the validation, a validation rule file corresponding to the design rule document is generated based on the layer definition code, the design rule framework, and the revised design rule code.
[0080] In one embodiment, after confirming that the design rule code has no syntax errors, the layer definition code, the design rule framework, and the corrected design rule code are spliced and integrated in a preset arrangement order to form a complete verification rule file.
[0081] In one embodiment, after the initial generation of design rule code is completed, the design rule code can be first subjected to syntax verification to check for various syntax problems such as format errors, misuse of instructions, and incorrect parameter input, and to accurately locate the error location. Based on the problems reported by the verification results, the erroneous design rule code is modified, adjusted, and optimized to obtain a grammatically compliant corrected design rule code. After all design rule codes have been verified to be qualified and without any abnormalities, the generated layer definition code, the design rule framework adapted to process requirements, and the corrected design rule code are combined and arranged to generate a complete verification rule file that can be directly put into use.
[0082] This embodiment performs syntax verification on the design rule code and corrects the design rule code based on the verification results. If the syntax of the design rule code passes the verification, a verification rule file corresponding to the design rule document is generated based on the layer definition code, the design rule framework, and the corrected design rule code. This can eliminate various syntax errors in the design rule code in advance, prevent unqualified code from flowing into the verification rule file, and improve the writing quality of the verification rule file.
[0083] In one embodiment, based on the above embodiments, the design rule code is subjected to syntax verification, and the design rule code is corrected according to the verification result, including: The layout verification tool is invoked to perform syntax validation on the design rule code. In one embodiment, the layout verification tool refers to a professional verification tool used for chip design compliance checks, capable of loading and running verification rule files, and capable of verifying chip layouts for process rules such as size, spacing, and layer.
[0084] In one embodiment, the design rule code can be syntax-checked by calling a layout verification tool via an Application Programming Interface (API), command line, or script.
[0085] Based on the syntax error information in the verification results returned by the layout verification tool, the design rule code is corrected.
[0086] In one embodiment, the syntax error information is the specific error content contained in the validation result, such as instruction not existing, parameter missing, layer undefined, invalid format, incomplete statement, etc.
[0087] In one embodiment, the design rule code can be corrected based on keywords in the syntax error information. For example, if the keywords in the syntax error information are "undefined layer" or "invalid parameter", then the error content can be replaced by matching preset repair rules based on these keywords.
[0088] In one embodiment, the design rule code can also be corrected by extracting line numbers and error content from the error log file returned by the layout verification tool.
[0089] In one embodiment, after generating the design rule code, a layout verification tool is called via command line or application programming interface to pass the code to the tool for syntax verification; the layout verification tool returns a verification result containing the error location, error type, and error description; the syntax error information is parsed, and the code is completed, replaced, or adjusted according to the error type; after correction, the layout verification tool can be called again for review and verification to ensure that the code has no syntax errors, and finally, design rule code without syntax errors is obtained.
[0090] This embodiment uses a layout verification tool to perform syntax validation on the design rule code; based on the syntax error information in the validation result returned by the layout verification tool, the design rule code is corrected, which can avoid the problem of incomplete or non-standard validation rules.
[0091] In one embodiment, based on the above embodiments, a verification rule file corresponding to the design rule document is generated according to the layer definition code, the design rule framework, and the modified design rule code, including: Obtain the configuration information for the layout verification tool; In one embodiment, the configuration information refers to the global environment parameters required for the normal operation of the layout verification tool, including file header, environment settings, running mode, output path, precision configuration, etc.
[0092] In one embodiment, the configuration information of the layout verification tool can be obtained by reading a local preset configuration file.
[0093] In one embodiment, the configuration information of the layout verification tool can also be obtained by calling the tool interface.
[0094] In one embodiment, the configuration information of the layout verification tool can also be matched from multiple preset configuration schemes according to the process type.
[0095] Based on the configuration information, the layer definition code, the design rule framework, and the revised design rule code, a verification rule file corresponding to the design rule document is generated.
[0096] In one embodiment, the verification rule file corresponding to the design rule document can be generated by concatenating the configuration information, the layer definition code, the design rule framework, and the modified design rule code in a fixed order. For example, the verification rule file corresponding to the design rule document can be generated by concatenating and combining the configuration information, layer definition code, design rule framework, and rule code in a fixed order. In one embodiment, the verification rule file is in SVRF format, which is compatible with mainstream chip layout verification tools and can be directly used for compliance checks of chip designs.
[0097] In one embodiment, after completing the syntax verification and error correction of the design rule code, the global configuration information adapted to the design rule checking tool can be obtained to determine basic parameters such as file header and runtime environment; the configuration information, layer definition code, design rule framework, and the corrected design rule code are then sequentially assembled; the arrangement is completed according to the writing format and layout logic specified by the tool to generate a verification rule file that can be directly loaded into the design rule checking tool for use.
[0098] This embodiment obtains the configuration information of the layout verification tool; based on the configuration information, the layer definition code, the design rule framework, and the revised design rule code, it generates a verification rule file corresponding to the design rule document. By introducing tool-specific configuration information to standardize the operating environment, the generated verification rule file can be more compatible with the operating logic of the design rule checking tool, avoiding abnormal operation due to inconsistent environment parameters.
[0099] In one embodiment, such as Figure 6 As shown, Figure 6 This document illustrates a flowchart of a file generation method provided in an embodiment of this application, including: DRM input, OCR recognition, layer mapping table, design rule table, metaloption, layer.csv, rule.csv, metal_option.json, script generation of DRC header, environment settings, layer definition, layer name and description, RAG system, related interface documentation, coder large model, metaloption macro definition and conditional compilation, design rules framework, SVRF design rules, complete SVRF code, DRC deck file, calling the verification tool agent skill, verified SVRF rule file, and user secondary confirmation. Specifically, after DRM input, it is split into three parallel processing branches after OCR recognition: 1) The layer mapping table generates layer.csv, and then the layer definition and layer name description information are extracted; 2) The design rule table generates rule.csv, and SVRF rules are generated by inputting the large model through the RAG system and related interface documentation (i.e., the aforementioned target syntax information); 3) The conditional compilation framework is generated from the metal layer configuration file. The outputs of the three branches (layer definition code, SVRF rules, and design rule framework) are merged with the DRC header and environment settings to obtain complete SVRF code. Then, a DRC deck file is generated and a validation tool is called to perform syntax verification. If the validation fails, it is returned for correction. If it passes, a validated SVRF rule file is formed. Finally, the user confirms it a second time, presenting an automated generation and validation process from design rule document to validation rule file.
[0100] For example, Step 1: The user uploads a DRM PDF document, and the system uses the integrated MinerU OCR engine to recognize the document. The OCR engine not only recognizes text, but also uses layout analysis technology to identify the chart structure in the document, converting the chart content into intermediate data in Markdown format.
[0101] Step 2: Process the three branches in parallel; The system starts three parallel processing threads to process different parts parsed from the OCR intermediate data.
[0102] Branch 1: Layer mapping processing; Thread 1 locates the "Layer Mapping Table" section from the data.
[0103] Parse the table and extract information such as layer name (e.g., METAL1), layer type (e.g., drawing), GDS number (e.g., 113), and data type (e.g., 1) for each row.
[0104] Write this information into a CSV file according to a predefined format, generating layer.csv. For example: Layer name,Layer Type,Gds Number,Datatype METAL1,drawing,113,1.
[0105] A layer definition module reads layer.csv and converts it into standard layer definition statements in SVRF syntax, for example: LAYER METAL1 10000; LAYER MAP 113 DATATYPE 1 10000.
[0106] Branch 2: Design rule processing; Thread 2 locates the "Design Rule Table" section from the data.
[0107] Parse the rule table to extract information such as rule name (e.g., M1.W), rule description (e.g., Min width of M1), label (e.g., A), operator (>=), and value (e.g., 8), and generate rule.csv. For example: Rule Name,Description,Label,Op.,Value; M1.W,Min width of M1,A,>=,8.
[0108] The RAG system is triggered: an embedding model converts each rule in rule.csv (e.g., "The minimum linewidth of M1 is 8um") into a vector. The system retrieves the most similar known SVRF rule code snippets or API documentation from a pre-built vector database. The search results are concatenated with the original rule to form an "enhanced rule description," which is ultimately compiled into a related interface documentation. For example, the documentation might contain: "For the minWidth rule, SVRF commonly uses the width command in conjunction with the < operator for checking; its typical syntax is: INT..."<layer_name> < <value>ABUT<90SINGULAR REGION.
[0109] Branch 3: Metal option processing; Thread 3 locates the "Metal Option" section from the data, which is usually in three formats: graph, text, and table. It requires the use of a multimodal large model (VLM) to comprehensively understand the graph and text table.
[0110] Output different metal layer stacking schemes (e.g., OPTION 1: ALPAD, VIA0, M1, OPTION 2: ALPAD, VIA0, M1, VIA1, M2) and write them to metal_option.json. For example: { "front": { "1M": ["ALPAD", "VIA0", "M1"], "2M": ["ALPAD", "VIA0", "M1", "VIA1", "M2"], "3M": ["ALPAD", "VIA0", "M1", "VIA1", "M2", "VIA2", "M3"] }, "back": { "1M": ["BM1"], "2M": ["BM1", "BVIA1", "BM2"], ... } ... }
[0111] Where front and back are MTSK switches, and 1M, 2M, and 3M are the values and their layers.
[0112] Define macros and conditionally compile metal options, and establish a framework for design rules. For example: #DEFINE FRONT_MTSK 1M / / {1M, 2M, 3M} #DEFINE BACK_MTSK 1M / / {1M, 2M, 3M} #IFDEF FRONT_MTSK 1M {design rules of layers: ["ALPAD", "VIA0", "M1"]} #ENDIF #IFDEF FRONT_MTSK 2M {design rules of layers: ["ALPAD", "VIA0", "M1", "VIA1", "M2"]} #ENDIF ...
[0113] The subsequently generated SVRF-formatted design rules will be filled into {design rules of layers}.
[0114] Step 3: Generate design rules in SVRF format from the large model; Launch a Retrieval Enhancement Generation (RAG) system (such as a solution based on LangChain+ vector database) to retrieve relevant interface documentation (such as SVRF API documentation) for the design rules in rule.csv, providing context for subsequent rule generation.
[0115] Build a structured prompt and send it to a locally deployed, finely tuned code generation model (e.g., a model finely tuned based on Qwen3-Coder). Example prompt: "You are an SVRF expert. Please generate a complete SVRF rule check file based on the following information: 1. Layer information: [Insert layer name and description here]. 2. Design rules and interface specifications: [Insert RAG recall documentation here]. 3. Design rules of layers: [Insert single rule information such as rule name and rule description here]. Please output syntactically correct SVRF code." Based on the prompts, the large model generates design rules in SVRF format one by one and fills them into the design rules framework.
[0116] The final DRC deck file is obtained by integrating the DRC header, environment settings, layer definition, design rules framework, and SVRF-style design rules.
[0117] Step 4: Agent calls for verification and iteration; An Agent program in the system is activated. This Agent receives the SVRF code generated in the previous step. The Agent first saves the code as a temporary .svrf file, then calls an internal DRC verification tool to perform a pure syntax check (dry-run or syntax-check mode). The verification tool returns a result. The Agent parses this result: if a syntax error (N) is returned, the Agent extracts the error information (such as line number and error description) and feeds it back to the coder model in step 3, requesting it to correct the code based on the error information. The process jumps back to step 3, forming a closed-loop iteration; if a syntax correctness (Y) is returned, the process continues.
[0118] Step 5: User confirmation; The system presents the validated SVRF rule file to the user. The user interface highlights the validated information and provides a code preview, download option, and a "Confirm Implementation" button. After the user conducts a final review and confirms that everything is correct, they click "Confirm," and the rule file is officially published to the design environment.
[0119] Furthermore, as Figure 1 The specific implementation of the method shown in this embodiment provides a file generation device 700, such as... Figure 7 As shown, Figure 7 This is a schematic diagram of a document generation apparatus provided in an embodiment of this application. The document generation apparatus 700 includes: The acquisition module 701 is configured to acquire the design rule document to be parsed, perform structured parsing on the design rule document, and obtain the layer mapping information, metal layer configuration information and design rule information of the design rule document; Processing module 702 is configured to perform file conversion processing on the layer mapping information, metal layer configuration information and design rule information respectively, and generate corresponding structured data files; The first generation module 703 is configured to generate, based on the structured data file, the layer definition code of the design rule document, the design rule framework of the design rule document, and the design rule code of the design rule document; The second generation module 704 is configured to generate a verification rule file corresponding to the design rule document based on the layer definition code, the design rule framework, and the design rule code.
[0120] In some examples, the acquisition module 701 is specifically configured to perform content recognition on the design rule document to obtain document content information in the design rule document; perform layout parsing on the design rule document to obtain document structure information of the design rule document; and determine layer mapping information, metal layer configuration information and design rule information of the design rule document based on the document content information and the document structure information.
[0121] In some examples, the structured data file includes a layer data file corresponding to the layer mapping information, a metal layer configuration file corresponding to the metal layer configuration information, and a design rule data file corresponding to the design rule information. The first generation module 703 is specifically configured to generate layer definition code for the design rule document based on the layer definition information in the layer data file; generate conditional compilation instructions based on the metal layer configuration file to construct the design rule framework of the design rule document; and generate design rule code for the design rule document based on the layer data file and the design rule data file.
[0122] In some examples, the first generation module 703 is specifically configured to determine the target syntax information corresponding to the design rule data file based on the rule syntax knowledge base; input the target syntax information, the layer basic information in the layer data file, and the rule association information in the design rule data file into the target code generation model to generate the design rule code of the design rule document.
[0123] In some examples, the second generation module 704 is specifically configured to perform syntax validation on the design rule code and correct the design rule code based on the validation result; if the syntax of the design rule code passes the validation, a validation rule file corresponding to the design rule document is generated based on the layer definition code, the design rule framework, and the corrected design rule code.
[0124] In some examples, the second generation module 704 is specifically configured to call a layout verification tool to perform syntax verification on the design rule code; and correct the design rule code based on the syntax error information in the verification result returned by the layout verification tool.
[0125] In some examples, the second generation module 704 is specifically configured to obtain the configuration information of the layout verification tool; and generate the verification rule file corresponding to the design rule document based on the configuration information, the layer definition code, the design rule framework, and the revised design rule code.
[0126] Based on the above, Figure 1 Accordingly, this embodiment also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method. Figure 1 The method shown.
[0127] Based on this understanding, the technical solution of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as CD-ROM, USB flash drive, mobile hard drive, etc.) and includes several instructions to cause a computer device (such as personal computer, server, or network device, etc.) to execute the methods of various implementation scenarios of this application.
[0128] Based on the above, Figure 1 The method shown, and Figure 7 To achieve the above objectives, the present application also provides an electronic device, which may include a storage medium and a processor; the storage medium is used to store a computer program; the processor is used to execute the computer program to achieve the above-described virtual device embodiments. Figure 1 The method shown.
[0129] Optionally, the aforementioned physical devices may also include a user interface, a network interface, a camera, radio frequency (RF) circuitry, sensors, audio circuitry, a Wi-Fi module, etc. The user interface may include a display screen, input units such as a keyboard, etc., and optional user interfaces may also include USB interfaces, card reader interfaces, etc. The network interface may optionally include standard wired interfaces, wireless interfaces (such as Wi-Fi interfaces), etc.
[0130] Those skilled in the art will understand that the physical device structure provided in this embodiment does not constitute a limitation on the physical device, and may include more or fewer components, or combine certain components, or have different component arrangements. The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the aforementioned physical device, supporting the operation of information processing programs and other software and / or programs. The network communication module is used to enable communication between the various components within the storage medium, as well as communication with other hardware and software in the information processing physical device.
[0131] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented using software plus necessary general-purpose hardware platforms, or it can be implemented using hardware. By applying the solution of this embodiment, when the validity of the target data changes, it can be ensured that the tag corresponding to the target data can automatically update its data and location information as the target data is refreshed, thereby improving data tagging efficiency.
[0132] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the term "comprising" or any other variations thereof is intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one…" does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0133] The above are merely specific embodiments of this application, enabling those skilled in the art to understand or implement this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to these embodiments, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.< / value>
Claims
1. A method for generating a file, characterized in that, include: Obtain the design rule document to be parsed, perform structured parsing on the design rule document, and obtain the layer mapping information, metal layer configuration information and design rule information of the design rule document; The layer mapping information, metal layer configuration information, and design rule information are respectively processed by file conversion to generate corresponding structured data files; Based on the structured data file, the layer definition code of the design rule document, the design rule framework of the design rule document, and the design rule code of the design rule document are generated; Based on the layer definition code, the design rule framework, and the design rule code, a verification rule file corresponding to the design rule document is generated.
2. The method according to claim 1, characterized in that, The structured parsing of the design rule document yields layer mapping information, metal layer configuration information, and design rule information, including: Perform content recognition on the design rule document to obtain the document content information in the design rule document; The layout of the design rules document is parsed to obtain the document structure information of the design rules document; Based on the document content information and the document structure information, determine the layer mapping information, metal layer configuration information, and design rule information of the design rule document.
3. The method according to claim 1, characterized in that, The structured data file includes a layer data file corresponding to the layer mapping information, a metal layer configuration file corresponding to the metal layer configuration information, and a design rule data file corresponding to the design rule information. The step of generating the layer definition code, the design rule framework, and the design rule code of the design rule document based on the structured data file includes: The layer definition code for the design rule document is generated based on the layer definition information in the layer data file; Based on the metal layer configuration file, conditional compilation instructions are generated to construct the design rule framework of the design rule document; The design rule code of the design rule document is generated based on the layer data file and the design rule data file.
4. The method according to claim 3, characterized in that, The design rule code that generates the design rule document based on the layer data file and the design rule data file includes: The target syntax information corresponding to the design rule data file is determined based on the rule syntax knowledge base; The target syntax information, the basic layer information in the layer data file, and the rule association information in the design rule data file are input into the target code generation model to generate the design rule code of the design rule document.
5. The method according to claim 1, characterized in that, The step of generating a validation rule file corresponding to the design rule document based on the layer definition code, the design rule framework, and the design rule code includes: The design rule code is syntax-checked, and the design rule code is corrected based on the check results; If the syntax of the design rule code passes the validation, a validation rule file corresponding to the design rule document is generated based on the layer definition code, the design rule framework, and the revised design rule code.
6. The method according to claim 5, characterized in that, The step of performing syntax validation on the design rule code and correcting the design rule code based on the validation results includes: The layout verification tool is invoked to perform syntax validation on the design rule code. Based on the syntax error information in the verification results returned by the layout verification tool, the design rule code is corrected.
7. The method according to claim 5, characterized in that, The step of generating a verification rule file corresponding to the design rule document based on the layer definition code, the design rule framework, and the revised design rule code includes: Obtain the configuration information for the layout verification tool; Based on the configuration information, the layer definition code, the design rule framework, and the revised design rule code, a verification rule file corresponding to the design rule document is generated.
8. A document generation device, characterized in that, include: The acquisition module is configured to acquire the design rule document to be parsed, perform structured parsing on the design rule document, and obtain the layer mapping information, metal layer configuration information and design rule information of the design rule document; The processing module is configured to perform file conversion processing on the layer mapping information, metal layer configuration information and design rule information respectively, and generate corresponding structured data files; The first generation module is configured to generate, based on the structured data file, the layer definition code of the design rule document, the design rule framework of the design rule document, and the design rule code of the design rule document; The second generation module is configured to generate a verification rule file corresponding to the design rule document based on the layer definition code, the design rule framework, and the design rule code.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 7.
10. An electronic device comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 7.