Switch setting method and device of power gating circuit, electronic equipment and medium

By constructing a graph theory model and using the ant colony algorithm to optimize the switching sequence of the power supply gating circuit, the limitations of multi-objective optimization in traditional methods are solved, and the power supply gating circuit is designed to be efficient, stable and low-power.

CN121835577APending Publication Date: 2026-04-10GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GREE ELECTRIC APPLIANCE INC OF ZHUHAI
Filing Date
2025-11-21
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Traditional power supply gate switch series connection method has limitations in optimizing timing, power consumption and voltage stability, and it is difficult to achieve multi-objective collaborative optimization in complex circuit design, resulting in a difficulty in balancing chip performance and energy efficiency.

Method used

By constructing a graph theory model and obtaining the timing characteristics of the switches, the ant colony algorithm is used to determine the series sequence of the switches, avoiding local optima and optimizing the timing delay and voltage fluctuation of the power supply gating circuit.

Benefits of technology

It significantly reduces power gating timing delay and voltage fluctuation, optimizes static power consumption, provides an intelligent optimization solution for complex power gating circuits, and improves design efficiency and power network stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121835577A_ABST
    Figure CN121835577A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a switch setting method and device for a power gate control circuit, electronic equipment and a medium, and the method comprises the steps: constructing graph theory node models corresponding to a plurality of switches in a one-to-one manner, and obtaining the time sequence feature information of each switch; obtaining time sequence characteristic information of a plurality of switches; based on an ant colony algorithm, determining a target connection path for connecting each node by taking the time sequence characteristic information of the plurality of switches as path cost; and determining a series connection sequence of the plurality of switches according to the target connection path. According to the embodiment of the invention, a graph theory path is efficiently solved through a bionic optimization algorithm, falling into a local optimal solution is avoided, power gating time sequence delay and voltage fluctuation are remarkably reduced, meanwhile, static power consumption is optimized, and an intelligent optimization scheme is provided for a complex power gating circuit.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power gating technology, and in particular to a switching setting method, device, electronic device, and readable storage medium for a power gating circuit. Background Technology

[0002] With the continuous development of low-power chip design, the requirements for optimizing the series sequence of switches in power gating circuits are becoming increasingly stringent. However, traditional power gating switch series sequencing methods mainly rely on empirical rules or simple heuristic algorithms for static sorting, which suffers from problems such as a single optimization objective and susceptibility to getting trapped in local optima. Especially when dealing with large-scale circuit designs or scenarios that require simultaneous optimization of multiple objectives such as timing, power consumption, and voltage stability, traditional methods adopt a fixed optimization strategy for the switch series sequence, which easily leads to getting trapped in local optima. At the same time, it is difficult to simultaneously achieve timing performance, power efficiency, and voltage integrity, failing to meet the requirements of advanced chip designs for intelligent optimization of power networks. Summary of the Invention

[0003] In view of the above problems, embodiments of the present invention are proposed to provide a switching setting method, apparatus, electronic device, and readable storage medium for a power gating circuit that overcomes or at least partially solves the above problems.

[0004] In a first aspect, embodiments of the present invention provide a method for setting the switch of a power gating circuit, the method comprising: For multiple switches in a power gating circuit, a graph theory model is constructed, wherein the graph theory model includes nodes that correspond one-to-one with the multiple switches. Obtain the timing characteristic information of the multiple switches; Based on the ant colony algorithm, the target connection path connecting each node is determined using the timing feature information of the multiple switches as the path cost. The series sequence of the multiple switches is determined based on the target connection path.

[0005] Optionally, the step of determining the target connection path connecting each node based on the ant colony algorithm, using the time-series characteristic information of the multiple switches as the path cost, includes: Obtain the ant colony parameters of the ant colony algorithm; The timing characteristics of the multiple switches are used as the path cost and the ant colony parameters to perform multiple rounds of iteration, and the preferred connection path connecting each node is determined in each round of iteration. The preferred connection path obtained under the condition of iteration termination is determined as the target connection path connecting the nodes.

[0006] Optionally, the timing characteristic information includes: the series delay between the plurality of switches; The process of performing multiple iterations using the timing characteristics of the multiple switches as path costs and the ant colony parameters, and determining the preferred connection path connecting each node in each iteration, includes: In one iteration, the ant colony parameters and initial node for each iteration are determined; based on the ant colony parameters and the temporal feature information for each iteration, the nodes are connected based on the initial node to obtain candidate connection paths; Based on the candidate connection paths obtained after multiple iterations, the preferred connection path is determined.

[0007] Optionally, the step of connecting the nodes based on the initial node to obtain candidate connection paths according to the ant colony parameters of each iteration and the temporal feature information includes: In each iteration, select the current node; Based on the ant colony parameters and temporal feature information of each iteration, the connection probability between the current node and each unconnected node is determined. Based on the connection probability between the current node and each unconnected node, determine the next node to be connected to the current node, and use the next node as the new current node, until all nodes are connected, thus obtaining the candidate connection paths for each node.

[0008] Optionally, determining the connection probability between the current node and each unconnected node based on the ant colony parameters and the temporal feature information in each iteration includes: Based on the ant colony parameters of this iteration process and the series delay between the switch corresponding to the current node and the switches corresponding to each unconnected node, the connection probability between the current node and each unconnected node is determined.

[0009] Optionally, determining the ant colony parameters for each iteration in this round of iteration includes: Obtain the ant colony parameters corresponding to the candidate connection paths obtained in the previous iteration during the current iteration; Based on the ant colony parameters corresponding to the candidate connection paths obtained in the previous iteration, the ant colony parameters for the current iteration are determined.

[0010] Optionally, the ant colony parameters include pheromone concentration, initial pheromone, and pheromone evaporation rate; determining the ant colony parameters for the current iteration based on the ant colony parameters corresponding to the candidate connection paths obtained in the previous iteration includes: Based on the pheromone concentration, initial pheromone, and pheromone evaporation rate corresponding to the preferred connection path obtained in the previous iteration, the pheromone concentration for this iteration is determined according to the following formula; τ ij2 =(1-ρ)*τ ij1+ρ*τ0 Where, τ ij2 To generate the pheromone concentration for the first iteration in this iteration, τ ij1 ρ is the pheromone concentration corresponding to the preferred connection path obtained in the previous iteration process, ρ is the pheromone evaporation rate, and τ0 is the initial pheromone.

[0011] Optionally, the timing feature information further includes: the on-time of the plurality of switches; The step of determining the preferred connection path based on the candidate connection paths obtained after multiple iterations includes: The path cost of the candidate connection paths is obtained based on the series delay between the switches corresponding to adjacent nodes in the candidate connection paths and the opening time of the multiple switches. The candidate connection path with the lowest path cost is determined as the preferred connection path.

[0012] Optionally, determining the ant colony parameters for each iteration in a round of iteration includes: Obtain the ant colony parameters and path cost corresponding to the preferred connection path obtained in the previous iteration process; Based on the ant colony parameters and path cost corresponding to the preferred connection path obtained in the previous iteration, the ant colony parameters for the first iteration in this iteration are generated.

[0013] Optionally, the ant colony parameters include pheromone concentration, pheromone parameters, and pheromone evaporation rate. The generation of the ant colony parameters for the first iteration in this round of iteration, based on the ant colony parameters and path cost corresponding to the preferred connection path obtained in the previous iteration, includes: Based on the pheromone concentration, pheromone parameters, pheromone evaporation rate and path cost corresponding to the preferred connection path obtained in the previous iteration, the pheromone concentration for the first iteration in this iteration is determined according to the following formula; τ ijB =(1-ρ)*τ ijA +ρ*Q / F opt Where, τ ijB To generate the pheromone concentration for this iteration process, τ ijA The pheromone concentration corresponding to the preferred connection path obtained in the previous iteration process, ρ is the pheromone evaporation rate, Q is the pheromone constant, and F is the pheromone concentration. opt This is the path cost corresponding to the preferred connection path obtained in the previous iteration.

[0014] Secondly, embodiments of the present invention provide a device for setting the switch of a power gating circuit, the device comprising: The model building module is used to build a graph theory model for multiple switches in a power gating circuit. The graph theory model includes nodes that correspond one-to-one with the multiple switches. A timing acquisition module is used to acquire timing characteristic information of the multiple switches; The path determination module is used to determine the target connection path connecting each node based on the ant colony algorithm and using the timing feature information of the multiple switches as the path cost. The sequence determination module is used to determine the series sequence of the plurality of switches according to the target connection path.

[0015] Optionally, the path determination module includes: The parameter acquisition submodule is used to acquire the ant colony parameters of the ant colony algorithm. The preferred path determination submodule is used to perform multiple rounds of iteration using the timing feature information of the multiple switches as the path cost and the ant colony parameters, and to determine the preferred connection path connecting each node in each round of iteration. The target path determination submodule is used to determine the preferred connection path obtained under the condition of iteration termination as the target connection path connecting the nodes.

[0016] Optionally, the timing characteristic information includes: the series delay between the plurality of switches; The preferred path determination submodule includes: The candidate path determination unit is used to determine the ant colony parameters and initial nodes for each iteration in a round of iteration; and to connect the nodes based on the initial nodes according to the ant colony parameters and the temporal feature information for each iteration to obtain candidate connection paths. The preferred path determination unit is used to determine the preferred connection path based on the candidate connection paths obtained after multiple iterations.

[0017] Optionally, the candidate path determination unit includes: The node selection sub-unit is used to select the current node in each iteration. The probability determination subunit is used to determine the connection probability between the current node and each unconnected node based on the ant colony parameters and the temporal feature information in each iteration process. The candidate path determination subunit is used to determine the next node connected to the current node based on the connection probability between the current node and each unconnected node, and to use the next node as the new current node, until all nodes are connected, thereby obtaining the candidate connection paths for each node.

[0018] Optionally, the probability determination subunit is specifically used to determine the connection probability between the current node and each unconnected node based on the ant colony parameters of this iteration process and the series delay between the switch corresponding to the current node and the switches corresponding to each unconnected node.

[0019] Optionally, the candidate path determination unit includes: The first parameter acquisition sub-unit is used to obtain the ant colony parameters corresponding to the candidate connection paths obtained in the previous iteration during the current iteration. The first parameter determination subunit is used to determine the ant colony parameters for the current iteration based on the ant colony parameters corresponding to the candidate connection paths obtained in the previous iteration.

[0020] Optionally, the ant colony parameters include pheromone concentration, initial pheromone, and pheromone evaporation rate; the parameter determination subunit is specifically used to determine the pheromone concentration for the current iteration process according to the pheromone concentration, initial pheromone, and pheromone evaporation rate corresponding to the preferred connection path obtained in the previous iteration process, according to the following formula; τ ij2 =(1-ρ)*τ ij1 +ρ*τ0 Where, τ ij2 To generate the pheromone concentration for the first iteration in this iteration, τ ij1 ρ is the pheromone concentration corresponding to the preferred connection path obtained in the previous iteration process, ρ is the pheromone evaporation rate, and τ0 is the initial pheromone.

[0021] Optionally, the timing feature information further includes: the on-time of the plurality of switches; The preferred path determination unit includes: The path cost determination subunit is used to obtain the path cost of multiple candidate connection paths based on the series delay between the corresponding switches of adjacent nodes in the candidate connection path and the opening time of the multiple switches. The preferred path determination subunit is used to determine the candidate connection path with the lowest path cost as the preferred connection path.

[0022] Optionally, the candidate path determination unit includes: The second parameter acquisition subunit is used to obtain the ant colony parameters and path cost corresponding to the preferred connection path obtained in the previous iteration process; The second parameter determination subunit is used to generate the ant colony parameters for the first iteration in this iteration process based on the ant colony parameters and path costs corresponding to the preferred connection paths obtained in the previous iteration process.

[0023] Optionally, the ant colony parameters include pheromone concentration, pheromone parameters, and pheromone evaporation rate. The second parameter determination subunit is specifically used to determine the pheromone concentration of the first iteration in this iteration process according to the pheromone concentration, pheromone parameters, pheromone evaporation rate, and path cost corresponding to the preferred connection path obtained in the previous iteration process, according to the following formula. τ ijB =(1-ρ)*τ ijA +ρ*Q / F opt Where, τ ijB To generate the pheromone concentration for this iteration process, τ ijA The pheromone concentration corresponding to the preferred connection path obtained in the previous iteration process, ρ is the pheromone evaporation rate, Q is the pheromone constant, and F is the pheromone concentration. opt This is the path cost corresponding to the preferred connection path obtained in the previous iteration.

[0024] Thirdly, embodiments of the present invention provide an electronic device including a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the method described in the first aspect.

[0025] Fourthly, embodiments of the present invention provide a readable storage medium storing a program or instructions that, when executed by a processor, implement the steps of the power gating circuit switching setting method as described in the first aspect.

[0026] The embodiments of the present invention have the following advantages: This invention provides a method, apparatus, electronic device, and medium for setting switches in a power gating circuit. The method constructs a graph theory node model corresponding one-to-one with multiple switches and obtains the timing characteristics of each switch. Subsequently, it obtains the timing characteristics of multiple switches; based on an ant colony algorithm, it determines the target connection path connecting each node using the timing characteristics of multiple switches as the path cost; and it determines the series sequence of multiple switches according to the target connection path. This invention efficiently solves the graph theory path using a biomimetic optimization algorithm, avoiding getting trapped in local optima, significantly reducing power gating timing delay and voltage fluctuations, while optimizing static power consumption, providing an intelligent optimization solution for complex power gating circuits. Attached Figure Description

[0027] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0028] Figure 1 This is a flowchart illustrating the steps of a power gating circuit switching setting method provided in an embodiment of the present invention; Figure 2 This is a flowchart of the steps of another power gating circuit switching setting method provided in an embodiment of the present invention; Figure 3 This is a structural block diagram of a power supply gating circuit switching setting device provided in an embodiment of the present invention. Detailed Implementation

[0029] 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, not all, of the embodiments of the present invention. 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.

[0030] The terms "first," "second," etc., used in the specification and claims of this invention are used to distinguish similar objects and are not used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention can be implemented in orders other than those illustrated or described herein. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0031] In the field of chip physical design, power gating circuits are a key component of low-power design, and the rationality of their switch series sequence directly affects the chip's timing convergence, power consumption distribution, and voltage stability. However, as process nodes continue to shrink and design scales continue to expand, the limitations of traditional switch series methods in optimizing efficiency and balancing multiple objectives are becoming increasingly apparent. Existing static sequencing strategies often struggle to simultaneously optimize multiple constraints such as timing, power consumption, and voltage noise when facing highly complex power networks, resulting in a trade-off between chip performance and energy efficiency.

[0032] In recent years, circuit path search methods based on swarm intelligence optimization have provided new technical approaches for power network optimization. In particular, the combination of graph theory modeling and biomimetic algorithms has made it possible to find globally approximate optimal solutions under multidimensional constraints. However, facing challenges such as the increasing number of switches in power gating circuits, tighter timing constraints, and higher voltage stability requirements, how to achieve efficient and low-cost automatic generation of series sequences remains a key problem that urgently needs to be solved in the field of physical design automation.

[0033] In the field of power supply gating circuit optimization, heuristic rules and metaheuristic algorithms provide feasible solutions for determining the series sequence of switches. Although existing technologies can achieve automatic generation of series paths to a certain extent, they still generally suffer from problems such as a single optimization objective, slow convergence speed, and susceptibility to local optima. In particular, they lack the ability to coordinate the optimization of multiple objectives such as timing, power consumption, and voltage stability, making it difficult to meet the design requirements of advanced processes in practical applications.

[0034] In the prior art, power gate switches are connected in series mainly using the following two methods: Method A: Static sorting method based on empirical rules. This method determines the series sequence through predefined priority rules (such as switch size, drive strength, etc.). This method is simple to implement and runs quickly, but it heavily relies on the designer's experience and cannot adapt to the specific needs of different design scenarios. Its optimization effect is limited in complex power networks.

[0035] Method B: A series optimization method based on traditional heuristic algorithms. This method searches for feasible solutions in the solution space using a greedy strategy or a local search algorithm. Although it can quickly obtain results in small-scale designs, it lacks a global perspective during the search process and is prone to getting trapped in local optima, leading to problems such as degraded timing performance and increased voltage noise in large-scale circuits.

[0036] Method A, similar to this invention, aims to improve optimization efficiency through deterministic strategies, but it relies on human experience and lacks flexibility, failing to cope with complex and ever-changing design constraints. Method B, while achieving automated optimization, has limited search capabilities and performs poorly in multi-objective trade-offs. Both methods have significant shortcomings in optimization quality, convergence speed, and multi-objective balancing capabilities, necessitating the development of a novel power supply gate circuit series technology based on intelligent optimization, possessing global search capabilities, and capable of collaboratively optimizing timing, power consumption, and voltage stability.

[0037] One of the core concepts of this invention is to first construct a graph theory node model corresponding one-to-one with multiple switches and obtain the timing characteristic information of each switch; then, obtain the timing characteristic information of multiple switches; based on the ant colony algorithm, use the timing characteristic information of multiple switches as the path cost to determine the target connection path connecting each node; and determine the series sequence of multiple switches according to the target connection path. This invention efficiently solves the graph theory path using a biomimetic optimization algorithm, avoiding getting trapped in local optima, significantly reducing power supply gating timing delay and voltage fluctuation, while optimizing static power consumption, providing an intelligent optimization solution for complex power supply gating circuits.

[0038] Figure 1 This is a flowchart illustrating the steps of a power gating circuit switching setting method provided in an embodiment of the present invention.

[0039] like Figure 1 As shown, the method may specifically include the following steps: Step 101: For multiple switches in the power gating circuit, construct a graph theory model, wherein the graph theory model includes nodes that correspond one-to-one with the multiple switches; In this embodiment of the invention, by introducing graph theory modeling, the complex power gating circuit switch layout problem is transformed into a computable graph theory path optimization problem, and the series connection order of the switches is abstracted into a path selection problem. Each power switch is modeled as an independent node in the graph, and the directed edges between nodes represent possible series connections between switches. This modeling method not only fully preserves the topological characteristics of the switch network, but also accurately describes the connection constraints between switches through the adjacency matrix of the graph.

[0040] This systematic modeling approach lays a solid mathematical foundation for subsequent path optimization based on intelligent algorithms.

[0041] Step 102: Obtain the timing characteristic information of the multiple switches; In this embodiment of the invention, the extraction of timing feature information is a crucial step in ensuring optimization effectiveness. This feature information may include, but is not limited to, key timing parameters such as switch on / off delay time, setup time, hold time, and series delay.

[0042] In some examples, timing characteristics can be calculated using the physical information of the switches, such as their physical location, size, number, and process parameter files. Additionally, the effects of process angle variations and temperature and voltage fluctuations can be taken into account, and the results can be found in the power-switch process library by size.

[0043] By using these well-validated time-series feature data as input to the cost function of subsequent path optimization algorithms, the reliability of the optimization results in practical applications is ensured.

[0044] Step 103: Based on the ant colony algorithm, the target connection path connecting each node is determined using the timing feature information of the multiple switches as the path cost. In this embodiment of the invention, an ant colony algorithm can be used, and the timing characteristics of multiple switches can be used as the path cost to determine the target connection path connecting each node.

[0045] In some examples, a number of virtual ants can be deployed on each node of the constructed graph model, with each ant representing a complete path solution. During iterative optimization, the ants use the temporal characteristics of multiple switches as path costs and probabilistically select connections between nodes to construct the target connection path.

[0046] By employing an ant colony algorithm-based path optimization method, the global optimization capability of path search is significantly improved. Simultaneously, the parallel search mechanism greatly enhances optimization efficiency, providing a reliable technical guarantee for optimizing the switching sequence of complex power supply gating circuits.

[0047] Step 104: Determine the series sequence of the multiple switches according to the target connection path.

[0048] In this embodiment of the invention, the target connection path can be mapped to the series sequence of the switches.

[0049] In some examples, the optimized target connection path can be topologically sorted to determine the order of each node. The optimized series sequence can then be directly written into the power network configuration file, which can be applied to the physical layout and routing of the power gating module to achieve low-power, high-stability chip design.

[0050] By adopting a path mapping method based on intelligent optimization, the design efficiency is significantly improved. At the same time, by optimizing the series sequence of switches, the dynamic power consumption of the circuit is significantly reduced, and the stability of the power network is enhanced, providing a reliable guarantee for the design of low-power chips under advanced process nodes.

[0051] This invention first constructs a graph theory node model corresponding one-to-one with multiple switches and obtains the timing characteristic information of each switch; then, it obtains the timing characteristic information of multiple switches; based on the ant colony algorithm, it determines the target connection path connecting each node using the timing characteristic information of multiple switches as the path cost; and finally, it determines the series sequence of multiple switches based on the target connection path. This invention efficiently solves the graph theory path using a biomimetic optimization algorithm, avoiding getting trapped in local optima, significantly reducing power supply gating timing delay and voltage fluctuation, while optimizing static power consumption, providing an intelligent optimization solution for complex power supply gating circuits.

[0052] Figure 2 This is a flowchart illustrating the steps of a switching setting method for a power gating circuit provided in an embodiment of the present invention.

[0053] like Figure 2 As shown, the method may specifically include the following steps: Step 201: For multiple switches in the power gating circuit, construct a graph theory model, wherein the graph theory model includes nodes that correspond one-to-one with the multiple switches; In this embodiment of the invention, by introducing graph theory modeling, the complex power gating circuit switch layout problem is transformed into a computable graph theory path optimization problem, and the series connection order of the switches is abstracted into a path selection problem. Each power switch is modeled as an independent node in the graph, and the directed edges between nodes represent possible series connections between switches. This modeling method not only fully preserves the topological characteristics of the switch network, but also accurately describes the connection constraints between switches through the adjacency matrix of the graph.

[0054] This systematic modeling approach lays a solid mathematical foundation for subsequent path optimization based on intelligent algorithms.

[0055] Step 202: Obtain the timing characteristic information of the multiple switches; In this embodiment of the invention, the extraction of timing feature information is a crucial step in ensuring optimization effectiveness. This feature information may include, but is not limited to, key timing parameters such as switch on / off delay time, setup time, hold time, and series delay.

[0056] By using these well-validated time-series feature data as input to the cost function of subsequent path optimization algorithms, the reliability of the optimization results in practical applications is ensured.

[0057] Step 203: Obtain the ant colony parameters of the ant colony algorithm; In this embodiment of the invention, the configuration of ant colony parameters can employ an adaptive adjustment strategy. Key ant colony parameters may include pheromone importance, heuristic pheromone importance, pheromone evaporation rate, pheromone constant, initial pheromone value, and pheromone concentration. The initial values ​​of some parameters are set according to the size and complexity of the graph theory model, and the pheromone concentration can be dynamically adjusted during the iteration process.

[0058] In some examples, when the algorithm gets stuck in a local optimum, the pheromone evaporation coefficient can be increased to enhance the exploration ability; when the algorithm converges too slowly, the heuristic factor can be adjusted to balance the relationship between global search and local exploration.

[0059] This parameter adaptation mechanism ensures that the algorithm maintains high search efficiency in switch networks of different sizes.

[0060] Step 204: Using the timing feature information of the multiple switches as the path cost and the ant colony parameters, perform multiple rounds of iteration, and determine the preferred connection path connecting each node in each round of iteration. In this embodiment of the invention, the iterative optimization process can employ a hierarchical search strategy.

[0061] In some examples, in each iteration, the connection probability can be calculated first based on the current pheromone distribution and temporal cost, and then candidate paths can be generated according to a probabilistic selection mechanism. For the generated paths, a temporal constraint-based evaluation method is used to assess their quality and select feasible solutions that meet the temporal requirements. During the pheromone update phase, not only is the overall quality of the paths considered, but a local optimization mechanism is also introduced to highlight critical path segments.

[0062] This hierarchical optimization approach improves the search accuracy of the optimal path while ensuring algorithm convergence.

[0063] In this embodiment of the invention, step 204 may include the following sub-steps: Sub-step S11, the timing feature information includes: the series delay between the plurality of switches; In one iteration, the ant colony parameters and initial node for each iteration are determined; based on the ant colony parameters and the temporal feature information for each iteration, the nodes are connected based on the initial node to obtain candidate connection paths; In this embodiment of the invention, the timing feature information consists of two physical quantities, which are the only two sets of physical quantity inputs to the algorithm. One is the series delay of the physical connection between the two switches, corresponding to the time it takes for an ant to walk from one switch to another; the other is the opening time of a single switch, corresponding to the time it takes for an ant to cross a single switch.

[0064] Prior to using this algorithm, all switches had already been physically arranged; their physical locations, sizes, and quantities were determined. The series delay was calculated by the placement and routing tool using the switches' physical locations and process parameter files. Switch turn-on times were determined by searching the switch's process library by size. Switches of the same type come in various sizes; larger sizes allow for higher current and shorter turn-on times, while smaller sizes allow for lower current and longer turn-on times. Generally, larger switches are used in areas with high operating current, and smaller switches are used in areas with low operating current.

[0065] In some examples, sub-step S11 may include the following steps: In each iteration, select the current node; In this embodiment of the invention, there are multiple iterations in one round of iteration. In each iteration, one ant from the ant colony algorithm is used to select the path, as follows: Suppose that the power gating circuit has three switches and three corresponding nodes, namely S1, S2, and S3, whose physical positions have been pre-arranged and the dimensions of the switches have been determined. Each ant needs to traverse the three switches to construct a path. The first ant can choose any node, such as S1, as its current node and then connect to the remaining nodes.

[0066] Based on the ant colony parameters and temporal feature information of each iteration, the connection probability between the current node and each unconnected node is determined. In this embodiment of the invention, the connection probability between the current node and other nodes of an ant can be determined by the ant colony parameters and time sequence feature information of each iteration process, so as to determine the next node.

[0067] In some examples, this may specifically include: determining the connection probability between the current node and each unconnected node based on the ant colony parameters of the current iteration process and the series delay between the switch corresponding to the current node and the switches corresponding to each unconnected node.

[0068] Based on the connection probability between the current node and each unconnected node, determine the next node to be connected to the current node, and use the next node as the new current node, until all nodes are connected, thus obtaining the candidate connection paths for each node.

[0069] In some examples, such as: As described above, the ant has two choices (S2, S3) to move from S1 to the next node. The choice needs to be made using the probability transition formula. The formula for calculating the connection probability is as follows: P ij =[τ ij ]^α*[η ij ]^β / Σ([τ ik ]^α* [η ik ]^β) The specific parameters are explained below: τ ij : is the pheromone concentration from path i to j, which is the selection value based on historical experience. It represents the ant's trust in choosing a path. The higher the concentration, the more likely the path will be selected. This variable is dynamically updated during the iteration process, and its key role is to control the ant's dependence on historical paths. τ ik : is the pheromone concentration along path i to k; η ij: It is the heuristic information for the path from i to j. It is a quantification of the characteristics of the problem, a normalized function of physical quantities such as distance / time / bandwidth. It ensures that the higher the quality, the larger the value, guiding the ants to choose the shortest path and avoiding blind exploration; η ik : is the heuristic information for the path from i to k; α: Pheromones are important and are weighted parameters in the path selection formula. The larger α is, the more ants rely on historical pheromones. The typical value range is (0.5-5.0). Its key role is to balance the use of historical experience and the exploration of new paths. β: Heuristic importance, a weighting parameter in the path selection formula, and the reciprocal of the serial delay. The larger β is, the more the ants rely on the shortest distance. Typical values ​​range from 1.0 to 5.0. Its key role is to balance the utilization of problem characteristics and dependency history.

[0070] Σ([τ ik ]^α*[η ik ]^β): The denominator represents the sum of the attractiveness of all possible paths the ant can choose at node i, k is the set of all remaining unchosen nodes, and k is the set of all possible values ​​for the numerator. Its key function is probability normalization, making P... ij ∈[0,1].

[0071] For example, using the above assumptions: S1 = 10ps, which is the time it takes for an ant to pass through node S1, i.e., the time it takes for the switch of S1 to be turned on. S2 = 12ps; S3=15ps.

[0072] The next step is to calculate the series delay between nodes S1 and S2 using the placement and routing tools: delay(S1→S2) = 5ps (that is, the time it takes for the ant to walk from S1 to S2, which is the series delay from S1 to S2). delay(S1→S3) = 8ps delay(S2→S1) = 6ps delay(S2→S3) = 4ps delay(S3→S1) = 7ps delay(S3→S2) = 3ps The ant colony parameters were initialized as follows: α=1.0, β=5.0, ρ=0.2, Q=100, τ0=0.01.

[0073] The heuristic importance β in the algorithm is obtained based on the series delay between switches, and is used to calculate the connection probability. η 12 =1 / delay (S1→S2)=0.200, η 13 =1 / delay (S1→S3)=0.125, η 21 =1 / delay(S2→S1)=0.167, η 23 =1 / delay(S2→S3)=0.167, η 31 =1 / delay(S3→S1)=0.143, η 32 =1 / delay(S3→S2)=0.167 When the first ant chooses S1 as its initial node, the next node will be either S2 or S3. The connection probability of moving to S2 or S3 is then calculated: P(S1→S2)=0.1^1.0*0.200^5.0) / [(0.1^1.0*0.200^5.0)+(0.1^1.0*0.125^5.0))]=0.9129; P(S1→S3)=(0.1^1.0*0.125^5.0) / [(0.1^1.0*0.200^5.0)+(0.1^1.0*0.125^5.0))]=0.0871; P(S1→S2)>P(S1→S3) Therefore, the first ant will choose the node with the higher probability, S2, as its next step. Then, the first ant will reach S3, thus forming a path.

[0074] In some examples, the ant colony parameters are updated during the iteration process, specifically in the following ways: (1) Obtain the ant colony parameters corresponding to the candidate connection paths obtained in the previous iteration process during the current iteration process; determine the ant colony parameters for the current iteration process based on the ant colony parameters corresponding to the candidate connection paths obtained in the previous iteration process.

[0075] In some examples, the steps for determining the ant colony parameters for this iteration may specifically include: The ant colony parameters include pheromone concentration, initial pheromone, and pheromone volatilization rate; based on the pheromone concentration, initial pheromone, and pheromone volatilization rate corresponding to the preferred connection path obtained in the previous iteration, the pheromone concentration for this iteration is determined according to the following formula; τ ij2 =(1-ρ)*τ ij1 +ρ*τ0 Where, τ ij2 To generate the pheromone concentration for the first iteration in this iteration, τij1 ρ is the pheromone concentration corresponding to the preferred connection path obtained in the previous iteration process, ρ is the pheromone evaporation rate, and τ0 is the initial pheromone.

[0076] For example, based on the above assumptions: When the first ant moves from S2 to S3, the pheromone concentration in S2 is updated to S3. τ(S2→S3)=(1-ρ)*τ 23 +ρ*τ0=(1-0.2)*0.1+0.2*0.01=0.082 The new τ(S2→S3) is used in subsequent ant path selection.

[0077] (2) Obtain the ant colony parameters and path cost corresponding to the preferred connection path obtained in the previous iteration process; generate the ant colony parameters for the first iteration in this iteration process based on the ant colony parameters and path cost corresponding to the preferred connection path obtained in the previous iteration process.

[0078] In some examples, the specific parameters may include: the ant colony parameters include pheromone concentration, pheromone parameters, and pheromone volatilization rate; based on the pheromone concentration, pheromone parameters, pheromone volatilization rate, and path cost corresponding to the preferred connection path obtained in the previous iteration, the pheromone concentration of the first iteration in this iteration is determined according to the following formula; τ ijB =(1-ρ)*τ ijA +ρ*Q / F opt Where, τ ijB To generate the pheromone concentration for this iteration process, τ ijA The pheromone concentration corresponding to the preferred connection path obtained in the previous iteration process, ρ is the pheromone evaporation rate, Q is the pheromone constant, and F is the pheromone concentration. opt This is the path cost corresponding to the preferred connection path obtained in the previous iteration.

[0079] For example, based on the above assumptions: Once all ants have constructed their paths, the current iteration is complete, and the information concentration after the local update is: τ 12 =0.0672, τ 23 =0.0672, τ 13 =0.0672, τ 32 =0.0672, τ 21 =0.0672, τ 31 =0.0672, τ 12 =0.0672 We now begin global pheromone updates. In this iteration, the optimal paths are S1→S2→S3 and S3→S2→S1. We update the pheromone concentrations between nodes on the optimal paths based on the global pheromone levels. τ(S1→S2)=(1-ρ)*τ 12 +ρ*Q / F 12 = (1-0.2)*0.0672+0.2*(100 / 46)=0.4885, τ(S2→S3)=(1-ρ)*τ 23 +ρ*Q / F 23 = (1-0.2)*0.0672+0.2*(100 / 46)=0.4885, τ(S3→S2)=(1-ρ)*τ 32 +ρ*Q / F 32 = (1-0.2)*0.0672+0.2*(100 / 46)=0.4885, τ(S2→S1)=(1-ρ)*τ 21 +ρ*Q / F 21 = (1-0.2)*0.0672+0.2*(100 / 46)=0.4885, In this way, during the next round of ant path construction, the ants are more inclined to choose the optimal path from the previous round, thus accelerating the convergence of the algorithm.

[0080] Sub-step S12: Determine the preferred connection path based on the candidate connection paths obtained after multiple iterations.

[0081] In some examples, sub-step S12 may also include the following steps: the timing feature information further includes: the on-time of the plurality of switches; The path cost of the candidate connection paths is obtained based on the series delay between the switches corresponding to adjacent nodes in the candidate connection paths and the opening time of the multiple switches. For example, based on the above assumptions: After the ant path S1→S2→S3 is constructed, the path cost is calculated: Series delay: 5ps (S1→S2) + 4ps (S2→S3) = 9ps Switch on time: 10ps (S1) + 12ps (S2) + 15ps (S3) = 37ps Path cost: 9ps + 37ps = 46ps.

[0082] The path constructed by the second ant is S1→S3→S2, with a path cost of 48ps; The path constructed by the third ant is S2→S1→S3, with a path cost of 51ps. The path constructed by the fourth ant is S2→S3→S1, with a path cost of 48ps; The path constructed by the fifth ant is S3→S1→S2, with a path cost of 49ps; The path constructed by the sixth ant is S3→S2→S1, with a path cost of 46 ps. Therefore, the candidate connection path S3→S2→S1 or S1→S2→S3 with the lowest path cost is determined as the preferred connection path.

[0083] Step 205: The preferred connection path obtained under the condition of ending the iteration is determined as the target connection path connecting the nodes.

[0084] In this embodiment of the invention, the preferred connection path obtained when the iteration ends can be determined as the target connection path connecting the nodes.

[0085] In some examples, in addition to the usual maximum number of iterations, the iteration termination condition can also use a convergence stability index and a solution quality threshold. The iteration can be terminated early when the algorithm's improvement in consecutive iterations is less than the set threshold, or when the current optimal solution already satisfies all timing constraints. For the finally determined preferred connection path, feasibility verification is also required to ensure that it meets the physical constraints and electrical rules of the circuit design, thereby guaranteeing the practical operability of the optimization results.

[0086] Step 206: Determine the series sequence of the multiple switches according to the target connection path.

[0087] In this embodiment of the invention, the generation of the series sequence can employ a structured mapping method. First, the target connection path is normalized to eliminate potential loops and conflicts. Then, based on the node order in the path, the corresponding switch connection sequence is generated. During the mapping process, the physical layout constraints of the switches also need to be considered to ensure the feasibility of the generated series sequence in subsequent placement and routing stages.

[0088] By using a structured mapping method to generate the switch series sequence, the physical realizability of the series sequence is significantly improved, effectively avoiding the layout conflict problem common in traditional methods, and ensuring the smooth transformation of optimization results into physical design.

[0089] This invention first constructs a graph theory model for multiple switches in a power supply gating circuit, containing nodes that correspond one-to-one with each switch. Then, it acquires the timing characteristics of each switch and initializes the parameters of the ant colony algorithm. Next, it performs multiple rounds of iterative optimization using the timing characteristics as path costs. In each iteration, the preferred connection path connecting each node is determined based on pheromone concentration and heuristic information, and the pheromone distribution is dynamically updated. When the iteration termination condition is met, the finally obtained preferred connection path is determined as the target connection path. Finally, the series sequence of multiple switches is determined based on the target connection path. This invention achieves global optimization of graph theory paths through a swarm intelligence algorithm, effectively avoiding getting trapped in local optima, significantly reducing power supply gating timing delay and voltage fluctuations, while optimizing static power consumption levels, providing an efficient and intelligent series connection scheme for complex power supply gating circuits.

[0090] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.

[0091] Figure 3 This is a structural block diagram of a power supply gating circuit switching setting device provided in an embodiment of the present invention.

[0092] like Figure 3 As shown in the figure, the power gating circuit switching setting device provided in this embodiment of the invention may specifically include the following modules: The model building module 301 is used to build a graph theory model for multiple switches in a power gating circuit, wherein the graph theory model includes nodes that correspond one-to-one with the multiple switches. Timing acquisition module 302 is used to acquire timing feature information of the plurality of switches; The path determination module 303 is used to determine the target connection path connecting each node based on the ant colony algorithm and using the timing feature information of the multiple switches as the path cost. Sequence determination module 304 is used to determine the series sequence of the plurality of switches according to the target connection path.

[0093] In this embodiment of the invention, the path determination module includes: The parameter acquisition submodule is used to acquire the ant colony parameters of the ant colony algorithm. The preferred path determination submodule is used to perform multiple rounds of iteration using the timing feature information of the multiple switches as the path cost and the ant colony parameters, and to determine the preferred connection path connecting each node in each round of iteration. The target path determination submodule is used to determine the preferred connection path obtained under the condition of iteration termination as the target connection path connecting the nodes.

[0094] In this embodiment of the invention, the timing feature information includes: the series delay between the plurality of switches; The preferred path determination submodule includes: The candidate path determination unit is used to determine the ant colony parameters and initial nodes for each iteration in a round of iteration; and to connect the nodes based on the initial nodes according to the ant colony parameters and the temporal feature information for each iteration to obtain candidate connection paths. The preferred path determination unit is used to determine the preferred connection path based on the candidate connection paths obtained after multiple iterations.

[0095] In this embodiment of the invention, the candidate path determination unit includes: The node selection sub-unit is used to select the current node in each iteration. The probability determination subunit is used to determine the connection probability between the current node and each unconnected node based on the ant colony parameters and the temporal feature information in each iteration process. The candidate path determination subunit is used to determine the next node connected to the current node based on the connection probability between the current node and each unconnected node, and to use the next node as the new current node, until all nodes are connected, thereby obtaining the candidate connection paths for each node.

[0096] In this embodiment of the invention, the probability determination subunit is specifically used to determine the connection probability between the current node and each unconnected node based on the ant colony parameters of the current iteration process and the series delay between the switch corresponding to the current node and the switches corresponding to each unconnected node.

[0097] In this embodiment of the invention, the candidate path determination unit includes: The first parameter acquisition sub-unit is used to obtain the ant colony parameters corresponding to the candidate connection paths obtained in the previous iteration during the current iteration. The first parameter determination subunit is used to determine the ant colony parameters for the current iteration based on the ant colony parameters corresponding to the candidate connection paths obtained in the previous iteration.

[0098] In this embodiment of the invention, the ant colony parameters include pheromone concentration, initial pheromone, and pheromone volatilization rate; the parameter determination subunit is specifically used to determine the pheromone concentration of the current iteration process according to the pheromone concentration, initial pheromone, and pheromone volatilization rate corresponding to the preferred connection path obtained in the previous iteration process, according to the following formula; τ ij2 =(1-ρ)*τ ij1 +ρ*τ0 Where, τ ij2 To generate the pheromone concentration for the first iteration in this iteration, τ ij1 ρ is the pheromone concentration corresponding to the preferred connection path obtained in the previous iteration process, ρ is the pheromone evaporation rate, and τ0 is the initial pheromone.

[0099] In this embodiment of the invention, the timing feature information further includes: the on-time of the plurality of switches; The preferred path determination unit includes: The path cost determination subunit is used to obtain the path cost of multiple candidate connection paths based on the series delay between the corresponding switches of adjacent nodes in the candidate connection path and the opening time of the multiple switches. The preferred path determination subunit is used to determine the candidate connection path with the lowest path cost as the preferred connection path.

[0100] In this embodiment of the invention, the candidate path determination unit includes: The second parameter acquisition subunit is used to obtain the ant colony parameters and path cost corresponding to the preferred connection path obtained in the previous iteration process; The second parameter determination subunit is used to generate the ant colony parameters for the first iteration in this iteration process based on the ant colony parameters and path costs corresponding to the preferred connection paths obtained in the previous iteration process.

[0101] In this embodiment of the invention, the ant colony parameters include pheromone concentration, pheromone parameters, and pheromone volatilization rate. The second parameter determination subunit is specifically used to determine the pheromone concentration of the first iteration in this iteration process according to the pheromone concentration, pheromone parameters, pheromone volatilization rate, and path cost corresponding to the preferred connection path obtained in the previous iteration process, according to the following formula. τ ijB =(1-ρ)*τ ijA +ρ*Q / F opt Where, τ ijB To generate the pheromone concentration for this iteration process, τ ijAThe pheromone concentration corresponding to the preferred connection path obtained in the previous iteration process, ρ is the pheromone evaporation rate, Q is the pheromone constant, and F is the pheromone concentration. opt This is the path cost corresponding to the preferred connection path obtained in the previous iteration.

[0102] This invention first constructs a graph theory node model corresponding one-to-one with multiple switches and obtains the timing characteristic information of each switch; then, it obtains the timing characteristic information of multiple switches; based on the ant colony algorithm, it determines the target connection path connecting each node using the timing characteristic information of multiple switches as the path cost; and finally, it determines the series sequence of multiple switches based on the target connection path. This invention efficiently solves the graph theory path using a biomimetic optimization algorithm, avoiding getting trapped in local optima, significantly reducing power supply gating timing delay and voltage fluctuation, while optimizing static power consumption, providing an intelligent optimization solution for complex power supply gating circuits.

[0103] As the apparatus embodiment is basically similar to the method embodiment, it is described in a relatively simple manner. For relevant details, please refer to the description of the method embodiment.

[0104] This invention also provides an electronic device, including a processor, a memory, and a program or instructions stored in the memory and executable on the processor. When the program or instructions are executed by the processor, they implement the various processes of the above-described power gating circuit switching setting method embodiment and achieve the same technical effect. To avoid repetition, they will not be described again here.

[0105] It should be noted that the electronic devices in the embodiments of the present invention include the mobile electronic devices and non-mobile electronic devices described above.

[0106] This invention also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described power gating circuit switching setting method embodiment and achieve the same technical effect. To avoid repetition, they will not be described again here.

[0107] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0108] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0109] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0110] Embodiments of the present invention are described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0111] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0112] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0113] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.

[0114] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0115] The present invention has provided a detailed description of a power gating circuit switching setting method, device, electronic device, and computer-readable storage medium. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for setting the switch of a power supply gating circuit, characterized in that, include: For multiple switches in a power gating circuit, a graph theory model is constructed, wherein the graph theory model includes nodes that correspond one-to-one with the multiple switches. Obtain the timing characteristic information of the multiple switches; Based on the ant colony algorithm, the target connection path connecting each node is determined using the timing feature information of the multiple switches as the path cost. The series sequence of the multiple switches is determined based on the target connection path.

2. The switching setting method for the power gating circuit according to claim 1, characterized in that, The ant colony algorithm, using the timing characteristics of the multiple switches as path costs, determines the target connection path connecting each node, including: Obtain the ant colony parameters of the ant colony algorithm; The timing characteristics of the multiple switches are used as the path cost and the ant colony parameters to perform multiple rounds of iteration, and the preferred connection path connecting each node is determined in each round of iteration. The preferred connection path obtained under the condition of iteration termination is determined as the target connection path connecting the nodes.

3. The switching setting method for the power gating circuit according to claim 2, characterized in that, The timing characteristic information includes: the series delay between the plurality of switches; The process of performing multiple iterations using the timing characteristics of the multiple switches as path costs and the ant colony parameters, and determining the preferred connection path connecting each node in each iteration, includes: In one iteration, the ant colony parameters and initial node for each iteration are determined; based on the ant colony parameters and the temporal feature information for each iteration, the nodes are connected based on the initial node to obtain candidate connection paths; Based on the candidate connection paths obtained after multiple iterations, the preferred connection path is determined.

4. The switching setting method for the power gating circuit according to claim 3, characterized in that, The step of connecting each node based on the initial node, according to the ant colony parameters of each iteration and the temporal feature information, to obtain candidate connection paths includes: In each iteration, select the current node; Based on the ant colony parameters and temporal feature information of each iteration, the connection probability between the current node and each unconnected node is determined. Based on the connection probability between the current node and each unconnected node, determine the next node to be connected to the current node, and use the next node as the new current node, until all nodes are connected, thus obtaining the candidate connection paths for each node.

5. The switching setting method for the power gating circuit according to claim 4, characterized in that, The step of determining the connection probability between the current node and each unconnected node based on the ant colony parameters and the temporal feature information in each iteration includes: Based on the ant colony parameters of this iteration process and the series delay between the switch corresponding to the current node and the switches corresponding to each unconnected node, the connection probability between the current node and each unconnected node is determined.

6. The switching setting method for the power gating circuit according to claim 3, characterized in that, The determination of the ant colony parameters for each iteration in this round of iteration includes: Obtain the ant colony parameters corresponding to the candidate connection paths obtained in the previous iteration during the current iteration; Based on the ant colony parameters corresponding to the candidate connection paths obtained in the previous iteration, the ant colony parameters for the current iteration are determined.

7. The switching setting method for the power gating circuit according to claim 6, characterized in that, The ant colony parameters include pheromone concentration, initial pheromone level, and pheromone evaporation rate; determining the ant colony parameters for the current iteration based on the ant colony parameters corresponding to the candidate connection paths obtained in the previous iteration includes: Based on the pheromone concentration, initial pheromone, and pheromone evaporation rate corresponding to the preferred connection path obtained in the previous iteration, the pheromone concentration for this iteration is determined according to the following formula; t ij2 =(1-ρ)*τ ij1 +p*t0 Where, τ ij2 To generate the pheromone concentration for the first iteration in this iteration, τ ij1 ρ is the pheromone concentration corresponding to the preferred connection path obtained in the previous iteration process, ρ is the pheromone evaporation rate, and τ0 is the initial pheromone.

8. The switching setting method for the power gating circuit according to claim 3, characterized in that, The timing feature information also includes: the on-time of the plurality of switches; The step of determining the preferred connection path based on the candidate connection paths obtained after multiple iterations includes: The path cost of the candidate connection paths is obtained based on the series delay between the switches corresponding to adjacent nodes in the candidate connection paths and the opening time of the multiple switches. The candidate connection path with the lowest path cost is determined as the preferred connection path.

9. The switching setting method for the power gating circuit according to claim 8, characterized in that, The process of determining the ant colony parameters for each iteration in a single iteration includes: Obtain the ant colony parameters and path cost corresponding to the preferred connection path obtained in the previous iteration process; Based on the ant colony parameters and path cost corresponding to the preferred connection path obtained in the previous iteration, the ant colony parameters for the first iteration in this iteration are generated.

10. The switching setting method for the power gating circuit according to claim 9, characterized in that, The ant colony parameters include pheromone concentration, pheromone parameters, and pheromone volatilization rate. The generation of the ant colony parameters for the first iteration in this round of iteration, based on the ant colony parameters and path cost corresponding to the preferred connection path obtained in the previous iteration, includes: Based on the pheromone concentration, pheromone parameters, pheromone evaporation rate and path cost corresponding to the preferred connection path obtained in the previous iteration, the pheromone concentration for the first iteration in this iteration is determined according to the following formula; t ijB =(1-ρ)*τ ijA +p*Q / F opt Where, τ ijB To generate the pheromone concentration for this iteration process, τ ijA The pheromone concentration corresponding to the preferred connection path obtained in the previous iteration process, ρ is the pheromone evaporation rate, Q is the pheromone constant, and F is the pheromone concentration. opt This is the path cost corresponding to the preferred connection path obtained in the previous iteration.

11. A switching setting device for a power supply gating circuit, characterized in that, The device includes: The model building module is used to build a graph theory model for multiple switches in a power gating circuit. The graph theory model includes nodes that correspond one-to-one with the multiple switches. A timing acquisition module is used to acquire timing characteristic information of the multiple switches; The path determination module is used to determine the target connection path connecting each node based on the ant colony algorithm and using the timing feature information of the multiple switches as the path cost. The sequence determination module is used to determine the series sequence of the plurality of switches according to the target connection path.

12. An electronic device, characterized in that, It includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein when the program or instructions are executed by the processor, they implement the steps of the switching setting method for the power gating circuit as described in claims 1-10.

13. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the power gating circuit switching setting method as described in claims 1-10.