Method, device and equipment for automatically extracting violation path and storage medium
By using Python automation methods to parse timing simulation reports, configure setting information and target information, and automatically extract and discard duplicate information, the problem of inefficient manual screening in timing simulation reports is solved, and efficient timing violation path extraction is achieved, reducing memory overhead and labor costs.
Patent Information
- Application Number
- CN202510882171.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-27
- Publication Date
- 2025-10-10
AI Technical Summary
In very large-scale integrated circuit design, timing simulation reports are presented in text format and lack intuitive visualization support. Designers need to manually screen critical paths, which is inefficient and prone to missing important information. How to efficiently and accurately extract the target content becomes a key issue.
A Python-based automation method is used to parse the timing simulation report file, configure the setting information and target information, match the file parsing data, automatically extract and save the key information, discard duplicate information, and achieve efficient timing violation path extraction.
Quickly obtain the timing violation data required by designers, such as register name and violation time, to reduce memory overhead, improve work efficiency, reduce labor costs, and solve the bottleneck problem of chip design process.
Smart Images

Figure CN120764518A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of natural language data processing, and in particular to a method, apparatus, device, and storage medium for automatically extracting illegal paths. Background Art
[0002] In the field of very large-scale integrated circuit (VLSI) design, timing violations are a core issue affecting chip performance and reliability. As process nodes advance to the nanometer scale, design complexity increases exponentially. Detecting and optimizing timing violation paths has become a key bottleneck in the chip design process. However, timing simulation reports are presented in text format and lack intuitive visualization support. Designers must manually screen critical paths, which is inefficient and prone to missing important information. Efficiently and accurately extracting target content from these reports has become a critical issue in many fields. Furthermore, timing simulation report files record all violation information, which can be tens of thousands or even hundreds of thousands of lines long. The same violation and bit violations in different registers can be reported multiple times, making manual analysis of these files a labor-intensive and inefficient process for digital circuit designers. Python, a powerful, easy-to-learn, and richly resourced programming language, has been widely used in data processing. Therefore, developing an efficient, versatile, and user-friendly method for extracting target content from timing simulation reports based on the computer programming language (Python) has important practical significance and application value. It improves the efficiency and accuracy of data processing, reduces the difficulty and input cost of designers' work, and provides strong support for subsequent work. Summary of the Invention
[0003] The present disclosure provides a method, apparatus, device and storage medium for automatically extracting violation paths, so as to at least solve the above technical problems existing in the prior art.
[0004] According to a first aspect of the present disclosure, a method for automatically extracting violation paths is provided, the method comprising:
[0005] selecting a first file, and configuring setting information and target information based on the first file;
[0006] Parsing the first file based on a first algorithm to obtain file parsing data;
[0007] The file parsing data is matched with the setting information based on a first function statement to obtain a first matching result, and whether to output the record file and end the extraction is determined based on the first matching result and the file parsing data.
[0008] In one embodiment, the determining whether to output the record file and end the extraction based on the first matching result and the file parsing data includes:
[0009] If the first matching result is no match, determining whether the extraction end condition is met based on the file parsing data;
[0010] If the extraction termination condition is met, the record file is output based on the first matching result, and the extraction operation is terminated in response to the record file being output.
[0011] In one embodiment, the method further comprises:
[0012] If the first matching result is a match, obtaining the file parsing data;
[0013] Matching corresponding content in the file parsing data based on the target information, and saving the corresponding content in the record file;
[0014] Corresponding position information in the file parsing data is determined based on the setting information, and a clipping position of the corresponding content saved in the record file is determined based on the position information.
[0015] In one embodiment, the method further comprises:
[0016] Obtaining the content stored in the record file, and comparing the corresponding content with the stored content;
[0017] If the comparison result shows that the corresponding content does not exist in the stored content, saving the corresponding content in the record file;
[0018] If the comparison result shows that the corresponding content already exists in the stored content, the corresponding content is discarded.
[0019] In one embodiment, the determining whether the extraction termination condition is met based on the file parsing data includes:
[0020] The file parsing data includes: the current number of lines in the file and the maximum number of lines in the file;
[0021] Determine whether the current number of rows is equal to the maximum number of rows based on the comparison field, and if they are equal, the extraction end condition is met;
[0022] If they are not equal, based on the traversal polling algorithm, the row variable is increased by one and the parsing of the first file continues.
[0023] In one embodiment, the method further comprises:
[0024] In response to the storing of the corresponding content or the discarding of the corresponding content, generating an instruction for determining a condition for ending extraction;
[0025] In response to the end extraction condition judgment instruction, it is determined whether the maximum number of lines in the file parsing data is equal to the current number of lines based on the comparison field, and if so, the end extraction condition is met;
[0026] If not, the line variable is incremented by one based on a traversal polling algorithm, and the first file is continuously parsed.
[0027] In an implementation, the configuration setting information and the target information based on the first file include:
[0028] The first file includes a key line structure composed of a file path, a timing violation, a register name, a task statement, and violation information, and the violation information includes a violation time;
[0029] Based on the key line structure, the register name and the violation time are set as the target information;
[0030] Based on the key line structure, the timing violation and the task statement are set as the setting information.
[0031] In an implementation, the file parsing data is matched with the setting information based on the first function statement, including:
[0032] The file parsing data includes the current number of lines in the file, the maximum number of lines of the file, and the current line file content;
[0033] The file setting information is used to mark the position data of different content in the file parsing data;
[0034] The current line file content is matched with the position data based on the first function statement to determine whether the position data exists in the current line file content.
[0035] In an implementation, the method further includes:
[0036] The target information of the current line file content in the file parsing data is found based on the setting information, and the target information is written into the record file;
[0037] When the setting information existing in the current line file content is found, the content written in the record file and the current number of lines in the file parsing data are saved.
[0038] According to a second aspect of the present disclosure, there is provided a violation path automatic extraction device, which includes:
[0039] An acquisition module is configured to select a first file, and configure setting information and target information based on the first file;
[0040] The comparison module is used to parse the first file based on a first algorithm to obtain file parsing data; match the file parsing data with the setting information based on a first function statement to obtain a first matching result; and determine whether to output the record file and end the extraction based on the first matching result and the file parsing data.
[0041] In one embodiment, the device further comprises:
[0042] A writing module is used to determine whether the end extraction condition is met based on the file parsing data if the first matching result is no match; if the end extraction condition is met, output the record file based on the first matching result, and end the extraction operation in response to the output of the record file.
[0043] In one possible implementation, the writing module is further configured to, if the first matching result is a match, obtain the file parsing data;
[0044] Match the corresponding content in the file parsing data based on the target information, and save the corresponding content in the record file; determine the corresponding position information in the file parsing data based on the setting information, and determine the interception position of the corresponding content saved in the record file based on the position information.
[0045] In one possible implementation manner, the writing module is further used to obtain the content stored in the record file, and compare the corresponding content with the stored content; if the comparison result is that the corresponding content does not exist in the stored content, then the corresponding content is saved in the record file; if the comparison result is that the corresponding content already exists in the stored content, then the corresponding content is discarded.
[0046] In one embodiment, the comparison module is also used to, in the file parsing data, include: the current number of lines in the file and the maximum number of lines in the file; determine whether the current number of lines and the maximum number of lines are equal based on the comparison field, and if they are equal, the end extraction condition is met; if they are not equal, based on the traversal polling algorithm, the row variable is increased by one, and the first file continues to be parsed.
[0047] In one embodiment, the comparison module is further used to generate an end extraction condition judgment instruction in response to saving the corresponding content or discarding the corresponding content; in response to the end extraction condition judgment instruction, determine whether the maximum number of lines in the file parsing data and the current number of lines are equal based on the comparison field, and if they are equal, the end extraction condition is met; if they are not equal, based on the traversal polling algorithm, the row variable is increased by one, and the first file continues to be parsed.
[0048] In one embodiment, the acquisition module is also used to: the first file contains a key line structure, the key line structure consists of a file path, a timing violation, a register name, a task statement and violation information, and the violation information includes a violation time; based on the key line structure, the register name and the violation time are set as the target information; based on the key line structure, the timing violation and the task statement are set as the setting information.
[0049] In one embodiment, the comparison module is also used to: the file parsing data includes the current number of lines in the file, the maximum number of lines in the file, and the current line file content; the file setting information is used to calibrate the position data of different contents in the file parsing data; based on the first function statement, the current line file content is matched with the position data to determine whether the position data exists in the current line file content.
[0050] In one embodiment, the writing module is further used to search for the target information of the current line file content in the file parsing data based on the setting information, and write the target information into the record file; when the setting information existing in the current line file content is found, the content written in the record file and the current line number in the file parsing data are saved.
[0051] According to a third aspect of the present disclosure, there is provided an electronic device, including:
[0052] at least one processor; and
[0053] a memory communicatively connected to the at least one processor; wherein,
[0054] The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the present disclosure.
[0055] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause the computer to execute the method described in the present disclosure.
[0056] The present invention discloses an automatic extraction method, device, equipment and storage medium for violation paths. By determining the position corresponding to the set information, parsing the data to obtain the target information, traversing the file to compare the target information with the set information, and discarding duplicate information, efficient timing violation path extraction is achieved. This method can quickly parse and obtain the timing violation data that the designer wants from the timing simulation report file, such as key information such as register name and violation time, without the need to store all the parsed data, which can reduce memory overhead and storage overhead for the parsed data, provide strong support for subsequent operations, and enable designers to deal with timing violation problems more promptly. In the design of ultra-large-scale integrated circuits, the traditional manual screening of critical paths is inefficient and easy to miss important information. The automatic extraction method disclosed in the present invention greatly reduces the workload of digital circuit designers, improves work efficiency, reduces manpower input costs, and effectively solves the bottleneck problem of chip design process caused by the difficulty of detecting and optimizing timing violation paths.
[0057] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] The above and other objects, features and advantages of the exemplary embodiments of the present disclosure will become readily understood by reading the detailed description below with reference to the accompanying drawings, in which several embodiments of the present disclosure are shown by way of example and not limitation, wherein:
[0059] In the drawings, the same or corresponding reference numerals denote the same or corresponding parts.
[0060] Figure 1 The following is a schematic diagram showing the implementation process of a method for automatically proposing a violation path according to an embodiment of the present disclosure. Figure 1 ;
[0061] Figure 2 The following is a schematic diagram showing the implementation process of a method for automatically extracting illegal paths according to an embodiment of the present disclosure. Figure 2 ;
[0062] Figure 3 A schematic diagram of an automatic extraction device for illegal paths according to an embodiment of the present disclosure is shown;
[0063] Figure 4 A schematic diagram of the key line structure of a timing simulation report file in an embodiment of the present disclosure is shown;
[0064] Figure 5 A schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0065] To make the purposes, features, and advantages of the present disclosure more apparent and understandable, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present disclosure without creative work shall fall within the scope of protection of the present disclosure.
[0066] Accurately and quickly finding the cause of timing violations in the timing path, and then performing targeted timing violation repairs, is crucial for quickly achieving timing convergence. When analyzing the timing path, EDA (Electronic Design Automation) tools are often used to generate relevant timing reports for timing optimization to achieve final timing convergence. However, the timing simulation report is presented in text form and lacks intuitive visualization support. Designers need to manually screen the critical path, which is inefficient and easy to miss important information. Therefore, this patent proposes the following method for quickly detecting timing violation information in the timing report, so that technicians can accurately and efficiently extract available information.
[0067] Figure 1 The following is a schematic diagram showing the implementation process of a method for automatically proposing a violation path according to an embodiment of the present disclosure. Figure 1 ,like Figure 1 As shown, the implementation process of a method for automatically proposing a violation path in an embodiment of the present disclosure includes the following steps:
[0068] Step 101: Select a first file, and configure setting information and target information based on the first file.
[0069] In the embodiments of the present disclosure, a first file is selected from a background memory or a database, wherein the first file is a timing simulation report file recording timing violations. The timing simulation report file is an important tool for designers in the process of designing digital circuits, and it runs through all stages of the design. Through the timing simulation report, the designer can view the output response of the circuit under different input signals and clock conditions, and check whether the circuit works according to the expected logic function. The timing simulation report file contains a key line structure, which includes a file path, a timing violation, a register name, a system task statement ($setuphold) for simultaneously checking setup time and hold time, and violation information. The register name can include multiple names, such as: name (register) 0, name (register) 1, name (register) 2, and the like (abbreviated as: register0, register1, register2, and the like). The violation information includes violation time, the rising edge or falling edge of the clock signal (posedge or negedge), limit information (limits), and time information (time). Based on the key line structure, the register name and the violation time are set as the target information. Since there can be multiple register names in the key line structure, there are also multiple register names in the set target information. At the same time, based on the key line structure, the timing violation and the task statement are set as the setting information.
[0070] In step 102, the first file is parsed based on a first algorithm to obtain file parsing data.
[0071] In the embodiments of the present disclosure, the method can parse the first file based on a Python platform, and therefore the corresponding first algorithm can be a file parsing method already stored in Python. The file parsing data obtained by parsing should include the current line number, the maximum line number, and the current line file content in the file.
[0072] In step 103, the file parsing data is matched with the setting information based on a first function statement to obtain a first matching result.
[0073] In the embodiments of the present disclosure, as known from step 102, the file analysis data includes the current line number in the file, the maximum line number of the file, and the current line file content; and the file setting information is used to mark the position data of different content in the file analysis data; therefore, the current line file content is matched with the position data based on the first function statement, to determine whether the position data exists in the current line file content. The first function statement can be a commonly used comparison field in Python code, which is used to detect whether the setting information exists in the current line file content, to obtain a first matching result.
[0074] In step 104, whether to output a record file is determined based on the first matching result and the file analysis data, and the extraction is ended.
[0075] In the embodiments of the present disclosure, if the first matching result is no match, whether the end extraction condition is met is determined based on the file analysis data; wherein the file analysis data required here includes the current line number in the file and the maximum line number of the file; whether the current line number and the maximum line number are equal is determined by the commonly used comparison field in the Python code, if yes, the end extraction condition is met, which means that the extraction of the entire file is completed; if no, the line variable is increased by one based on the traversal polling algorithm, and the first file is continuously analyzed. When the end extraction condition is met, the record file is output based on the first matching result, and the extraction operation is ended after the record file is output. The record file should include all the exception data existing in the first file, such as the related content information of the time, position, and register name corresponding to the exception path.
[0076] In the embodiment of the present disclosure, if the first matching result is a match, the file parsing data is obtained, that is, the file parsing data is obtained according to the position recorded by the setting information. The file parsing data should include the target information at the corresponding position. Specifically, the corresponding content in the file parsing data can be matched based on the target information, and the corresponding content is saved in the record file; the corresponding position information in the file parsing data is determined based on the above setting information, and the position information corresponds to the starting position and the end position of the target information intercepted in the current line, and the interception position of the corresponding content saved in the record file is determined based on the end position in the position information. Specifically, the target information of the current line of file content in the file parsing data is searched based on the position corresponding to the setting information, and the target information is written into the record file; at the same time, when the setting information existing in the current line of file content is found, the content written in the record file and the current line number in the file parsing data are saved. Furthermore, the stored content in the record file is obtained, and the corresponding content can be compared with the stored content based on the commonly used comparison fields in the above Python code; if the comparison result is that the corresponding content does not exist in the stored content, the corresponding content is saved in the record file; if the comparison result is that the corresponding content already exists in the stored content, the corresponding content is discarded, wherein the corresponding content includes the relevant content in the above target information. Here, the main purpose is to compare the intercepted register names. Since the timing paths for different bits of the same register may be the same, if a timing violation occurs for a thousand-bit register, there will be a thousand reports about the same register in the timing simulation report file. When the code style ensures that the timing paths for different bits of the same register are the same, the violation path automatic extraction device of the timing simulation report file will only record the violation once for the same register. When the target information has been recorded, that is, when the same register appears repeatedly, the target information of this row will be discarded. If the target information has not been recorded, it will be saved to the output file.
[0077] In an embodiment of the present disclosure, after the record file is updated based on the above method, an end extraction condition judgment instruction is generated in response to saving the corresponding content or discarding the corresponding content; in response to the end extraction condition judgment instruction, whether the maximum number of lines in the file parsing data and the current number of lines corresponding to the current line file content in the above updated content are equal is determined based on the comparison field in the Python code. If they are equal, the end extraction condition is met; if they are not equal, based on the traversal polling algorithm, the row variable is configured to be increased by one, and the first file is continued to be parsed until all lines of the full text of the first file are parsed. Specifically, based on the comparison field in Python, it is determined whether the current line is equal to the maximum line of the file, that is, whether the current number of lines is equal to the maximum number of lines of the timing simulation report file. If so, the record file is output and the process ends. If not, the variable value set based on the traversal polling algorithm is increased by one, and the file content is continued to be parsed.
[0078] In the disclosed embodiment, efficient timing violation path extraction is achieved by determining the position corresponding to the setting information, parsing the data and obtaining the target information, while traversing the file and discarding duplicate information. This method does not need to store all parsed data, which can effectively reduce memory and storage overhead, and quickly obtain the timing violation data required by designers, such as register names and violation times, etc., providing strong support for subsequent operations such as timing optimization, and changing the previous situation of low screening efficiency and easy omissions. At the same time, targeted module design can be carried out according to this method, and different module functions can be set separately, such as: a module responsible for receiving the file to be parsed, setting information and target information; a module for parsing the file line by line and comparing it with the setting information; a module for recording and saving the target content, which can be specifically referred to. Figure 3 On this basis, the various modules work together to ensure the accuracy and orderliness of the extraction process, effectively addressing the problems of large number of lines and repeated information in timing simulation report files, and improving the processing efficiency of timing reports.
[0079] Figure 2 The following is a schematic diagram showing the implementation process of a method for automatically extracting illegal paths according to an embodiment of the present disclosure. Figure 2 ,like Figure 2 As shown, the implementation process of an example path automatic extraction method in the embodiment of the present disclosure includes the following steps:
[0080] Step 201: Configure setting information and target information.
[0081] In the disclosed embodiment, at the beginning of the method for automatically extracting violation paths, a file to be analyzed is selected, and setting information and target information are configured. This patent takes a timing simulation report file as an example. Based on the analyzed key line structure of the timing simulation report file, the target information is set to the register name and violation time required by the designer in the timing simulation report file. The setting information is set to the timing violation (Timing violation in) and the system task statement ($setuphold) for simultaneously checking the setup time and hold time. The setting information is used to determine the location data for extracting the violation information, and the target information is the key content corresponding to the extracted violation data.
[0082] In the disclosed embodiment, the timing simulation report file is an important tool for designers in the digital circuit design process. It runs through all stages of the design. Through the timing simulation report, designers can view the output response of the circuit under different input signals and clock conditions, and check whether the circuit works according to the expected logical function. A timing report generally contains many timing paths, and these timing paths are divided into different timing path groups according to different clock domains and path types. The timing slack in the timing report is used to measure the degree of completion of the timing path. It represents the difference between the time required for the timing path to complete its operation and the given clock cycle. If the timing slack is positive, it means that the timing path has enough time margin to complete its operation. On the contrary, if the timing slack is negative, it means that the timing path cannot complete its operation within the specified clock cycle, that is, there is a timing violation.
[0083] In the embodiment of the present disclosure, analysis is performed based on the key line structure in the timing simulation report file. Specifically, Figure 4 The schematic diagram of the key line structure of the timing simulation report file in the embodiment of the present disclosure is shown as follows: Figure 4 As shown, the key line structure includes the file path, Timing violation in, register name, $setuphold and violation information, where the register name can include multiple, such as: register0, register1, register2, etc.; the violation information includes: violation time, rising edge or falling edge (posedge or negedge) of the clock signal, limit information (limits) and number information (time).
[0084] Step 202: parse the current line of file content.
[0085] In an embodiment of the present disclosure, the current line of the timing simulation report file is parsed based on Python to obtain parsing information in the file, wherein the parsing information includes the current line number, the maximum line number and the current line file content in the current file.
[0086] Step 203: Check whether the content of the current row matches the setting information.
[0087] In the disclosed embodiment, the current line of the file content is compared to see if it matches the setup information. Specifically, based on the comparison field in Python, the current line of the file content parsed in step 202 is compared with the setup information configured in step 201, namely, timing violation in and $setuphold, to determine whether the setup information exists in the current line of the file content. If there is no match, that is, no setup information is found, step 206 is executed to determine whether all lines of the file have been parsed. If there is a match, that is, setup information is found in the current line of the file content, step 204 is executed to obtain the target information at the current line of the file.
[0088] Step 204: Obtain target information of the current line position of the file.
[0089] In the embodiment of the present disclosure, if the content matches, the target information of the current line content of the file is obtained, that is, when Timing violation in and $setuphold are matched, the current line number, intercepted register name and violation time in the current line file content are saved.
[0090] Step 205: Check whether the target information has been recorded.
[0091] In the disclosed embodiment, the saved current row number, intercepted register name and violation time are compared with the content already stored in the record file. Specifically, the target information is compared based on the comparison field in Python to see if it has been recorded. The main purpose is to compare the intercepted register names, because for digital chip design engineers, the timing paths for different bits of the same register may be the same. If a timing violation occurs in a thousand-bit register, there will be a thousand reports about the same register in the timing simulation report file. When the code style ensures that the timing paths for different bits of the same register are the same, the violation path automatic extraction device of the timing simulation report file will only record one violation for the same register. When the target information has been recorded, that is, when the same register appears repeatedly, the target information of this row will be discarded. If the target information has not been recorded, it will be saved in the output file.
[0092] Step 206: Check whether all lines of the file have been parsed.
[0093] In the embodiment of the present disclosure, after completing the above step 203 or step 205, this step is executed to determine whether the parsing of all lines of the file is completed. Specifically, based on the comparison field in Python, it is determined whether the current line is equal to the maximum line of the file, that is, based on whether the current number of lines is equal to the maximum number of lines of the timing simulation report file. If so, the record file is output and the process ends. If not, the variable value set based on the traversal polling algorithm is increased by one to continue parsing the file content.
[0094] Step 207: Output the record file.
[0095] In the embodiment of the present disclosure, when it is determined that the current number of lines is equal to the maximum number of lines in the timing simulation report file, step 207 is executed, and the automatic extraction of the timing violation path is ended after the record file is output. The record file can be in the form of a table, which records the relevant content information of the time, position, and register name corresponding to the violation path, so that designers can handle the timing violation problem more promptly.
[0096] The disclosed embodiment provides a method for automatically extracting timing violation paths in a timing simulation report file. The method includes: the timing simulation report file contains setting information, and the information position corresponding to the setting information is determined from the timing simulation report file data; the data information at the position corresponding to the setting information in the timing simulation report file is parsed to obtain the target information; the entire timing simulation report file is traversed to complete the acquisition of the target information in the entire file, and at the same time, duplicate target information is discarded when obtaining the target information. It can be seen that this method requires all data in the data file to be parsed, and there is no need to store all parsed data, which can reduce memory overhead and storage overhead for parsed data. In addition, this method can quickly parse and obtain the timing violation data that the designer wants so that subsequent operations can be quickly performed.
[0097] In the disclosed embodiments, a method for automatically extracting violation paths has brought significant improvements to the field of very large-scale integrated circuit design, and has many beneficial effects: Efficient data extraction: It can quickly parse and obtain the timing violation data that designers want from the timing simulation report file, such as key information such as register name and violation time, without the need to store all parsed data, which can reduce memory overhead and storage overhead for parsed data, provide strong support for subsequent operations, and enable designers to deal with timing violation problems more promptly. Reduce work difficulty and cost: In very large-scale integrated circuit design, the traditional manual screening of critical paths is inefficient and easy to miss important information. The automated extraction method of the present invention greatly reduces the workload of digital circuit designers, improves work efficiency, reduces manpower input costs, and effectively solves the bottleneck problem of the chip design process caused by the difficulty of detecting and optimizing timing violation paths.
[0098] Figure 3 A schematic diagram of an automatic extraction device for illegal paths according to an embodiment of the present disclosure is shown. Figure 3 As shown, an automatic extraction device for violation paths according to an embodiment of the present disclosure includes: an acquisition module 301, a comparison module 302, and a writing module 303. The acquisition module 301 mainly receives the file to be parsed, the setting information, and the target information. The comparison module 302 parses the file line by line and compares the current line content of the file to be parsed with the pre-set information. The writing module 303 records the current line and the current line content, saves the target content in the current line content, and outputs the saved target content after the line-by-line parsing is completed. The specific functions are as follows:
[0099] The acquisition module 301 is configured to select a first file and configure setting information and target information based on the first file.
[0100] The acquisition module 301 is also used to: the first file contains a key line structure, the key line structure consists of a file path, a timing violation, a register name, a task statement and violation information, and the violation information includes a violation time; based on the key line structure, the register name and the violation time are set as the target information; based on the key line structure, the timing violation and the task statement are set as the setting information.
[0101] The comparison module 302 is used to parse the first file based on a first algorithm to obtain file parsing data; match the file parsing data with the setting information based on a first function statement to obtain a first matching result; and determine whether to output the record file and end the extraction based on the first matching result and the file parsing data.
[0102] The comparison module 302 is also used to, in the file parsing data, include: the current number of lines in the file and the maximum number of lines in the file; determine whether the current number of lines and the maximum number of lines are equal based on the comparison field, and if they are equal, the end extraction condition is met; if they are not equal, based on the traversal polling algorithm, the row variable is increased by one and the first file is continued to be parsed.
[0103] The comparison module 302 is also used to generate an end extraction condition judgment instruction in response to saving the corresponding content or discarding the corresponding content; in response to the end extraction condition judgment instruction, determine whether the maximum number of lines in the file parsing data and the current number of lines are equal based on the comparison field, and if they are equal, the end extraction condition is met; if they are not equal, based on the traversal polling algorithm, the row variable is increased by one, and the first file continues to be parsed.
[0104] The comparison module 302 is also used to: the file parsing data includes the current number of lines in the file, the maximum number of lines in the file, and the current line file content; the file setting information is used to calibrate the position data of different contents in the file parsing data; based on the first function statement, the current line file content is matched with the position data to determine whether the position data exists in the current line file content.
[0105] The writing module 303 is used to determine whether the end extraction condition is met based on the file parsing data if the first matching result is not a match; if the end extraction condition is met, output the record file based on the first matching result, and end the extraction operation in response to the output of the record file.
[0106] The writing module 303 is also used to, if the first matching result is a match, obtain the file parsing data; match the corresponding content in the file parsing data based on the target information, and save the corresponding content in the record file; determine the corresponding position information in the file parsing data based on the setting information, and determine the interception position of the corresponding content saved in the record file based on the position information.
[0107] The writing module 303 is also used to obtain the content stored in the record file, and compare the corresponding content with the stored content; if the comparison result is that the corresponding content does not exist in the stored content, the corresponding content is saved in the record file; if the comparison result is that the corresponding content already exists in the stored content, the corresponding content is discarded.
[0108] The writing module 303 is also used to search for the target information of the current line file content in the file parsing data based on the setting information, and write the target information into the record file; when the setting information existing in the current line file content is found, the content written in the record file and the current line number in the file parsing data are saved.
[0109] In an embodiment of the present disclosure, an automatic extraction device for violation paths includes the following steps during operation: a determination step: determining an information position corresponding to pre-set information from the timing simulation report file data, wherein the set information is used to identify rows containing content related to timing violations; a parsing step: parsing the data information at the position corresponding to the set information to obtain the target information required by the designer, wherein the target information includes at least the register name and the violation time; a traversal and deduplication step: traversing the entire timing simulation report file to complete the acquisition of all target information, and during the acquisition process, when the register name in the newly acquired target information is the same as the register name in the recorded target information, if the code style ensures that the timing paths of different bits of the same register are the same, then the newly acquired target information is discarded, otherwise the target information is recorded.
[0110] In the embodiment of the present disclosure, corresponding to the operation of the above-mentioned automatic extraction device for violation paths, the acquisition module 301 is used to receive the timing simulation report file to be parsed, setting information, and target information; the comparison module 302 is used to parse the timing simulation report file line by line, compare the current line content of the file with the pre-set information, and trigger the target information acquisition operation when the setting information matches; the writing module 303 is used to record the current line and the current line content, and save the target information in the current line content, and output the saved target information after completing the line-by-line parsing. The acquisition module 301, the comparison module 302, and the writing module 303 work together to realize the functions of the above-mentioned automatic extraction device for violation paths.
[0111] In an embodiment of the present disclosure, according to the above-mentioned automatic extraction device for violation paths or automatic extraction method for violation paths, an integrated circuit design assistance system can be used, wherein the system uses the extraction method or automatic extraction device for violation paths to process timing simulation report files to assist integrated circuit designers in analyzing and processing timing violation paths.
[0112] The advantages of the disclosed embodiments lie in providing a method for automatically extracting timing violation paths from timing simulation report files. The specific innovations are as follows: a unique extraction process: By determining the location corresponding to the set information, parsing the data to obtain the target information, and traversing the file while discarding duplicate information, efficient timing violation path extraction is achieved. This method eliminates the need to store all parsed data, effectively reducing memory and storage overhead. It can quickly obtain the timing violation data required by designers, such as register names and violation times, providing strong support for subsequent operations and resolving the previous situation of manual screening, which is inefficient and prone to omissions. Targeted module design: An automated violation path extraction device is designed, consisting of an acquisition module 301, a comparison module 302, and a write module 303. The acquisition module 301 is responsible for receiving the file to be parsed, the set information, and the target information; the comparison module 302 parses the file line by line and compares it with the set information; and the write module 303 records and saves the target content. The coordinated operation of these modules ensures the accuracy and orderliness of the extraction process, effectively addressing the problems of large lines and duplicate information in timing simulation report files, and improving processing efficiency.
[0113] In an exemplary embodiment, the acquisition module 301, the comparison module 302 and the writing module 303 can be implemented by one or more central processing units (CPUs), graphics processing units (GPUs), application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers (MCUs), microprocessors, or other electronic components.
[0114] Regarding the device in the above embodiment, the specific manner in which each module and unit performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0115] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device and a readable storage medium.
[0116] Figure 5A schematic block diagram of an example electronic device 800 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein. It should be noted that, since those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here. Furthermore, the functional modules in the various embodiments of the present application can be integrated together to form an independent part, or each module can exist separately, or two or more modules can be integrated to form an independent part.
[0117] like Figure 5 As shown, the device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. Various programs and data required for the operation of the device 800 can also be stored in the RAM 803. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0118] Various components in device 800 are connected to I / O interface 805, including an input unit 806, such as a keyboard, mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a magnetic disk, optical disk, etc.; and a communication unit 809, such as a network card, modem, wireless communication transceiver, etc. The communication unit 809 allows device 800 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0119] The computing unit 801 can be various general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above, such as a method for automatically extracting violation paths. For example, in some embodiments, a method for automatically extracting violation paths can be implemented as a computer software program that is tangibly contained in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program can be loaded and / or installed on the device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, one or more steps of the method for automatically extracting violation paths described above can be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to execute an automatic illegal path extraction method in any other appropriate manner (for example, by means of firmware).
[0120] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0121] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0122] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0123] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0124] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0125] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact through a communication network. The client-server relationship arises through computer programs running on the respective computers and having a client-server relationship with each other. The server may be a cloud server, a server in a distributed system, or a server integrated with a blockchain.
[0126] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not a limitation herein.
[0127] In addition, the units described as separate components may or may not be physically separate, and 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 may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0128] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features being referred to. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. Throughout the present disclosure, "plurality" means two or more, unless otherwise specifically defined.
[0129] The above description is merely a specific embodiment of the present disclosure, but the scope of protection of the present disclosure is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this disclosure should be included in the scope of protection of the present disclosure. Therefore, the scope of protection of the present disclosure should be based on the scope of protection of the claims.
Claims
1. A method for automatically extracting illegal paths, characterized in that: The method comprises: selecting a first file, and configuring setting information and target information based on the first file; Parsing the first file based on a first algorithm to obtain file parsing data; The file parsing data is matched with the setting information based on a first function statement to obtain a first matching result, and whether to output the record file and end the extraction is determined based on the first matching result and the file parsing data.
2. The method according to claim 1, characterized in that The determining whether to output the record file and ending the extraction based on the first matching result and the file parsing data includes: If the first matching result is no match, determining whether the end extraction condition is met based on the file parsing data; If the extraction termination condition is met, the record file is output based on the first matching result, and the extraction operation is terminated in response to the record file being output.
3. The method according to claim 1, characterized in that The method further comprises: If the first matching result is a match, obtaining the file parsing data; matching corresponding content in the file parsed data based on the target information, and saving the corresponding content in the record file; Corresponding position information in the file parsing data is determined based on the setting information, and a clipping position of the corresponding content saved in the record file is determined based on the position information.
4. The method according to claim 3, characterized in that The method further comprises: Obtaining the content stored in the record file, and comparing the corresponding content with the stored content; If the comparison result shows that the corresponding content does not exist in the stored content, saving the corresponding content in the record file; If the comparison result shows that the corresponding content already exists in the stored content, the corresponding content is discarded.
5. The method according to claim 2, characterized in that The determining whether the extraction end condition is met based on the file parsing data includes: The file parsing data includes: the current number of lines in the file and the maximum number of lines in the file; Determine whether the current number of rows is equal to the maximum number of rows based on the comparison field, and if they are equal, the extraction end condition is met; If they are not equal, based on the traversal polling algorithm, the row variable is increased by one and the parsing of the first file continues.
6. The method according to claim 4, characterized in that The method further comprises: In response to the storing of the corresponding content or the discarding of the corresponding content, generating an instruction for determining a condition for ending extraction; In response to the extraction end condition judgment instruction, determining whether the maximum number of lines in the file parsed data and the current number of lines are equal based on the comparison field, and if they are equal, the extraction end condition is met; If they are not equal, based on the traversal polling algorithm, the row variable is increased by one and the parsing of the first file continues.
7. The method according to claim 1, characterized in that The configuring setting information and target information based on the first file includes: The first file includes a key line structure, the key line structure consists of a file path, a timing violation, a register name, a task statement and violation information, and the violation information includes a violation time; Based on the critical row structure, setting the register name and the violation time as the target information; The timing violation and the task statement are set as the setting information based on the critical row structure.
8. The method according to claim 1, characterized in that The matching of the file parsing data with the setting information based on the first function statement includes: The file parsing data includes the current line number in the file, the maximum line number of the file and the current line file content; The file setting information is used to mark the position data of different contents in the file parsed data; The current row of file content is matched with the position data based on the first function statement to determine whether the position data exists in the current row of file content.
9. The method according to claim 3, characterized in that The method further comprises: searching for the target information of the current line of file content in the file parsing data based on the setting information, and writing the target information into the record file; When the setting information existing in the current line of file content is found, the content written in the record file and the current line number in the file parsing data are saved.
10. An automatic extraction device for illegal paths, characterized in that: The device comprises: an acquisition module, configured to select a first file and configure setting information and target information based on the first file; The comparison module is used to parse the first file based on a first algorithm to obtain file parsing data; match the file parsing data with the setting information based on a first function statement to obtain a first matching result; and determine whether to output the record file and end the extraction based on the first matching result and the file parsing data.
11. The device according to claim 10, characterized in that The device further comprises: A writing module is used to determine whether the end extraction condition is met based on the file parsing data if the first matching result is no match; if the end extraction condition is met, output the record file based on the first matching result, and end the extraction operation in response to the output of the record file.
12. The device according to claim 10, characterized in that The writing module is further configured to obtain the file parsing data if the first matching result is a match; matching corresponding content in the file parsed data based on the target information, and saving the corresponding content in the record file; Corresponding position information in the file parsing data is determined based on the setting information, and a clipping position of the corresponding content saved in the record file is determined based on the position information.
13. The device according to claim 12, characterized in that The writing module is further configured to obtain the content stored in the record file, compare the corresponding content with the stored content, and save the corresponding content in the record file if the comparison result shows that the corresponding content does not exist in the stored content. If the comparison result shows that the corresponding content already exists in the stored content, the corresponding content is discarded.
14. The device according to claim 11, characterized in that The comparison module is further configured to: wherein the file parsing data includes: the current number of lines in the file and the maximum number of lines in the file; determine whether the current number of lines and the maximum number of lines are equal based on a comparison field; if they are equal, the extraction end condition is met; if they are not equal, then based on a traversal polling algorithm, the row variable is incremented by one and the first file continues to be parsed.
15. The device according to claim 13, characterized in that The comparison module is further configured to generate an extraction end condition judgment instruction in response to the storing or discarding of the corresponding content; and in response to the extraction end condition judgment instruction, determine whether the maximum number of lines in the file parsed data and the current number of lines are equal based on the comparison field, and if they are equal, the extraction end condition is met; If they are not equal, based on the traversal polling algorithm, the row variable is increased by one and the parsing of the first file continues.
16. The device according to claim 10, characterized in that The acquisition module is further configured to: the first file includes a key line structure, the key line structure consisting of a file path, a timing violation, a register name, a task statement, and violation information, wherein the violation information includes a violation time; based on the key line structure, set the register name and the violation time as the target information; The timing violation and the task statement are set as the setting information based on the critical row structure.
17. The device according to claim 10, characterized in that The comparison module is further configured to: the file parsing data includes the current line number in the file, the maximum line number in the file, and the current line file content; the file setting information is configured to mark the position data of different contents in the file parsing data; The current row of file content is matched with the position data based on the first function statement to determine whether the position data exists in the current row of file content.
18. The device according to claim 12, characterized in that The writing module is further configured to search for the target information of the current line of file content in the file parsing data based on the setting information, and write the target information into the record file; and when the setting information is found in the current line of file content, save the content written in the record file and the current line number in the file parsing data.
19. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 9.
20. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 9.