Complex system-oriented core particle combination optimization method
By using a mixed-integer linear programming model and the OR-Tools solver, the global and scalability problems in chip-particle combinatorial optimization are solved, enabling efficient and automated chip-particle combinatorial design, ensuring global optimal solutions and rapid iteration, supporting dynamic expansion of new constraints, and improving the efficiency and flexibility of integrated circuit design.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-11
- Publication Date
- 2026-03-27
AI Technical Summary
Existing core-particle combinatorial optimization techniques struggle to balance optimization efficiency, globality, and system scalability when dealing with complex system designs that are high-dimensional, multi-objective, strongly constrained, and dynamically changing. Expert systems rely on human experience and have poor scalability, while genetic algorithms have slow convergence speeds and are prone to getting trapped in local optima. The practical application of intelligent algorithms in engineering still requires breakthroughs.
The mixed-integer linear programming (MILP) mathematical model is adopted to transform the core combination optimization problem into a formalized solution problem. The solution is obtained by mathematical optimization engines such as OR-Tools, which achieves the global optimum. It supports the dynamic expansion of new core parameters and constraints, abandons the traditional simulation iteration, and ensures global optimum and automated design.
It significantly shortens the design cycle, improves the efficiency and reliability of core-particle combination design, ensures the global optimal solution, reduces verification costs, supports dynamic expansion of new constraints, and realizes the automation and intelligence of the design process.
Smart Images

Figure CN121745014A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of chiplet design, and particularly relates to a chiplet combination optimization method for complex systems. BACKGROUND
[0002] In the field of integrated circuit design, chiplet combination optimization as a key link of system in package (SiP) design is directly related to the overall performance, energy efficiency, volume, cost and manufacturability of the integrated circuit system. With the gradual approach of Moore's Law to the physical limit, chip design gradually shifts from single SoC (System on Chip) mode to multi-chiplet heterogeneous integration mode. Chiplets can be flexibly selected, combined according to function, process node, supplier, etc., to realize "on-demand assembly", greatly improving design freedom and system scalability. However, the reasonable combination of chiplets needs to be weighed and optimized under multiple targets and complex constraints such as computing power, power consumption, area, thermal design, bandwidth, delay, cost, etc., which has become one of the major challenges of high-end integrated circuit system design.
[0003] The existing mainstream chiplet combination optimization technology mainly includes the following two types: 1. Rule-based expert system: This method realizes automatic configuration and screening of chiplets by constructing a design rule library containing rich engineering experience (such as "prefer high-performance GPU chiplets in large-scale parallel computing scenarios, and prefer high-bandwidth interconnection chiplets in low-latency scenarios"). Expert systems can quickly make decisions and significantly improve design efficiency when dealing with standardized and regular application scenarios. However, its main defects are: (1) It relies on human experience and has high maintenance cost of rule library. The construction and improvement of rules require long-term accumulation and continuous updating of a large number of experts, and rules differ in different projects, different processes and different application scenarios. (2) Poor scalability, difficult to dynamically adapt to new constraints or new targets. When design requirements change (such as adding new performance indicators, power consumption limits or process compatibility constraints), the existing rule system often needs to be modified significantly, which limits the flexibility and adaptability of the system. (3) Difficult to globally optimize, easy to miss innovative combinations. Expert systems tend to "experience first", and have insufficient exploration ability for emerging chiplets or unconventional combinations, which are easily limited to known solution space.
[0004] 2. Genetic algorithm: Genetic algorithm is a kind of random optimization method based on the idea of evolution, which evolves through selection, crossover, mutation and other operations on the core particle combination individual, and seeks the optimal solution. Compared with the expert system, genetic algorithm does not depend on the pre-defined rule, has strong global search ability, and can handle large-scale optimization problems containing multiple objectives and multiple constraints. For example, it is widely used in practical core particle layout, interconnection topology, power consumption thermal design and other complex scenarios. However, genetic algorithm also has the following shortcomings: (1) slow convergence speed. With the increase of core particle types and combination size, the number of iterations and the consumption of computing resources of genetic algorithm increase significantly, and the optimization process takes a long time, which is difficult to meet the engineering demand of rapid iteration. (2) easy to fall into local optimum. Due to the randomness of the algorithm itself and the limitation of the fitness function design, genetic algorithm may stay at a suboptimal solution, and it is difficult to jump out of the local optimal trap, resulting in a large gap between the final result and the global optimal solution. (3) strong parameter dependence. The performance of genetic algorithm is significantly affected by selection strategy, crossover rate, mutation rate and other parameters, and improper parameter setting can easily affect the optimization effect, and there is no unified parameter self-adaption mechanism.
[0005] With the development of emerging technologies such as artificial intelligence and big data, some researches have begun to try to introduce intelligent algorithms such as machine learning and reinforcement learning into core particle combination optimization field. Through the mining of historical design data and the model adaptive ability, the optimization efficiency and globality can be improved to a certain extent. However, the current related methods are still in the exploratory stage, and the algorithm generalization, interpretability and engineering landing still need to be broken through.
[0006] In summary, the core particle combination optimization problem has complex characteristics such as high dimension, multiple objectives, strong constraints and dynamic changes. The existing methods based on rules such as expert system and genetic algorithm have different degrees of limitations in practical application, and it is still difficult to balance optimization efficiency, globality and system scalability. Therefore, there is an urgent need for a new, intelligent, efficient and scalable optimization method to meet the growing design needs of advanced integrated circuit systems and provide solid support for industry innovation and development. SUMMARY
[0007] The present application aims to solve the problems raised in the background art and proposes a core particle combination optimization method for complex systems.
[0008] In order to achieve the purpose of the present application, the present application provides a core particle combination optimization method for complex systems, which comprises the following steps:
[0009] Step 1, parameterized core particle demand definition;
[0010] Step 2, establishing performance constraint conditions, resource constraint conditions and mutual exclusion and dependence relationship between core particles;
[0011] Step 3, define the objective function and determine the weight;
[0012] Step 4, multi-stage screening is carried out, and the decision variable, constraint condition and objective function are solved to obtain an optimal core particle combination scheme.
[0013] Compared with the prior art, the significant progress of the application lies in: innovatively using a formal solving method instead of a traditional simulation method, and converting the core particle selection problem into a formal solving problem with strict mathematical expressions by establishing a mixed integer linear programming (MILP) mathematical model. Unlike the traditional method which relies on a large number of simulation verifications, the present method completely maps the design space into mathematical constraints, thereby ensuring a global optimal solution.
[0014] The core innovation of the method lies in abandoning the simulation iteration which relies on a large amount of time consumption in the traditional core particle combination design, and instead directly solving the optimal configuration through strict mathematical reasoning and formal proof. The solver integrates advanced mathematical optimization engines such as OR-Tools, which can efficiently generate a lowest-cost configuration scheme that meets the multi-dimensional constraints of computing power, power consumption, packaging area, etc.
[0015] The application realizes three key breakthroughs in the field of formal solving: first, the accurate mathematical modeling replaces the empirical simulation decision, making the core particle combination design completely automated and significantly reducing the solving time; second, based on the linear programming theory, the global optimality of the solution is guaranteed, unlike the simulation method which is prone to local optimum, and mathematical tools such as dual variable analysis are provided to strictly verify the feasibility of the scheme; third, a modular constraint definition architecture is adopted, which supports dynamic extension of new core particle parameters or addition of physical constraints through JSON configuration files, without the need to reconstruct the algorithm core, greatly improving the adaptability of the system.
[0016] The application breaks through the limitations of the traditional simulation method and realizes a methodological change from "statistical verification based on samples" to "formal proof based on full space". It has been verified that the formal solving scheme can obtain a global optimal solution in a single calculation, avoiding the problem that the simulation method needs repeated iteration and cannot guarantee the optimality. With the support of the lego-sim solver, when optimizing a complex system configuration containing more than 50 core particles, the solving time is shortened by 85%, while the correctness and optimality of the solution are guaranteed, providing a new paradigm for core particle combination design that is efficient and reliable.
[0017] The application also embodies the concept of "deterministic design", completely changing the iterative mode of "trial and error-verification" in traditional integrated circuit design. Through the formal method, designers can obtain mathematical guarantees for system behavior at the architecture stage, significantly shortening the design cycle and reducing verification costs. The widespread application of this method will restructure the entire chip design ecosystem, making the design process more efficient, automated and scalable.
[0018] In the future, the formalization framework based on the present application can further integrate machine learning techniques, enabling the system to learn from historical design data, continuously optimize constraint models and solving strategies, form an adaptive intelligent design system, and ultimately realize the automation and intelligentization of the design process.
[0019] To more clearly illustrate the functional properties and structural parameters of the present application, further description will be made in conjunction with the accompanying drawings and specific embodiments. BRIEF DESCRIPTION OF DRAWINGS
[0020] Figure 1 is the introduction diagram of the formalization solution provided by the present application;
[0021] Figure 2 is the use flowchart provided by the present application;
[0022] Figure 3 is the flowchart provided by the present application in cooperation with lego-sim;
[0023] Figure 4 is the test 1 result diagram provided by the present application;
[0024] Figure 5 is the test 2 result diagram provided by the present application. DETAILED DESCRIPTION
[0025] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments of the present application; based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of the present application.
[0026] The present application proposes a combinatorial optimization method for heterogeneous core particle design, which converts the core particle combinatorial optimization problem into a solvable problem with expressions through the modeling method of mixed integer linear programming (MILP), and realizes the automatic search of global optimal solution by using optimization engines such as OR-Tools. The present application can generate the core particle combination scheme with the optimal cost under the premise of meeting various constraint conditions according to the given performance requirements.
[0027] The implementation process of the present system mainly includes several key stages such as parameterized core particle demand definition, constraint condition construction, multi-objective optimization model construction, solver configuration and optimization solving, and simulation verification closed-loop integration, and the detailed implementation methods will be described one by one in the following.
[0028] The detailed implementation process of the core particle combinatorial optimization will be described in detail below:
[0029] Step 1, parameterized core particle demand definition;
[0030] Step 11: Establish the core particle library and classify it;
[0031] Establish a complete core particle library and classify it reasonably. In this invention, the core particles are clearly divided into the following types:
[0032] General-purpose computing core particles: including various specifications of CPU cores, responsible for system control and general-purpose computing tasks;
[0033] Accelerated core particles: including GPU cores and special-purpose computing accelerators, used for parallel computing and specific algorithm acceleration;
[0034] Storage core particles: including various capacities and bandwidths of storage units, used for data caching and temporary storage;
[0035] IO core particles: including various interface controllers, used to realize data exchange with external systems;
[0036] Special function core particles: including AI accelerators, video codecs and other specific function units;
[0037] Step 12: For each core particle, establish a standardized performance parameter matrix to describe its performance in various performance dimensions:
[0038] ;
[0039] Where, represents the quantitative performance of the th core particle in the th performance indicator; for general-purpose computing core particles, the performance parameter matrix includes indicators such as computing power TOPS, power consumption W, packaging area, and cost;
[0040] Step 13: Define decision variables:
[0041] After establishing the core particle library, the system defines integer decision variables , where represents the number of core particles, represents the number of the th core particle, and ; Where: : represents the number of general-purpose computing core particles of model A; : represents the number of accelerated core particles of model B; : represents the number of storage core particles of model C; ; : represents the number of special function core particles of model N;
[0042] The decision variables form the core of the corelet combination optimization problem, and the goal is to determine the optimal number of each corelet to use to meet performance requirements and minimize total cost.
[0043] Step 14, build a performance requirement expression model:
[0044] In order to accurately map the application requirements to the corelet specifications, a structured performance requirement expression model is created:
[0045] ;
[0046] Each requirement dimension is further refined as:
[0047] ;
[0048] The three parameters in each dimension represent the minimum requirement, the expected upper limit, and the weight coefficient, respectively. In actual corelet design, these requirements can be specifically expressed as:
[0049] : represents the AI computing power requirement of 10 TOPS, with an expected upper limit of 20 TOPS, and a weight of 0.5
[0050] : represents the memory bandwidth of 500 GB / s, with an expected upper limit of 1000 GB / s, and a weight of 0.3
[0051] : represents the power consumption of 20 W (to ensure basic functionality), with a maximum of 50 W, and a weight of 0.2
[0052] Based on the characteristics of the workload, a weight automatic learning algorithm is used to automatically map from application characteristics to optimization weights:
[0053] ;
[0054] By analyzing the computational density, memory access pattern, and parallelism of the application, the weight coefficients of each performance dimension are automatically determined, making the optimization target more in line with actual application requirements.
[0055] Step 2, establish performance constraints, resource constraints, and mutual exclusion and dependency relationships between corelets;
[0056] Step 21, after determining the decision variables and performance requirements, strict constraint conditions are established to ensure that the generated corelet combination scheme meets all performance requirements. For each performance or functional indicator , the following linear constraint conditions are established:
[0057] ;
[0058] wherein: is the contribution of the th corelet to the performance or metric; is the lower bound of the performance or metric sum, i.e. the minimum performance requirement; is the upper bound of the performance or metric sum (can be infinity);
[0059] Take the computing power requirement as an example. If the minimum computing power required by the system is 100 TOPS, the constraint condition can be expressed as:
[0060] ;
[0061] wherein, , , and the like represent the computing power (TOPS) provided by different corelets.
[0062] Step 22, construction of resource constraint conditions:
[0063] In addition to performance constraints, various resource limitations also need to be considered, including total power consumption, total area, total cost, etc. The resource constraint conditions are also determined by the following method:
[0064] ;
[0065] wherein: represents the consumption of the th corelet on the th resource; represents the total limit of the th resource; represents the total number of resource types;
[0066] For example, if the upper limit of the total power consumption of the system is 100W, the corresponding constraint condition is:
[0067] ;
[0068] wherein, , , and the like represent the power consumption (W) of different corelets.
[0069] Step 23, expressing the mutual exclusion and dependency relationship between corelets by linear constraint conditions;
[0070] The mutual exclusion and dependency relationship between corelets is expressed by linear constraint conditions; for example, certain corelets cannot be used at the same time, or certain corelets must be used in pairs, etc.
[0071]
[0072]
[0073] Step 3, define the objective function and determine the weight;
[0074] The optimization goal is to minimize the total cost under the premise of meeting all constraints, and the objective function is defined as:
[0075] ;
[0076] Wherein, is the cost coefficient of the i-th core particle; is the pure economic cost, or the weighted combination of cost, power consumption, and area:
[0077] ;
[0078] Wherein, , , is the weight coefficient of cost, power consumption, and area, which is dynamically adjusted. For example, for power-sensitive mobile devices, the value of can be increased; for cost-sensitive consumer products, the value of can be increased.
[0079] Step 4, multi-stage screening is carried out, and the decision variables, constraints, and objective function are solved to obtain the optimal core particle combination scheme.
[0080] In view of the multi-objective optimization challenge in core particle selection, the system innovatively proposes a multi-stage combination linear programming framework. The core idea of this framework is to gradually refine the solution space to improve the solution efficiency and scheme quality.
[0081] Step 41, set the model of two-stage screening;
[0082] Wherein, the coarse screening stage model is represented as:
[0083] Objective function:
[0084] ;
[0085] Constraint conditions (simplified constraint set):
[0086]
[0087] Wherein, is a continuous variable, allowing non-integer solutions to improve solution speed;
[0088] The mathematical model of the fine screening stage is:
[0089] ;
[0090] The constraints are as follows: (complete constraint set, corresponding to the constraint condition construction stage in the foregoing) :
[0091] 1) Performance constraints (corresponding to the establishment of performance constraints in the foregoing) :
[0092] ;
[0093] wherein is the contribution of the core particle to the performance index , the minimum requirement is , and the upper limit is ;
[0094] 2) Resource constraints (corresponding to the construction of resource constraints in the foregoing) :
[0095] ;
[0096] wherein is the consumption of the core particle on the resource , and the upper limit of the resource is ;
[0097] 3) Core particle relationship constraints (corresponding to the mutually exclusive and dependent relationships in the foregoing) :
[0098]
[0099] 4) Integer constraints and boundary conditions:
[0100]
[0101] The mathematical model of the above fine screening stage is completely compatible with the MILP standard form of the OR-Tools solver, all constraints are linear inequalities or equations, and can be efficiently solved by the SCIP solver, while meeting multiple constraints such as performance, resources, relationships, etc.
[0102] wherein, is the total optimization target value, representing the comprehensive performance score; is the total number of core particle types that can be selected, such as the number of different functional core particles such as CPU, GPU, and storage; is the number of system design constraint conditions, including power consumption, area, bandwidth, and cost; is the cost coefficient, representing the contribution value or resource consumption of the i-th core particle under the j-th constraint; is the decision variable 0 or 1, representing whether to select the i-th core particle to meet the j-th system requirement; The resource consumption coefficient for the i-th type of chip, such as power consumption or area size; The resource limit for the j-th constraint, such as the system's total power consumption limit or total area limit;
[0103] Step 42, perform coarse screening:
[0104] In the initial screening stage, the system constructs a simplified linear programming model, focusing on the most critical resource constraints to achieve rapid candidate solution generation. The specific implementation is as follows:
[0105] Step 421, Set the constraints for the coarse screening stage:
[0106] The initial screening stage only considers key resource constraints, including:
[0107] Total power consumption constraint: ,in For the first The power consumption of the seed core, The system's total power consumption is capped; total area constraint: ,in For the first The area of the seed core, Maximum total system area; Minimum performance requirements: Only for the most critical performance indicators (e.g., minimum computing power requirements);
[0108] The following constraints are not considered in the coarse screening stage: mutual exclusion between core particles, core particle dependency, detailed bandwidth constraints, time delay constraints, and thermal design constraints.
[0109] Step 422, set the boundary conditions for the coarse screening stage:
[0110] Continuous relaxation is applied to the decision variables: (Non-integer solutions are allowed to improve solution speed);
[0111] The maximum number of cores is set to a lenient limit: ,in This is twice the theoretical maximum value (such as twice the inventory or physical limit).
[0112] Step 423, set the screening method for the coarse screening stage:
[0113] Call the linear programming solver GLOP for a fast preliminary solution. This solver is based on the simplex method or interior point method and is suitable for continuous variable optimization problems.
[0114] Solve for the objective function: ,in For core Cost coefficient;
[0115] After obtaining the preliminary optimal solution, the candidate set is generated by the following method :
[0116] The core type of in the continuous solution is marked as a candidate; the Top-K lowest-cost integer combination schemes are generated by combinatorial optimization; each scheme in is preliminarily evaluated to calculate the cost and key performance indicators, and the Top-K candidates (such as K=10) that meet the basic constraints are selected into the fine screening stage;
[0117] Step 43, fine screening:
[0118] In the fine screening stage, the system builds a complete mixed integer linear programming MILP model based on the coarse screening results, adds all constraint conditions, and realizes accurate solution; the following is realized:
[0119] Step 431, set the constraint conditions of the fine screening stage:
[0120] The fine screening stage considers the complete constraint condition set, which completely corresponds to the constraints defined in the "constraint condition construction stage" in the foregoing:
[0121] Performance constraint conditions (corresponding to the performance constraints in the foregoing):
[0122] For each performance indicator , a complete two-boundary constraint is established:
[0123] ;
[0124] Where is the minimum performance requirement, is the upper limit of performance (which can be )
[0125] Specifically, it includes: computing power constraint, memory bandwidth constraint, IO bandwidth constraint, computing delay constraint;
[0126] Resource constraint conditions (corresponding to the resource constraints in the foregoing):
[0127] For each resource , an upper limit constraint is established:
[0128] ;
[0129] Where is the consumption of the core on the resource , is the upper limit of the resource;
[0130] Specifically, it includes: total power consumption, total area, total cost, total thermal design power TDP;
[0131] Corelet relationship constraints (corresponding to the above-mentioned mutual exclusion and dependency relationships):
[0132] Mutual exclusion constraint: i.e., corelets and cannot be used at the same time;
[0133] Dependency constraint: i.e., corelet must be used before corelet , is a large constant;
[0134] Pairing constraint: i.e., corelets and must be used in pairs;
[0135] Proportion constraint: i.e., the number of corelets and must satisfy a certain proportion;
[0136] Process compatibility constraint (if any):
[0137] ;
[0138] where and are corelet groups of different process nodes to ensure process compatibility;
[0139] The above constraints are fully compatible with the OR-Tools solver, and all constraints can be expressed as linear inequalities or equations, meeting the standard form of the MILP model.
[0140] Step 432, set the boundary conditions of the fine screening stage:
[0141] Decision variables are subject to integer constraints: (requiring integer solutions, consistent with the actual number of corelets);
[0142] The upper limit of the number of corelets is set as the precise boundary:
[0143] Based on the coarse screening results, the range is tightened: if the corelet is not selected in the coarse screening, set ; for the selected corelets, set the actual constraints: where is the actual available inventory or physical slot limit; the performance indicator is strictly limited within the demand range: not allowed to exceed;
[0144] Step 433, set the screening method of the fine screening stage corresponding to the OR-Tools solver:
[0145] Step 4331: Initialize the SCIP solver
[0146] Call OR-Tools pywraplp.Solver.CreateSolver(’SCIP’) to create an MILP solver instance;
[0147] SCIP (Solving Constraint Integer Programs) is suitable for handling discrete decision variables and complex constraints;
[0148] Step 4332: Create integer decision variables:
[0149] For each core particle type , create an integer variable: res[i] = solver.IntVar(0, N_max[i], ’res_i’);
[0150] The lower limit of the variable is 0 and the upper limit is the boundary condition of the fine screening stage ;
[0151] Step 4333: Add all linear constraints:
[0152] Performance constraints: solver.Add(sum(res[i]*a[i][j] for i in range(n)) >= c[j]);
[0153] Resource constraints: solver.Add(sum(res[i]*b[i][k] for i in range(n)) <= B[k]);
[0154] Mutually exclusive constraints: solver.Add(res[i] + res[j] <= 1);
[0155] Add dependency constraints, pairing constraints, etc. in the same way;
[0156] Step 4334: Set the objective function;
[0157] Define the optimization objective: objective = solver.Objective();
[0158] Set the coefficient: objective.SetCoefficient(res[i], e[i]);
[0159] Set minimization: objective.SetMinimization();
[0160] Step 4335: Call the solver and get the result:
[0161] Execute the solution: status = solver.Solve();
[0162] Check the solution status: if status == pywraplp.Solver.OPTIMAL, it means an optimal solution is found;
[0163] Extract the solution: optimal_res[i] = res[i].solution_value();
[0164] Calculate the optimal cost: optimal_cost = objective.Value();
[0165] Step 4336: Generate a set of candidate solutions :
[0166] Output the optimal core particle combination scheme that meets all the constraints;
[0167] If there are multiple optimal solutions, distinguish them by adding a secondary optimization target (such as minimizing power consumption);
[0168] Generate a detailed performance report, including the satisfaction of each constraint and resource utilization.
[0169] Through the above screening process, the OR-Tools solver can simultaneously satisfy multiple constraints such as performance constraints, resource constraints, core particle relationship constraints, and process compatibility constraints, ensuring the global optimality and practical feasibility of the solution.
[0170] During the implementation of this application, the solver configuration and optimization solving are involved; the specific process includes:
[0171] Initialization and configuration of OR-Tools solver:
[0172] In order to solve the above linear programming problem, the system selects different solver engines according to the optimization stage:
[0173] 1) Coarse screening stage solver configuration:
[0174] System initializes linear programming solver GLOP: solver = pywraplp.Solver.CreateSolver(’GLOP’)
[0175] GLOP is based on simplex method, suitable for linear programming problems with continuous variables, and has fast solving speed. In the coarse screening stage, the decision variables are relaxed as continuous variables: res[i] = solver.NumVar(0, N_max_loose, ’res_i’); Only key constraints (total power consumption, total area, minimum performance requirement) are added, and the number of constraints is usually level; The solving time is usually in seconds, suitable for fast screening of candidate schemes.
[0176] 2) Fine screening stage solver configuration:
[0177] System initializes the mixed integer linear programming solver SCIP: solver = pywraplp.Solver.CreateSolver(’SCIP’); SCIP (Solving Constraint Integer Programs) is a high-performance MILP solver, especially suitable for handling discrete decision variable problems involved in the system; In the fine screening stage, the decision variables are strictly constrained to be integers: res[i] = solver.IntVar(0, N_max_real, ’res_i’);
[0178] Add all constraints, including:
[0179] Performance constraints (computing power, bandwidth, delay, etc.): ;
[0180] Resource constraints (power consumption, area, cost, etc.): ;
[0181] Core particle relationship constraints (mutually exclusive, dependent, paired, proportional): such as ;
[0182] Process compatibility constraints: ensure compatibility of core particles of different process nodes;
[0183] The SCIP solver of OR-Tools can handle hundreds of constraints at the same time, and the number of constraints can reach level;
[0184] The solving time is usually in minutes according to the problem size, ensuring global optimality.
[0185] 3) Solver failure handling mechanism:
[0186] If the solver initialization fails, the system will output detailed error information and terminate execution; if the solver returns an INFEASIBLE state, indicating that the constraints are too strict, the system will prompt the user to relax the constraints; if the solver returns an UNBOUNDED state, indicating that the objective function is unbounded, the system will check if the constraints are missing.
[0187] In the core particle design scenario, since the number of core particles must be an integer, using the integer programming solver SCIP in the fine screening stage is the most suitable choice. By selecting different solvers in stages, the system ensures both the speed of solving in the coarse screening stage and the accuracy and global optimality in the fine screening stage. Linear constraint addition and objective function construction;
[0188] After initializing the solver, the system creates an array of decision variables to represent the number of each core particle used. For each core particle, the system sets the lower limit of its usage number to 0 and the upper limit to the maximum available number, and assigns each variable a unique identifier.
[0189] Then, the system adds linear constraints one by one according to the constraint condition model described above. For performance constraints, the system creates a range constraint, setting the lower limit to the minimum performance requirement and the upper limit to the maximum allowed value, and sets the contribution coefficient of each core particle to that performance indicator. For resource constraints, the system creates an upper limit constraint, setting the lower limit to 0 and the upper limit to the resource limit, and sets the consumption coefficient of each core particle to that resource.
[0190] Finally, the system defines the optimization objective function. The system creates a target function object, sets the coefficient (cost coefficient) of each decision variable in the target function, and sets the target to minimize the total cost.
[0191] In the core particle design scenario, the objective function coefficient usually represents the comprehensive cost of each core particle, which may include the weighted sum of economic cost, power consumption cost, area cost, and other factors.
[0192] Optimization solving and result analysis:
[0193] After completing the model construction, the system calls the solver to perform optimization calculation. The system checks the solving state, and if the state is "OPTIMAL", it indicates that the optimal solution has been found. At this time, the system outputs the optimal usage number of each core particle (the number of core particles with a number greater than 0), and calculates the total cost of the optimal scheme. If no feasible solution is found, the system will prompt the user to check if the constraints are too strict.
[0194] After the solution is completed, the system will conduct in-depth analysis on the results, evaluate whether the performance indicators meet the requirements, and assess key indicators such as resource utilization and cost-effectiveness ratio. For the core particle design scenario, the system will also generate detailed core particle layout schemes and interconnection topologies to provide guidance for subsequent physical implementation.
[0195] The application also provides a simulation verification closed-loop integrated system for verifying the effectiveness of the method.
[0196] Implementation of data exchange protocol:
[0197] To achieve seamless integration of optimization solving and simulation verification, the system designs a standardized data exchange protocol. This protocol uses a structured data format and includes the following core components:
[0198] Parameters (Params): Contains basic information such as core particle type definition, performance parameter matrix, resource consumption matrix, and cost coefficient;
[0199] Constraints (Constraints): Contains optimization conditions such as performance constraints, resource constraints, and relationship constraints;
[0200] Solutions (Solutions): Contains optimization results such as the number of core particles used, total cost, actual values of each performance indicator, and actual usage of each resource;
[0201] Feedback (Feedback): Contains simulation feedback information such as simulation results, performance gaps, and optimization suggestions.
[0202] This protocol ensures efficient data exchange between the optimizer and the simulation environment, allowing the entire system to operate in a closed-loop manner, continuously optimizing core particle combination schemes.
[0203] Execution flow of multi-fidelity progressive optimization;
[0204] The system innovatively establishes a multi-fidelity progressive optimization strategy, gradually improving optimization accuracy from low precision to high precision:
[0205] First stage: Fast linear model estimation:
[0206] - Use a simplified linear model for preliminary evaluation;
[0207] - Use theoretical calculation methods to quickly estimate performance indicators;
[0208] - Generate a preliminary candidate solution set;
[0209] - Optimize time controlled at the second level;
[0210] Second stage: Medium-precision functional simulation verification:
[0211] - Verify candidate solutions using function-level simulators;
[0212] - Evaluate performance of solutions under typical workloads;
[0213] - Identify potential functional compatibility issues
[0214] - Optimization time control is at the minute level;
[0215] Third stage: High-precision physical-level corelet simulation:
[0216] - Perform physical-level simulation using high-precision simulation tools;
[0217] - Evaluate physical characteristics such as power consumption, timing, thermal design, etc.
[0218] - Verify signal integrity and interconnection performance between corelets;
[0219] - Generate the final optimized solution;
[0220] - Optimization time may reach the hour level;
[0221] Through this multi-level optimization strategy, the system can significantly improve optimization efficiency while ensuring optimization quality, especially suitable for the design of large-scale heterogeneous corelet systems.
[0222] Implementation case: Corelet optimization design for intelligent edge camera
[0223] To verify the effectiveness of this system, assume the following to give an intelligent edge camera-oriented corelet optimization design case.
[0224] Intelligent cameras need to complete AI tasks such as face recognition and behavior analysis on the edge side, with the following design constraints:
[0225] AI computing power: at least 8 TOPS (supporting real-time video analysis);
[0226] Image processing capability: at least 1080p@30fps;
[0227] Power upper limit: no more than 5W (passive cooling without fan);
[0228] Cost upper limit: no more than 80 yuan (aiming at the consumer market);
[0229] Chip area: no more than 50mm 2 (Small size design requirement);
[0230] Corelet library:
[0231] The optional corelet types and their performance parameters are as follows:
[0232] Smart camera can choose core particle types and performance parameters:
[0233]
[0234] Optimization solving process:
[0235] The system converts the above requirements into a mixed integer linear programming model:
[0236]
[0237] Where, is the cost coefficient, is the AI computing contribution, is the image processing capability contribution (quantified as 0-1), is the power consumption, is the area.
[0238] The system first creates a SCIP solver, then defines five integer decision variables representing the number of each core particle used, with each variable ranging from 0 to 10. Then, the system adds four types of constraints: AI computing power is not less than 8TOPS, image processing capability meets the demand, total power consumption does not exceed 5W, and total area does not exceed 50mm 2 . Finally, the system sets the objective function as minimizing the total cost, and calls the solver to perform optimization calculation.
[0239] Optimization results:
[0240] After multi-stage optimization solving, the system gets the optimal core particle combination scheme:
[0241] General CPU: 1 (system control);
[0242] Visual DSP: 1 (image preprocessing);
[0243] AI accelerator A: 2 (AI inference);
[0244] Image processor: 1 (video encoding and decoding);
[0245] The performance indicators of the scheme are:
[0246] AI computing power: 9.5 TOPS (meets the requirements)
[0247] Image processing: supports 1080p@30fps (meets the requirements)
[0248] Total power consumption: 4.9W (does not exceed the upper limit)
[0249] Total area: 43mm 2 (does not exceed the upper limit)
[0250] Total cost: 77 yuan (not exceeding the upper limit)
[0251] Verification and benefits:
[0252] Through the test verification on the actual prototype, the final solution can meet the real-time requirements of end-side face recognition and behavior analysis, and improve the customizability and upgrade flexibility of the system.
[0253] At present, the solver has been successfully integrated in lego-sim, providing a core particle selection system for the core particle library of lego-sim. The following is the solution test of lego-sim after integrating the solver.
[0254] The flow chart of cooperation with lego-sim is as follows Figure 3 :
[0255] The benchmark for testing is to perform 400 matrix operations with a width of 100.
[0256] Test 1:
[0257] Set all to default properties, that is, the program will automatically select the appropriate price result. The results are as follows, the cycle number of cpu and gpu running part is higher, but the price is relatively low.
[0258] Test 2:
[0259] Make requirements for acceleration and cache, and release the requirement for area. The results are as shown in Figure 5 Compared with Figure 4 , the total cost is higher, and the cycle number is greatly reduced.
[0260] Although embodiments of the present application have been shown and described, it is to be understood that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the present application, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A core-particle combination optimization method for complex systems, characterized in that, The method includes: Step 1, Parameterize the core requirement definition; Step 2: Establish performance constraints, resource constraints, and mutual exclusion and dependency relationships between chips; Step 3: Define the objective function and determine the weights; Step 4: Perform multi-stage screening, solve the decision variables, constraints and objective function to obtain the optimal core particle combination scheme.
2. The method according to claim 1, characterized in that, Step 1, parameterize the core requirement definition, including: Step 11: Establish and classify the core material library; Cores are clearly classified into the following types: General-purpose computing chips: These include CPU cores of various specifications, responsible for system control and general-purpose computing tasks; Accelerated chips: These include GPU cores and dedicated computing accelerators for parallel computing and specific algorithm acceleration; Storage chips: These include storage units of various capacities and bandwidths, used for data caching and temporary storage; IO-type cores: These include various interface controllers used to enable data exchange with external systems; Dedicated functional components: including specific functional units such as AI accelerators and video codecs; Step 12: For each type of chip, establish a standardized performance parameter matrix to describe its performance across various dimensions. ; in, Indicates the first Seed core in the first Quantitative performance indicators; for general computing chips, the performance parameter matrix includes indicators such as computing power (TOPS), power consumption (W), package area, and cost. Step 13, Define decision variables: After establishing the core library, the system defines integer decision variables. ,in The part number represents the core chip. Indicates the first The number of cores used, and ;in: : Indicates the number of general-purpose computing cores of type A used; : Indicates the number of acceleration cores of type B used; : Indicates the number of memory chips of type C used; ; : Indicates the number of dedicated functional cores of type N used; The goal of the decision variables is to determine the optimal quantity of each type of chip to use in order to meet performance requirements and minimize total cost. Step 14, construct an expression model of performance requirements: ; Each demand dimension Further refined to: ; The three parameters in the equation represent the minimum requirement, the upper limit of expectation, and the weighting coefficient for that dimension, respectively. Based on workload characteristics, an automatic weight learning algorithm is used to achieve automatic mapping from application characteristics to optimized weights: ; By analyzing the application's computational density, memory access patterns, and parallelism, the weighting coefficients of each performance dimension are automatically determined, making the optimization objectives more aligned with actual application needs.
3. The method according to claim 2, characterized in that, Step 2, establish performance constraints, resource constraints, and mutual exclusion and dependency relationships between chips; including: Step 21, for each performance or functional metric Establish the following linear constraints: ; in: It is the first Individual core particles in the indicators Contributions; It is the lower limit of the sum of performance or indicators, i.e., the minimum performance requirement; It is the upper limit for the sum of performance or metrics; ; Step 22, Constructing resource constraints: Resource constraints are also determined using the following method: ; in: Indicates the first Seed core in the first Consumption of resources; Indicates the first The total limitation of species resources; Indicates the total number of resource types; ; Step 23: Use linear constraints to represent the mutual exclusion and dependency relationships between core particles; The mutual exclusion and dependency relationships between core particles are represented by linear constraints. ; 4. The method according to claim 3, characterized in that, Step 3, define the objective function and determine the weights; including: Under the premise of satisfying all constraints, the optimization objective is to minimize the total cost, and the objective function is defined as: ; in, It is the first The cost coefficient of each chip; it can be the pure economic cost, or a weighted combination of factors such as cost, power consumption, and area. ; in, , , These are weighting coefficients for cost, power consumption, and area, which are dynamically adjusted.
5. The method according to claim 4, characterized in that, Step 4 involves multi-stage screening, solving for the decision variables, constraints, and objective function to obtain the optimal core-particle combination scheme, including: Step 41, set up a two-stage screening model; Step 42, perform coarse screening; Step 43, fine screening: In the fine screening stage, based on the coarse screening results, the system constructs a complete mixed integer linear programming (MILP) model, adds all constraints, and achieves accurate solution.
6. The method according to claim 5, characterized in that, Step 41, setting up a two-stage screening model; including: The model for the coarse screening stage is represented as follows: Objective function: ; Constraints (Simplified Constraint Set): in, For continuous variables, non-integer solutions are allowed to improve solution speed; The mathematical model for the fine screening stage is as follows: ; The constraints are as follows: Performance constraints: ; in For core In performance metrics Contributions, As the minimum requirement, The upper limit; Resource constraints: ; in For core In resources On the consumption, This represents the maximum resource limit. Core-particle relationship constraints: Integer constraints and boundary conditions: ; in, The overall optimization target value represents the comprehensive performance score; The total number of chip types that can be selected, such as the number of different functional chips like CPU, GPU, and storage. The number of system design constraints includes power consumption, area, bandwidth, and cost; The cost coefficient represents the contribution or resource consumption of the i-th type of core under the j-th constraint. The decision variable is 0 or 1, indicating whether to select the i-th type of core to meet the j-th system requirement; Let be the resource consumption coefficient for the i-th type of core; Let be the upper limit of resources for the j-th constraint.
7. The method according to claim 6, characterized in that, Step 42, coarse screening; including: Step 421, set the constraints for the coarse screening stage: The initial screening stage only considers key resource constraints, including: Total power consumption constraint: ,in For the first The power consumption of the seed core, The system's total power consumption is capped; total area constraint: ,in For the first The area of the seed core, Maximum total system area; Minimum performance requirements: Only for the most critical performance indicators ; The following constraints are not considered in the coarse screening stage: mutual exclusion between core particles, core particle dependency, detailed bandwidth constraints, time delay constraints, and thermal design constraints. Step 422, set the boundary conditions for the coarse screening stage: Continuous relaxation is applied to the decision variables: ; The maximum number of cores is set to a lenient limit: ,in This is the theoretical maximum value; Step 423, Set the screening method for the coarse screening stage: Use the linear programming solver GLOP to perform a fast preliminary solution; Solve for the objective function: ,in For core Cost coefficient; After obtaining the preliminary optimal solution, the candidate set is generated using the following method. : In continuous solutions The core types are marked as candidates; the Top-K lowest-cost integer combinations are generated through combinatorial optimization; and the core types are further classified as candidates. Each scheme is initially evaluated, its cost and key performance indicators are calculated, and the Top-K candidate schemes that meet the basic constraints (e.g., K=10) are selected to enter the fine screening stage.
8. The method according to claim 7, characterized in that, Step 43, fine screening, including: The implementation is as follows: Step 431, set the constraints for the fine screening stage: Performance constraints: For each performance metric Establish complete dual boundary constraints: ; in For minimum performance requirements, This represents the upper limit of performance. Specifically, these include: computing power constraints, memory bandwidth constraints, I / O bandwidth constraints, and computing latency constraints; Resource constraints: For each resource Establish upper limit constraints: ; in For core In resources On the consumption, This represents the maximum resource limit. Specifically, this includes: total power consumption, total area, total cost, and total thermal design power (TDP); Core-particle relationship constraints: Mutual exclusion constraint: Core particles and They cannot be used simultaneously; Dependency constraints: That is, using core particles Cores must be used first , It is a large constant; Pairing constraints: Core particles and Must be used in pairs; Proportional constraints: Core particles and The quantity must meet a specific ratio; Process compatibility constraints (if any): ; in and To ensure process compatibility for core assemblies at different process nodes; Step 432, set the boundary conditions for the fine screening stage: Integer constraints are used for decision variables: ; The maximum number of cores is set to a precise boundary: Based on the tightening range of the coarse screening results: if the core particles in the coarse screening... If not selected, then set For the selected core, set the actual constraints: ,in Limited by actual available inventory or physical slots; performance metrics are strictly limited to demand: No exceeding is allowed; Step 433: Set the correspondence between the screening method in the fine screening stage and the OR-Tools solver: Step 4331: Initialize the SCIP solver Call OR-Tools' pywraplp.Solver.CreateSolver('SCIP') to create a MILP solver instance; SCIP (Solving Constraint Integer Programs) is suitable for handling discrete decision variables and complex constraints; Step 4332: Create integer decision variables: For each core type Create an integer variable: res[i] = solver.IntVar(0, N_max[i], 'res_i'); The lower bound of the variable is 0, and the upper bound is the boundary condition of the fine screening stage. ; Step 4333: Add all linear constraints: Performance constraint: solver.Add(sum(res[i]*a[i][j] for i in range(n)) >= c[j]); Resource constraints: solver.Add(sum(res[i]*b[i][k] for i in range(n)) <= B[k]); Mutual exclusion constraint: solver.Add(res[i] + res[j] <= 1); Step 4334: Set the objective function; Define the optimization objective: objective = solver.Objective(); Set the coefficient: objective.SetCoefficient(res[i], e[i]); Set to minimize: objective.SetMinimization(); Step 4335: Call the solver and obtain the results: To perform the solver: status = solver.Solve(); Check the solution status: If status == pywraplp.Solver.OPTIMAL, it means that the optimal solution has been found; Extracting the solution: optimal_res[i] = res[i].solution_value(); Calculate the optimal cost: optimal_cost = objective.Value(); Step 4336: Generate a set of candidate solutions : Output the optimal core combination scheme that satisfies all constraints; If multiple optimal solutions exist, they can be distinguished by adding secondary optimization objectives; Generate detailed performance reports, including the satisfaction status of each constraint and resource utilization.