Cross-clock domain violation information classification method and device, electronic equipment and medium
Through the automated processing of dictionary data structure and module storage structure, the problem of the inability to automatically classify violation information in cross-clock domain inspection tool reports is solved, and the efficiency and accuracy of chip design are improved.
Patent Information
- Application Number
- CN202510533528.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2025-08-08
AI Technical Summary
Existing cross-clock domain inspection tools cannot automate the violation information in classification reports, resulting in cumbersome manual classification and error-prone, affecting the efficiency and accuracy of chip design.
By designing a method of classification of violation information across clock domains, the dictionary data structure and module storage structure are used to automatically process the report files of the cross-clock domain inspection tool, and the classification and modular storage of violation information are realized.
It realizes automatic classification of violation information across clock domains, improves inspection efficiency, reduces manual errors, and improves the success rate of chip design.
Smart Images

Figure CN120449005A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, electronic device, and medium for classifying violation information across clock domains. Background Art
[0002] In chip design, multiple clock domains are very common. When data is output from a register driven by clock A and captured by a register driven by clock B, clock domain crossing (CDC) occurs, leading to metastable states and affecting chip functionality.
[0003] To quickly detect cross-clock domain risks early in the design process, designers use tools such as VC Spyglass to check for CDC violations and eliminate potential risks. However, today's chip designs are extremely complex, often involving dozens or even hundreds of clock domains. Reports generated by tools like VC Spyglass often contain hundreds of thousands of CDC violations. These violations are categorized into different types, each involving multiple modules. These violations are intermingled in reports, making it difficult to troubleshoot and record errors and making it easy to miss related issues. Therefore, separately outputting and recording errors by category and module in the report can help designers better troubleshoot and resolve CDC violations.
[0004] However, some cross-clock domain checking tools (CDC tools) such as VC Spyglass currently do not have the function of classifying reported errors by module. Manual classification is very tedious and prone to errors. Summary of the Invention
[0005] The present application provides a method, device, electronic device, and medium for classifying cross-clock domain violation information to at least solve the problem in the related art that errors in reports are not classified when checking violation information of cross-clock domain risks, and manual classification is very tedious and prone to errors.
[0006] The present application provides a method for classifying cross-clock domain violation information, the method comprising:
[0007] Get the script data to be checked;
[0008] Check script data based on the cross-clock domain check tool and generate a report file with cross-clock domain violation information;
[0009] Matching the report file based on a dictionary data structure to obtain a first file, wherein the dictionary data structure is composed of a plurality of key-value pairs, the key-value pairs are used to represent the classification type of the violation information and the specific information contained in the classification type, and the first file is used to represent the violation information under different classification categories in the script data;
[0010] The first file is matched based on the module storage structure to obtain a second file, wherein the module storage structure is composed of multiple modules, and the second file is used to represent violation information of different modules under various classification categories in the script data.
[0011] The present application also provides a device for classifying violation information across clock domains, the device comprising:
[0012] The acquisition module is used to obtain the script data to be checked;
[0013] A generation module is used to check script data based on a cross-clock domain check tool and generate a report file of cross-clock domain violation information;
[0014] a first matching module, configured to match the report file based on a dictionary data structure to obtain a first file, wherein the dictionary data structure is composed of a plurality of key-value pairs, the key-value pairs being used to represent a classification type of violation information and specific information contained in the classification type, and the first file being used to represent violation information under different classification categories in the script data;
[0015] The second matching module is used to match the first file based on the module storage structure to obtain the second file, wherein the module storage structure is composed of multiple modules, and the second file is used to represent the violation information of different modules under each classification category in the script data.
[0016] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any of the above-mentioned cross-clock domain violation information classification methods when executing the computer program.
[0017] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned methods for classifying cross-clock domain violation information are implemented.
[0018] The present application also provides a computer program product, including a computer program, which implements the steps of any of the above-mentioned cross-clock domain violation information classification methods when executed by a processor.
[0019] In an embodiment of the present application, a cross-clock domain check tool is used to perform a cross-clock domain check on the script data to be checked, and a report file of cross-clock domain violation information is obtained. Then, the report file is matched based on a dictionary data structure to obtain a first file, wherein the first file is used to characterize violation information under different classification categories in the script data. The first file is matched based on a module storage structure to obtain a second file, wherein the second file is used to characterize violation information of different modules under each classification category in the script data. Therefore, the embodiment of the present application realizes that different classification types in the script data to be checked are placed into different files according to the classification type of violation information set in the dictionary data structure, and then the first file under each classification type is classified according to the module object set in the module storage structure to obtain violation information of different modules under each classification category, thereby realizing automatic classification of violations in the inspection report generated by the cross-clock domain tool, avoiding the tedious and error-prone problem of manual violation classification, improving the efficiency of cross-clock domain violation inspection, and thereby improving the success rate of chip design. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0021] Figure 1 A flowchart of a method for classifying cross-clock domain violation information provided by an embodiment of the present application;
[0022] Figure 2 A script processing flow chart for classifying cross-clock domain violation information provided in an embodiment of the present application;
[0023] Figure 3 A structural block diagram of a cross-clock domain violation information classification device provided in an embodiment of the present application;
[0024] Figure 4 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0025] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0026] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.
[0027] In chip design, a clock is a pulse signal that continuously emits pulses at a certain voltage amplitude and time intervals. The time interval between the pulse signals is the clock period, and the number of pulses generated per unit time is the frequency. Synchronous clocks originate from the same clock source and have a fixed phase relationship; asynchronous clocks originate from different clock sources and have a non-fixed phase relationship. This gave rise to the concept of clock domains, which are divided by the capture clock. Data is sent and received using the same clock, forming a single clock domain; data sent and received using different clocks constitutes multiple clock domains. Multiple clock domains are common in chip design. When data is output from a register driven by clock A and captured by a register driven by clock B, clock domain crossing (CDC) occurs, leading to metastable states and affecting chip functionality.
[0028] To quickly detect cross-clock domain risks early in the design process, designers use tools such as VC Spyglass to check for CDC violations and eliminate potential risks. However, today's chip designs are extremely complex, often involving dozens or even hundreds of clock domains. Reports generated by tools like VC Spyglass often contain hundreds of thousands of CDC violations. These violations are categorized into different types, each involving multiple modules. These violations are intermingled in reports, making it difficult to troubleshoot and record errors and making it easy to miss related issues. Therefore, separately outputting and recording errors by category and module in the report can help designers better troubleshoot and resolve CDC violations.
[0029] However, some cross-clock domain checking tools (CDC tools) such as VC Spyglass currently do not have the function of classifying reported errors by module. Manual classification is very tedious and prone to errors.
[0030] In order to solve the above problems, the embodiment of the present application provides a method for classifying violation information across clock domains. The method is described in detail in conjunction with the execution flow of the method for classifying violation information across clock domains. Specifically, Figure 1 As shown, Figure 1 This is a flow chart of a method for classifying cross-clock domain violation information provided in an embodiment of the present application. This method can be applied to a scripting tool, wherein the scripting tool refers to a program written in a scripting language (such as Python, JavaScript, Shell, etc.). Then, the embodiment of the present application implements an automated script based on a scripting language, such as Python, to complete the classification of cross-clock domain violation information. The specific process is as follows:
[0031] Step S101: Acquire script data to be checked.
[0032] Optionally, in an embodiment of the present application, it is necessary to first obtain the script data to be checked so that the subsequent script tool can classify the violation information. Here, the methods of obtaining script data include but are not limited to: 1. Local file system reading: If the script data is stored locally in the form of a file (such as a common text file .txt, script file .js, .py, etc.), the file reading function of the corresponding programming language can be used to obtain the data. 2. Database query: When the script data is stored in a database (such as MySQL, Oracle, SQLite, etc.), it is necessary to first establish a connection with the database, and then use SQL statements to query and obtain the data. 3. Network request acquisition: If the script data is located on a network server, it can be obtained through a network request (such as an HTTP request). 4. Obtain from a version control system: such as Git, clone the code repository containing the script data to the local through the command line or related graphical tools, and then obtain the script data from the corresponding file. 5. Log file parsing: The log file generated by the script during operation may contain key data that needs to be checked. You can use text processing tools or programming languages to read the log file line by line to parse out useful information. 6. System command output capture: In some cases, script data may be obtained by executing the output of system commands.
[0033] In addition to obtaining the script data to be checked through the above method, some preprocessing is also required, such as establishing a folder for exporting violation files, defining the folder path, setting the log save location and other information for subsequent steps to read.
[0034] It should be noted that, when defining the path of a folder, it is necessary to first clarify the folder path where the violation file is saved and the location where the log is saved; an absolute path or a relative path can be used. When establishing a folder where the violation file is saved, a blank table file is created (which will be elaborated in subsequent embodiments and will not be repeated here). When setting the log save location, Python's logging module can be used to save the log information to a specified location.
[0035] Step S102 : checking script data based on a cross-clock domain checking tool, and generating a report file of cross-clock domain violation information.
[0036] Optionally, a CDC check tool is configured in the script tool, and the CDC check tool process is started to check the script data obtained above (for example, the VC Spyglass tool can be started to perform CDC checking). After the CDC check tool completes the CDC check, a report file of cross-clock domain violation information is generated, such as a report.rpt file.
[0037] Functions designed in the script tool detect the execution phase of the CDC checker. When the CDC checker generates a violation report, the CDC check is considered complete and the CDC violation classification process begins. The classification process includes classification by category and classification by module.
[0038] Step S103, matching the report file based on the dictionary data structure to obtain a first file, wherein the dictionary data structure is composed of multiple pairs of key-value pairs, the key-value pairs are used to represent the classification type of violation information and the specific information contained under the classification type, and the first file is used to represent the violation information under different classification categories in the script data.
[0039] Optionally, in an embodiment of the present application, a dictionary data structure can be pre-configured for matching report files to obtain a first file, thereby implementing category classification. Specifically, the violation types to be exported and the specific information of interest for each type are determined. Specifically, a file named violation_info.xlsx is created to serve as the basis for subsequent category classification.
[0040] Table 1 shows an example of a violation_info.xlsx file. Each row in the file corresponds to a specific violation type. The first column of each row contains the name of the violation type, and the following columns contain the specific information of interest for that violation type. For example, if the violation type in the first row is CDC_UNSYNC_CTRL, the information of interest is the source object, destination object, and corresponding clock name for this violation type. The script reads the violation_info.xlsx file row by row and stores this information in the violation_info_dict dictionary structure. For example, the first row is stored as: violation_info_dict = {'CDC_UNSYNC_CTRL':['SourceObject','DestObject','ClockName',...]}. The portion before the colon, 'CDC_UNSYNC_CTRL', is called the key, and the portion after the colon, ['SourceObject','DestObject','ClockName',...], is called the value.
[0041] Table 1
[0042] CDC_UNSYNC_CTRL Source Object Dest Object Clock Name … CDC_UNSYNC_DATA Dest Object - - - … … … … …
[0043] From the above description, it can be seen that a dictionary data structure can be constructed from the violation_info.xlsx file. The dictionary data structure is composed of multiple key-value pairs. The key of the key-value pair is used to represent the classification type of the violation information, and the value of the key-value pair is used to represent the specific information contained in each classification type.
[0044] Since the dictionary data structure contains all possible violation types and all specific information contained in each classification type, the dictionary data structure is matched with the generated report.rpt file, and the matching results are written into a newly created blank table file to obtain the first file. The obtained first file will contain all violation classification categories that can be matched by the report.rpt file.
[0045] Step S104 , matching the first file based on the module storage structure to obtain a second file, wherein the module storage structure is composed of multiple modules, and the second file is used to represent violation information of different modules under each classification category in the script data.
[0046] Optionally, create a file called split_module.xlsx to serve as the basis for classifying violations by module in subsequent steps. Specifically, enter the module names corresponding to all module objects by writing each module name into a column in split_module.xlsx, with each column representing a module name. This step parses the split_module.xlsx file by column and stores the module names in a module storage structure, such as the split_module_list module storage structure, for example, split_module_list = ['TOP / U_MA', 'TOP / U_MB', ...].
[0047] The first file is then matched against the module storage structure split_module_list, classified by module, and the classification results are written to a newly created blank table file to obtain the second file. It should be noted that the matching process here essentially matches the same classification category, sequentially matching different modules within the module storage structure. Thus, the second file will contain violation information matched by different modules within each classification category.
[0048] In an embodiment of the present application, a cross-clock domain check tool is used to perform a cross-clock domain check on the script data to be checked, and a report file of cross-clock domain violation information is obtained. Then, the report file is matched based on a dictionary data structure to obtain a first file, wherein the first file is used to characterize violation information under different classification categories in the script data. The first file is matched based on a module storage structure to obtain a second file, wherein the second file is used to characterize violation information of different modules under each classification category in the script data. Therefore, the embodiment of the present application realizes that different classification types in the script data to be checked are placed into different files according to the classification type of violation information set in the dictionary data structure, and then the first file under each classification type is classified according to the module object set in the module storage structure to obtain violation information of different modules under each classification category, thereby realizing automatic classification of violations in the inspection report generated by the cross-clock domain tool, avoiding the tedious and error-prone problem of manual violation classification, improving the efficiency of cross-clock domain violation inspection, and thereby improving the success rate of chip design.
[0049] As an optional embodiment, the first file is obtained by matching the report file based on the dictionary data structure, including:
[0050] Obtain the first keyword corresponding to each classification type and the second keyword corresponding to the specific information contained in each classification type;
[0051] Obtaining a first matching result based on each first keyword matching report file;
[0052] Obtaining a second matching result based on a second keyword matching report file corresponding to the first keyword;
[0053] The first matching result and the second matching result are written into a violation type file for creating a report file to obtain a first file.
[0054] Optionally, when matching the dictionary data structure to the report file, ①: Read the first data in the dictionary data structure violation_info_dict and create a blank table file. According to Table 1, the first data read is CDC_UNSYNC_CTRL, and a CDC_UNSYNC_CTRL.xlsx file is created for subsequent writing of CDC_UNSYNC_CTRL type errors.
[0055] ②: Read the report file report.rpt of the cross-clock domain violation information.
[0056] ③: Read the key and value of the first data item in violation_info_dict, match it with each violation reported in the report.rpt file using regular expression matching, and write the matched violations of different types to the table file created in ①. For example, in Table 1, for violations of the CDC_UNSYNC_CTRL category, the script matches the first keyword corresponding to the CDC_UNSYNC_CTRL category and obtains the first matching result.
[0057] If the first matching result is a successful match, the second keyword corresponding to the specific information contained in the CDC_UNSYNC_CTRL category, such as keywords such as 'Source Object', 'Dest Object', and 'Clock Name', is matched to obtain a second matching result. The matching content of the first matching result and the matching content of the second matching result corresponding to these keywords in report.rpt are then stored.
[0058] ④: Write the content stored in ③ into the spreadsheet file created in ①. For example, write it into the CDC_UNSYNC_CTRL.xlsx file. The content in CDC_UNSYNC_CTRL.xlsx can be as shown in Table 2 below.
[0059] Table 2
[0060] Violation Type Source Object Dest Object Clock Name … CDC_UNSYNC_CTRL TOP / U_MA TOP / U_MB / U_subl Main_clk … CDC_UNSYNC_CTRL TOP / U_MC TOP / U_MA Sub_clk …
[0061] ⑤: Read the second data in violation_info_dict and repeat steps ①-④ until all CDC violation types are matched and processed. Generate table files containing the violation types contained in violation_info_dict, such as CDC_UNSYNC_CTRL.xlsx and CDC_UNSYNC_DATA.xlsx. CDC_UNSYNC_CTRL.xlsx corresponds to a table file with the classification type CDC_UNSYNC_CTRL, and CDC_UNSYNC_DATA.xlsx corresponds to a table file with the classification type CDC_UNSYNC_DATA.xlsx. The CDC_UNSYNC_CTRL.xlsx, CDC_UNSYNC_DATA.xlsx, and other table files are then combined to form the first file.
[0062] In the embodiment of the present application, based on the violation information in the report generated by the CDC tool, the violations are exported into different files according to their categories. According to different CDC violation types, different types are placed into different table files, thus realizing the automatic classification and processing of violations in categories.
[0063] As an optional embodiment, matching the first file based on the module storage structure to obtain the second file includes:
[0064] Obtaining the third keyword corresponding to each module object contained in the module storage structure;
[0065] Based on each third keyword, data of the same classification type in the first file are matched respectively to obtain a second file.
[0066] Optionally, the specific steps of classifying by module are:
[0067] ①: Read the first data in the split_module_list module storage structure and create a blank spreadsheet file. For example, if the first data is 'TOP / U_MA', create a blank spreadsheet file TOP-U_MA.xlsx for subsequent writing of violations related to the TOP / U_MA module.
[0068] ②: Read the first table file in the first file, such as CDC_UNSYNC_CTRL.xlsx. Using regular expression matching, match a module object, such as the module name TOP / U_MA (its corresponding third keyword is TOP / U_MA), with the DestObject in each violation reported in the first file from the same classification type, such as CDC_UNSYNC_CTRL.xlsx.
[0069] ③: Continue reading the second table file in the first file, such as CDC_UNSYNC_DATA.xlsx. Repeat the steps in ② until all violation table files classified by category are read, and write the matched violations of different types to the table file created in ①.
[0070] ④: After processing the first data in split_module_list, read the second data in split_module_list and repeat steps ①-③ until all data in split_module_list has been processed. The second file is generated by writing to the table file created in ①.
[0071] In the embodiment of the present application, based on the violation information in the report generated by the CDC tool, the violations are exported into different files according to the module. For the same type of CDC violation, the violations of different modules are placed into different table files, thus realizing the automatic classification and processing of violations on the module.
[0072] As an optional embodiment, the second file is obtained by matching data of the same classification type in the first file based on each third keyword, including:
[0073] Using the third keyword corresponding to the first module object, match the data under all classification types in the first file, and repeat the above matching steps until the third keywords of all module objects have matched the data under all classification types in the first file, and obtain information generated after each match;
[0074] A second file is generated based on the information generated after each match.
[0075] Optionally, it can be seen from the above embodiments that the embodiments of the present application process the generated table files of each category violation. When classifying by module, the corresponding third keyword is obtained based on the module name of the first module object, and then the data under the same classification type is matched based on the third keyword. For example, the data under the first classification type is matched based on the third keyword. After the matching is completed, the newly created table file is written, and then the data under other classification types is matched based on the third keyword until all the data under the classification types in the first file are matched. Then, the module name of the second module object is used to obtain the corresponding third keyword to match the data under the same classification type and other classification types. The above steps are executed in a loop until the third keywords of all module objects match all the data under the classification types in the first file, and the information generated after each match is obtained. The second file is then composed of the information generated after each match.
[0076] As an optional embodiment, after matching the first file based on the module storage structure to obtain the second file, the method further includes:
[0077] Generate a log file based on the first file and the second file;
[0078] Output log file.
[0079] Optionally, the execution status of all operations corresponding to the processes in the first and second files is generated, such as whether the files were successfully created, whether there were any matching errors, format errors, etc. This information is generated as a log file and output. The first and second files can also be formatted as a table for easy viewing.
[0080] When generating a log file, you can configure logging using the logging.basicConfig function. Set the log level to INFO, the log format to include the time, log level, and specific information, and the log file name to file_generation.log. You can then use the generate_file function to generate the file. During the file generation process, checks are performed for possible matching errors, format errors, and other errors. If the file is created and written successfully, a success message is logged; if an exception occurs, an error message is logged. The check_format function can also be used to check the data format, logging a warning message if any format errors are found. The check_matching function can also be used to check whether two data items match, logging a warning message if they do not match. The execution status of all operations is recorded in the specified log file.
[0081] In an embodiment of the present application, a log file is generated by utilizing information corresponding to the first file and the second file, and output and visual display are facilitated based on the log file.
[0082] As an optional embodiment, Figure 2 A script processing flow chart for classifying cross-clock domain violation information provided in an embodiment of the present application is as follows:
[0083] Pretreatment;
[0084] Information collection (i.e., creating dictionary data structures and module storage structures);
[0085] Initiate CDC inspections;
[0086] Classify violation information by category;
[0087] Classify violation information by module;
[0088] Output log file.
[0089] The embodiment of the present application designs an automated scripting tool to avoid the tedious and error-prone problems caused by manual classification and review, and improves the efficiency of CDC violation checking. Specifically, the embodiment of the present application designs an automated scripting tool that can classify CDC violations according to the violation categories of CDC inspection, making it convenient for relevant personnel to review violations of different categories. The embodiment of the present application designs an automated scripting tool that can classify CDC violations of various categories according to modules, making it convenient for relevant personnel to review violations of different modules.
[0090] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.
[0091] The embodiment of the present application also provides a device for classifying violation information across clock domains, such as Figure 3 As shown, the device includes:
[0092] Acquisition module 301, used to acquire script data to be checked;
[0093] A generating module 302 is configured to check script data based on a cross-clock domain checking tool and generate a report file of cross-clock domain violation information;
[0094] A first matching module 303 is configured to match the report file based on a dictionary data structure to obtain a first file, wherein the dictionary data structure is composed of a plurality of key-value pairs, each of which is used to represent a classification type of violation information and specific information contained in the classification type, and the first file is used to represent violation information under different classification categories in the script data;
[0095] The second matching module 304 is used to match the first file based on the module storage structure to obtain a second file, wherein the module storage structure is composed of multiple modules, and the second file is used to represent the violation information of different modules under each classification category in the script data.
[0096] In an embodiment of the present application, a cross-clock domain check tool is used to perform a cross-clock domain check on the script data to be checked, and a report file of cross-clock domain violation information is obtained. Then, the report file is matched based on a dictionary data structure to obtain a first file, wherein the first file is used to characterize violation information under different classification categories in the script data. The first file is matched based on a module storage structure to obtain a second file, wherein the second file is used to characterize violation information of different modules under each classification category in the script data. Therefore, the embodiment of the present application realizes that different classification types in the script data to be checked are placed into different files according to the classification type of violation information set in the dictionary data structure, and then the first file under each classification type is classified according to the module object set in the module storage structure to obtain violation information of different modules under each classification category, thereby realizing automatic classification of violations in the inspection report generated by the cross-clock domain tool, avoiding the tedious and error-prone problem of manual violation classification, improving the efficiency of cross-clock domain violation inspection, and thereby improving the success rate of chip design.
[0097] As an optional embodiment, the first matching module 303 is used to obtain the first keyword corresponding to each classification type and the second keyword corresponding to the specific information contained in each classification type; obtain the first matching result based on each first keyword matching report file; obtain the second matching result based on the second keyword matching report file corresponding to the first keyword; write the first matching result and the second matching result into the violation type file of the creation report file to obtain the first file.
[0098] As an optional embodiment, the second matching module 304 is used to obtain the third keyword corresponding to each module object contained in the module storage structure; and match the data of the same classification type in the first file based on each third keyword to obtain the second file.
[0099] As an optional embodiment, the second matching module 304 is also used to use the third keyword corresponding to the first module object to match the data under all classification types in the first file, and to loop the above matching steps until the third keywords of all module objects have matched the data under all classification types in the first file, and obtain the information generated after each match; based on the information generated after each match, a second file is generated.
[0100] As an optional embodiment, the device also includes, before matching the report file based on the dictionary data structure to obtain the first file, obtaining all classification types corresponding to the violation information and all specific information contained in each classification type; and creating a dictionary data structure based on all classification types and all specific information.
[0101] As an optional embodiment, the device further includes, before matching the first file based on the module storage structure to obtain the second file, obtaining all module objects corresponding to the violation information; and creating a module storage structure based on all module objects.
[0102] As an optional embodiment, the device further includes, after matching the first file based on the module storage structure to obtain the second file, generating a log file based on the first file and the second file; and outputting the log file.
[0103] For descriptions of features in the embodiment corresponding to the cross-clock domain violation information classification device, reference may be made to the relevant descriptions of the embodiment corresponding to the cross-clock domain violation information classification method, which will not be described in detail here.
[0104] The embodiment of the present application also provides an electronic device, such as Figure 4 As shown, it includes a memory 10 and a processor 20, wherein the memory 10 stores a computer program, and the processor 20 is configured to run the computer program to execute the steps in any of the above-mentioned embodiments of the cross-clock domain violation information classification method.
[0105] An embodiment of the present application further provides a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps of any of the above-mentioned cross-clock domain violation information classification method embodiments when running.
[0106] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0107] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of any of the above-mentioned cross-clock domain violation information classification method embodiments are implemented.
[0108] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium, the non-volatile computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, implementing the steps in any of the above-mentioned cross-clock domain violation information classification method embodiments.
[0109] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0110] The above is a detailed introduction to the cross-clock domain violation information classification method, device, electronic device, and medium provided by the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
Claims
1. A method for classifying violation information across clock domains, characterized in that: The method comprises: Get the script data to be checked; Check the script data based on a cross-clock domain checking tool, and generate a report file of cross-clock domain violation information; Matching the report file based on a dictionary data structure to obtain a first file, wherein the dictionary data structure is composed of a plurality of key-value pairs, the key-value pairs being used to represent a classification type of violation information and specific information contained in the classification type, and the first file being used to represent violation information under different classification categories in the script data; The first file is matched based on a module storage structure to obtain a second file, wherein the module storage structure is composed of multiple modules, and the second file is used to represent violation information of different modules under each of the classification categories in the script data.
2. The violation information classification method according to claim 1, characterized in that: The matching of the report file based on the dictionary data structure to obtain the first file includes: Obtaining a first keyword corresponding to each classification type and a second keyword corresponding to specific information contained in each classification type; matching the report file based on each of the first keywords to obtain a first matching result; matching the report file based on a second keyword corresponding to the first keyword to obtain a second matching result; The first matching result and the second matching result are written into a violation type file for creating the report file to obtain the first file.
3. The violation information classification method according to claim 1, characterized in that: The matching of the first file based on the module storage structure to obtain the second file includes: Obtaining a third keyword corresponding to each module object contained in the module storage structure; The second file is obtained by matching the data of the same classification type in the first file based on each of the third keywords.
4. The method for classifying violation information according to claim 3, wherein: The step of matching data of the same classification type in the first file based on each of the third keywords to obtain the second file includes: Using the third keyword corresponding to the first module object, match the data of all classification types in the first file, and repeat the above matching steps until the third keywords of all module objects have matched the data of all classification types in the first file, and obtain information generated after each match; The second file is generated based on the information generated after each matching.
5. The method for classifying violation information according to claim 1, wherein: Before matching the report file based on the dictionary data structure to obtain the first file, the method further includes: Obtain all classification types corresponding to the violation information and all specific information contained in each classification type; Based on all classification types and all specific information, the dictionary data structure is created.
6. The method for classifying violation information according to claim 1, wherein: Before matching the first file based on the module storage structure to obtain the second file, the method further includes: Obtain all module objects corresponding to the violation information; Based on all module objects, the module storage structure is created.
7. The method for classifying violation information according to claim 1, wherein: After matching the first file based on the module storage structure to obtain the second file, the method further includes: generating a log file based on the first file and the second file; Output the log file.
8. A cross-clock domain violation information classification device, characterized in that: The device comprises: The acquisition module is used to obtain the script data to be checked; A generating module, configured to check the script data based on a cross-clock domain checking tool and generate a report file of cross-clock domain violation information; a first matching module, configured to match the report file based on a dictionary data structure to obtain a first file, wherein the dictionary data structure is composed of a plurality of key-value pairs, the key-value pairs being used to represent a classification type of violation information and specific information contained in the classification type, and the first file being used to represent violation information under different classification categories in the script data; The second matching module is used to match the first file based on a module storage structure to obtain a second file, wherein the module storage structure is composed of multiple modules, and the second file is used to represent the violation information of different modules under each of the classification categories in the script data.
9. An electronic device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the cross-clock domain violation information classification method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the cross-clock domain violation information classification method according to any one of claims 1 to 7 are implemented.