Optimization method, device and computer-readable storage medium for updating netlist hierarchy based on incremental calculation
Through the incremental calculation method, only the partially modified netlist level is updated in large-scale circuit design, which solves the problems of resource waste and high computational complexity of traditional methods, and achieves efficient netlist level calculation and circuit modification support.
Patent Information
- Application Number
- CN202410725423.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-06
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2044-06-06
AI Technical Summary
The traditional global netlist level value calculation method has high computational complexity and large resource consumption in large-scale circuit design, and cannot support rapid circuit modifications. Especially when local modifications require recalculation of the entire netlist, resulting in a waste of resources.
Using a method based on incremental calculation, by obtaining the initial level value of the Netlist, identifying locally modified components, using breadth-first traversal to reset the level values of the affected input and output pins, and only performing calculations in the local update area to ensure that the netlist Level accuracy and consistency.
It optimizes the time and resource consumption of netlist level value calculation, supports real-time circuit modification, reduces the consumption of memory and processor resources, and improves design efficiency.
Smart Images

Figure CN118297010B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of digital circuit design, and more specifically, relates to an optimization method device and a computer-readable storage medium for updating a netlist hierarchy based on incremental calculation. Background Art
[0002] Quickly and accurately calculating the level value of the netlist is an important step in the circuit design and verification process of EDA tools. By quickly and accurately calculating the level value of the netlist, designers can more quickly understand the delay and timing characteristics of signal transmission in the circuit, which helps to promptly discover and solve possible problems, avoid timing conflicts in signal transmission, and improve circuit performance and stability. At the same time, you can also better understand the level value information of each part of the circuit, so that you can optimize the circuit in a targeted manner, such as reasonably arranging the layout of components, optimizing the timing path of the circuit, etc., so as to more effectively utilize the resources in the circuit.
[0003] Chinese invention patent CN115238616A discloses a chip netlist automatic modification method, device and electronic device. Based on the connection relationship from the abnormal node to the node to be modified in the chip netlist, a modification path is obtained, wherein the abnormal node is a node in the chip netlist with abnormal output, and the node to be modified is a node that causes the abnormal node to output abnormally; the file of the chip netlist is parsed to obtain Cell objects and Pin objects, and stored in a data dictionary; based on the modification path, the data dictionary is queried to obtain the target object to be modified, wherein the target object is a Cell object and / or a Pin object; and the file of the chip netlist is modified according to the modification script for the target object.
[0004] In summary, as the scale of circuits increases, the computational complexity of traditional global netlist level value calculation methods increases dramatically, and they cannot meet the needs of large-scale circuit design. For modern high-density, high-complexity large-scale circuits, the calculation time is long and the resource consumption is large, which seriously affects the design efficiency; moreover, traditional calculation methods need to traverse and analyze the entire netlist, which has high requirements for computing resources. Large-scale circuit designs may contain millions of components and complex connection relationships, which leads to the consumption of a large amount of memory and processor resources; in addition, in the process of circuit design, it is often necessary to modify and optimize the circuit. Traditional calculation methods need to recalculate the level value of the entire netlist. For netlists whose level values have been calculated, if only local modifications are made, recalculating the level value of the entire netlist will waste computing resources, so traditional calculation methods cannot support rapid circuit modifications. Summary of the invention
[0005] The present invention aims to overcome at least one defect of the above-mentioned prior art and provide an optimization method for updating the netlist hierarchy based on incremental calculation, so as to solve the problem in the prior art that for a netlist whose level value has been calculated, if only local modifications are made, recalculating the level value of the entire netlist will waste computing resources.
[0006] The detailed technical scheme of the present invention is as follows:
[0007] S1. Get the initial level value of the global Netlist, that is, the level value of the input and output pins of all components;
[0008] The initial level values of the global Netlist include the level values of the input pins of all components and the level values of the output pins of all components before the Netlist is modified;
[0009] S2. When the Netlist is modified, first obtain the order relationship and recursive dependency relationship between the local components modified in the Netlist, record the source pins information of the modified components, and clear the level values of the input pins and output pins of all components affected by the modified components. Use the list method to obtain the source pins in the Netlist where the connection relationship is first modified, that is, start_pins;
[0010] S3, use start_pins as the starting point of breadth-first traversal, find the adjacent components that have not been visited, set the level value of the input pin connected to start_pin, and record the visited components;
[0011] S4. After the level values of all input pins of the components accessed by start_pins are set, the output pin (OUT) of the set component is used as the next round of start_pins, and the steps S3-S4 are continued to search for adjacent components that have not been accessed until the next round of start_pins is empty.
[0012] S5. When the levels of the input and output pins of the local components modified in the Netlist are set successfully, the optimization of updating the netlist hierarchy based on incremental calculation is completed. The order relationship, recursive dependency relationship and level value between the components in the unoptimized area of the netlist remain consistent before and after the local update. If they are inconsistent, they are repaired and updated.
[0013] Furthermore, the method for calculating the level values of the input and output pins of all components is as follows:
[0014] S11. Initialize the level value of the input port of Netlist:
[0015] S12, starting from the input port, traversing each component in the design in sequence, wherein the process of traversing each component is:
[0016] After getting a component, check whether all input pins of the component have level values:
[0017] If the level values of all input pins of the current component are missing, continue to obtain the next component, and the current component will be treated as an uncalculated component and calculated later;
[0018] If the level values of all input pins of the current component exist, then the level value of its output pins can be calculated to be equal to the maximum value of the level values of all its input pins plus 1.
[0019] S13, complete the acquisition of the initial level value of the global Netlist;
[0020] The sign of completing the acquisition of the initial level value of the global Netlist is that all output ports of the current Netlist and all input and output pins of the components included in the current Netlist have level values.
[0021] Furthermore, the repair and update means: first locate the inconsistent components, then find the path associated with the components, and based on the Netlist that has not been locally updated, repair the order relationship, recursive dependency and level value of all components on this path.
[0022] The present invention also includes an optimization device for updating the netlist hierarchy based on incremental calculation, characterized in that the device comprises:
[0023] processor;
[0024] a memory having stored thereon a computer program executable on the processor;
[0025] Wherein, when the computer program is executed by the processor, the optimization method of updating the netlist hierarchy based on incremental calculation is implemented.
[0026] A computer-readable storage medium, characterized in that: the computer-readable storage medium stores an optimization method for updating the netlist level based on incremental calculation, and when the optimization method for updating the netlist level based on incremental calculation is executed by the processor, the optimization method for updating the netlist level based on incremental calculation is implemented.
[0027] Compared with the prior art, the present invention has the following beneficial effects:
[0028] The optimization method for updating the netlist hierarchy based on incremental calculation provided by the present invention adopts the idea of local update of incremental calculation when modifying or optimizing the Netlist. First, the starting position of the modification or optimization of the Netlist is found, and the level values of the input and output ports (pins) of all components affected by the modification or optimization of the Netlist are reset. Then, the level values of the input and output pins on the traversed components are set from these starting positions until the traversed components do not belong to the modification or optimization area of the Netlist, so as to realize the optimization of updating the netlist hierarchy based on incremental calculation, optimize the time and resource consumption of the netlist level value calculation, and support real-time circuit modification. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 It is a flow chart of the optimization method for updating the netlist level value based on incremental calculation according to the present invention.
[0030] Figure 2 It is a schematic diagram of the connection relationship of the Netlist described in Example 1 of the present invention.
[0031] Figure 3 It is a schematic diagram of the component connection relationship of the optimized Netlist described in Example 1 of the present invention. DETAILED DESCRIPTION
[0032] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0033] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0034] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0035] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.
[0036] Example 1
[0037] This embodiment provides an optimization method for updating the netlist level based on incremental calculation, which can be used to solve the problem of low performance and efficiency of digital EDA tools, optimize netlist level calculation, and support flexible circuit modification, thereby improving calculation efficiency and reducing memory and processor resource consumption:
[0038] Figure 2 and Figure 3 The order and recursive dependency of the components in the Netlist shown are exactly the same except for area A. IN0-IN3 of the Netlist in the two figures are input pins, and OUT0 and OUT1 are output pins. It should be noted that Figure 2 Region A in the Netlist shown is optimized to Figure 3 Area A in the Netlist shown. Figure 2 and Figure 3 Components U1, U2, U4, U5, U9, Figure 2 Components U0_0, U0_1, U0_2, U0_3, U0_4, U0_5, and Figure 3 The components U1_0, U1_1, and U1_2 represent a logical 'and' operation relationship; Figure 2 and Figure 3 Components U7 and U12 in the figure represent a logical 'XOR' operation relationship; Figure 2 and Figure 3 Components U3, U8 and U10 in the figure represent a logical 'exclusive OR' operation relationship; Figure 2 and Figure 3 Components U0, U6 and U11 in the figure represent a logical 'not' operation relationship.
[0039] This embodiment provides an optimization method for updating the netlist hierarchy based on incremental calculation, such as Figure 1 As shown:
[0040] S1. Get the initial level value of the global Netlist, that is Figure 2 The level values of the input and output pins of all components in the global Netlist, wherein the initial level values of the global Netlist include the level values of the input pins of all components and the level values of the output pins of all components before the Netlist is modified;
[0041] Figure 2 In the global Netlist, the level value of the input pins IN0, IN1, IN2 and IN3 is 0. When the level values of all the input pins of a component have been determined, the level value of the output pin of the component can be determined to be equal to the maximum level value of all the input pins + 1. Based on this principle, it can be determined Figure 2 The level values of all pins on each component are shown in Table 1. According to Table 1, the level values of the output pins (ie, OUT0 and OUT1) of the global Netlist are the level values of the output pins (OUT) of components U8 and U12, namely, 6 and 8.
[0042] Furthermore, the method for calculating the level values of the input and output pins of all components is as follows:
[0043] S11. Initialize the level value of the input port of Netlist:
[0044] Preferably, the input port of the Netlist described in this embodiment is the input end of the signal, so the level value of all input ports on the Netlist is 0;
[0045] S12, starting from the input port, traversing each component in the design in sequence, wherein the process of traversing each component is:
[0046] After getting a component, check whether all input pins of the component have level values:
[0047] If the level values of all input pins of the current component are missing, continue to obtain the next component, and the current component will be treated as an uncalculated component and calculated later;
[0048] If the level values of all input pins of the current component exist, then the level value of its output pins can be calculated to be equal to the maximum value of the level values of all its input pins plus 1.
[0049] S13, complete the acquisition of the initial level value of the global Netlist;
[0050] The sign of completing the acquisition of the initial level value of the global Netlist is that all output ports of the current Netlist and all input and output pins of the components included in the current Netlist have level values.
[0051] S2. When the Netlist is modified, first obtain the order relationship and recursive dependency relationship between the local components modified in the Netlist, record the source pins information of the modified components, and clear the level values of the input pins and output pins of all components affected by the modified components. Use the list method to obtain the source pins in the Netlist where the connection relationship is first modified, that is, start_pins;
[0052] The source pins refer to all pins connected to the input pins when the type and connection relationship of the components are changed for the first time after the Netlist is modified.
[0053] Specifically, the modification of the Netlist includes the need to modify and optimize the circuit during the circuit design process, such as Figure 2 , Figure 3 As shown, Figure 2 The Netlist in has been modified after some optimization to Figure 3 Netlist in; and Figure 2 Compared with Netlist, we get Figure 3 The order relationship and recursive dependency relationship between the local components modified in the Netlist;
[0054] from Figure 2 and Figure 3 It can be seen intuitively that because Figure 3 The optimized modified Netlist shown has changed Figure 2 In area A, the level values of the input and output pins on the components in area B affected by area A (the input signal is transmitted from left to right (from the input end to the output end), first passing through area A, then through area B, so it is described as area B being affected by area A) also change;
[0055] First clear Figure 3 The level values of all pins on the components in area A and area B are Figure 3 and Figure 2 By comparison, we can find that the source pins, namely start_pins, whose connection relationships are first modified in Netlist are the out ports of components U7, U2, U3 and U6. By looking up Table 1, we can find that the level values of start_pins are 3, 1, 1 and 2 respectively.
[0056] Table 1 Comparison table of level values of all pins on each component in the netlist
[0057]
[0058]
[0059] S3, use start_pins as the starting point of breadth-first traversal, find the adjacent components that have not been visited, set the level value of the input pin connected to start_pin, and record the visited components;
[0060] exist Figure 3In the Netlist shown, according to the start_pins obtained by S2, the adjacent components U1_0, U1_1 and U1_2 that have not been accessed are found, and the level values of the input pins of components U1_0, U1_1 and U1_2 can be further derived as shown in Table 2;
[0061] Table 2 Comparison table of level values of input pins of components U1_0, U1_1 and U1_2
[0062]
[0063] S4. After the level values of all input pins of the components accessed by start_pins are set, the output pins of the set components are used as the next round of start_pins, and the steps S3-S4 are continued to search for adjacent components that have not been accessed until the next round of start_pins is empty.
[0064] Specifically, in S3, the level values of all input pins of the components U1_0, U1_1 and U1_2 accessed by start_pins are set, so the output pins (OUT) of the components U1_0, U1_1 and U1_2 are used as the next round of start_pins to continue looping S3-S4 steps to find adjacent components that have not been accessed until the next round of start_pins is empty;
[0065] In this embodiment, the process of looping through the remaining components in the Netlist is as follows:
[0066] The level values of the output pins (OUT) of components U1_0, U1_1 and U1_2 are shown in Table 3:
[0067] Table 3 Comparison table of the level values of the output pins (OUT) of components U1_0, U1_1, and U1_2 derived when looping through the remaining components in the Netlist
[0068]
[0069] Then, the output pins (OUT) of components U1_0, U1_1 and U1_2 are used as the next round of start_pins to continue searching for adjacent components that have not been visited, namely components U8, U9 and U10; similarly, the level values of the input pins of components U8, U9 and U10 are derived as shown in Table 4, and then the level values of the output pins (OUT) of components U8, U9 and U10 are derived as shown in Table 5:
[0070] Table 4 Comparison table of level values of input pins of components U8, U9 and U10 derived when looping through the remaining components in the Netlist
[0071]
[0072] Table 5 Comparison table of the level values of the output pins (OUT) of components U8, U9, and U10 derived when looping through the remaining components in the Netlist
[0073]
[0074] The level values of all input pins of the accessed components U8, U9 and U10 are set, so the output pins (OUT) of components U8, U9 and U10 are used as the start_pins of the next round to continue searching for adjacent components that have not been accessed, namely components U11 and U12. Similarly, the level values of the input pins of components U11 and U12 are derived as shown in Table 6. The level value of the output pin (OUT) of component U11 is further derived as shown in Table 7; because the level value of the input port in0 of component U12 is not set, the output port pin (OUT) of U12 cannot be used as the start_pins of the next round, that is, the start_pins of the next round only contains the output pin (OUT) of component U11.
[0075] Table 6 Comparison table of level values of input pins of components U11 and U12 derived when looping through the remaining components in the Netlist
[0076]
[0077] Table 7 Comparison table of level values of component U11 output pin (OUT) derived when looping through the remaining components in the Netlist
[0078]
[0079] The output pin (OUT) of the component U11 accessed above is used as the start_pins for the next round to continue searching for the adjacent component that has not been accessed yet, namely, component U12. Similarly, the level values of the input pins and output pin (OUT) of component U12 are derived as shown in Table 8. However, because the output pin (OUT) of component U12 is the output pin (OUT1) of the Netlist, it cannot be used as the start_pins for the next round, so the start_pins for the next round is empty, and the loop ends.
[0080] Table 8 Comparison table of the level values of the input pins and output pin (OUT) of component U12 derived when looping through the remaining components in the Netlist
[0081]
[0082] S5. When the levels of the input and output pins of the local components modified in the Netlist are set successfully, the optimization of updating the netlist hierarchy based on incremental calculation is completed. The order relationship, recursive dependency relationship and level value between the components in the unoptimized area of the netlist remain consistent before and after the local update. If they are inconsistent, they are repaired and updated.
[0083] The repair and update means: first locate the inconsistent components, then find the path associated with the components, and based on the Netlist that has not been locally updated, repair the order relationship, recursive dependency relationship and level value of all components on this path.
[0084] After the above processing, the level values of the output pins OUT0 and OUT1 of the global Netlist of this embodiment are the level values of the output pins (OUT) of components U8 and U12, respectively. Figure 2 , and its values are updated to 5 and 7.
[0085] In specific applications, if the connection relationship of one or more components changes, the levels of the input pins of these components can be checked and used as reference values to further calculate a new level for the pins on these components and the components affected by them.
[0086] Experiments show that when the connection relationship between components changes, usually only the levels of the components directly related to the change need to be recalculated, while the levels of other unaffected components can remain unchanged, thus avoiding the need to perform a complete level calculation on the entire netlist.
[0087] From the perspective of time complexity, if the number of components in the entire netlist is V and the number of connections between components is E, then the time complexity of level calculation for the entire circuit using the traditional breadth-first traversal and depth-first traversal methods is O(V + E). However, this method only needs to calculate the levels of components affected by connection changes and their affected components, greatly reducing the number of components that need to be calculated. At the same time, after obtaining a component, only when all input pins of the component have level values will the search for subsequent connection relationships of the component continue, effectively avoiding multiple visits to the same component, ensuring that each component is only traversed once, and reducing the time complexity to a level closer to O(1). Therefore, this method can greatly reduce the time and resource consumption of level calculations, and support real-time circuit modification operations, which plays a key role in the successful implementation of circuit design and performance improvement.
[0088] Example 2
[0089] This embodiment discloses an optimization device for updating a netlist hierarchy based on incremental calculation, characterized in that the device comprises:
[0090] processor;
[0091] a memory having stored thereon a computer program executable on the processor;
[0092] Wherein, when the computer program is executed by the processor, the optimization method of updating the netlist hierarchy based on incremental calculation is implemented.
[0093] This embodiment also includes a computer-readable storage medium, characterized in that: the computer-readable storage medium stores an optimization method for updating the netlist level based on incremental calculation, and when the optimization method for updating the netlist level based on incremental calculation is executed by the processor, the optimization method for updating the netlist level based on incremental calculation is implemented.
[0094] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the technical solution of the present invention, and are not intended to limit the specific implementation methods of the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the claims of the present invention shall be included in the protection scope of the claims of the present invention.
Claims
1. An optimization method for updating the netlist hierarchy based on incremental calculation, characterized in that: include: S1. Get the initial level value of the global Netlist, that is, the level value of the input and output pins of all components; The initial level values of the global Netlist include the level values of the input pins of all components and the level values of the output pins of all components before the Netlist is modified; S2. When the Netlist is modified, first obtain the order relationship and recursive dependency relationship between the local components modified in the Netlist, record the source pins information of the modified components, and clear the level values of the input pins and output pins of all components affected by the modified components. Use the list method to obtain the source pins in the Netlist where the connection relationship is first modified, that is, start_pins; S3, use start_pins as the starting point of breadth-first traversal, find the adjacent components that have not been visited, set the level value of the input pin connected to start_pin, and record the visited components; S4. After the level values of all input pins of the components accessed by start_pins are set, the output pins of the set components are used as the next round of start_pins, and the steps S3-S4 are continued to search for adjacent components that have not been accessed until the next round of start_pins is empty. S5. When the levels of the input and output pins of the local components modified in the Netlist are set successfully, the optimization of updating the netlist hierarchy based on incremental calculation is completed. The order relationship, recursive dependency relationship and level value between the components in the unoptimized area of the netlist remain consistent before and after the local update. If they are inconsistent, they are repaired and updated.
2. The optimization method for updating the netlist hierarchy based on incremental calculation according to claim 1, characterized in that: The calculation method of the level values of the input and output pins of all the components is as follows: S11. Initialize the level value of the input port of Netlist: S12, starting from the input port, traversing each component in the design in sequence, wherein the process of traversing each component is: After getting a component, check whether all input pins of the component have level values; If the level values of all input pins of the current component are missing, continue to obtain the next component, and the current component will be treated as an uncalculated component and calculated later; If the level values of all input pins of the current component exist, then the level value of its output pins can be calculated to be equal to the maximum value of the level values of all its input pins plus 1; S13, complete the acquisition of the initial level value of the global Netlist; The sign of completing the acquisition of the initial level value of the global Netlist is that all output ports of the current Netlist and all input and output pins of the components included in the current Netlist have level values.
3. The optimization method for updating the netlist hierarchy based on incremental calculation according to claim 2, characterized in that: The repair and update means: first locate the inconsistent components, then find the path associated with the components, and based on the Netlist that has not been locally updated, repair the order relationship, recursive dependency relationship and level value of all components on this path.
4. An optimization device for updating the netlist hierarchy based on incremental calculation, characterized in that: The device comprises: processor; a memory having stored thereon a computer program executable on the processor; Wherein, when the computer program is executed by the processor, the steps of the optimization method for updating the netlist hierarchy based on incremental calculation as described in any one of claims 1 to 3 are implemented.
5. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores an optimization program for updating the netlist level based on incremental calculations, and when the optimization program for updating the netlist level based on incremental calculations is executed by the processor, the steps of the optimization method for updating the netlist level based on incremental calculations as described in any one of claims 1 to 3 are implemented.
