Global layout optimization method and device

The deep learning algorithm is used to calculate the deviation value of FPGA layout and iteratively update the hyperparameters, which solves the problem of poor robustness of the FPGA global layout method and improves the layout quality and efficiency.

CN118536447APending Publication Date: 2024-08-23BEIJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410811458.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-21
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

Existing FPGA global layout methods have problems such as poor robustness and low layout quality, making it difficult to effectively optimize the FPGA layout process.

Method used

The deep learning algorithm is used to calculate the deviation value of the first parameter, determine whether the layout position of the FPGA needs to be adjusted, and iteratively update the target hyperparameters to optimize the global layout process.

Benefits of technology

It improves the robustness judgment and calculation accuracy of FPGA layout, and improves the global layout quality and optimization efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118536447A
    Figure CN118536447A
Patent Text Reader

Abstract

The invention provides a global layout optimization method and device, and belongs to the technical field of deep learning, and the method comprises the steps: determining a first parameter according to a target position; the target position is a layout position in the FPGA. The first parameter is a global layout quality evaluation index. And judging whether the target position corresponding to the first parameter needs to be adjusted based on a first judgment criterion. And updating the target hyper-parameter based on a first algorithm in response to the condition that the target position corresponding to the first parameter needs to be adjusted. The target hyper-parameter is a parameter used for determining the target position. And optimizing the layout of the target position in the FPGA based on the target hyper-parameter. According to the global layout optimization method and device provided by the invention, the global layout quality and the optimization efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure belongs to the field of deep learning technology, and more specifically, to a global layout optimization method and device. Background Art

[0002] FPGA (Field Programmable Gate Array) is a field programmable gate array with thousands of configurable logic blocks inside. Users can configure these logic blocks according to the functions they need to implement. How to better layout and route each logic block during the configuration process becomes a major problem. The existing global layout methods usually have poor robustness and low layout quality. Therefore, a global layout optimization solution is proposed to solve the above problems. Summary of the invention

[0003] The purpose of the present disclosure is to provide a global layout optimization method and device to solve the problem of poor global layout quality in FPGA and improve the robustness of the global layout process in FPGA.

[0004] A first aspect of an embodiment of the present disclosure provides a global layout optimization method, including: Determine a first parameter according to a target position; the target position is a layout position in the FPGA; the first parameter is a global layout quality evaluation index; Determining whether the target position corresponding to the first parameter needs to be adjusted based on a first judgment criterion; In response to the target position corresponding to the first parameter needing to be adjusted, updating a target hyperparameter based on a first algorithm; the target hyperparameter is a parameter used to determine the target position; The layout of the target location is optimized in the FPGA based on the target hyperparameters.

[0005] A second aspect of the embodiments of the present disclosure provides a global layout optimization device, including: A parameter determination module, used to determine a first parameter according to a target position; the target position is a layout position in the FPGA; the first parameter is a global layout quality evaluation index; A judgment module, used for judging whether the target position corresponding to the first parameter needs to be adjusted based on a first judgment criterion; an adjustment module, configured to update a target hyperparameter based on a first algorithm in response to a target position corresponding to the first parameter requiring adjustment; the target hyperparameter being a parameter used to determine the target position; An optimization module is used to optimize the layout of the target position in the FPGA based on the target hyperparameter.

[0006] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of the above-mentioned global layout optimization method when executing the computer program.

[0007] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned global layout optimization method are implemented.

[0008] The beneficial effects of a global layout optimization method and device provided by the embodiments of the present disclosure are: The disclosed embodiment calculates the deviation value of the first parameter to determine whether the target position for layout in the FPGA needs to be adjusted, introduces a deep learning algorithm to iteratively update the target hyperparameter, and optimizes the global layout of the FPGA according to the target hyperparameter. The disclosed embodiment improves the robustness judgment of the first parameter, and through continuous updating, improves the calculation accuracy of the target hyperparameter, thereby improving the global layout quality and optimization efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0010] Figure 1 A schematic diagram of a flow chart of a global layout optimization method provided by an embodiment of the present disclosure; Figure 2 A global layout optimization flow chart provided for an embodiment of the present disclosure; Figure 3 A structural block diagram of a global layout optimization device provided by an embodiment of the present disclosure; Figure 4 A schematic block diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0011] In the following description, specific details such as specific system structures and technologies are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present disclosure. However, it should be clear to those skilled in the art that the present disclosure may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obstructing the description of the present disclosure with unnecessary details.

[0012] In order to make the purpose, technical solutions and advantages of the present disclosure more clear, specific embodiments will be described below in conjunction with the accompanying drawings.

[0013] Reference Figure 1 , Figure 1 A flowchart of a global layout optimization method provided in an embodiment of the present disclosure includes: S101: Determine a first parameter according to a target position. The target position is a layout position in the FPGA. The first parameter is a global layout quality evaluation index.

[0014] In this embodiment, FPGA is a digital circuit chip that can be repeatedly programmed. Users can implement the required functions by laying out the logic blocks contained inside it. The layout process can be achieved through programming technology. FPGA can be regarded as a logic device whose internal layout can be changed through programming. In order to improve the layout efficiency of FPGA, the global layout process of FPGA can be optimized through deep learning algorithms.

[0015] In this embodiment, the target position is the layout position of each logic block in the FPGA. According to the target position, a first parameter can be determined, wherein the first parameter is an evaluation index for quality evaluation of the global layout, and the first parameter can represent the difference between the current global layout and the functional layout that the user wants to achieve, thereby reflecting the quality of the current global layout.

[0016] For example, if the first parameter reflects that the current target position is significantly different from the functional layout that the user wants to achieve, then the target position needs to be adjusted to optimize the current layout. If the first parameter reflects that the current target position is slightly different from the functional layout that the user wants to achieve, then the global layout quality is high and can meet the user's needs.

[0017] S102: Determine whether a target position corresponding to a first parameter needs to be adjusted based on a first judgment criterion.

[0018] In this embodiment, the first judgment criterion may be a robustness judgment criterion, which may reflect whether there is a lack of robustness in the global layout optimization process. According to the first judgment criterion, it may be determined whether the current first parameter meets the robustness standard, thereby determining whether the target position corresponding to the first parameter needs to be adjusted.

[0019] S103: In response to the target position corresponding to the first parameter needing to be adjusted, updating the target hyperparameter based on the first algorithm. The target hyperparameter is a parameter used to determine the target position.

[0020] In this embodiment, if it is determined that the first parameter does not meet the first judgment criterion, it means that the target position needs to be adjusted. The specific adjustment method can be: updating the target hyperparameter according to the first algorithm. Among them, the target hyperparameter is a parameter used to determine the target position. The first algorithm can be an adaptive Nesterov algorithm, which mainly adjusts the layout position by an adaptive method to update the target hyperparameter. The nonlinear inverse solution problem of the target hyperparameter in the adaptive adjustment process can be approximated to a linear solution problem through the first algorithm, thereby improving the efficiency of layout optimization.

[0021] S104: Optimizing the layout of the target location in the FPGA based on the target hyperparameters.

[0022] In this embodiment, the target position can be adjusted in the FPGA according to the calculated target hyperparameters to achieve better layout optimization effect and improve the overall layout optimization quality. The specific optimization method may be: determining whether the target hyperparameters meet the conditions for exiting the iterative update, until the conditions are met, updating the corresponding target position according to the target hyperparameters, determining the difference between the updated target position and the target position before the update, until the difference is less than a preset value, and stopping the position update process.

[0023] From the above, it can be concluded that this embodiment can determine the layout quality of the current target position according to the judgment result of the first parameter by the first judgment criterion, so as to make corresponding layout adjustments. By improving the robustness of the judgment criterion, the robustness of the overall global layout is improved, and poor layout quality due to misjudgment is avoided, thereby improving the overall layout efficiency and quality.

[0024] In one embodiment of the present disclosure, the target hyperparameter includes: a first hyperparameter and a second hyperparameter. Updating the target hyperparameter based on the first algorithm includes: The first hyperparameter is scaled down based on the first scaling factor.

[0025] The second hyperparameter is calculated based on the reduced first hyperparameter and the first formula.

[0026] The first formula is:

[0027] in, represents the second hyperparameter after k iterations. represents the second hyperparameter after k+1 iterations. β represents the first scaling factor. represents the first hyperparameter after k+1 iterations.

[0028] In this embodiment, the target hyperparameter may include a first hyperparameter and a second hyperparameter, wherein the values ​​of the first hyperparameter and the second hyperparameter have a significant impact on the layout optimization result, so determining the values ​​of the first hyperparameter and the second hyperparameter is a very critical process. First, the first hyperparameter may be a weight coefficient representing the first algorithm model. In an iterative algorithm (such as gradient descent), the first hyperparameter may be updated with each iteration to gradually approach the optimal solution. In order to find the optimal solution for the first hyperparameter, it can be reduced based on the first scaling factor, and the reduced first hyperparameter can be expressed as:

[0029] Where k represents the number of iterations, represents the first hyperparameter after k+1 iterations, β represents the first scaling factor, which is a coefficient ranging from 0 to 1, and the first scaling factor can be obtained through multiple calculations.

[0030] The second hyperparameter can be calculated based on the reduced first hyperparameter and the first formula, where the second hyperparameter can represent the global layout step, which can reflect the distance that the layout unit moves in the target area or the size of the position adjustment during each iteration. The expressions of the first hyperparameter and the second hyperparameter after k+1 iterations can be expressed as:

[0031] , represents the first hyperparameter after k+1 iterations, represents the first hyperparameter after k iterations, represents the second hyperparameter after k+1 iterations.

[0032] Under the traditional method, the first hyperparameter solution after k iterations can be obtained according to the formula: This formula represents a complex nonlinear equation for solving the first hyperparameter. In order to improve the solving efficiency, an approximate equation can be used to solve the first hyperparameter. The approximate equation can be expressed as:

[0033] According to the reverse solution of the approximate equation, the first hyperparameter after k iterations can be obtained. The first hyperparameter after k iterations is substituted into the first hyperparameter expression after k+1 iterations to obtain the first formula, which can be expressed as:

[0034] in, represents the second hyperparameter after k iterations. represents the second hyperparameter after k+1 iterations. β represents the first scaling factor. represents the first hyperparameter after k+1 iterations.

[0035] It can be concluded from the above that this embodiment can obtain the target hyperparameter by calculating the first hyperparameter and the second hyperparameter, thereby converting the complex nonlinear calculation process into a linear calculation according to the target hyperparameter, thereby improving the calculation accuracy and efficiency.

[0036] In one embodiment of the present disclosure, judging whether the target position corresponding to the first parameter needs to be adjusted based on the first judgment criterion includes: In response to the first parameter being greater than or equal to the first deviation value, it is determined that the target position corresponding to the first parameter needs to be adjusted.

[0037] In response to the first parameter being less than the first deviation value, it is determined that the target position corresponding to the first parameter does not need to be adjusted.

[0038] In this embodiment, in order to determine whether the current layout meets the user's needs, a deviation judgment can be performed on the first parameter based on the first judgment criterion, where the first parameter can be a half-circle line length. The specific judgment process can be described in detail as follows: A first deviation value is determined. When the first parameter is greater than or equal to the first deviation value, it can be determined that the current first parameter does not meet the preset standard, that is, the corresponding target position needs to be adjusted. When the first parameter is less than the first deviation value, it can be determined that the first parameter meets the preset standard, and it is determined that the corresponding target position does not need to be adjusted.

[0039] For example, it is determined that the first deviation value is 3 and the first parameter is 5. At this time, the first parameter is greater than the first deviation value, indicating that the current first parameter does not meet the preset standard and its corresponding target position needs to be adjusted.

[0040] It can be concluded from the above that this embodiment can perform robustness judgment on the first parameter according to the first deviation value, thereby judging whether the current layout meets the robustness requirement, and making timely adjustments when it does not meet the requirement, so as to improve the quality and robustness of the global layout.

[0041] In one embodiment of the present disclosure, the first deviation value is calculated based on a second formula, and the second formula is:

[0042] Wherein, R represents the first deviation value. represents the average value of the first parameter. n represents the number of calculations of the first parameter. represents the optimal solution for the first parameter.

[0043] In this embodiment, the first deviation value may be calculated according to a deviation value calculation formula, wherein the deviation value calculation formula is:

[0044] Wherein, R represents the first deviation value, represents the mean value of the first parameter, represents the standard deviation of the operation on the benchmark test set, which can be expressed as:

[0045] In the calculation process of the first parameter, multiple calculations can be performed to obtain the results after multiple calculations, and the multiple results are processed to extract the data that falls within the optimal solution range, that is, n represents the number of calculations of the first parameter. Substituting the standard deviation into the deviation value calculation formula, we get the first formula:

[0046] In the first formula, the average value of the first parameter is It can be expressed as: .

[0047] It can be concluded from the above that this embodiment can provide a specific process for calculating the first deviation value, improve the scientific nature of the judgment of the first parameter, and thus improve the calculation accuracy of the overall layout optimization method.

[0048] Figure 2 A global layout optimization flow chart provided in an embodiment of the present disclosure, referring to Figure 2 In one embodiment of the present disclosure, determining a first parameter according to a target position includes: Initialize the target position randomly.

[0049] The first parameter is calculated based on the first gradient coefficient and the second gradient coefficient corresponding to the target position. The first gradient coefficient is the line length gradient coefficient corresponding to the target position. The second gradient coefficient is the density gradient coefficient corresponding to the target position.

[0050] In this embodiment, the specific process of determining the first parameter according to the target position can be described in detail as follows: The target position can be randomly initialized based on a global layout framework IR-DREAMPlaceFPGA (Improving Robustness ofDREAMPlaceFPGA Using Adaptive Nesterov Method), which is a process that assigns random values ​​to the weights and biases of the algorithm network before the algorithm model training begins. The purpose of this is to ensure that each neuron in the overall network has a different activation state at the beginning of training, thereby promoting the network to learn the diversity characteristics of the data.

[0051] The target position corresponds to a first gradient coefficient and a second gradient coefficient, respectively, and the first parameter can be calculated according to the first gradient coefficient and the second gradient coefficient. Among them, the first gradient coefficient refers to the line length gradient coefficient corresponding to the target position, and the line length gradient coefficient usually refers to the measure of the sensitivity of the length of a line segment to the change of position in geometry or physics. In this embodiment, the first gradient coefficient can be used to represent the measure of the sensitivity of the position box corresponding to the target position to the change of position. The second gradient coefficient can be the density gradient coefficient corresponding to the target position, and the density gradient coefficient is a physical quantity used to describe the change of the density of an object in space. In this embodiment, the second gradient coefficient can be used to represent the change of the density of the position box corresponding to the target position in the target area.

[0052] It can be concluded from the above that this embodiment can calculate the first parameter according to the first gradient coefficient and the second gradient coefficient, thereby improving the scientificity and efficiency of the calculation of the first parameter, thereby preliminarily improving the accuracy of the global layout optimization process.

[0053] Reference Figure 2 In one embodiment of the present disclosure, the layout of the target location is optimized based on the target hyperparameter, including: Update the target position based on the target hyperparameters.

[0054] Calculate the coefficient of change of the updated target position.

[0055] The second gradient coefficient of the target position is adjusted based on the first condition and the change coefficient. The first condition is to determine whether the change coefficient satisfies a predetermined coefficient.

[0056] In this embodiment, after obtaining the target hyperparameters, the layout of the target position can be optimized according to the target hyperparameters. The specific optimization process can be described in detail as follows: A first condition is set, the target position is updated according to the first condition and the target hyperparameter, and the change coefficient of the updated target position is calculated, and the change coefficient can reflect the degree of change of the target position. The first condition can be a judgment condition for determining whether the change coefficient corresponding to the target position meets the preset coefficient, and the second gradient coefficient corresponding to the target position is adjusted according to the change coefficient corresponding to the adjusted target position, and then a new first parameter is calculated and it is determined whether the target position needs to be adjusted further, thereby realizing a dynamic cycle process of adjusting the target position, until the change coefficient meets the first condition, and the update of the target position is stopped.

[0057] It can be concluded from the above that this embodiment can implement a dynamic update process of the target position according to the first condition, thereby improving the layout optimization quality to ensure the robustness of the global layout optimization process.

[0058] In one embodiment of the present disclosure, adjusting the second gradient coefficient of the target position based on the variation coefficient includes: In response to the variation coefficient being greater than the preset coefficient, the second gradient coefficient of the target position is adjusted based on a first adjustment rule. The first adjustment rule is to reduce the second gradient coefficient of the target position.

[0059] In this embodiment, the specific process of adjusting the second gradient coefficient can be described in detail as follows: When the change coefficient of the target position is greater than the preset coefficient, the second gradient coefficient can be adjusted according to the first adjustment rule. The first adjustment rule can be to reduce the second gradient coefficient of the target position within a preset range, calculate the first parameter according to the reduced second gradient coefficient, and further perform an adjustment operation on the target position until the change coefficient is less than or equal to the preset coefficient, stop the update process of the target position, and complete the global layout optimization process.

[0060] For example, the preset coefficient may be 1%. When the variation coefficient is greater than 1%, the second gradient coefficient of the target position is reduced by the first value, thereby further updating the target position until the variation coefficient is less than or equal to 1%, and the updating process of the target position is stopped.

[0061] It can be concluded from the above that this embodiment can further dynamically update the target position through the first condition, thereby ensuring the accuracy of global layout optimization and improving the quality of layout optimization.

[0062] Corresponding to a global layout optimization method of the above embodiment, Figure 3 This is a structural block diagram of a global layout optimization device provided by an embodiment of the present disclosure. For ease of explanation, only the parts related to the embodiment of the present disclosure are shown. Figure 3The global layout optimization device 20 includes: a parameter determination module 21, a judgment module 22, an adjustment module 23 and an optimization module 24.

[0063] The parameter determination module 21 is used to determine a first parameter according to a target position. The target position is a layout position in the FPGA. The first parameter is a global layout quality evaluation index.

[0064] The judgment module 22 is used to judge whether the target position corresponding to the first parameter needs to be adjusted based on the first judgment criterion.

[0065] The adjustment module 23 is configured to update the target hyperparameter based on the first algorithm in response to the target position corresponding to the first parameter needing to be adjusted. The target hyperparameter is a parameter used to determine the target position.

[0066] The optimization module 24 is used to optimize the layout of the target position in the FPGA based on the target hyperparameters.

[0067] In one embodiment of the present disclosure, the adjustment module 23 is specifically used to: The first hyperparameter is scaled down based on the first scaling factor.

[0068] The second hyperparameter is calculated based on the reduced first hyperparameter and the first formula.

[0069] The first formula is:

[0070] in, represents the second hyperparameter after k iterations. represents the second hyperparameter after k+1 iterations. β represents the first scaling factor. represents the first hyperparameter after k+1 iterations.

[0071] In one embodiment of the present disclosure, the determination module 22 is specifically configured to: In response to the first parameter being greater than or equal to the first deviation value, it is determined that the target position corresponding to the first parameter needs to be adjusted.

[0072] In response to the first parameter being less than the first deviation value, it is determined that the target position corresponding to the first parameter does not need to be adjusted.

[0073] In one embodiment of the present disclosure, the first deviation value is calculated based on a second formula, and the second formula is:

[0074] Wherein, R represents the first deviation value. represents the average value of the first parameter. n represents the number of calculations of the first parameter. represents the optimal solution for the first parameter.

[0075] In one embodiment of the present disclosure, the parameter determination module 21 is specifically used to: Initialize the target position randomly.

[0076] The first parameter is calculated based on the first gradient coefficient and the second gradient coefficient corresponding to the target position. The first gradient coefficient is the line length gradient coefficient corresponding to the target position. The second gradient coefficient is the density gradient coefficient corresponding to the target position.

[0077] In one embodiment of the present disclosure, the optimization module 24 is specifically used to: Update the target position based on the target hyperparameters.

[0078] Calculate the coefficient of change of the updated target position.

[0079] The second gradient coefficient of the target position is adjusted based on the first condition and the change coefficient. The first condition is to determine whether the change coefficient satisfies a predetermined coefficient.

[0080] In one embodiment of the present disclosure, the optimization module 24 is specifically used to: In response to the variation coefficient being greater than the preset coefficient, the second gradient coefficient of the target position is adjusted based on a first adjustment rule. The first adjustment rule is to reduce the second gradient coefficient of the target position.

[0081] Reference Figure 4 , Figure 4 Schematic block diagram of an electronic device provided by an embodiment of the present disclosure. Figure 4 The electronic device 300 in the embodiment shown may include: one or more processors 301, one or more input devices 302, one or more output devices 303 and one or more memories 304. The processors 301, input devices 302, output devices 303 and memories 304 communicate with each other via a communication bus 305. The memory 304 is used to store computer programs, which include program instructions. The processor 301 is used to execute the program instructions stored in the memory 304. The processor 301 is configured to call the program instructions to execute the functions of the modules in the above-mentioned device embodiments, such as Figure 3 The functions of modules 21 to 24 are shown.

[0082] It should be understood that in the embodiment of the present disclosure, the processor 301 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0083] The input device 302 may include a touch panel, a fingerprint collection sensor (for collecting the user's fingerprint information and fingerprint direction information), a microphone, etc., and the output device 303 may include a display (LCD, etc.), a speaker, etc.

[0084] The memory 304 may include a read-only memory and a random access memory, and provide instructions and data to the processor 301. A portion of the memory 304 may also include a non-volatile random access memory. For example, the memory 304 may also store information about the device type.

[0085] In a specific implementation, the processor 301, input device 302, and output device 303 described in the embodiments of the present disclosure may execute the implementation methods described in the first and second embodiments of a global layout optimization method provided in the embodiments of the present disclosure, and may also execute the implementation methods of the electronic device described in the embodiments of the present disclosure, which will not be repeated here.

[0086] In another embodiment of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by the processor, all or part of the processes in the above-mentioned embodiment method are implemented, and the computer program can also be completed by instructing the relevant hardware through the computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor, the steps of each of the above-mentioned method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0087] The computer-readable storage medium may be an internal storage unit of the electronic device of any of the aforementioned embodiments, such as a hard disk or memory of the electronic device. The computer-readable storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Furthermore, the computer-readable storage medium may also include both an internal storage unit of the electronic device and an external storage device. The computer-readable storage medium is used to store computer programs and other programs and data required by the electronic device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.

[0088] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this disclosure.

[0089] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the electronic devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0090] In the several embodiments provided in the present application, it should be understood that the disclosed electronic devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces or units, or it can be an electrical, mechanical or other form of connection.

[0091] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present disclosure.

[0092] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0093] The above are only specific embodiments of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present disclosure, and these modifications or replacements should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.

Claims

1. A global layout optimization method, characterized in that: include: determining a first parameter according to the target position; The target position is a layout position in the FPGA; The first parameter is a global layout quality assessment index; Determining whether the target position corresponding to the first parameter needs to be adjusted based on a first judgment criterion; In response to a target position corresponding to the first parameter requiring adjustment, updating a target hyperparameter based on a first algorithm; The target hyperparameter is a parameter used to determine the target position; The layout of the target location is optimized in the FPGA based on the target hyperparameters.

2. A global layout optimization method as claimed in claim 1, characterized in that: The target hyperparameter includes: a first hyperparameter and a second hyperparameter; and updating the target hyperparameter based on the first algorithm includes: Scaling down the first hyperparameter based on a first scaling factor; A second hyperparameter is calculated based on the reduced first hyperparameter and the first formula; The first formula is: in, represents the second hyperparameter after k iterations; represents the second hyperparameter after k+1 iterations; β represents the first scaling factor; represents the first hyperparameter after k+1 iterations.

3. A global layout optimization method as claimed in claim 1, characterized in that: The determining, based on the first determination criterion, whether the target position corresponding to the first parameter needs to be adjusted includes: In response to a first parameter being greater than or equal to a first deviation value, determining that a target position corresponding to the first parameter needs to be adjusted; In response to the first parameter being less than the first deviation value, it is determined that the target position corresponding to the first parameter does not need to be adjusted.

4. A global layout optimization method as claimed in claim 3, characterized in that: The first deviation value is calculated based on a second formula, and the second formula is: Wherein, R represents the first deviation value; represents the average value of the first parameter; n represents the number of calculations of the first parameter; represents the optimal solution for the first parameter.

5. A global layout optimization method as claimed in claim 1, characterized in that: The step of determining the first parameter according to the target position includes: Randomly initialize the target position; The first parameter is calculated based on the first gradient coefficient and the second gradient coefficient corresponding to the target position; the first gradient coefficient is the line length gradient coefficient corresponding to the target position; and the second gradient coefficient is the density gradient coefficient corresponding to the target position.

6. A global layout optimization method as claimed in claim 5, characterized in that: The optimizing the layout of the target position based on the target hyperparameters includes: Updating the target position based on the target hyperparameters; Calculate the coefficient of change of the updated target position; The second gradient coefficient of the target position is adjusted based on the first condition and the variation coefficient; the first condition is a judgment condition for judging whether the variation coefficient satisfies a preset coefficient.

7. A global layout optimization method as claimed in claim 6, characterized in that: The step of adjusting the second gradient coefficient of the target position based on the variation coefficient comprises: In response to the variation coefficient being greater than a preset coefficient, the second gradient coefficient of the target position is adjusted based on a first adjustment rule; the first adjustment rule is to reduce the second gradient coefficient of the target position.

8. A global layout optimization device, characterized in that: include: A parameter determination module, used to determine a first parameter according to a target position; The target position is a layout position in the FPGA; The first parameter is a global layout quality assessment index; A judgment module, used for judging whether the target position corresponding to the first parameter needs to be adjusted based on a first judgment criterion; an adjustment module, configured to update a target hyperparameter based on a first algorithm in response to a target position corresponding to the first parameter requiring adjustment; The target hyperparameter is a parameter used to determine the target position; An optimization module is used to optimize the layout of the target position in the FPGA based on the target hyperparameter.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.