Efficient automatic planning and grouping method for memory built-in self-testing

By combining greedy algorithms and simulated annealing algorithms, the automatic grouping method of built-in self-test circuits of the memory is optimized, and the problem of local optimization and poor robustness in the prior art is solved, and more efficient grouping and faster running time is achieved.

CN119851734APending Publication Date: 2025-04-18GUANGDONG UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510043638.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-10
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

The prior art has problems of local optimization and poor robustness in the automatic planning and grouping of built-in self-test circuits in memory, and it is difficult to effectively improve the efficiency and effectiveness of the algorithm.

Method used

An automatic grouping method based on greedy algorithm combined simulated annealing algorithm is adopted, and efficient grouping results are generated through preliminary grouping, regrouping, greedy algorithm processing and simulation annealing algorithm optimization.

Benefits of technology

It significantly accelerates the convergence speed of the algorithm, improves the grouping effect and operation efficiency, avoids the problem of falling into local optimal solutions, and enhances the robustness of the algorithm.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119851734A_ABST
    Figure CN119851734A_ABST
Patent Text Reader

Abstract

The invention aims to provide an efficient automatic planning grouping method for memory built-in self-testing, which comprises the following steps: preliminarily grouping memories to be grouped, and reading grouping information of the memories to be grouped according to batches; according to the grouping information, preferentially re-grouping any preliminary group according to a matching constraint, and dividing the memories meeting the matching constraint into the same group to obtain a re-grouping result; processing a re-grouping result by using a greedy algorithm to form an initial solution; optimizing the initial solution by using a simulated annealing algorithm, and reducing the grouping number to obtain a final grouping result; according to the method provided by the invention, the automatic planning grouping problem can be solved through the improved simulated annealing algorithm, and the problems of falling into local optimum and poor robustness are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of digital integrated circuit electronic design automation (EDA), and in particular to an automatic planning and grouping method for a memory built-in self-test circuit based on a greedy algorithm combined with a simulated annealing algorithm. Background Art

[0002] Memory Built-In Self-Test (MBIST) is a test technology widely used in chip design to verify the function and reliability of memory modules in integrated circuits. Due to the high density and variety of memory in modern chip design, traditional external test methods are difficult to efficiently cover all memory cells, so MBIST technology was introduced.

[0003] In MBIST (Memory Built-In Self-Test) technology, automatic test grouping is an important research direction in order to optimize test time and resource utilization. The purpose of the grouping algorithm is to group multiple memory blocks for parallel testing according to the characteristics of the memory, or to generate an efficient test sequence for a single memory block. Among them, the heuristic-based grouping algorithm is a method for quickly generating test groups through rules and strategies, focusing on efficiency and flexibility, and is suitable for large-scale memory systems or complex scenarios. The algorithms mainly include the following types: Greedy Algorithm, Dynamic Programming, Simulated Annealing, etc. These heuristic algorithms systematically construct and perturb the current state to find high-quality grouping solutions. Among them, simulated annealing is widely used in scenarios such as large grouping scales and complex problem spaces due to its simple operation and ability to accept differential solutions.

[0004] The core process of using the simulated annealing algorithm to solve the grouping problem includes state modeling, initial solution generation, iterative optimization, and convergence judgment. First, the grouping problem needs to be modeled as an optimization problem, each grouping scheme is defined as a state, and the objective function (energy function) is used to measure the pros and cons of the grouping scheme. The objective function can be set according to specific needs, such as the test time after grouping, resource utilization, or load balancing. In the initial stage, an initial grouping scheme is randomly generated as the starting point of the algorithm. Then enter the iterative optimization stage, starting from the current state each time, a new adjacent state is generated through a certain perturbation method (such as randomly adjusting the content of the grouping or moving elements). If the objective function value of the new state is better, this state is accepted; if it is not better, it is accepted with a certain probability, and the probability is dynamically adjusted according to the "annealing temperature" in the simulated annealing algorithm. As the temperature gradually decreases, the algorithm tends to "cool down", that is, it is more inclined to accept better solutions and less likely to accept worse solutions. In this way, the algorithm can avoid falling into the local optimum and gradually approach the global optimal solution. Finally, when the temperature drops to the lowest or stops after a certain number of iterations, the current state is the final grouping solution. The whole process is similar to the cooling process in physical annealing, which uses random perturbations and probabilistic acceptance mechanisms to explore the solution space, thereby effectively solving complex grouping optimization problems.

[0005] In addition to simulated annealing, previous researchers have also proposed greedy algorithms and dynamic programming methods. These two methods are also widely used to optimize test grouping and resource allocation. Greedy algorithms are a method of building solutions quickly and step by step, selecting the current best option at each step. For example, some studies use greedy algorithms to prioritize the allocation of memory unit groups with high test coverage to minimize test time or hardware resource overhead. For related applications, please refer to IEEE's research "Models Based on Greedy Algorithms and Grid Discretization". Dynamic programming methods are used to deal with complex grouping problems with optimal structures of sub-problems. Dynamic programming can allocate memory blocks through recursion and memoization methods to minimize test time while maintaining resource constraints. Related cases include memory testing methods based on dynamic programming to solve nested optimization. Therefore, greedy algorithms have fast calculation speed but are prone to fall into local optimal solutions. Dynamic programming is only applicable to problems with certain special structures, but the computational complexity is high and it is difficult to expand to large-scale problems.

[0006] It can be seen that the existing methods are usually very limited and are often only effective in certain specific situations, such as greedy algorithms or dynamic programming. One is prone to fall into local optimal solutions, and the other has high computational complexity and is difficult to expand to large-scale problems, which limits the further improvement of efficiency.

[0007] In view of this, an efficient automatic planning grouping method for memory built-in self-test that can accelerate algorithm convergence speed and improve algorithm efficiency needs to be developed urgently. Summary of the invention

[0008] The object of the present invention is to provide a highly efficient automatic planning grouping method for memory built-in self-test, so as to at least solve one technical problem in the prior art.

[0009] The technical solution of the present invention is:

[0010] An efficient automatic planning grouping method for memory built-in self-test, comprising:

[0011] Perform preliminary grouping on the memory to be grouped, and then read the grouping information of the memory to be grouped in batches;

[0012] According to the grouping information, any of the preliminary groups is regrouped according to the matching constraints, and the memories satisfying the matching constraints are grouped into the same group to obtain a regrouping result;

[0013] Use the greedy algorithm to process the regrouping results to form an initial solution;

[0014] The initial solution is optimized using a simulated annealing algorithm to reduce the number of groups and obtain a final grouping result.

[0015] The step of optimizing the initial solution by using a simulated annealing algorithm comprises:

[0016] Let T = T0 represent the initial temperature for starting annealing, and the objective function value E(x0);

[0017] As time goes by, r = kT, where k is the rate of temperature drop;

[0018] For the current solution x t Apply random perturbations to generate a new solution x in its neighborhood t+1 , and obtain the corresponding objective function value E(x t+1 );

[0019] When ΔE=E(x t+1 )-E(x t ), if ΔE<0, accept the new solution as the current solution, otherwise follow the probability Decide whether to accept the new solution;

[0020] If the new solution is better than the current solution, the new solution is accepted, otherwise the new solution is accepted with probability.

[0021] The probability of accepting the new solution includes:

[0022] The acceptance probability of the new solution is:

[0023]

[0024] Among them, x t is the solution being searched at the current moment; E t is the corresponding system energy or objective function; x t+1 For the new solution; E t+1 is the system energy corresponding to the new solution, P is the system energy from the search point r t to x t+1 The acceptance probability of the transition.

[0025] The matching constraints include:

[0026] One or more of distance constraints, power consumption constraints, and matching constraints.

[0027] The method of processing the regrouping result by using a greedy algorithm to form an initial solution includes:

[0028] Transform the problem of dealing with the regrouping results into a mathematical or abstract model while satisfying the constraints;

[0029] Use the greedy criterion for each decision-making strategy;

[0030] When all elements have been processed, no valid selection can be made, or the goal is reached, the algorithm is terminated and the initial solution is obtained.

[0031] The strategy of using the greedy criterion for each decision step includes:

[0032] Prioritize the planning scheme with fewer groups as the optimal solution;

[0033] At each iteration, the current optimal element is selected according to the greedy criterion; and after each selection, check whether the current solution meets the constraints.

[0034] The beneficial effects of the present invention include at least:

[0035] The method described in the present invention improves the optimization mechanism on the traditional simulated annealing algorithm, and uses a greedy algorithm to generate an initial solution to replace a randomly generated initial solution. The improved simulated annealing algorithm can be used to solve the automatic planning grouping problem, and the problems of falling into local optimality and poor robustness are solved. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 is a flow chart of the method of the present invention;

[0037] Figure 2 This is the flow chart of the simulated annealing algorithm;

[0038] Figure 3 for Figure 1 A design information diagram of the method when it is specifically implemented;

[0039] Figure 4 for Figure 1 Screenshot of the method running in the terminal. DETAILED DESCRIPTION

[0040] The present application is further described below in conjunction with the accompanying drawings. Specific embodiment 1:

[0042] The present invention provides an embodiment:

[0043] like Figure 1 , an efficient automatic planning grouping method for memory built-in self-test, comprising: firstly performing preliminary grouping on memories to be grouped, and then reading grouping information of the memories to be grouped in batches; according to the grouping information, regrouping any of the preliminary groups according to matching constraints in priority, and grouping memories that meet the matching constraints into the same group to obtain a regrouping result; processing the regrouping result by using a greedy algorithm to form an initial solution; optimizing the initial solution by using a simulated annealing algorithm to reduce the number of groups and obtain a final grouping result.

[0044] Specifically, the steps of the greedy algorithm are:

[0045] First, the fewer the number of groups, the better, provided that the constraints are met. Then, this problem is transformed into a mathematical or abstract model, and a strategy is designed for each decision step, called the greedy criterion. For example, the planning scheme with fewer groups is preferred as the optimal solution. In subsequent iterations, the current optimal element is selected according to the greedy criterion at each step. After each selection, check whether the current solution meets the constraints. Finally, the algorithm is terminated when all elements have been processed, no valid selection can be made, or the goal is reached.

[0046] In this embodiment, the thermal motion of particles in the simulated annealing algorithm is realized by moving the memory position. Each movement of the memory will be calculated to ensure that the constraints are met, ensuring that the final grouping result meets the basic constraints. The rand() function is used to randomly select the memory to move. When the initial temperature is high, multiple random moves of the memory are performed to realize the random perturbation of the simulated annealing algorithm, jump out of the local optimal solution, and find a better combination of partitioning and grouping.

[0047] The algorithm for memory partitioning is mainly implemented by finding a function to reduce the number of groups. The function will scan the original groups, dissolve one group at a time and try to allocate the memory to other groups under the premise of satisfying the constraints. If all allocations are successful, the number of groups is reduced and a new group is returned.

[0048] Construct an initial solution based on the constraints:

[0049] Considering that the number of memories varies in different designs, when the number of memories is large, optimizing the grouping of memories together will use a lot of memory overhead. Considering the different constraint types, you can first perform preliminary grouping, then read the memory grouping information in batches, and perform detailed grouping optimization one by one. This streaming grouping is particularly important for cases with a large number of memories.

[0050] Among the memory-related constraints, some constraints come from memory instances, that is, each memory is different, while most constraints come from memory types, that is, memories of the same type are the same, and most of the related constraints require matching, rather than having maximum acceptable values ​​like power consumption and distance constraints. The related constraints that require memory to match each other are matching constraints.

[0051] Prioritize grouping based on matching constraints, group the memories that meet the matching constraints into the same group, and use the greedy algorithm to form an initial solution. Then use the simulated annealing algorithm to optimize and reduce the number of groups.

[0052] The matching constraint conditions described in this embodiment include:

[0053] 1. Distance constraint: The distance constraint of the memory mainly takes into account that the excessive length of the interconnection line will cause various timing, voltage drop and other problems. Therefore, the memories in the same group need to meet certain distance constraints to ensure the normal operation of Mbist.

[0054] Definition: The Euclidean distance between any two memories in the same group does not exceed the upper limit of the distance constraint.

[0055] 2. Power Constraint: The power consumption constraint of memory mainly takes into account that the power consumption of multiple memories controlled by the same controller has an upper limit, so it must be required that the total power consumption of memories in the same group does not exceed an upper limit. Because static power consumption is relatively small, only dynamic power consumption is considered in actual consideration.

[0056] Definition: The total dynamic power consumption of memories in the same group does not exceed the upper limit of power consumption.

[0057] 3. Matching constraints: Other related constraints such as algorithms, ports, clock domains, address mapping, etc. require the same memory to be grouped together for parallel testing. Matching constraints will serve as the basis for initial grouping.

[0058] like Figure 2 The optimized simulated annealing algorithm process in this embodiment includes:

[0059] The algorithm is essentially divided into two layers of loops. At any temperature level, random perturbations generate new solutions, and the change in the objective function value is calculated to determine whether it is accepted. Since the initial temperature of the algorithm is relatively high, new solutions that increase E may also be accepted at the beginning, thus jumping out of the local minimum. Then, by slowly lowering the temperature, the algorithm may eventually converge to the global optimal solution. The specific process is as follows:

[0060] Let T = T0 represent the initial temperature for starting annealing, import the initial grouping generated by the improved algorithm, and calculate the corresponding objective function value Ex0);

[0061] Let r = kT, where k is between 0 and 1, which is the temperature drop rate;

[0062] For the current solution x t Apply random perturbations to generate a new solution x in its neighborhood t+1 , and calculate the corresponding objective function value E(x t+1 ),calculate

[0063] ΔE=E(x t+1 )-E(x t )

[0064] If ΔE<0, accept the new solution as the current solution, otherwise according to the probability Decide whether to accept the new solution.

[0065] The mechanism of simulated annealing to accept new solutions is to accept new solutions if they are better than the current solutions, otherwise it is determined whether to accept the new solutions based on the Metropolis criterion. The acceptance probability is:

[0066]

[0067] As shown in the above formula, assuming that the solution currently being searched is x t , the corresponding system energy (objective function) is E t , apply random perturbations to the search point to generate a new solution x t+1 , accordingly, the system energy is E t+1 , then the system searches for the point from x t to x t+1 The acceptance probability of the transition is given by the above formula.

[0068] The experiment was carried out using the method described in this embodiment:

[0069] First, the traditional simulated annealing algorithm is more comprehensive than the result obtained by simply using the greedy algorithm (GreedyAlgorithm) and the dynamic programming method on the MBIST grouping problem, and the robustness is better, but the running time is usually longer. And this experiment adopts the method (MBIST) grouping algorithm described in the present embodiment compared to the existing simulated annealing algorithm, and significantly improves the grouping effect and running time. Because the initial solution is not randomly generated, but the initial solution generated by using the greedy algorithm to perform preliminary grouping under the constraint condition is satisfied. This greatly accelerates the convergence speed of the subsequent simulated annealing algorithm, greatly improves the operating efficiency of the algorithm, and the running time also significantly decreases.

[0070] Secondly, in the simulated annealing process, this experiment uses randomly selected memories to move and generate new solutions. Of course, the new solutions all meet the grouping constraints. This maintains the random perturbation feature of the simulated annealing algorithm, which improves the robustness of the algorithm and can maintain relatively good grouping results when facing various complex memory grouping scales. Some case design information of this experiment is as follows Figure 3 (a) Figure 3 (b) as shown; terminal program operation diagram, such as Figure 4 The obtained grouping results are shown in Table 1.

[0071] Table 1: Grouping results of example test cases from industry:

[0072] Case Name Testcase01 Testcase02 Testcase03 Testcase04 Testcase05 Distance Constraint 700000 350000 500000 500000 450000 Dynamic Power Constraints 0.15 0.2 0.3 0.15 0.2 Number of groups 14 132 35 8 828

[0073] As can be seen from this, the method described in the present embodiment is directed to the MBIST field in the electronic design automation of integrated circuits, and a kind of automatic planning grouping method and system for the built-in self-test circuit of memory based on the combination of the greedy algorithm and the simulated annealing algorithm are proposed. The result of the greedy algorithm used in the present method is used as the initial solution of the simulated annealing and the position movement of the memory is used to realize the particle thermal motion in the simulated annealing algorithm in the simulated annealing process. The position movement is random, which enhances robustness. This is different from the traditional simulated annealing algorithm, the greedy algorithm or the dynamic programming method used separately in the existing method. Through this comprehensive optimization, the global optimal solution or the solution close to the optimal solution can be searched more effectively in the solution space. In addition, multiple links are optimized together, and the algorithm can be improved at different levels, thereby improving overall efficiency and avoiding being trapped in the local optimal solution. Secondly, different links form a synergistic effect, promote each other, and improve the global optimization ability of the algorithm.

[0074] The above disclosures are only several specific implementation scenarios of the present invention, but the present invention is not limited thereto, and any changes that can be thought of by a person skilled in the art should fall within the protection scope of the present invention. The above serial numbers of the present invention are only for description and do not represent the advantages and disadvantages of the implementation scenarios.

Claims

1. An efficient automatic planning grouping method for memory built-in self-test, characterized in that: include: Perform preliminary grouping on the memory to be grouped, and then read the grouping information of the memory to be grouped in batches; According to the grouping information, any of the preliminary groups is regrouped according to the matching constraints, and the memories satisfying the matching constraints are grouped into the same group to obtain a regrouping result; Use the greedy algorithm to process the regrouping results to form an initial solution; The initial solution is optimized using a simulated annealing algorithm to reduce the number of groups and obtain a final grouping result.

2. The efficient automatic planning grouping method for memory built-in self-test according to claim 1, characterized in that: The step of optimizing the initial solution by using a simulated annealing algorithm comprises: Let T = T0 represent the initial temperature for starting annealing, and the objective function value E(x0); As time goes by, T = kT, where k is the rate of temperature drop; For the current solution x t Apply random perturbations to generate a new solution x in its neighborhood t+1 , and obtain the corresponding objective function value E(x t+1 ); When ΔE=E(x t+1 )-E(x t ), if ΔE<0, accept the new solution as the current solution, otherwise according to the probability Decide whether to accept the new solution; If the new solution is better than the current solution, the new solution is accepted, otherwise the new solution is accepted with probability.

3. The efficient automatic planning grouping method for memory built-in self-test according to claim 2, characterized in that: The probability of accepting the new solution includes: The acceptance probability of the new solution is: Among them, x t is the solution being searched at the current moment; E t is the corresponding system energy or objective function; x t+1 For the new solution; E t+1 is the system energy corresponding to the new solution, P is the system energy from the search point x t to x t+1 The acceptance probability of the transition.

4. The efficient automatic planning grouping method for memory built-in self-test according to claim 1, characterized in that: The matching constraints include: One or more of distance constraints, power consumption constraints, and matching constraints.

5. The efficient automatic planning grouping method for memory built-in self-test according to claim 1, characterized in that: The method of processing the regrouping result by using a greedy algorithm to form an initial solution includes: Transform the problem of dealing with the regrouping results into a mathematical or abstract model while satisfying the constraints; Use the greedy criterion for each decision-making strategy; When all elements have been processed, no valid selection can be made, or the goal is reached, the algorithm is terminated and the initial solution is obtained.

6. The efficient automatic planning grouping method for memory built-in self-test according to claim 5, characterized in that: The strategy of using the greedy criterion for each decision step includes: Prioritize the planning scheme with fewer groups as the best solution; At each iteration, the current optimal element is selected according to the greedy criterion; and after each selection, check whether the current solution meets the constraints.