An optimization method and system for a series power gating cell

By optimizing the connection of the power switch unit using the odd-even alternating series connection method and the greedy strategy, the problems of poor adaptability and excessively long connection lines caused by the fixed series connection method of the power switch unit are solved, and more efficient power management and more reliable low-power design are achieved.

CN122287539BActive Publication Date: 2026-07-31广东鸿钧微电子科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
广东鸿钧微电子科技有限公司
Filing Date
2026-05-28
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

In the prior art, the series connection method of power switch units is fixed, which leads to problems such as poor adaptability, excessively long connection lines and the introduction of additional unit overhead, especially in complex layouts where efficient connection is difficult.

Method used

The power switch units are grouped by column using an odd-even interleaved series connection method, and a greedy strategy is used to connect them based on the pre-calculated inter-column distance information, breaking the limitation of traditional head-to-tail connection and achieving optimal connection.

Benefits of technology

It significantly shortens the overall trace length, avoids the need for additional relay buffer units, improves the automation level and physical implementation reliability of low-power chip design, and adapts to irregular layouts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122287539B_ABST
    Figure CN122287539B_ABST
Patent Text Reader

Abstract

This invention relates to the field of integrated circuit design technology and discloses an optimization method and system for series power gating units. The method includes: grouping multiple power switch units by columns; connecting the power switch units in each column using an odd-even interleaved series connection method; and for the relationships between multiple columns, based on pre-calculated inter-column distance information, using a greedy strategy to sequentially determine the connection relationship between each unconnected column and the set of connected columns, wherein each unconnected column can be connected to any column in the set of connected columns. This application can significantly shorten the overall trace length, avoid the insertion of additional relay buffer units, efficiently adapt to irregular layouts such as the periphery and edge regions of macrocells, and greatly improve the automation, connection efficiency, and physical implementation reliability of low-power chip design.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of integrated circuit design technology, and specifically to an optimization method and system for a series power supply gating unit. Background Technology

[0002] In modern integrated circuit (IC) design, especially for complex designs such as system-on-a-chip (SoC), artificial intelligence chips, and 5G communication chips, power consumption has become a key bottleneck restricting product deployment. Power gating technology, as an effective low-power method, eliminates static leakage power consumption by dynamically cutting off the power supply to idle modules. The power switch cell is the core component that performs power gating, and its series connection method directly affects the efficiency and reliability of power management.

[0003] In existing technologies, especially in the workflow of electronic design automation (EDA) tools (such as Cadence Innovus), power switch units are mainly connected in two ways: manual connection and tool-automated connection. Manual connection offers high flexibility but is inefficient and prone to errors. Tool-automated connection improves efficiency but has poor adaptability, typically connecting the power switch units "end-to-end" according to a fixed path (e.g., from left to right, from top to bottom), and cannot handle irregularly distributed power switch units (e.g., around chip edges or macrocells). This fixed connection method easily leads to excessively long connection lines, causing signal transition time violations, thus requiring the insertion of additional inverters / buffers (AO buffers) for relaying. However, inserting additional units introduces new wiring resource overhead and additional power consumption, which contradicts the original intention of low-power design.

[0004] Therefore, there is an urgent need for a more efficient, intelligent, and adaptable method for optimizing the series connection of power switch units to solve the problems of poor adaptability, excessively long connection lines, and additional overhead in existing technologies. Summary of the Invention

[0005] This invention provides an optimization method and system for series power gating units, aiming to solve the problems of poor adaptability, excessively long connection lines, and additional unit overhead caused by the fixed series connection method in the prior art.

[0006] In a first aspect, the present invention provides an optimization method for a series power supply gating unit, the method comprising: Multiple power switch units are grouped by column, and the power switch units in each column are connected by an odd-even interleaved series connection method. For multiple columns, based on the pre-calculated inter-column distance information, a greedy strategy is used to sequentially determine the connection relationship between each unconnected column and the set of connected columns, where each unconnected column can be connected to any column in the set of connected columns.

[0007] This invention provides an optimization method for series power gating units. First, multiple power switch units are grouped by column. Within each column, a regular connection is achieved using an odd-even interleaved series connection method. Between columns, based on a pre-calculated symmetric distance matrix, a greedy strategy based on minimum spanning trees is employed to optimally connect unconnected columns to the nearest unit in any column of the connected columns, breaking the limitation of only connecting the head and tail. This application can significantly shorten the overall trace length, avoid the insertion of additional relay buffer units, and efficiently adapt to irregular layouts such as those around macrocells and edge regions, greatly improving the automation, connection efficiency, and physical implementation reliability of low-power chip design.

[0008] In one alternative implementation, the power switch units in each column are connected in an odd-even alternating series connection, including: The power switch units in each column are numbered in order from bottom to top; All odd-numbered power switch units are connected in series from bottom to top in ascending order of their numbers to form an odd-numbered chain; All even-numbered power switch units are connected in series from top to bottom in descending order of their numbers to form an even-numbered chain; The input end of the odd chain and the output end of the even chain are arranged on the same side to form the external connection port of the column.

[0009] In one alternative implementation, the power switch units in each column are connected in an odd-even alternating series connection, and the method further includes: When the number of power switch units in a column is odd, the output of the odd-numbered switch unit at the top of the column is connected to the input of the next adjacent even-numbered switch unit.

[0010] In one optional implementation, based on pre-calculated inter-column distance information, a greedy strategy is used to sequentially determine the connection relationship between each unconnected column and the set of connected columns, including: Step S21: Pre-calculate the pairwise distances between all columns and construct the distance matrix; Step S22: Specify a starting column, move the starting column into the connected set, and record the shortest distance from each unconnected column to the connected set; Step S23: Select a target column from all unconnected columns, wherein the target column is the column that is closest to the connected set; Step S24: Connect the target column to its nearest column, move the target column into the connected set, and update the shortest distance from the remaining unconnected columns to the connected set; Step S25: Repeat steps S23 to S24 until all columns are connected.

[0011] In one alternative implementation, updating the shortest distance from the remaining unconnected columns to the connected set includes: When a new column is added to the connected set, for each unconnected column, calculate the distance between it and the newly added column; Compare the distance with the shortest distance currently recorded; If the distance is less than the shortest distance currently recorded, then the shortest distance currently recorded is updated to the distance stated in the record. If the distance is not less than the shortest distance of the current record, then keep the shortest distance of the current record unchanged.

[0012] In one alternative implementation, pre-calculating pairwise distances between all columns and constructing the distance matrix includes: Calculate the distance between each column and the other columns, where the distance is the geometric distance between the power switch units that are physically closest in two columns; Store the distances between each pair of columns to construct a distance matrix.

[0013] In one alternative implementation, the greedy strategy is implemented using the minimum spanning tree algorithm.

[0014] Secondly, the present invention provides an optimization device for a series power supply gating unit, the device comprising: The group connection module is used to group multiple power switch units by column, and connect the power switch units in each column using an odd-even interleaved series connection method. The inter-group connection module is used to determine the connection relationship between each unconnected column and the set of connected columns in turn, based on the pre-calculated inter-column distance information, using a greedy strategy. Each unconnected column can be connected to any column in the set of connected columns.

[0015] This invention provides an optimization device for series power gating units. First, multiple power switch units are grouped by columns. Within each column, a regular connection is achieved using an odd-even interleaved series connection method. Between columns, based on a pre-calculated symmetric distance matrix, a greedy strategy based on minimum spanning trees is employed to optimally connect unconnected columns to the nearest unit in any column of the connected columns, breaking the limitation of only connecting the head and tail. This application can significantly shorten the overall trace length, avoid the insertion of additional relay buffer units, and efficiently adapt to irregular layouts such as those around macrocells and edge regions, greatly improving the automation, connection efficiency, and physical implementation reliability of low-power chip design.

[0016] Thirdly, the present invention provides an electronic device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the optimization method of the series power supply gating unit of the first aspect or any corresponding embodiment described above.

[0017] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to execute the optimization method of the series power supply gating unit of the first aspect or any corresponding embodiment described above. Attached Figure Description

[0018] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0019] Figure 1 This is a schematic diagram of the first series connection method of the power switch unit in the related technology; Figure 2 This is a schematic diagram of the second series connection method of the power switch unit in related technologies; Figure 3 This is a flowchart illustrating the optimization method of a series power supply gating unit according to an embodiment of the present invention; Figure 4 This is a single-row schematic diagram of a power switch unit according to an embodiment of the present invention; Figure 5 This is a schematic diagram of a first series connection method for a power switch unit according to an embodiment of the present invention; Figure 6 This is a schematic diagram of a tree structure according to an embodiment of the present invention; Figure 7 This is a schematic diagram of a second series connection method for a power switch unit according to an embodiment of the present invention; Figure 8 This is a schematic diagram of the power switch unit connected in series before and after the improvement; Figure 9 This is a structural block diagram of an optimization device for a series power supply gating unit according to an embodiment of the present invention; Figure 10 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0021] It is understood that before using the technical solutions disclosed in the various embodiments of the present invention, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in the present invention and their authorization should be obtained in accordance with relevant laws and regulations through appropriate means.

[0022] In the existing design flow of the Innovus tool, the series connection of power switch cells mainly adopts a hybrid approach combining automatic connection by the tool and manual adjustment. Its core logic is to connect all power switch cells in series according to a fixed path (such as from left to right or from top to bottom) to achieve power control of the on-chip power-off module. Existing series connection methods are mainly divided into the following two categories: I. Manual Connection: Manual connection was a common implementation method in early low-power designs. The specific process is as follows: Step 1: Based on the chip layout plan, the engineer determines the functional modules (such as memory, peripheral interfaces, etc.) that need to be turned off and the corresponding power switch unit placement locations; Step 2: The sleep input signal terminal (Sleep In) and sleep output signal terminal (Sleep Out) of each power switch unit are manually connected one by one through metal interconnects to form a daisy chain structure, that is, the output terminal of the previous stage switch is connected to the input terminal of the next stage switch, such as... Figure 1 As shown; Step 3: Optimize and adjust the wiring path to avoid the connection length between power switch units exceeding the tool's default maximum allowable distance, and at the same time prevent physical design rule violations (DRV, Design Rule Violation), such as overlapping of adjacent metal traces.

[0023] Manual connection is highly flexible, allowing for adjustments to the connection path based on the shape of the functional modules. However, it is inefficient, requires significant design time when dealing with complex layouts, and is prone to short circuits, open circuits, and other connection errors, resulting in poor stability and consistency.

[0024] 2. Tool-Automated Connection: To address the inefficiency of manual connection, the Innovus tool provides an automatic connection function for power switch units. The specific implementation logic is as follows: Step 1: The tool automatically identifies all power switch units within the chip based on the power domain information defined in the Unified Power Format (UPF) file; Step 2: Following preset path rules such as left to right and top to bottom, the tool automatically completes the series connection of the input and output signals of each power switch unit; Step 3: After generating the preliminary connection results, engineers check for issues such as excessively long wires or violations of physical design rules (DRV), such as insufficient spacing between adjacent switch metal lines, and perform necessary manual corrections.

[0025] While automated connection tools offer higher efficiency and significantly reduce manual workload, they suffer from poor layout adaptability and cannot accommodate scenarios with irregularly distributed power switch units. For example, when power switch units are located at the chip edge or around macrocells, the automatically generated connection paths are prone to issues such as excessively long traces and violations of physical design rules, requiring the insertion of additional AO buffers for relaying. These AO buffers incur additional overhead in routing resources (2nd PG), such as... Figure 2 As shown.

[0026] Therefore, the present invention provides an optimization method for a series power supply gating unit, such as... Figure 3 As shown, it includes the following steps: Step S1: Group the multiple power switch units by column, and connect the power switch units in each column using an odd-even interleaved series connection method.

[0027] Specifically, based on the chip's physical layout, power gating units distributed in the same vertical column are uniformly divided into single-column groups. For all power switching units within each column group, a series connection method with differentiating odd and even serial numbers and normalizing signal input and output ports is used to complete the intra-column series connection. This creates a compact, staggered closed-loop structure within the column, which maximizes the reduction of intra-column trace length and signal transmission loss, while also enabling the centralized layout of signal input and output ports on the same side. This provides a well-organized physical interface foundation for efficient inter-column connections.

[0028] Step S2: For multiple columns, based on the pre-calculated inter-column distance information, a greedy strategy is used to sequentially determine the connection relationship between each unconnected column and the set of connected columns, wherein each unconnected column can be connected to any column in the set of connected columns.

[0029] Specifically, the column-to-column connection method abandons the fixed logic of sequential connection from beginning to end in traditional schemes. Instead, it focuses on minimizing the total overall path distance. This is achieved through a three-layer logic: pre-calculation of the distance matrix for all columns, dynamic maintenance of the shortest distance from unconnected columns to connected columns, and a greedy strategy for optimal column-by-column connection. This ensures a shortest-distance adaptive connection between unconnected and connected columns at any position. Based on the greedy selection property and optimal substructure characteristics of minimum spanning trees, this method mathematically guarantees that locally optimal choices can derive globally optimal column-to-column topology, fundamentally solving the problems of rigid paths and excessively long paths in traditional column-to-column connections.

[0030] This invention provides an optimization method for series power gating units. First, multiple power switch units are grouped by column. Within each column, a regular connection is achieved using an odd-even interleaved series connection method. Between columns, based on a pre-calculated symmetric distance matrix, a greedy strategy based on minimum spanning trees is employed to optimally connect unconnected columns to the nearest unit in any column of the connected columns, breaking the limitation of only connecting the head and tail. This application can significantly shorten the overall trace length, avoid the insertion of additional relay buffer units, and efficiently adapt to irregular layouts such as those around macrocells and edge regions, greatly improving the automation, connection efficiency, and physical implementation reliability of low-power chip design.

[0031] In one alternative implementation, pre-calculating pairwise distances between all columns and constructing the distance matrix includes the following steps: Step S11: Calculate the distance between each column and the other columns. The distance is the geometric distance between the power switch units that are physically closest in two columns.

[0032] Specifically, first, define the range of all columns to be connected. For each column (denoted as column i), perform pairing calculations with all other columns (denoted as column j, j ≠ i) one by one. For the pairing of column i and column j, first traverse all power switch units within column i, recording the physical coordinates of each unit in the chip layout: (x1, y1), (x2, y2), ..., (x...). m ,y m (where m is the total number of power switch units in column i); simultaneously, iterate through all power switch units in column j, recording the physical coordinates of each unit (x1', y1'), (x2', y2')...(x'...). n ,y' n (where n is the total number of power switch units in column j).

[0033] Subsequently, the geometric distance between each cell in column i and each cell in column j is calculated using a preset Euclidean distance function. After traversal, the minimum value is selected from all calculated inter-cell distances. This minimum value is the final distance between column i and column j, which accurately reflects the shortest achievable trace distance between the two columns, aligning with the actual engineering requirements for inter-column connections in chip layout.

[0034] Step S12: Store the distances between each pair of columns to construct a distance matrix.

[0035] Specifically, based on the total number of columns n to be connected, an n×n zero matrix is ​​initialized as the basic framework of the distance matrix. The rows and columns of the matrix correspond to the columns to be connected, and the matrix elements are denoted as D[i][j], where D[i][j] represents the distance between the i-th column and the j-th column.

[0036] The distance between each pair of columns (i,j) calculated in step S11 is assigned to the corresponding position in the distance matrix, i.e., D[i][j] = the shortest unit distance between column i and column j. Since the distance between column i and column j is equal to the distance between column j and column i (i.e., dist(column i, column j) = dist(column j, column i)), to reduce redundant calculations and storage overhead, the symmetry of the matrix can be utilized. After calculating D[i][j], it can be directly assigned to D[j][i] without having to recalculate the distance between column j and column i.

[0037] For each element D[i][i] on the diagonal of the matrix (i.e., the distance between a column and itself), a value of 0 is uniformly assigned. This is because power switch units within the same column belong to the same connected unit, and the distance between themselves is meaningless. Assigning a value of 0 satisfies the identity requirement of the distance matrix and facilitates logical judgment during subsequent distance queries. After assigning distance values ​​to all column pairs, the distance matrix is ​​constructed.

[0038] In one alternative implementation, the power switch units in each column are connected in an odd-even alternating series connection, including the following steps: Step S13: Number the power switch units in each column in a bottom-up order.

[0039] Specifically, taking all power switch units in the same vertical column as the object, starting from the bottom of the column, assign consecutive integer numbers to each power switch unit in turn, starting from 1 and increasing sequentially until the unit at the top of the column ends, so that all power switch units in the column have a unique number.

[0040] Step S14: Connect all odd-numbered power switch units in series from bottom to top in ascending order of their numbers to form an odd-numbered chain.

[0041] Specifically, extract the odd-numbered power switch units numbered 1, 3, 5... from the column, and connect the output of the previous odd-numbered unit to the input of the next odd-numbered unit in ascending order of number and from bottom to top, forming a unidirectional chain of odd numbers. The starting point of the odd chain is the input of the odd-numbered unit with the smallest number, and the ending point is the output of the odd-numbered unit with the largest number.

[0042] Step S15: Connect all even-numbered power switch units in descending order of their numbers to form an even chain.

[0043] Specifically, extract the even-numbered power switch units in the column, numbered 2, 4, 6... and connect them sequentially from the top even-numbered unit to the input of the next even-numbered unit, starting from the top even-numbered unit in the column, in a direction from largest to smallest and from top to bottom. This forms an even-numbered chain that is opposite to the odd-numbered chain. The even-numbered chain starts at the input of the even-numbered unit with the largest number and ends at the output of the even-numbered unit with the smallest number.

[0044] Step S16: Arrange the input end of the odd chain and the output end of the even chain on the same side to form the external connection port of the column.

[0045] Specifically, the output end of the odd chain is connected to the input end of the even chain to complete the cascading of the odd and even chains, forming a complete serial path within the column. At the same time, the input end of the odd chain is used as the total input port of the column, and the output end of the even chain is used as the total output port of the column. The total input port and the total output port are arranged on the same side of the column to form a standardized external connection port for the column, which facilitates subsequent inter-column connections.

[0046] In one alternative implementation, the power switch units in each column are connected in an odd-even alternating series connection method, and the method further includes the following steps: Step S17: When the number of power switch units in a column is odd, connect the output of the odd-numbered switch unit at the top of the column to the input of the next adjacent even-numbered switch unit.

[0047] Specifically, when the total number of power switch units in a column is odd, the top position of the column is occupied by an odd-numbered switch unit. If there is no even-numbered switch unit at the top of the same column, they can be directly cascaded. In this case, the output terminal of the top odd-numbered switch unit is directly connected to the input terminal of the adjacent even-numbered switch unit below it, so that the end signal of the odd chain can be smoothly connected to the even chain, keeping the series path within the column completely closed. At the same time, the rule of arranging the total input port and the total output port on the same side is not changed, ensuring that the position of the external connection port is uniform.

[0048] like Figure 4As shown, taking a single column containing 6 power switch units as an example, the above-mentioned odd-even interleaved series connection method is explained in detail. First, the odd chain connection is completed, with the connection path being 1→3→5: the input terminal Sleep In_1 of switch 1 is used to connect to the external control signal; the output terminal Sleep Out_1 of switch 1 is connected to the input terminal Sleep In_3 of switch 3; the output terminal Sleep Out_3 of switch 3 is connected to the input terminal Sleep In_5 of switch 5; thus forming a complete odd chain, with the end of the odd chain being the output terminal Sleep Out_5 of switch 5.

[0049] Then, the even-numbered chain is connected, with the connection path being 6→4→2: Switch 6 is used as the starting node of the even-numbered chain to satisfy the requirement of connecting the even-numbered chain from top to bottom; the output terminal Sleep Out_5 of switch 5 at the end of the odd-numbered chain is connected to the input terminal Sleep In_6 of switch 6; the output terminal Sleep Out_6 of switch 6 is connected to the input terminal Sleep In_4 of switch 4; the output terminal Sleep Out_4 of switch 4 is connected to the input terminal Sleep In_2 of switch 2; thus forming a complete even-numbered chain.

[0050] When the total number of power switch units in a column is odd, and the top unit of the column is odd-numbered, the output of this odd-numbered switch must be connected to the input of the even-numbered chain start node to ensure a complete series path within the column. Finally, a unified input / output port setting is implemented, arranging the total input and output ports of the entire column on the same side. In this example, the total input is the input terminal of switch number 1 (Sleep In_1), and the total output is the output terminal of switch number 2 (Sleep Out_2), achieving a neat layout of input and output ports on the same side.

[0051] In one optional implementation, based on pre-calculated inter-column distance information, a greedy strategy is used to sequentially determine the connection relationship between each unconnected column and the set of connected columns, including the following steps: Step S21: Pre-calculate the pairwise distances between all columns and construct the distance matrix.

[0052] Specifically, take the n to-be-connected columns that have completed vertical column division in the chip layout as the processing objects. Each column forms a feature vector or sequence with quantifiable information such as the number of voltage controllable units it contains, the arrangement structure, and the physical coordinates. Calculate the shortest connection distance between any two columns using a preset distance function, and the preset distance function includes the Euclidean distance function based on the chip physical coordinates. Among them, the Euclidean distance function based on the chip physical coordinates takes the geometric center coordinates of two columns as the input and calculates the straight-line distance between the two columns. Calculate the distances of all column pairs at once to generate a symmetric distance matrix; the diagonal elements in the matrix are the distances from the corresponding columns to themselves, with a value of 0, and the non-diagonal elements represent the shortest connection distances between two columns, which are used for subsequent fast look-up table queries.

[0053] The implementation method is as follows: Calculate the distance D [i][j] between all column pairs (i, j) at once. To reduce the computational amount, only perform distance calculations on column pairs that satisfy i < j, and use symmetry to synchronously assign the results to D [j][i] so that D [i][j] = D[j][i], and finally form a symmetric distance matrix. The time complexity of this calculation method is O(n²), and the computational amount is proportional to the square of the number of columns.

[0054] #Code example dist_matrix = [[0]*n for _ in range(n)] # Initialize an n×n zero matrix for i in range(n): for j in range(i+1, n): # Only traverse the upper triangular region dist_matrix[i][j]= dist_matrix[j][i]= dist_func(column[i], column[j]) Construct a symmetric distance matrix through the above method, where: dist_matrix[i][j] is used to represent the shortest connection distance between the i-th column and the j-th column; the diagonal element dist_matrix[i][i] of the matrix is always 0, indicating the distance from a certain column to itself; the matrix satisfies strict symmetry, that is, dist_matrix[i][j] = dist_matrix[j][i]. This construction method only needs to calculate the distances in the upper triangular part, the computational amount is n (n - 1) / 2, and the time complexity is O(n²), which greatly improves the generation efficiency of the distance matrix and reduces redundant calculations.

[0055] Step S22, specify the starting column, move the starting column into the connected set, and record the shortest distance from each unconnected column to the connected set.

[0056] Specifically, based on the chip layout or user settings, one column is designated as the starting column S from all columns to be connected. The starting column S can be specified by the user or automatically selected based on the layout. This starting column S is added to the connected set C, i.e., C = {S}, and all columns other than S are added to the unconnected set U, i.e., U = {all columns}\{S}. For each column in the unconnected set, the distance from it to each column in the connected set is calculated, and the minimum value is taken as the current shortest distance from the unconnected column to the connected set, thus completing the initial shortest distance recording.

[0057] Step S23: Select the target column from all unconnected columns. The target column is the column that is closest to the connected set.

[0058] Specifically, select the target column from all unconnected columns. The target column is the column with the shortest distance to the connected set. Iterate through all columns in the current unconnected set, compare the current shortest distance for each column, and select the column with the smallest shortest distance value as the target column. If multiple unconnected columns have the same shortest distance to the connected set, choose any one of them as the target column.

[0059] For each unconnected column u in the unconnected set, calculate the shortest distance from u to all columns in the connected set C according to the formula d[u] = min{ D[u][c] | u∈U,c∈C}, where d[u] represents the minimum distance from the unconnected column u to the connected set C, and D[u][c] is the pre-calculated distance between column u and column c; record and maintain all d[u] for subsequent greedy selection.

[0060] Step S24: Connect the target column to its nearest column, move the target column into the connected set, and update the shortest distance from the remaining unconnected columns to the connected set.

[0061] Specifically, the target column is connected to its nearest column, and the target column is moved into the connected set. Simultaneously, the shortest distance from the remaining unconnected columns to the connected set is updated. The target column is connected to its nearest corresponding column in the connected set, with the connection point being the cell node with the shortest distance between the two columns, not just the beginning or end of the column. After the connection is complete, the target column is moved from the unconnected set to the connected set. For each remaining column in the unconnected set, its shortest distance to the updated connected set is recalculated, and the distance value is updated.

[0062] A greedy strategy is employed to select the nearest column and perform arbitrary position joins. Among all unconnected columns u, the column with the smallest corresponding shortest distance d[u] is selected as the target column. If multiple candidate columns with equal distances exist, any one of them is chosen as the target column. The target column u is then joined with the nearest column c in the connected set C. The join position is selected from any power switch unit with the shortest distance between the two columns, regardless of the column's head or tail unit. The target column u is moved from the unconnected set U to the connected set C, i.e., C = C∪{u} and U = U\{u} is updated. Based on the updated connected set C, the shortest distance d[u] from the remaining unconnected columns to the connected set C is recalculated and updated.

[0063] Step S25: Repeat steps S23-S24 until all columns are connected.

[0064] Specifically, steps S23 to S24 are repeated until all columns are connected. The process of selecting the target column, connecting columns, updating the set, and updating the shortest distance is executed cyclically until the unconnected set U is empty, and all columns are included in the connected set, completing the optimal series topology construction of all multi-column power switch units. The series connection method of the power switch units in this embodiment is described in [reference needed]. Figure 5 .

[0065] In one alternative implementation, updating the shortest distance from the remaining unconnected columns to the connected set includes the following steps: Step S241: When a new column is added to the connected set, for each unconnected column, calculate the distance between it and the newly added column.

[0066] Specifically, when a new column is added to the connected set, each unconnected column in the unconnected set is traversed, and the physical distance between the current unconnected column and the newly added column in the connected set is calculated. This distance is obtained directly by looking up a table through a pre-built distance matrix, without the need for repeated calculation.

[0067] Step S242: Compare the distance with the currently recorded shortest distance.

[0068] Specifically, for each unconnected column, the distance between it and the newly added column is compared item by item with the shortest distance of the unconnected column to the previously recorded connected set.

[0069] Step S243: If the distance is less than the shortest distance currently recorded, then update the shortest distance currently recorded to the distance.

[0070] Specifically, if the distance between the currently unconnected column and the newly added column is less than the shortest distance currently recorded for the unconnected column, it means that a better connection path can be obtained through the newly added column. Therefore, the shortest distance currently recorded for the unconnected column is updated to the currently calculated distance between the unconnected column and the newly added column.

[0071] Step S244: If the distance is not less than the shortest distance of the current record, then keep the shortest distance of the current record unchanged.

[0072] Specifically, if the distance between the currently unconnected column and the newly added column is greater than or equal to the shortest distance currently recorded in the unconnected column, it means that the newly added column has not brought a better connection path. In this case, the shortest distance currently recorded in the unconnected column remains unchanged, and no update operation is performed.

[0073] Taking a power switch unit consisting of 5 columns (A, B, C, D, and E) as an example, based on the pre-calculated inter-column distance matrix, with column A as the starting column S, a greedy strategy is used to complete the optimal inter-column connection. The inter-column distance matrix is ​​shown in Table 1.

[0074] Table 1

[0075] The specific implementation process is as follows: I. Initial Conditions Columns to be joined: A, B, C, D, E (5 columns in total) Starting column S: A Initial state of the connected set: C = {A} Initial state of the unconnected set: U = {B, C, D, E} Initial shortest distance: The shortest distance from each unconnected column to the connected set C, directly taken as its distance from the starting column A. d[B] = D[B][A] = 2 d[C] = D[C][A] = 2 d[D] = D[D][A] = 5 d[E] = D[E][A] = 4 After initialization, the cells within column A are connected using the alternating odd and even serialization method.

[0076] II. First Iteration Step 1: In the unconnected set {B, C, D, E}, select the column with the smallest distance from the connected set C={A}.

[0077] The current shortest distance is d[B]=2 and d[C]=2, which are equal, so either one can be chosen.

[0078] Step 2: Select column B as the target column. First, perform odd-even interleaved series connection on the power switch units inside column B. After completing the intra-column connection, connect column B and column A at any position with the shortest distance.

[0079] Step 3: Update the collection: The connected set C = {A, B} Unconnected set U = {C, D, E} Step 4: Update the shortest distance of the remaining unconnected columns: d[C] = min (D[C][A], D[C][B]) = min (2, 3) = 2, which remains unchanged. d[D] = min (D[D][A], D[D][B]) = min (5, 6) = 5, which remains unchanged. d[E] = min (D[E][A], D[E][B]) = min (4, 5) = 4, which remains unchanged. III. Second Iteration Step 1: In the unconnected set {C, D, E}, select the column with the smallest distance to the connected set C={A,B}. The current minimum distance is d[C]=2.

[0080] Step 2: Select column C as the target column, first complete the alternating concatenation of odd and even numbers within column C, and then connect column C and column A with the shortest distance at any position.

[0081] Step 3: Update the collection: The connected set C = {A, B, C} Unconnected set U = {D, E} Step 4: Update the shortest distance of the remaining unconnected columns: d[D] = min (original distance 5, D[D][C]=4) = 4, updated to 4 d[E] = min (original distance 4, D[E][C]=3) = 3, updated to 3.

[0082] IV. Third Iteration Step 1: In the unconnected set {D, E}, select the column with the smallest distance from the connected set C={A,B,C}.

[0083] The current minimum distance is d[E]=3.

[0084] Step 2: Select column E as the target column, first complete the parity-even interleaving of column E, and then connect column E and column C at any position using the shortest distance.

[0085] Step 3: Update the collection: The connected set C = {A, B, C, E} Unconnected set U = {D} Step 4: Update the shortest distance of the remaining unconnected column D: d[D] = min (original distance 4, D[D][E]=2) = 2, update to 2.

[0086] V. Final Iteration Step 1: The unconnected set has only column D left, and its shortest distance d[D]=2, which is the only target column.

[0087] Step 2: First, complete the alternating concatenation of odd and even numbers within column D, and then connect column D and column E with the shortest distance at any position.

[0088] Step 3: Update the collection: The connected set C = {A, B, C, E, D} Unconnected sets All columns are now connected.

[0089] VI. Connection Results The greedy strategy employs the minimum spanning tree algorithm, ultimately forming an acyclic tree topology rather than a simple linear daisy chain. The connecting edges are AB, AC, CE, and ED, with corresponding distances of 2, 2, 3, and 2 respectively. The total connection distance is 2 + 2 + 3 + 2 = 9. This achieves the global shortest path while fully covering all columns. The specific structure is as follows... Figure 6 As shown.

[0090] The final column connection topology is as follows: A–B, A–C, C–E, E–D The total connection distance is 2 + 2 + 3 + 2 = 9, achieving the global shortest path connection.

[0091] In this embodiment of the invention, the distances of all column pairs are pre-calculated and stored (O(n²) complexity). Subsequently, only the distance data needs to be obtained by looking up the table, without repeated calculation. Compared with the traditional method, which requires recalculating the distance for each connection, redundant calculations are greatly reduced. Subsequently, only the shortest distance of the unconnected columns needs to be dynamically updated (total update amount is O(n²)), avoiding the repeated calculation of O(n³) in the traditional method.

[0092] Existing O(n³) methods employ brute-force enumeration of all column permutations (e.g., 120 permutations for 5 columns), requiring recalculation of the distance for each permutation, resulting in a factorial increase in computational complexity with the number of columns. This embodiment, however, reduces the complexity to O(n² log n) by pre-compiling the distance matrix and using a greedy strategy, as shown in Table 2.

[0093] Table 2

[0094] When the number of columns n=500, the traditional brute-force enumeration method (O (n³)) takes more than 60,000 ms, while this embodiment (O (n²log n)) only takes 2,000 ms, with a speedup ratio of >30x, and the speedup effect is significant, as shown in Table 3.

[0095] Table 3

[0096] This invention breaks the limitation of "only connecting the beginning and end of a column," allowing connection to any unit closest to the other end of two columns. This avoids excessively long traces caused by fixed connections between the beginning and end, further shortening the total connection distance. Figure 7 As shown, d[B][A] records the shortest distance from cell 7 to a cell in column A on the right, rather than just the beginning / end. This allows cell 7 to be inserted into a cell in the middle of column A (e.g., C={1,2,3,4,5,6}, where cell 7 is closest to cell 3, so cell 7 is connected to cell 3, forming 1-3-7-5-6-4-2), reducing the total connection distance (originally 1-3-5-6-4-2-7, because by default only beginning and end connections are allowed).

[0097] In this embodiment of the invention, a greedy strategy is used to select the shortest distance connection, such as... Figure 8 As shown, for example, for columns A, B, and C, D[A][C]=2, D[B][C]=2, D[A][B]=4. The distance between A and C is less than the distance between A and B. A and C can be directly connected, and then B and C can be connected. The total distance is only 4. Compared with the fixed connection method of A→B→C (total distance 4+3=7), the connection length is greatly shortened, achieving global optimization.

[0098] This embodiment also provides an optimization device for a series power supply gating unit, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0099] This embodiment provides an optimized device for a series power supply gating unit, such as... Figure 9 As shown, it includes: The group connection module 91 is used to group multiple power switch units by column, and to connect the power switch units in each column using an odd-even interleaved series connection method.

[0100] The inter-group connection module 92 is used to determine the connection relationship between each unconnected column and the set of connected columns in turn, based on the pre-calculated inter-column distance information, using a greedy strategy. Each unconnected column can be connected to any column in the set of connected columns.

[0101] The optimization device for the series power supply gating unit provided in this embodiment of the invention can execute the optimization method for the series power supply gating unit provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects for executing the method. Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.

[0102] This invention provides an optimization device for series power gating units. First, multiple power switch units are grouped by columns. Within each column, a regular connection is achieved using an odd-even interleaved series connection method. Between columns, based on a pre-calculated symmetric distance matrix, a greedy strategy based on minimum spanning trees is employed to optimally connect unconnected columns to the nearest unit in any column of the connected columns, breaking the limitation of only connecting the head and tail. This application can significantly shorten the overall trace length, avoid the insertion of additional relay buffer units, and efficiently adapt to irregular layouts such as those around macrocells and edge regions, greatly improving the automation, connection efficiency, and physical implementation reliability of low-power chip design.

[0103] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention.

[0104] The following is a detailed reference. Figure 10 This diagram illustrates a structural schematic suitable for implementing an electronic device according to embodiments of the present invention. The electronic device may include a processor (e.g., a central processing unit, graphics processor, etc.) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from memory 1008 into random access memory (RAM) 1003. The RAM 1003 also stores various programs and data required for the operation of the electronic device. The processor 1001, ROM 1002, and RAM 1003 are interconnected via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.

[0105] Typically, the following devices can be connected to the I / O interface 1005: input devices 1006 including, for example, a touchscreen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 1007 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; memory devices 1008 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. Communication device 1009 allows electronic devices to exchange data via wireless or wired communication with other devices. Although Figure 10 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown, and more or fewer devices may be implemented or have instead.

[0106] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 1009, or installed from a memory 1008, or installed from a ROM 1002. When the computer program is executed by the processor 1001, it performs the functions defined in the optimized method of the series power supply gating unit according to embodiments of the present invention.

[0107] Figure 10 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of the present invention.

[0108] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. An optimization method for a series power supply gating unit, characterized in that, The method includes: Multiple power switch units are grouped by column, and the power switch units in each column are connected by an odd-even interleaved series connection method. For multiple columns, based on the pre-calculated inter-column distance information, a greedy strategy is used to sequentially determine the connection relationship between each unconnected column and the set of connected columns, wherein each unconnected column can be connected to any column in the set of connected columns; The power switch units in each column are connected in series using an alternating odd-even series connection method, including: The power switch units in each column are numbered in order from bottom to top; All odd-numbered power switch units are connected in series from bottom to top in ascending order of their numbers to form an odd-numbered chain; All even-numbered power switch units are connected in series from top to bottom in descending order of their numbers to form an even-numbered chain; The input end of the odd chain and the output end of the even chain are arranged on the same side to form the external connection port of the column; Based on pre-calculated inter-column distance information, a greedy strategy is used to sequentially determine the connection relationship between each unconnected column and the set of connected columns, including: Step S21: Pre-calculate the pairwise distances between all columns and construct the distance matrix; Step S22: Specify a starting column, move the starting column into the connected set, and record the shortest distance from each unconnected column to the connected set; Step S23: Select a target column from all unconnected columns, wherein the target column is the column that is closest to the connected set; Step S24: Connect the target column to its nearest column, move the target column into the connected set, and update the shortest distance from the remaining unconnected columns to the connected set; Step S25: Repeat steps S23 to S24 until all columns are connected; Update the shortest distances from the remaining unconnected columns to the connected set, including: When a new column is added to the connected set, for each unconnected column, calculate the distance between it and the newly added column; Compare the distance with the shortest distance currently recorded; If the distance is less than the shortest distance currently recorded, then the shortest distance currently recorded is updated to the distance stated in the record. If the distance is not less than the shortest distance of the current record, then keep the shortest distance of the current record unchanged.

2. The method of optimizing a series power-gating cell of claim 1, wherein, The power switch units in each column are connected in series using an odd-even alternating method, and the system also includes: When the number of power switch units in a column is odd, the output of the odd-numbered switch unit at the top of the column is connected to the input of the next adjacent even-numbered switch unit.

3. The optimization method for the series power supply gating unit according to claim 1, characterized in that, Pre-calculate pairwise distances between all columns and construct the distance matrix, including: Calculate the distance between each column and the other columns, where the distance is the geometric distance between the power switch units that are physically closest in two columns; Store the distances between each pair of columns to construct a distance matrix.

4. The optimization method for the series power supply gating unit according to claim 1, characterized in that, The greedy strategy is implemented using the minimum spanning tree algorithm.

5. An optimization device for a series power supply gating unit, characterized in that, An optimization method for the series power supply gating unit according to any one of claims 1-4, the apparatus comprising: The group connection module is used to group multiple power switch units by column, and connect the power switch units in each column using an odd-even interleaved series connection method. The inter-group connection module is used to determine the connection relationship between each unconnected column and the set of connected columns in turn, based on the pre-calculated inter-column distance information, using a greedy strategy. Each unconnected column can be connected to any column in the set of connected columns.

6. An electronic device, characterized in that, include: A memory and a processor are communicatively connected, the memory stores computer instructions, and the processor executes the computer instructions to perform the optimization method of the series power supply gating unit according to any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a computer to execute the optimization method of the series power supply gating unit according to any one of claims 1 to 4.