H-type tree optimization method and device, equipment and storage medium
By using the mean clustering algorithm in the H-tree to classify the register positions and obtaining the centroid position as the tap point, the problem of tap point uniformity in the automatic generation tool of H-tree is solved, and the process sensitivity resistance and iterative optimization capability of clock tree design are improved.
Patent Information
- Application Number
- CN202311031902.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-15
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2043-08-15
AI Technical Summary
Existing H-tree automatic generation tools can only generate tap points evenly, which cannot meet user needs.
By obtaining the register positions in the H-tree, the register positions are classified using the mean clustering algorithm. The centroid position of each class is obtained based on the classification results, and the centroid position is used as the tap point position.
The distribution of tap points in the H-type tree has been optimized to better meet user needs, and the process resistance and iterative optimization capabilities of the clock tree design have been improved.
Smart Images

Figure CN117251773B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of semiconductor technology, and in particular to an H-tree optimization method, apparatus, device, and storage medium. Background Technology
[0002] With the continuous development of semiconductor manufacturing processes, the operating frequency of digital chips has significantly increased, and chip power consumption has also increased accordingly. As the "heart" of a digital system, the clock signal plays a decisive role in the system's functionality, performance, and stability. Therefore, the characteristics of the clock signal and the layout of the clock tree have attracted great attention from designers. How to reduce clock signal propagation delay and clock skew, and minimize the impact of PVT (Process, Voltage, Temperature) environmental variables and power consumption has become the main theme of clock tree design today.
[0003] Currently, there are three main methods for implementing clock tree designs: H-tree, fishbone tree, and grid tree. While fishbone and grid trees offer strong process insensitivity and perfectly meet symmetry requirements, their design complexity is extremely high, making effective iterative optimization impossible. Therefore, the H-tree is a more suitable automated implementation method. However, current H-tree automatic generation tools do not consistently generate tap points that meet user needs.
[0004] The above content is only used to help understand the technical solution of the present invention and does not represent an admission that the above content is prior art. Summary of the Invention
[0005] The main objective of this invention is to provide an H-type tree optimization method, apparatus, device, and storage medium, aiming to solve the technical problem that H-type tree automatic generation tools can only generate tap points uniformly.
[0006] To achieve the above objectives, the present invention provides an H-type tree optimization method, the method comprising the following steps:
[0007] Get the register positions in the H-tree;
[0008] The register locations are classified using the mean clustering algorithm;
[0009] Based on the classification results, the centroid position of each class is obtained, and the centroid position is used as the tap point position.
[0010] Optionally, before the step of obtaining the register location in the H-tree, the method further includes:
[0011] Perform chip layout planning and power network planning;
[0012] generate an H-type tree according to the layout plan and the power network plan.
[0013] Optionally, the step of generating an H-type tree according to the layout plan and the power network plan further comprises:
[0014] obtaining clock tree routing rules;
[0015] setting line width, spacing and routing layer of the H-type tree routing according to the clock tree routing rules.
[0016] Optionally, the step of obtaining register positions in the H-type tree comprises:
[0017] obtaining register information by using a related command;
[0018] obtaining register positions according to the register information.
[0019] Optionally, the step of classifying the register positions using a mean clustering algorithm comprises:
[0020] aligning the register positions and updating the register positions;
[0021] setting a classification number;
[0022] classifying the register positions using a K-means clustering algorithm based on the classification number.
[0023] Optionally, the step of classifying the register positions using a K-means clustering algorithm based on the classification number comprises:
[0024] selecting initial centroids corresponding to the classification number from the register positions;
[0025] for each sample point in the register positions, determining the initial centroid closest to the sample point and classifying the sample point as a class corresponding to the initial centroid;
[0026] based on sample points in each class, re-determining centroids and classifying the register positions based on the centroids.
[0027] Optionally, the step of obtaining centroid positions of each class according to the classification result of the classification and taking the centroid positions as tap point positions further comprises:
[0028] defining creation specifications of the H-type tree and performing H-type tree synthesis based on the creation specifications;
[0029] creating a clock at the tap point of the H-type tree;
[0030] synthesizing the tap point sub-tree.
[0031] In addition, to achieve the above object, the present application also provides an H-tree optimization device, characterized in that the H-tree optimization device comprises:
[0032] An acquisition module is configured to acquire register positions in an H-tree.
[0033] A classification module is configured to classify the register positions by using a mean clustering algorithm.
[0034] A determination module is configured to obtain a centroid position of each class according to a classification result of the classification, and take the centroid position as a tap point position.
[0035] In addition, to achieve the above object, the present application also provides an H-tree optimization device, characterized in that the device comprises a memory, a processor, and an H-tree optimization program stored in the memory and executable on the processor, the H-tree optimization program being configured to implement the steps of the H-tree optimization method as described above.
[0036] In addition, to achieve the above object, the present application also provides a storage medium, characterized in that the storage medium stores an H-tree optimization program, the H-tree optimization program being executable on a processor to implement the steps of the H-tree optimization method as described above.
[0037] The present application acquires register positions in an H-tree, classifies the register positions by using a mean clustering algorithm, and obtains a centroid position of each class according to a classification result of the classification, and takes the centroid position as a tap point position. After the register positions in the H-tree are acquired, the register positions are classified by using a mean clustering algorithm, and the classes of the registers can be obtained based on the internal structure of sample data. According to the classification result of the classification, the centroid position of each class is obtained, and the centroid position of the class can represent the characteristics of the class, and then the centroid position is taken as a tap point position. Thus, the technical problem that an H-tree automatic generation tool can only generate uniform tap points is solved. BRIEF DESCRIPTION OF DRAWINGS
[0038] Figure 1 An H-tree optimization device structure schematic diagram of a hardware running environment related to an embodiment scheme of the present application;
[0039] Figure 2 A flowchart schematic diagram of an H-tree optimization method first embodiment of the present application;
[0040] Figure 3 A flowchart schematic diagram of an H-tree optimization method second embodiment of the present application;
[0041] Figure 4This is a flowchart illustrating the third embodiment of the H-type tree optimization method of the present invention;
[0042] Figure 5 This is a schematic diagram of the clock tree structure;
[0043] Figure 6 This is a structural block diagram of the H-type tree optimization device of the present invention.
[0044] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0045] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.
[0046] Reference Figure 1 , Figure 1 This is a schematic diagram of the H-tree optimization device structure of the hardware operating environment involved in the embodiments of the present invention.
[0047] like Figure 1 As shown, the H-type tree optimization device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen or an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be a high-speed random access memory (RAM) or a stable non-volatile memory (NVM), such as a disk drive. The memory 1005 may also optionally be a storage device independent of the aforementioned processor 1001.
[0048] Those skilled in the art will understand that Figure 1 The structure shown does not constitute a limitation on the H-type tree optimization device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0049] like Figure 1 As shown, the memory 1005, which serves as a storage medium, may include an operating system, a network communication module, a user interface module, and an H-tree optimization program.
[0050] In Figure 1 In the H-type tree optimization device shown, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the H-type tree optimization device can be arranged in the H-type tree optimization device, and the H-type tree optimization device calls the H-type tree optimization program stored in the memory 1005 through the processor 1001, and executes the H-type tree optimization method provided by the embodiment of the application.
[0051] The embodiment of the application provides an H-type tree optimization method, which refers to Figure 2 , Figure 2 The flowchart of the first embodiment of the H-type tree optimization method is shown. The H-type tree optimization method comprises the following steps.
[0052] Step S10: Obtain the register positions in the H-type tree.
[0053] It can be understood that the H-type tree can be a clock tree design structure of a chip.
[0054] It should be noted that the register can be a hardware component for storing and processing data. In a computer system, registers are used to temporarily store data, instructions and addresses, etc. They are usually located inside the central processing unit (CPU) for fast access and processing of data. Registers play an important role in computer systems, and are crucial for improving system performance and optimizing the computing process.
[0055] Step S20: Classify the register positions using a mean clustering algorithm.
[0056] It can be understood that the mean clustering algorithm can be an iterative solution clustering analysis algorithm, such as a K-means clustering algorithm, a mean shift clustering algorithm, a hierarchical clustering algorithm, etc.
[0057] Step S30: According to the classification result of the classification, obtain the centroid position of each class, and take the centroid position as the tap point position.
[0058] It should be noted that the centroid can be the average value of all register positions in each class.
[0059] In a specific implementation, the average of all register positions in each category. The average of all register positions in each category. The register positions are classified using a mean clustering algorithm. The mean clustering algorithm is a commonly used clustering algorithm that can divide a set of data into multiple categories. In this embodiment, we take the register positions as input data and divide them into different categories through the mean clustering algorithm. Each category represents a group of similar register positions. According to the classification result, this method obtains the centroid position of each class. The centroid position refers to the average of all register positions in each category. By calculating the average of the register positions in each category, the centroid position can be obtained. Finally, this method takes the obtained centroid position as the tap point position. The tap point refers to a specific position selected in the H-type tree for optimizing register layout. By taking the centroid position as the tap point position, we can determine the appropriate position in the H-type tree to place the register.
[0060] For example, assume we have an H-type tree containing 8 registers, A, B, C, D, E, F, G, H. We can obtain the position information of these registers by reading the definition of the H-type tree or extracting it from the existing H-type tree structure. Next, we use the mean clustering algorithm to classify these register positions. Suppose we divide these register positions into two categories, category 1 and category 2. According to the classification result, we calculate the average of the register positions in each category to obtain the centroid position. Suppose the centroid position of category 1 is (2, 4) and the centroid position of category 2 is (6, 8). Finally, we take the centroid position as the tap point position. In this example, we take (2, 4) and (6, 8) as tap point positions for optimizing register layout.
[0061] This embodiment obtains the register positions in the H-type tree, classifies the register positions using a mean clustering algorithm, and obtains the centroid position of each class based on the classification result of the classification, taking the centroid position as the tap point position. After obtaining the register positions in the H-type tree, the register positions are classified using the mean clustering algorithm, which can obtain the categories of the registers based on the internal structure of the sample data. According to the classification result of the classification, the centroid position of each class is obtained, which can represent the characteristics of the class, and then the centroid position is taken as the tap point position. Thus, the technical problem of the H-type tree automatic generation tool being able to only generate uniform tap points is solved.
[0062] Further, in this embodiment, before step S10, it further includes:
[0063] Step S01: Perform layout planning and power network planning of the chip.
[0064] It should be noted that the layout planning can refer to determining the positions of various components on the chip and the layout relationship therebetween, including registers, processors, memories, etc.
[0065] It should be noted that the power network planning can refer to designing the power supply network of the chip to ensure that each component can obtain stable power supply when working.
[0066] Step S02: generating an H-type tree according to the layout planning and the power network planning.
[0067] In a specific implementation, before obtaining the register positions in the H-type tree, the method further includes performing layout planning and power network planning of the chip. According to the layout planning and the power network planning, the H-type tree is generated. The process of generating the H-type tree includes determining the structure and connection relationship of the H-type tree, and determining the position of each node (register). On the basis of the layout planning and the power network planning, a required H-type tree is generated through a reasonable algorithm or rule. Then, after obtaining the register positions in the H-type tree, the method continues the subsequent steps, such as classifying the register positions using a mean clustering algorithm, and obtaining the centroid position of each class as the tap point position according to the classification result. For example, assuming that we want to design a chip including a processor, a memory and multiple registers. Before performing the H-type tree optimization, we first perform the layout planning and the power network planning of the chip. The layout planning determines the relative positions and layout relationship of the processor, the memory and the registers, and the power network planning ensures that each component can obtain stable power supply. According to the layout planning and the power network planning, the H-type tree is generated. The process of generating the H-type tree includes determining the structure and connection relationship of the H-type tree, and determining the position of each node (register). Through a reasonable algorithm or rule, a required H-type tree is generated.
[0068] The above manner of the embodiment can perform the layout planning and the power network planning of the chip, and generate the H-type tree according to the layout planning and the power network planning. The layout planning and the power network planning of the chip are performed, and the H-type tree is generated according to the layout planning and the power network planning, which can comprehensively consider the factors of chip layout and power supply, and further optimize the register layout.
[0069] Further, in the embodiment, after the step S02, the method further includes:
[0070] Step S03: obtaining a clock tree routing rule.
[0071] It should be noted that the clock tree routing rule can refer to a routing rule about clock signal transmission specified in chip design.
[0072] Step S04: setting the line width, the pitch and the wire layer of the H-shaped tree wire according to the clock tree wire rule.
[0073] It should be noted that the line width can refer to the width of the transistor in the chip, and also the minimum width in the chip production process.
[0074] It can be understood that the pitch can be the distance between the internal circuits and the circuits in the chip.
[0075] It can be understood that the wire layer can be the layer at which the wire is wound.
[0076] In a specific implementation, the clock tree wire rule is obtained. The line width, the pitch and the wire layer of the H-shaped tree wire are set according to the clock tree wire rule.
[0077] For example, it is assumed that the H-shaped tree has been generated according to the layout planning and the power network planning, and the clock tree wire rule is obtained. The clock tree wire rule requires that the wire width of the clock signal is 10 nanometers, the pitch is 5 nanometers, and the wire layer is the third layer. According to the obtained clock tree wire rule, the line width of the H-shaped tree wire is set to 10 nanometers, the pitch is set to 5 nanometers, and the wire layer is set to the third layer. In this way, the H-shaped tree can be wired according to the specified wire requirements, so as to ensure the transmission quality and stability of the clock signal.
[0078] The above manner of the embodiment can further optimize the layout and the wire of the H-shaped tree by obtaining the clock tree wire rule and setting the line width, the pitch and the wire layer of the H-shaped tree wire according to the clock tree wire rule.
[0079] Further, in the embodiment, the step S10 includes:
[0080] Step S101: obtaining register information by using a related command.
[0081] It can be understood that the register information can be the physical position or the relative position of the register.
[0082] Step S102: obtaining a register position according to the register information.
[0083] In a specific implementation, the register information is extracted from a chip design tool or a chip description language through specific instructions or tools. Next, the register positions are obtained based on the obtained register information. The register positions can be represented by coordinates or relative positions of the registers. Based on the relevant data in the register information, such as the physical positions or relative positions of the registers, the specific positions of each register in the H-type tree can be obtained. For example, assume that we want to design a chip that includes multiple registers, each of which has a unique identifier and relevant information. We can use relevant commands in the chip design tool, such as query commands or extraction commands, to obtain the register information. This information includes the physical positions or relative positions of the registers.
[0084] The above method of the present application obtains register information by using relevant commands and obtains register positions based on the register information. The register positions in the H-type tree can be accurately obtained, providing accurate data basis for subsequent optimization steps.
[0085] Further, based on the above embodiment, a second embodiment of the present application is proposed. Referring to Figure 3 , Figure 3 The flowchart of the second embodiment of the H-type tree optimization method of the present application is shown.
[0086] In this embodiment, the step S20 includes:
[0087] Step S201: Align the register positions and update the register positions.
[0088] In a specific implementation, the register positions are aligned before clustering to ensure that they are in the same coordinate system. This can be achieved by calculating the relative positions of the register positions or adjusting the coordinate origin. After alignment, the register positions are updated for subsequent classification operations.
[0089] Step S202: Set the number of classifications.
[0090] In a specific implementation, the number of classifications is set according to design requirements and system requirements. The number of classifications determines the number of categories in the final clustering result.
[0091] Step S203: Based on the number of classifications, use the K-means clustering algorithm to classify the register positions.
[0092] In a specific implementation, the register positions are classified using a K-means clustering algorithm: the K-means clustering algorithm is a commonly used clustering algorithm that can divide a set of data into K categories. In this embodiment, we use the register positions as input data and use the K-means clustering algorithm to divide them into a set number of categories. The clustering algorithm will classify the register positions based on their features and distances, grouping similar register positions into the same category.
[0093] This embodiment updates the register positions by aligning them, sets the number of categories, and uses the K-means clustering algorithm to classify the register positions based on the number of categories. In the step of using the K-means clustering algorithm to classify the register positions, it includes aligning and updating the register positions, setting the number of categories, and using the K-means clustering algorithm to classify the register positions based on the number of categories. This can divide the register positions into multiple categories, providing accurate classification results for subsequent optimization steps.
[0094] Further, in this embodiment, the step S203 includes:
[0095] Step S2031: Selecting an initial centroid corresponding to the number of categories from the register positions.
[0096] In a specific implementation, a corresponding number of initial centroids are randomly selected from the register positions according to the set number of categories. The initial centroid refers to the point that serves as the clustering center, used to divide the register positions into different categories.
[0097] Step S2032: For each sample point in the register positions, determine the initial centroid closest to the sample point, and label the sample point as the category corresponding to the initial centroid.
[0098] In a specific implementation, for each register position sample point, calculate its distance from all initial centroids and determine the closest initial centroid. Label the sample point as the category corresponding to the closest initial centroid.
[0099] Step S2033: Based on the sample points in each category, re-determine the centroid, and classify the register positions based on the centroid.
[0100] In a specific implementation, for each category, recalculate the average of all sample points in the category to obtain a new centroid position. Then, based on the new centroid position, reclassify the register positions by assigning each sample point to the category corresponding to the closest centroid.
[0101] The above manner of the embodiment can divide the register positions into multiple categories, and continuously optimize the positions of the centroids in an iterative manner to improve the classification accuracy.
[0102] Further, in the embodiment, step S30 comprises:
[0103] Step S301: defining the creation specification of the H-type tree, and performing H-type tree synthesis based on the creation specification.
[0104] In a specific implementation, the creation specification of the H-type tree is defined according to design requirements and system requirements, including the structure, connection relationship, node attribute, and the like of the H-type tree. The creation specification can specify specific requirements of the H-type tree, such as the distance between nodes, hierarchical structure, connection mode, and the like. According to the defined creation specification of the H-type tree, the H-type tree is synthesized. Synthesis refers to synthesizing the nodes and edges of the H-type tree according to the specification to form a complete H-type tree structure. The process of synthesis can include node position allocation, edge connection, attribute assignment, and the like.
[0105] Step S302: creating a clock at the tap point of the H-type tree.
[0106] In a specific implementation, the positions of the centroids obtained according to the classification result are taken as the positions of the tap points. Transmission paths of the clock signal are created at each centroid position of the H-type tree. The transmission paths of the clock signal can be implemented through wiring and connection technology, to ensure that the clock signal can be accurately transmitted to the corresponding register.
[0107] Step S303: synthesizing the tap point sub-tree.
[0108] In a specific implementation, the positions of the centroids obtained according to the classification result are taken as the positions of the tap points. Transmission paths of the clock signal are created at each centroid position of the H-type tree. The transmission paths of the clock signal can be implemented through wiring and connection technology, to ensure that the clock signal can be accurately transmitted to the corresponding register.
[0109] The above manner of the embodiment can divide the register positions into multiple categories, and continuously optimize the positions of the centroids in an iterative manner to improve the classification accuracy.
[0110] Further, based on the above embodiment, a third embodiment of the application is proposed. Referring to Figure 4 , Figure 4 is a flowchart of the third embodiment of the H-type tree optimization method of the application.
[0111] In this embodiment, the floorplan, power network planning and place steps of the chip need to be completed before the clock tree synthesis, to prepare for the clock tree synthesis. Then, the tool creates the clock tree spec according to the standard timing constraints (SDC). Specifically, the following command can be executed: create_ccopt_clock_tree_spec.
[0112] The flip rate of the clock signal is generally high, in order to reduce the influence of noise on the clock tree, the clock tree routing rules (NDR) are generally set, the NDR generally sets the line width, spacing and routing layer of the clock tree routing, so that the clock tree routing is performed according to the defined routing rules. Set the clock tree design constraints to achieve the expected skew, transition and clock buffer fanout number.
[0113] Specifically, the definition command of NDR is as follows:
[0114] add-ndr-name NDR_tree-width_multiplier{METAL4:METAL6 2}
[0115] -spacing_multiplier{METAL4:METAL6 2}
[0116] The clock tree constraint command is as follows:
[0117] set_ccopt_property max_fanout 36
[0118] set_ccopt_property target_max_capacitance 0.15
[0119] set_ccopt_property target_max_trans 0.3
[0120] Clock tree synthesis refers to inserting buffers or inverters along the designed clock path to balance the clock delay of all clock inputs. The clock tree refers to the clock buffer / inverter tree from the root point of a clock to each sink point or leaf node. Sink refers to the last stage of registers in the clock tree. Referring to Figure 5 ,Figure 5 Structure diagram of clock tree.
[0121] After creating the clock tree spec, the clock tree has been built, at this time, the relevant information of sinks can be reported in innovus using the command. Specifically, the command is as follows: get_ccopt_clock_tree_sinks. After obtaining the name, the position of these registers can be obtained using the command: dbget [dbget top.insts.name-p instname].box.
[0122] After obtaining the position of the sink, clustering can be performed according to the position. Since the register position coordinates obtained in the previous step have four, simple processing is required for alignment. For register A, its position is represented as follows: A{x1, y1, x2, y2}, we take the center point as its position, and the new position is represented as follows: A{x0, y0}, where:
[0123] x0=(x1+x2) / 2
[0124] y0=(y1+y2) / 2
[0125] Clustering is one of the most common unsupervised learning methods, which classifies a set of unlabeled samples according to sample attributes, so that the similarity between objects in the same class is higher than that between objects in other classes. Through this technology, the internal structure of sample data can be discovered. K-means is a widely used clustering algorithm. Given a set of data points, each data sample is a 2-dimensional real vector (x0, y0), and the data point set is divided into k sets by k-means clustering, the steps are as follows:
[0126] 1. Select k initial points from the sample data as initial centroids.
[0127] 2. For each sample point, calculate the nearest centroid to obtain its class, and mark the class corresponding to the centroid.
[0128] 3. Recalculate the centroid corresponding to the k classes.
[0129] 4. Repeat steps 2-3 until the centroid no longer changes.
[0130] The value of k represents the number of tap points set subsequently, the selection of k value is related to the design of the circuit, and k value can be set according to experience. If the optimization effect is not good, k value can be changed to re-cluster. In this scheme, k is set to 6 according to experience.
[0131] After getting the clustering result, the centroid of each class is calculated respectively, and the position of the centroid is the position of the tap point. Define the create specification of the Flexible H-tree, such as the clock source point, whether it is symmetrical, the number and position area of the tap points, etc. Specifically, the command is as follows:
[0132] create_ccopt_flexible_htree-name$tree_name-pin$pin_name
[0133] -trunk_cell{$cellname}-final_cell{&cellname}
[0134] -image_directory$file_directory-no_symmetry_buffers
[0135] -sinks{{$tap0}{$tap1}...{$tapn}}
[0136] Synthesize the defined Flexible H-tree trunk, check whether the tap point position and trunk routing are reasonable after synthesis, create the clock for the placed multi-tap point and define the clock grouping, synthesize the defined sub-tree, the sub-tree can adopt the balanced tree or the unbalanced tree by borrowing the useful skew, at this time, if the timing after the sub-tree synthesis is not ideal, analyze whether the division of the sub-tree is reasonable, whether the sub-tree is mounted reasonably according to the logical relationship and the physical position, and at the same time, pay attention to whether the clock latency of a single sub-tree is too long. The main command is as follows:
[0137] synthesis_ccopt_flexible_htrees
[0138] ccopt_design-cts-outDir.. / rpt / $rptDirection-prefix cts
[0139] The difficulty of implementing clock tree with multi-tap point FlexHtree lies in the determination of tap point number and the reasonable mounting of sink under different tap points. The scheme proposes an optimization method for the problem. First, the clock tree spec is generated, and then the sink position is obtained in the innovus tool. Then, the sink position is clustered according to the position, and the number of clusters can be determined according to the design requirement and experience. The tap point position is calculated from the clustering result, so as to mount the sink under the appropriate tap point. Compared with the ordinary H-tree, the optimization method can further improve the performance of the clock tree. If the optimization effect is not good, the number of clusters can be reset for a new round of iteration optimization. The optimization method can make the tap point position distribution more reasonable, and has good optimization efficiency on the power consumption, skew and other indicators of the clock tree.
[0140] In addition, in order to achieve the above object, the application further provides an H-type tree optimization device. Figure 6 , Figure 6 The structure block diagram of the H-type tree optimization device is shown in the figure.
[0141] The acquisition module is used for acquiring the register position in the H-type tree.
[0142] The classification module is used for classifying the register position by using the mean clustering algorithm.
[0143] The determination module is used for obtaining the centroid position of each class according to the classification result of the classification, and taking the centroid position as the tap point position.
[0144] The application acquires the register position in the H-type tree, classifies the register position by using the mean clustering algorithm, and obtains the centroid position of each class according to the classification result of the classification, and takes the centroid position as the tap point position. After acquiring the register position in the H-type tree, the register position is classified by using the mean clustering algorithm, and the class of the register can be obtained based on the internal structure of the sample data. According to the classification result of the classification, the centroid position of each class is obtained, and the centroid position of the class can represent the characteristics of the class, and then the centroid position is taken as the tap point position. Thus, the technical problem that the H-type tree automatic generation tool can only generate uniform tap points is solved.
[0145] In addition, in order to achieve the above object, the application further provides an H-type tree optimization device, which comprises a memory, a processor and an H-type tree optimization program stored in the memory and executable on the processor. The H-type tree optimization program is configured to implement the steps of the H-type tree optimization method as described above.
[0146] In addition, in order to achieve the above object, the application further provides a storage medium, wherein the storage medium stores an H-type tree optimization program, and the H-type tree optimization program is executed by a processor to realize the steps of the H-type tree optimization method.
[0147] It should be noted that, in this document, the terms "comprising", "containing" or any other variant thereof are intended to cover non-exclusive inclusions, so that a process, method, article or system that includes a list of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent in such a process, method, article or system. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of other identical elements in the process, method, article or system that includes the element.
[0148] The above-mentioned embodiment numbers of the application are only for description, and do not represent the advantages and disadvantages of the embodiments.
[0149] Through the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be realized by means of software and necessary general hardware platforms, of course, they can also be realized by hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the application can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a plurality of instructions for making a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) execute the methods described in various embodiments of the application.
[0150] The above is only the preferred embodiment of the application, and does not limit the patent scope of the application, and any equivalent structure or equivalent flow transformation made by using the content of the specification and drawings, or directly or indirectly applied to other related technical fields, are also included in the patent protection scope of the application.
Claims
1. A method for H-tree optimization, characterized by, The H-type tree optimization method comprises: obtaining register positions in an H-type tree; classifying the register positions using a mean clustering algorithm; according to a classification result of the classification, obtaining a centroid position of each class, and taking the centroid position as a tap point position, the centroid position being an average value of the register positions in the corresponding class, and the tap point being a specific position in the H-type tree for optimizing register layout; the step of classifying the register positions using the mean clustering algorithm comprises: aligning the register positions and updating the register positions; setting a classification number; based on the classification number, classifying the register positions using a K-means clustering algorithm; the step of classifying the register positions using the K-means clustering algorithm based on the classification number comprises: selecting initial centroids corresponding to the classification number from the register positions; for each sample point in the register positions, determining the initial centroid closest to the sample point, and marking the sample point as a class corresponding to the initial centroid; based on sample points in each class, re-determining a centroid, and classifying the register positions based on the centroid; the step of obtaining a centroid position of each class according to a classification result of the classification, and taking the centroid position as a tap point position comprises: defining a creation specification of the H-type tree, and synthesizing the H-type tree based on the creation specification; creating a clock at a tap point of the H-type tree; synthesizing a tap point sub-tree.
2. The H-trees optimization method of claim 1, wherein, Before the step of obtaining register positions in an H-type tree, the method further comprises: performing layout planning and power network planning of a chip; generating an H-type tree according to the layout planning and the power network planning.
3. The H-trees optimization method of claim 2, wherein, After the step of generating an H-type tree according to the layout planning and the power network planning, the method further comprises: obtaining a clock tree routing rule; setting a line width, a spacing, and a routing layer of the H-type tree routing according to the clock tree routing rule.
4. The H-trees optimization method of claim 1, wherein, The step of obtaining register positions in an H-type tree comprises: obtaining register information by using a related command; obtaining register positions according to the register information.
5. An H-tree optimization apparatus, characterized by comprising: The H-type tree optimization device comprises: an obtaining module configured to obtain register positions in an H-type tree; a classification module configured to classify the register positions using a mean clustering algorithm; a determination module configured to, according to a classification result of the classification, obtain a centroid position of each class, and take the centroid position as a tap point position, the centroid position being an average value of the register positions in the corresponding class, and the tap point being a specific position in the H-type tree for optimizing register layout; the classification module is further configured to align the register positions, update the register positions, set a classification number, and classify the register positions using a K-means clustering algorithm based on the classification number; The classification module is further configured to select initial centroids corresponding to the classification number from the register positions; determine, for each sample point in the register position, an initial centroid closest to the sample point, and label the sample point as a class corresponding to the initial centroid; and re-determine centroids based on sample points in each class, and classify the register position based on the centroids. The determination module is further configured to define a creation specification of the H-type tree, perform H-type tree synthesis based on the creation specification, create a clock at a tap point of the H-type tree, and synthesize a sub-tree of the tap point.
6. An H-tree optimization apparatus, characterized by comprising: The device comprises a memory, a processor, and an H-type tree optimization program stored on the memory and executable on the processor, and the H-type tree optimization program is configured to implement the steps of the H-type tree optimization method according to any one of claims 1 to 4.
7. A storage medium, characterized by The storage medium stores an H-type tree optimization program, and the H-type tree optimization program, when executed by a processor, implements the steps of the H-type tree optimization method according to any one of claims 1 to 4.