Time sequence path information comparison method

By concatenating the node characteristic encoding values ​​of the timing paths in series to generate path encoding and storing them in a clear codebook file, the problem of too long time path judgment in the prior art is solved, and fast and efficient path comparison is achieved.

CN120197570APending Publication Date: 2025-06-24SHANGHAI HUADA JIUTIAN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510269354.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-07
Publication Date
2025-06-24

AI Technical Summary

Technical Problem

When checking timing paths, the prior art requires comparing the path nodes one by one, resulting in too long judgment times and running time, especially in a large number of complex paths, resulting in increased load burden and memory demand.

Method used

By concatenating the node characteristic encoding values ​​corresponding to the node keys of the timing path to generate path encoding, and storing the encoding in a clear code book file, it is possible to quickly determine whether the two paths are the same.

Benefits of technology

It greatly reduces the number of judgments and run time, improves work efficiency, and can quickly compare the differences between different simultaneous sequential paths in the two timing path files.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120197570A_ABST
    Figure CN120197570A_ABST
Patent Text Reader

Abstract

The invention discloses a time sequence path information comparison method, electronic equipment and a storage medium, and the method comprises the following steps: obtaining a reference time sequence path from a reference path file, carrying out the series connection of node characteristic coding values corresponding to node keys of the reference time sequence path, generating a first path code, and storing the first path code in a reference path plain codebook file; obtaining a comparison time sequence path from a comparison path file, and connecting node characteristic coding values corresponding to node keys of the comparison time sequence path in series to generate a second path code; and judging whether the second path code is stored in the reference path plain codebook file or not, accumulating judgment results, and generating a comparison report. According to the method, characteristic coding is carried out on a large number of paths which have sequences and are called repeatedly, and the codes are subjected to time sequence arrangement to obtain time sequence codes, so that non-congruent ordered files are compared, and the difference of different time sequence paths in two time sequence path files can be quickly compared.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of Electronic Design Automation (EDA), and particularly to a method for comparing timing path information. Background Art

[0002] In IC (Integrated Circuit) circuit analysis, when the input and output ends are fixed, a timing arc is formed. Different digital logics will be passed through in the middle of the timing arc, forming multiple timing paths.

[0003] In the prior art, when checking whether a comparison path is covered by a reference path, it is necessary to compare the comparison path with all reference paths one by one. When judging whether two paths are the same each time, since the same timing path may have different numbers of path nodes when represented in different ways (such as whether the representation method includes internal nodes), the two path texts cannot be simply judged by diff (difference), but it is necessary to compare the order of the nodes in the paths in sequence or perform fuzzy matching. In this judgment method, first, it is judged whether the comparison path node 1 is the same as the reference path node 1. If the result is the same, the judgment of the next node is carried out. When the comparison node n is different from the reference node n, at this time, assuming that the comparison node n is an internal node, the comparison between the comparison node n + 1 and the reference node n is continued, and so on until all comparison nodes are exhausted.

[0004] In this method, if the comparison path has covered all reference nodes before all comparison nodes are exhausted, it cannot be judged whether the remaining comparison nodes are internal nodes at this time. When judging a comparison path with M nodes, if the number of reference paths is N, M×N times of long string comparison judgments are required. In actual operation, when the total number of file paths reaches the order of one hundred thousand and the number of nodes reaches the order of ten million, the individual, large-scale, and repeated string judgments will become a huge load. For an extremely large timing path file, since all nodes need to be traversed during path analysis and the analysis script needs to store all path-related information, if the file is not processed, the memory conditions required for the script to run will become very demanding for the running machine. Summary of the Invention

[0005] In order to solve the defects of the prior art, the purpose of the present invention is to provide a method for comparing timing path information, which can quickly judge whether two paths are the same in a large number of complex paths, greatly reducing the number of judgments and running time, and improving work efficiency.

[0006] To achieve the above purpose, the method for comparing timing path information provided by the present invention includes the following steps:

[0007] Obtain the reference timing path from the reference path file, concatenate the node characteristic encoding values corresponding to the node keys of the reference timing path, generate a first path encoding, and save it to the reference path plaintext file;

[0008] Obtain the control timing path from the control path file, concatenate the node characteristic encoding values corresponding to the node keys of the control timing path, and generate a second path encoding;

[0009] Determine whether the second path encoding exists in the reference path plaintext file, accumulate the determination results, and generate a comparison report.

[0010] Further, the step of obtaining the reference timing path from the reference path file further includes: reading the reference path file and analyzing the type of the path block, and performing matching according to the characteristics of the timing arc in the timing path report using regular matching to obtain the path characteristics; the types include delay path, clock path, and data path.

[0011] Further, if the reference timing path does not have a node key, perform characteristic encoding on the nodes of the reference timing path, establish the node key and the mapping relationship, and save it to the node plaintext file; the node plaintext file is used to store the mapping relationships of all nodes.

[0012] Further, if the control timing path has a node key, obtain the characteristic encoding value corresponding to the node key according to the node plaintext, concatenate the characteristic encoding values to generate a second path encoding, and then determine whether the second path encoding exists in the reference path plaintext file.

[0013] Further, it also includes: establishing a node array and a path array, where the node array is used to store node names, and the path array is used to store the corresponding node characteristic encoding values.

[0014] Further, it also includes: establishing a node hash array and a path hash array;

[0015] Sequentially determine whether the reference timing path has a node key;

[0016] If the reference timing path does not have a node key, perform characteristic encoding on its nodes, establish the node key and the mapping relationship between the node key and the node characteristic encoding value, and insert the mapping relationship into the node hash array, and then generate a node plaintext file;

[0017] If the reference timing path has a node key, concatenate the node characteristic encoding values corresponding to the node key, generate a first path encoding, and store it in the path hash array, and then generate a reference path plaintext file.

[0018] Further, the step of determining whether there is a node key in the reference timing path further includes:

[0019] Determine whether the nodes of the path exist in the established hash node library. If the nodes do not exist, create hash nodes and use if exists to determine whether the values of these nodes exist in the hash node library. If the nodes exist, use the corresponding values of the nodes.

[0020] If the node does not have a node key, create a node key and map it to the node feature encoding value.

[0021] To achieve the above object, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor is configured to execute the computer program stored in the memory to implement the timing path information comparison method as described above.

[0022] To achieve the above object, the present invention also provides a computer-readable storage medium, in which a computer program is stored. The computer program is loaded and executed by a processor to implement the timing path information comparison method as described above.

[0023] The timing path information comparison method provided by the present invention has the following beneficial effects compared with the prior art:

[0024] Feature-encode a large amount of sequential and repeatedly called text, and perform timing arrangement on this encoding to obtain timing encoding, so as to compare non-identical ordered files, and can quickly compare the differences of different timing paths in two timing path files.

[0025] Other features and advantages of the present invention will be described in the following description, and some of them will become obvious from the description, or be understood by implementing the present invention. Description of the Drawings

[0026] The drawings are used to provide a further understanding of the present invention, and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention, and do not constitute a limitation to the present invention. In the drawings:

[0027] Figure 1 It is a flowchart of the timing path information comparison method according to an embodiment of the present invention;

[0028] Figure 2 It is a schematic structural diagram of an electronic device according to an embodiment of the present invention. Detailed Embodiments

[0029] The preferred embodiments of the present invention will be described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only for the purpose of illustrating and explaining the present invention, and are not intended to limit the present invention.

[0030] Embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. On the contrary, these embodiments are provided to more thoroughly and completely understand the present invention. It should be understood that the drawings and embodiments of the present invention are only for exemplary purposes and are not intended to limit the scope of protection of the present invention.

[0031] As used herein, the term "comprising" and its variants are open-ended, i.e., "including but not limited to". The term "based on" is "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0032] It should be understood that the concepts of "first", "second", etc. that may be mentioned in the present invention are only used to distinguish different data or units, and are not intended to limit the order or interdependence of the functions performed by these data or units. These terms are only used to distinguish one feature from another. For example, without departing from the scope of the exemplary embodiments, the first feature may be referred to as the second feature, and similarly the second feature may be referred to as the first feature.

[0033] In an embodiment of the present invention, a method for comparing timing path information is provided. The method includes the following steps: obtaining a reference timing path from a reference path file, concatenating the node characteristic encoding values corresponding to the node keys of the reference timing path to generate a first path code and saving it to a reference path plaintext book file; obtaining a comparison timing path from a comparison path file, concatenating the node characteristic encoding values corresponding to the node keys of the comparison timing path to generate a second path code; determining whether the second path code exists in the reference path plaintext book file, and accumulating the determination results to generate a comparison report.

[0034] Figure 1 For the flowchart of the method for comparing timing path information according to an embodiment of the present invention, the following will be combined with Figure 1 to describe the specific implementation manners of the present invention in detail.

[0035] First, in step 101, obtain the reference timing path from the reference path file. In this step, it includes reading the reference path file and analyzing whether the read path block belongs to a delay path, a clock path, or a data path, and using regular matching to match according to the characteristics of the timing arc in the timing path report. For example:

[0036] In the timing path report, the report title of the delay path is:

[0037] Library arc 12345:delay max PinA(f)<-CLK(r)

[0038] Taking the Perl language as an example, the following regular matching can obtain the specific information of this title:

[0039] $_ =~ / Library arc(\d+):delay(max)(.*?)\((r|f)\)<-(.*?)\((r|f)\)(.*?) /

[0040] At this time, the parameter $1 is 12345, $5 is CLK, $6 is r, $3 is PinA, $4 is f. At this time, we can analyze that the timing arc information matched at this time is the maximum delay timing arc from the rising edge of CLK to the falling edge of PinA, that is, delay_max_path_CCLK_r_PinA_f.

[0041] In step 102, establish a node array and a path array, and sequentially determine whether there is a node key in the reference timing path. The node array is used to store node names, and the path array is used to store the corresponding node characteristic encoding values (the encoding method is described in step 103). For example, establish two arrays, array 1 stores node names, and array 2 stores the corresponding node characteristic encoding values at the same position.

[0042] In the embodiment of the present invention, compared with the ordinary array structure, using a hash array can further improve efficiency, that is, establish a node hash array and a path hash array (subsequently referred to as a hash node library and a path library). After analyzing the timing arc attributes, determine whether the path node exists in the hash node library (such as the already established hash node library $delay_path). If the node exists, it means that there is a node key in the reference timing path; otherwise, it means that there is no node key in the reference timing path. If the net (node) does not exist, then establish a hash node. For example, after reading the path information "CCLK", use if exists to determine whether the value of this node exists in the hash node library:

[0043] If(exists($delay_path{"CCLK"}))

[0044] If the net exists, use the value corresponding to the node; if the node key does not exist for the node, create a node key and map it to the node characteristic encoding value. For example, if the hash node library $delay_path is an empty library at this time, and "CCLK is not in the library", then a node key and a mapping relationship need to be established, such as: $delay_path{"CCLK"} = "d1".

[0045] In step 103, if the reference timing path does not have a node key, perform characteristic encoding on its node, establish a node key and the mapping relationship between the node key and the node characteristic encoding value, and insert the mapping relationship into the node hash array. At the same time, generate a node plain codebook file. For example, if it is determined that this node is a delay path node, the characteristic is set to '#', and then obtain the length of the node hash array and assume it is 'n', then the node characteristic encoding is '#n'. Establish a node key and map it to the node characteristic encoding value: assume this node is named 'XIcell1 / internal1 / net1', then the mapping relationship is 'XIcell1 / internal1 / net1' => '#n'; similarly, if it is determined that this node is a clock path node or a data path node, the characteristic can be set to 'c' or 'd', the characteristic encoding is 'cn' or 'dn', and the mapping relationship is 'XIcell1 / internal1 / net1' => 'cn' or 'XIcell1 / internal1 / net1' => 'dn'. Subsequently, insert the mapping relationship into the node hash array and generate a node plain codebook file, which is a file storing all node mappings.

[0046] In step 104, if the reference timing path has a node key, concatenate the corresponding node characteristic encoding values to generate a first path encoding, and store it in the path hash array. At the same time, generate a reference path plain codebook file. In this step, concatenate the node characteristic encoding values to generate a first path encoding. For example, if the characteristic encodings are d1, d2, d4, d8, c1, c12, c3 in sequence, the concatenated encoding is 'd1d2d4d8c1c12c3'. Store the concatenated encoding in the path hash array, and at the same time, generate a reference path plain codebook file, which is a file storing all path encodings.

[0047] In the embodiments of the present invention, according to steps 102 and 103, analyze the nodes on the path, and then concatenate them into a first path encoding. The rule is similar to establishing a hash node library. For example, there is the following path:

[0048] CCLK-delay_net1-delay_net2-delay_net3-PinA

[0049] Then the node keys and the mapping relationships can be: CCLK => d1, delay_net1 => d2, delay_net3 => d3, PinA => d4, where '=>' indicates that there is a mapping relationship between the content at both ends; then the first path code formed by concatenating this path finally is d1d2d3d4, and store this first path code and the timing arc code of this delay path into the path hash array. The mapping relationship is, for example, delay_max_path_CCLK_r_PinA_f_1 => d1d2d3d4. At this time, d1d2d3d4, which represents the path of this arc (timing arc), is used as the subsequent comparison basis. Since the codes d1, d2, d3, d4 are all unique, translating this path only requires looking up in the node plain codebook - hash node library.

[0050] In step 105, read the control path file, obtain the control timing path from it, and determine whether there is a node key in the control timing path.

[0051] In the embodiment of the present invention, the read control path file is the comparison file. At this time, there is no need to establish a node library, and it only needs to be determined whether the node key exists in the already established node library. If the node key of the control timing path exists, obtain the characteristic coding value corresponding to the node key (obtain the node characteristic coding value corresponding to the node key according to the node plain codebook), and concatenate them to generate the second path code. If the node of the control timing path does not exist in the already established node library (that is, the node key does not exist), it means that there is no path related to the control path in the reference node library. It should be understood that: the node information existing in the comparison file does not exist in the reference library, which does not completely represent an error in path analysis. At this time, corresponding marking should be carried out, mark that this node information does not exist and perform subsequent analysis (the present invention does not limit this).

[0052] In step 106, concatenate and encode the control timing path according to the node plain codebook to obtain the second path code.

[0053] In the embodiment of the present invention, to determine whether the control path exists, it is necessary to cache the node keys in steps 105 and 106, and concatenate the node characteristic coding values in a similar way to step 104 to obtain the second path code, and compare whether this path code exists in the path hash array of the reference path plain codebook. For example, at this time, a control timing path analyzed from the control path file is:

[0054] CCLK - delay_net1 - delay_net2 - PinA

[0055] Then, according to the node plain codebook analysis, the path code of this comparison timing path is obtained as: d1d2d4. Judging whether this path code exists in the reference path plain codebook is equivalent to judging whether there is a corresponding path for this path in the reference file. In the above example, there is only d1d2d3d4 in the reference path plain codebook, so the comparison path does not exist at this time.

[0056] In step 107, it is judged whether the second path code generated in step 106 exists in the reference path plain codebook file.

[0057] In step 108, the judgment results of step 107 are accumulated to generate a comparison report.

[0058] In the embodiments of the present invention, a large number of sequential and repeatedly called texts are feature-encoded, and this encoding is arranged in time sequence to obtain a time sequence encoding, so as to perform non-identical ordered file comparison, which can quickly compare the differences between different time sequence paths in two time sequence path files, and has the following advantages:

[0059] In practical applications, the reference file usually remains unchanged, while the control file changes frequently due to analysis methods or other reasons. When the reference file remains unchanged and the control file is replaced, only the reference path plain codebook, the reference node plain codebook and the new control file need to be analyzed;

[0060] This method reduces the O(n) time complexity of scanning and comparing paths one by one to the O(1) time complexity of judging whether an element exists, changes the judgment method, and thus speeds up the comparison efficiency.

[0061] The embodiments of the present invention also provide an electronic device, Figure 2 For the structural schematic diagram of the electronic device according to the embodiment of the present invention, as Figure 2 shown, the electronic device of the present invention includes a processor 201 and a memory 202, wherein,

[0062] The memory 202 stores a computer program, and when the computer program is read and executed by the processor 201, it executes the steps in the embodiment of the above-mentioned time sequence path information comparison method.

[0063] The embodiments of the present invention also provide a computer-readable storage medium, in which a computer program is stored, wherein the computer program is set to execute the steps in the embodiment of the above-mentioned time sequence path information comparison method when running.

[0064] In this embodiment, the above computer-readable storage medium may include, but is not limited to: various media such as USB flash drives, read-only memory (ROM for short), random access memory (RAM for short), mobile hard disks, magnetic disks, or optical discs that can store computer programs.

[0065] Those of ordinary skill in the art can understand that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, for those skilled in the art, they can still modify the technical solutions described in the foregoing embodiments or perform equivalent replacements for some of the technical features. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for comparing timing path information, characterized in that: The following steps are involved: Acquire a reference time sequence path from a reference path file, concatenate node characteristic code values ​​corresponding to node keys of the reference time sequence path, generate a first path code, and save it in a reference path plain text file; Acquire a control time series path from the control path file, and concatenate node characteristic code values ​​corresponding to node keys of the control time series path to generate a second path code; Determine whether the second path code exists in the reference path plain text file, accumulate the determination results, and generate a comparison report.

2. The timing path information comparison method according to claim 1, characterized in that: The step of obtaining a reference timing path from a reference path file further includes: reading the reference path file and analyzing the type of the path block, using regular matching to match the characteristics of the timing arc in the timing path report to obtain path characteristics; the types include delay paths, clock paths and data paths.

3. The timing path information comparison method according to claim 1, characterized in that: If the reference timing path does not have a node key, the node of the reference timing path is characteristically encoded, and the node key and mapping relationship are established and saved in a node plain text file; the node plain text file is used to store the mapping relationship of all nodes.

4. The timing path information comparison method according to claim 3, characterized in that: If there is a node key in the reference timing path, the characteristic code value corresponding to the node key is obtained according to the node plain code book, and the characteristic code value is concatenated to generate a second path code, and then it is determined whether the second path code exists in the reference path plain code book file.

5. The timing path information comparison method according to claim 1, characterized in that: It also includes: establishing a node array and a path array, wherein the node array is used to store node names, and the path array is used to store corresponding node characteristic coding values.

6. The timing path information comparison method according to claim 1, characterized in that: It also includes: establishing a node hash array and a path hash array; Determine in sequence whether there is a node key in the reference time series path; If the reference time sequence path does not have a node key, then the node is characteristic-encoded, a mapping relationship between the node key and the node characteristic encoding value is established, and the mapping relationship is inserted into the node hash array, thereby generating a node plain text file; If the reference timing path has a node key, the node characteristic code values ​​corresponding to the node keys are concatenated to generate a first path code and store it in the path hash array, thereby generating a reference path plain text file.

7. The timing path information comparison method according to claim 1, characterized in that: The step of determining whether a node key exists in the reference timing path further comprises: Determine whether the node of the path exists in the established hash node library. If the node does not exist, create a hash node and use if exists to determine whether the value of this node exists in the hash node library; if the node exists, use the value corresponding to the node; If the node key does not exist, a node key is created and mapped to the node attribute encoding value.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: The processor is used to execute the computer program stored in the memory to implement the timing path information comparison method according to any one of claims 1 to 7.

9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, which is loaded and executed by a processor to implement the timing path information comparison method according to any one of claims 1 to 7.