Chip layout method and device, equipment and storage medium
Through the chip layout model, the layout strategy of macrocells in the non-center area of the chip and the layout of standard units in the remaining areas is solved, and the layout of poor layout performance caused by the area difference between macrocells and standard units in the existing technology is solved, achieving more efficient Chip layout.
Patent Information
- Application Number
- CN202310640892.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-31
- Publication Date
- 2024-12-03
AI Technical Summary
In the existing chip layout methods, the electrostatic-based layout algorithm has too large differences in the area of macrocells and standard cells, resulting in poor layout performance, which is prone to blocking the wiring path.
Through the chip layout model, the layout strategy of macrocells in the non-center area of the chip is predicted, and standard units are laid out in the remaining areas, separating the layout of macrocells and standard units, reducing the probability of blocking, and improving layout performance.
The reasonable distribution of macro cells and standard cells is achieved, the performance of chip layout is improved, the possibility of blocking wiring paths is reduced, and the overall performance of the chip is improved.
Smart Images

Figure CN119067041A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a chip layout method, device, equipment and storage medium. Background Art
[0002] Chip layout refers to the placement of macro cells and standard cells on a chip. As circuit scale and design complexity continue to increase, chip layout methods also need to be continuously optimized.
[0003] In the related art, an electrostatic-based layout algorithm is used for layout. The chip is modeled as an electrostatic system, and each macro cell and standard cell is regarded as a positively charged particle. Since the electrostatic force between particles forms mutual repulsion, the chip layout problem is forwarded to a problem of minimizing the distance between particles with potential energy constraints. However, since the above method usually requires the placement of macro cells and standard cells at the same time, and the area of macro cells far exceeds that of standard cells, the performance of the layout result mainly depends on the layout method of the macro cells, which is prone to poor performance of the layout result. Summary of the invention
[0004] The embodiments of the present application provide a chip layout method, device, computer equipment and storage medium, which realizes the reasonable distribution of macro cells and standard cells, and is conducive to improving the performance of chip layout. The technical solution is as follows:
[0005] In one aspect, a chip layout method is provided, the method comprising:
[0006] Acquire chip information, macro cell information, and standard cell information, wherein the chip information indicates a chip, the macro cell information indicates a plurality of macro cells for layout on the chip, and the standard cell information indicates a plurality of standard cells for layout on the chip, wherein an area of the standard cell is smaller than an area of the macro cell;
[0007] Predicting a macrocell layout strategy based on the chip information and the macrocell information by a chip layout model, wherein the macrocell layout strategy indicates a location of the macrocell in a non-central area of the chip;
[0008] Determine a standard cell layout strategy according to the chip information, the standard cell information and the macro cell layout strategy, wherein the standard cell layout strategy indicates the position of the standard cell in the remaining area of the chip, and the remaining area refers to the area of the chip except the position of the macro cell;
[0009] A layout result is generated according to the macro cell layout strategy and the standard cell layout strategy, wherein the layout result refers to a result of placing the macro cell and the standard cell in the chip.
[0010] Optionally, the process of determining the second value parameter includes:
[0011] Determining a second layout strategy according to the search result, the second layout strategy indicating the location of the sample macro unit in the non-central area of the sample chip and the location of the standard unit set in the central area of the sample chip;
[0012] generating a third layout result according to the second layout strategy, wherein the third layout result refers to a result of placing the sample macro cell and the set of standard cells in the sample chip;
[0013] Determining a sample standard cell layout strategy according to the third layout result, wherein the sample standard cell layout strategy indicates a position of the sample standard cell in a region where a corresponding standard cell set is located;
[0014] According to the sample standard cell layout strategy, the third layout result is adjusted to obtain a fourth layout result, wherein the fourth layout result refers to a result of placing the sample macro cell and the standard cell in the sample chip;
[0015] Based on the fourth layout result, the second value parameter is determined.
[0016] In another aspect, a chip layout device is provided, the device comprising:
[0017] An information acquisition module, used to acquire chip information, macro cell information and standard cell information, wherein the chip information indicates a chip, the macro cell information indicates a plurality of macro cells for layout on the chip, and the standard cell information indicates a plurality of standard cells for layout on the chip, wherein an area of the standard cell is smaller than an area of the macro cell;
[0018] A strategy prediction module, used for predicting a macrocell layout strategy based on the chip information and the macrocell information through a chip layout model, wherein the macrocell layout strategy indicates a location of the macrocell in a non-central area of the chip;
[0019] a strategy determination module, configured to determine a standard cell layout strategy according to the chip information, the standard cell information and the macro cell layout strategy, wherein the standard cell layout strategy indicates a position of the standard cell in a remaining area of the chip, wherein the remaining area refers to an area of the chip excluding a position of the macro cell;
[0020] The layout module is used to generate a layout result according to the macro cell layout strategy and the standard cell layout strategy, wherein the layout result refers to a result of placing the macro cell and the standard cell in the chip.
[0021] Optionally, the device further comprises a model training module, which is used to:
[0022] Acquire sample chip information, sample macrocell information and sample standard cell information, wherein the sample chip information indicates a sample chip, the sample macrocell information indicates a plurality of sample macrocells for layout on the sample chip, and the sample standard cell information indicates a plurality of sample standard cells for layout on the sample chip;
[0023] Based on the sample standard cell information, clustering the plurality of sample standard cells to obtain standard cell set information, wherein the standard cell set information indicates a plurality of standard cell sets, the standard cell sets include the plurality of sample standard cells, and the sum of the areas of the plurality of sample standard cells in the standard cell set is of the same order of magnitude as the area of the sample macro cell;
[0024] Predicting a first layout strategy through the chip layout model according to the sample chip information, the sample macrocell information and the standard cell set information, wherein the first layout strategy indicates the location of the sample macrocell in a non-central area of the sample chip and the location of the standard cell set in a central area of the sample chip;
[0025] Based on the first layout strategy, the chip layout model is trained.
[0026] Optionally, the model training module is used to:
[0027] Generate a first layout result according to the first layout strategy, where the first layout result refers to a result of placing the sample macro cell and the standard cell set in the sample chip;
[0028] Determining a sample standard cell layout strategy according to the first layout result, wherein the sample standard cell layout strategy indicates a position of the sample standard cell in a region where a corresponding standard cell set is located;
[0029] According to the sample standard cell layout strategy, the first layout result is adjusted to obtain a second layout result, where the second layout result refers to a result of placing the sample macro cell and the standard cell in the sample chip;
[0030] Based on the second layout result, determining a reward parameter, wherein the reward parameter indicates a degree of chip performance of the second layout result;
[0031] The chip layout model is trained based on the reward parameter.
[0032] Optionally, the model training module is used to perform at least one of the following:
[0033] Based on the second layout result, determine the length of the half-perimeter wire, and based on the half-perimeter wire length, determine the reward parameter, wherein the reward parameter is negatively correlated with the half-perimeter wire length, and the half-perimeter wire length refers to the length of the connection between the sample macro unit and the sample standard unit laid out in the sample chip;
[0034] Based on the second layout result, determining a layout congestion parameter, and based on the layout congestion parameter, determining the reward parameter, wherein the reward parameter is negatively correlated with the layout congestion parameter, and the layout congestion parameter represents a degree of congestion between the sample macrocell and the sample standard cell laid out in the sample chip;
[0035] Based on the second layout result, determine the chip usage area, and based on the chip usage area, determine the reward parameter, wherein the reward parameter is negatively correlated with the chip usage area, and the chip usage area refers to the area of the minimum area in the sample chip that covers all the sample macro units and all the sample standard units;
[0036] Based on the second layout result, the path delay is determined, and based on the path delay, the reward parameter is determined, the reward parameter is negatively correlated with the path delay, and the path delay refers to the delay caused by the signal being transmitted between the sample macro unit and the sample standard unit in the sample chip.
[0037] Optionally, the model training module is used to:
[0038] By using the chip layout model, according to the sample chip information, the sample macro cell information and the standard cell set information, predicting the first layout strategy and value parameters, wherein the value parameters represent the quality of chip performance after layout according to the first layout strategy;
[0039] The step of training the chip layout model based on the reward parameter comprises:
[0040] The difference between the reward parameter and the value parameter is determined as a target parameter, and the chip layout model is trained based on the target parameter.
[0041] Optionally, the first layout strategy includes a plurality of layout sub-strategies arranged in sequence, the layout sub-strategies indicating the position of the next sample macro cell or the next set of standard cells in the sample chip after layout is performed according to the previous layout sub-strategies, and the value parameters include value parameters of each layout sub-strategy, and the value parameters of the layout sub-strategies indicate the degree of chip performance after layout is performed according to the layout sub-strategies;
[0042] The model training module is also used for:
[0043] Determining a parameter average of value parameters of a plurality of said layout sub-strategies;
[0044] Based on the value parameter of each of the layout sub-strategies and the parameter average value, the chip layout model is trained so that the difference between the value parameter of each of the layout sub-strategies obtained by the trained chip layout model and the parameter average value is reduced.
[0045] Optionally, the first layout strategy includes a first probability distribution, wherein the first probability distribution represents the probability of each position of the sample macro unit and the standard unit set on the chip; the model training module is used to:
[0046] By using the chip layout model, according to the sample chip information, the sample macrocell information and the standard cell set information, predicting the first probability distribution and a first value parameter, the first value parameter indicating the quality of chip performance when the sample macrocell and the standard cell set are arranged at corresponding positions;
[0047] The model training module is used to:
[0048] Using a Monte Carlo tree search algorithm, searching for the positions of the sample macrocells and the standard cell set on the chip according to the sample chip information, the sample macrocell information and the standard cell set information, determining a second probability distribution and a second value parameter according to the search results, wherein the second probability distribution represents the probability of searching for each position of the sample macrocell and the standard cell set on the chip, the probability of the position being positively correlated with the number of times the position is searched, and the second value parameter represents the quality of chip performance when the sample macrocell and the standard cell set are placed at the searched position;
[0049] The chip layout model is trained based on the first probability distribution, the first value parameter, the second probability distribution, and the second value parameter.
[0050] Optionally, the model training module is used to:
[0051] Based on the difference between the first probability distribution and the second probability distribution, and the difference between the first value parameter and the second value parameter, the chip layout model is trained so that the difference between the first probability distribution and the second probability distribution obtained by the trained chip layout model is reduced, and the difference between the first value parameter and the second value parameter is reduced.
[0052] Optionally, the model training module is used to:
[0053] A Monte Carlo tree search algorithm is used to search the positions of the sample macrocells and the standard cell set on the chip based on the sample chip information, the sample macrocell information, the standard cell set information and the first probability distribution, so that the probability of each position being searched is equal to the probability of each position in the first probability distribution.
[0054] Optionally, the first layout strategy includes a plurality of layout sub-strategies arranged in sequence, the layout sub-strategy refers to a first probability distribution of the next sample macro cell or the next set of standard cells after layout is performed according to the previous layout sub-strategy, and the second value parameter includes a value parameter of each layout sub-strategy, and the value parameter of the layout sub-strategy indicates the degree of chip performance after layout is performed according to the layout sub-strategy;
[0055] The model training module is used to:
[0056] Determining a parameter average of value parameters of a plurality of said layout sub-strategies;
[0057] Based on the value parameter of each of the layout sub-strategies and the parameter average value, the chip layout model is trained so that the difference between the value parameter of each of the layout sub-strategies obtained by the trained chip layout model and the parameter average value is reduced.
[0058] Optionally, the model training module is used to:
[0059] Determining a second layout strategy according to the search result, the second layout strategy indicating the location of the sample macro unit in the non-central area of the sample chip and the location of the standard unit set in the central area of the sample chip;
[0060] generating a third layout result according to the second layout strategy, wherein the third layout result refers to a result of placing the sample macro cell and the set of standard cells in the sample chip;
[0061] Determining a sample standard cell layout strategy according to the third layout result, wherein the sample standard cell layout strategy indicates a position of the sample standard cell in a region where a corresponding standard cell set is located;
[0062] According to the sample standard cell layout strategy, the third layout result is adjusted to obtain a fourth layout result, wherein the fourth layout result refers to a result of placing the sample macro cell and the standard cell in the sample chip;
[0063] Based on the fourth layout result, the second value parameter is determined.
[0064] Optionally, the model training module is used to:
[0065] The first layout strategy is predicted through the chip layout model according to the sample chip information, the sample macro unit information, the standard unit set information and the layout constraints, so that the first layout strategy satisfies the layout constraints, wherein the layout constraints include that the sample macro unit is located in a non-central area of the sample chip and the standard unit set is located in a central area of the sample chip.
[0066] On the other hand, a computer device is provided, comprising a processor and a memory, wherein at least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor to implement the chip layout method described in the above aspect.
[0067] On the other hand, a computer-readable storage medium is provided, wherein at least one computer program is stored in the computer-readable storage medium, and the at least one computer program is loaded and executed by a processor to implement the chip layout method described in the above aspect.
[0068] On the other hand, a computer program product is provided, including a computer program, wherein the computer program is loaded and executed by a processor to implement the chip layout method described in the above aspect.
[0069] The solution provided by the embodiment of the present application divides the layout of macro cells and the layout of standard cells into two parts. First, the layout strategy of macro cells in the chip is predicted through the chip layout model, and the macro cells are placed in the non-central area of the chip. Since the area of macro cells is large, placing macro cells in the non-central area can reduce the possibility of blocking the wiring path. After determining the layout strategy of macro cells, standard cells with smaller areas are placed in the remaining areas of the chip, thereby achieving a reasonable distribution of macro cells and standard cells, which is conducive to improving the performance of chip layout results. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] Figure 1 It is a schematic diagram of an implementation environment provided by an embodiment of the present application;
[0071] Figure 2 is a flow chart of a chip layout method provided in an embodiment of the present application;
[0072] Figure 3 is a flow chart of a chip layout model training method provided in an embodiment of the present application;
[0073] Figure 4 is a comparison diagram of a chip layout provided in an embodiment of the present application;
[0074] Figure 5is a flow chart of a chip layout model training method provided in an embodiment of the present application;
[0075] Figure 6 is a schematic diagram of determining path delay provided by an embodiment of the present application;
[0076] Figure 7 is a schematic diagram of a chip layout strategy provided in an embodiment of the present application;
[0077] Figure 8 is a flow chart of a chip layout model training method provided in an embodiment of the present application;
[0078] Fig. 9 is a comparison diagram of a chip layout and a Go game provided in an embodiment of the present application;
[0079] Fig.10 is a flow chart of a chip layout method provided in an embodiment of the present application;
[0080] Fig.11 is a flow chart of a chip layout method provided in an embodiment of the present application;
[0081] Fig.12 is a schematic structural diagram of a chip layout device provided in an embodiment of the present application;
[0082] Fig.13 is a structural schematic diagram of another chip layout device provided in an embodiment of the present application;
[0083] Fig.14 is a schematic diagram of the structure of a terminal provided in an embodiment of the present application;
[0084] Fig.15 It is a structural diagram of a server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0085] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.
[0086] It is understood that the terms "first", "second", etc. used in this application can be used in this article to describe various concepts, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of this application, a first layout strategy can be referred to as a second layout strategy, and similarly, a second layout strategy can be referred to as a first layout strategy.
[0087] Among them, at least one refers to one or more than one, for example, at least one macro unit can be one macro unit, two macro units, three macro units, or any other macro unit greater than or equal to one. Multiple refers to two or more than two, for example, multiple macro units can be two macro units, three macro units, or any other macro units greater than or equal to two. Each refers to each of at least one, for example, each macro unit refers to each macro unit in the multiple macro units. If the multiple macro units are 3 macro units, each macro unit refers to each macro unit in the 3 macro units.
[0088] It can be understood that in the implementation of the present application, related data such as chip information, macro unit information and standard unit information are involved. When the above embodiments of the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0089] Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.
[0090] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. Basic artificial intelligence technologies generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operating / interactive systems, mechatronics and other technologies. Artificial intelligence software technologies mainly include computer vision technology, speech processing technology, natural language processing technology, as well as machine learning / deep learning, autonomous driving, smart transportation and other major directions.
[0091] Machine Learning (ML) is a multi-disciplinary subject that involves probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It specializes in studying how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all areas of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and teaching learning.
[0092] The following will describe the chip layout method provided in the embodiment of the present application based on artificial intelligence technology.
[0093] The image processing method provided in the embodiment of the present application can be used in a computer device. Optionally, the computer device is a terminal or a server. Optionally, the server is an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network) and big data and artificial intelligence platforms. Server. Optionally, the terminal is a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, an intelligent voice interaction device, a smart home appliance, a vehicle-mounted terminal, and an aircraft, but is not limited to this.
[0094] Figure 1 is a schematic diagram of an implementation environment provided by an embodiment of the present application, see Figure 1 The implementation environment includes: a terminal 101 and a server 102. The terminal 101 and the server 102 are connected via a wireless network or a wired network. The server 102 is used to train a chip layout model using the method provided in the embodiment of the present application, and the chip layout model is used to determine a chip layout strategy.
[0095] In a possible implementation, the server 102 sends the trained chip layout model to the terminal 101, and the terminal 101 can determine the chip layout strategy through the chip layout model. Optionally, a target application provided by the server 102 is running in the terminal 101, and the server 102 stores the trained chip layout model in the target application, and the target application has a chip layout function. Based on the target application, the terminal 101 determines the chip layout strategy through the chip layout model.
[0096] In another possible implementation, the server 102 determines the chip layout strategy through the trained chip layout model, and sends the chip layout strategy to the terminal 101, and the terminal 101 can display the chip layout strategy to the user.
[0097] The rapid development of new industries such as artificial intelligence technology, big data technology, and the Internet of Things technology has created a huge demand for high-performance semiconductor chips. As the scale of integrated circuits continues to expand and device sizes continue to scale to deep nanometer process nodes, the complexity of chip design has increased rapidly. As an important tool in chip design, electronic design automation technology needs to process circuit scale and calculate data in an explosive growth. Shortening the chip design cycle can enable hardware to better adapt to the rapid development of the computing field, especially artificial intelligence-related fields. How to quickly and agilely design high-performance chips in a short period of time and meet the design indicators required by applications has become the focus of current chip design.
[0098] Among them, integrated circuit physical design is the key to chip design, and there is a close connection between each link and step. In the integrated circuit physical design stage, chip layout is one of the most complex and time-consuming stages in the chip design process. It mainly layouts the netlist diagram containing macro cells and standard cells with equal height logic gates on the chip to optimize power consumption, performance and area. The chip layout method provided by the embodiment of the present application is adopted. Through the chip layout model, the layout strategy of the macro cells on the chip is determined, and then the layout strategy of the standard cells on the chip is determined. The macro cells and standard cells are laid out on the chip according to the layout strategy, which realizes the reasonable distribution of macro cells and standard cells, which is conducive to improving the performance of the chip layout.
[0099] Figure 2 is a flowchart of a chip layout method provided in an embodiment of the present application. The embodiment of the present application is executed by a computer device. Figure 2 , the method comprising:
[0100] 201. A computer device obtains chip information, macro cell information and standard cell information, wherein the chip information indicates a chip, the macro cell information indicates a plurality of macro cells to be arranged on the chip, and the standard cell information indicates a plurality of standard cells to be arranged on the chip, wherein an area of the standard cell is smaller than an area of the macro cell.
[0101] The computer device obtains chip information of the chip, macro cell information of the macro cell and standard cell information of the standard cell. The purpose of the embodiment of the present application is to layout the macro cell and the standard cell on the chip.
[0102] The chip information is used to indicate the chip, which can be a chip canvas, the area of which is equal to the area of the chip base plate. Optionally, the chip canvas is a plurality of gridded grids. For example, the area of the chip canvas is W*H, W represents width, H represents height, and the chip canvas is gridded into a plurality of grids of (W / bW)*(H / bH), bW represents the number of grids in the horizontal direction of the chip canvas, and bH represents the number of grids in the vertical direction of the chip canvas, thereby reducing the operation space of the layout on the chip from W*H to bW*bH.
[0103] The macrocell information indicates multiple macrocells for layout on the chip. The macrocell is a predefined logic function implementation unit composed of a trigger, an arithmetic logic unit, a hardware register, etc., which has a higher level of abstraction than a logic gate. For example, the macrocell may be an SRAM (Static Random-Access Memory) or an EPROM (Erasable Programmable Read-Only Memory). The standard cell information indicates multiple standard cells for layout on the chip. The standard cell is a group of transistors and interconnect structures that provide a Boolean logic function or a storage function (a trigger or a latch). For example, the standard cell may be a NAND (Not And), a NOR (Not Or), an XOR (Exclusive OR), an XNOR (Not Exclusive Or), an inverter, etc.
[0104] The area of the standard cell is smaller than that of the macro cell, and the area of the macro cell is tens or hundreds of times larger than that of the standard cell. In chip layout, the number of standard cells is greater than the number of macro cells.
[0105] 202. The computer device predicts a macrocell layout strategy based on chip information and macrocell information through a chip layout model, and the macrocell layout strategy indicates the location of the macrocell in a non-central area of the chip.
[0106] The chip layout model is used to predict the layout strategy of the macrocell in the chip. The computer device inputs the chip information and the macrocell information into the chip layout model, and the chip layout model predicts the macrocell layout strategy based on the chip information and the macrocell information. In addition, in the embodiment of the present application, the macrocell layout strategy predicted by the chip layout model will indicate that the macrocell is placed in the non-central area of the chip. This is achieved by introducing the constraint condition of placing the macrocell in the non-central area of the chip during the training process of the chip layout model. The training process of the chip layout model can be seen below Figure 3 , Figure 5 and Figure 8 The embodiment shown.
[0107] Among them, the chip information can be a gridded chip canvas, which includes multiple grids. The intersection of four grids can be regarded as a position, or a network can be regarded as a position. The position of the macro unit in the non-central area of the chip refers to one or more positions occupied by the macro unit layout in the chip.
[0108] In one possible implementation, the chip layout model includes a graph neural network, and the computer device extracts the spatial features of the chip information and the spatial features of the macro unit information through the graph neural network, and then predicts the macro unit layout strategy based on the spatial features of the chip information and the spatial features of the macro unit information. Optionally, when predicting the macro unit layout strategy, the chip layout model predicts the position of each macro unit in the non-central area of the chip in order from large to small in terms of the area of the macro unit until the positions of all the macro units on the chip are obtained.
[0109] 203. The computer device determines a standard cell layout strategy based on chip information, standard cell information and macro cell layout strategy, wherein the standard cell layout strategy indicates a location of the standard cell in a remaining area of the chip, and the remaining area refers to an area of the chip excluding the location of the macro cell.
[0110] After determining the macro cell layout strategy, the computer device determines the remaining area information according to the chip information and the macro cell layout strategy, the remaining area information indicating the remaining area in the chip except the position of the macro cell, and then determines the position of each standard cell in the remaining area of the chip according to the remaining area information and the standard cell information.
[0111] In one possible implementation, the computer device uses an electrostatic-based layout analysis method to determine the position of each standard cell in the remaining area of the chip. That is, each standard cell is regarded as a positively charged particle. Since the electrostatic force between particles forms mutual repulsion, the layout problem of the standard cell is forwarded to the problem of minimizing the distance between particles with potential energy constraints, and the position of each standard cell in the remaining area is determined.
[0112] 204. The computer device generates a layout result according to the macro cell layout strategy and the standard cell layout strategy. The layout result refers to the result of placing the macro cells and the standard cells in the chip.
[0113] After determining the macro cell layout strategy and the standard cell layout strategy, the computer device places the netlists of the multiple macro cells indicated by the macro cell information on the chip canvas according to the macro cell layout strategy, and places the netlists of the multiple standard cells indicated by the standard cell information on the chip canvas according to the standard cell layout strategy, thereby obtaining a layout result, which represents the result of placing the macro cells and standard cells in the chip.
[0114] The method provided in the embodiment of the present application divides the layout of macro cells and the layout of standard cells into two parts. First, the layout strategy of macro cells in the chip is predicted through the chip layout model, and the macro cells are placed in the non-central area of the chip. Since the area of macro cells is large, placing macro cells in the non-central area can reduce the possibility of blocking the wiring path. After determining the layout strategy of macro cells, standard cells with smaller areas are placed in the remaining areas of the chip, thereby achieving a reasonable distribution of macro cells and standard cells, which is conducive to improving the performance of chip layout results.
[0115] In addition, the chip layout model is used to first layout the larger macro cells in the non-central area of the chip, and then the smaller standard cells are laid out in the remaining area. This can avoid the problem of blocking the wiring path due to the random cross-layout of the larger macro cells and the smaller standard cells.
[0116] Above Figure 2 The training process of the chip layout model in the embodiment shown can be seen in the following Figure 3 The embodiment shown. Figure 3 is a flowchart of a chip layout model training method provided in an embodiment of the present application. The embodiment of the present application is executed by a computer device. Figure 3 , the method comprising:
[0117] 301. A computer device obtains sample chip information, sample macro cell information and sample standard cell information, wherein the sample chip information indicates a sample chip, the sample macro cell information indicates a plurality of sample macro cells for layout on the sample chip, and the sample standard cell information indicates a plurality of sample standard cells for layout on the sample chip.
[0118] The area of the sample standard cell is smaller than the area of the sample macro cell. The sample chip information, sample macro cell information and sample standard cell information in step 301 are the same as the chip information, macro cell information and standard cell information in step 201, and will not be described again.
[0119] 302. The computer device clusters the multiple sample standard cells based on the sample standard cell information to obtain standard cell set information, where the standard cell set information indicates multiple standard cell sets, the standard cell set includes multiple sample standard cells, and the sum of the areas of the multiple sample standard cells in the standard cell set is of the same order of magnitude as the area of the sample macro cell.
[0120] The sample standard cell information indicates a plurality of sample standard cells. The computer device clusters the plurality of sample standard cells according to the sample standard cell information to obtain a plurality of standard cell sets, and determines standard cell set information of the plurality of standard cell sets. Each standard cell set includes a plurality of sample standard cells. Different standard cell sets do not include the same sample standard cell, that is, a sample standard cell is in a standard cell set. Furthermore, the sum of the areas of the plurality of standard cells in each standard cell set is of the same order of magnitude as the area of the sample macro cell.
[0121] Since the area of the sample standard cell is smaller than that of the sample macro cell, the sample standard cells are clustered so that the area of the clustered standard cell set is of the same order of magnitude as the area of the sample macro cell. In this way, the standard cell set and the sample macro cell can be treated equally, and the same method can be used to layout the standard cell set and the sample macro cell.
[0122] In a possible implementation, there are interconnected sample standard units among the multiple sample standard units, and the computer device uses a hypergraph partitioning algorithm to partition the multiple sample standard units into multiple standard unit sets according to the connection relationship between the multiple sample standard units.
[0123] 303. The computer device predicts a first layout strategy through a chip layout model according to the sample chip information, the sample macro cell information and the standard cell set information. The first layout strategy indicates the position of the sample macro cell in the non-central area of the sample chip and the position of the standard cell set in the central area of the sample chip.
[0124] The computer device inputs the sample chip information, the sample macro cell information and the standard cell set information into the chip layout model, and the chip layout model predicts the first layout strategy based on the sample chip information, the sample macro cell information and the standard cell set information. In addition, in an embodiment of the present application, the first layout strategy predicted by the chip layout model will indicate that the sample macro cell is placed in a non-central area of the chip and the standard cell set is placed in a central area of the chip. The non-central area and the central area can be flexibly set by the R&D personnel, for example, an area with a preset area extending outward from the center point of the chip is determined as the central area, and other areas of the chip except the central area are determined as non-central areas.
[0125] In a possible implementation, when predicting the first layout strategy through the chip layout model, a layout constraint is also introduced to guide the prediction direction of the chip layout model. Then the computer device predicts the first layout strategy through the chip layout model according to the sample chip information, the sample macro cell information, the standard cell set information and the layout constraint, so that the first layout strategy satisfies the layout constraint, and the layout constraint includes that the location of the sample macro cell is located in the non-central area of the sample chip, and the location of the standard cell set is located in the central area of the sample chip.
[0126] When the chip layout model predicts the layout strategy, the search space of the chip layout strategy is very large. Chip layout has a history of decades and has accumulated a lot of layout experience. This layout experience can be called expert knowledge. According to expert knowledge, since the area of macro cells is large, if macro cells are placed in the center area of the chip, the wiring path will often be blocked. Therefore, it is more appropriate to place macro cells in the non-center area of the chip and standard cells in the continuous center area of the chip. Therefore, based on this expert knowledge, layout constraints can be provided for the chip layout model so that when the chip layout model places macro cells and standard cells, macro cells are placed in the non-center area and standard cells are placed in the center area.
[0127] Figure 4 is a comparison diagram of a chip layout provided in an embodiment of the present application, such as Figure 4 As shown, the gray part represents the macro unit laid out on the chip, and the black part represents the standard unit laid out on the chip. Figure 4 The layout result on the left is the layout result obtained without introducing the above-mentioned layout constraints. Without introducing layout constraints, macro cells are also laid out in the central area of the chip. The layout of macro cells and standard cells is relatively messy, and standard cells are interspersed between macro cells, which easily leads to problems of blocking the wiring path. Figure 4 The layout result on the right is the layout result obtained by introducing the above-mentioned layout constraints. When the layout constraints are introduced, the macro cells are placed in the non-central area of the chip, most of the standard cells are placed in the central area of the chip, and only a small number of standard cells are interspersed between the macro cells, which can reduce the probability of blocking the wiring path.
[0128] Furthermore, by introducing the above layout constraints, the search space for the chip layout model to predict the layout strategy is reduced, so that the training process of the chip layout model converges faster.
[0129] Optionally, in addition to stipulating that the location of the sample macro unit is located in a non-central area of the sample chip and the location of the standard cell set is located in a central area of the sample chip, the layout constraint conditions may also include other contents. For example, the layout constraint conditions also include at least one of the following: the locations of the sample macro unit and the standard cell set do not overlap; the sample macro unit and the standard cell set do not exceed the edge of the chip when they are laid out at corresponding locations on the chip. In addition, the layout constraint conditions may also include other contents, which can be flexibly set by R&D personnel, and the embodiments of the present application do not limit this.
[0130] 304. The computer device trains a chip layout model based on the first layout strategy.
[0131] After determining the first layout strategy, the computer device trains the chip layout model according to the quality of the first layout strategy, so that the chip layout model changes in the direction of predicting a better first layout strategy. There are many ways to measure the quality of the first layout strategy, which can be seen in detail below. Figure 5 and Figure 8 The embodiment shown.
[0132] The method provided in the embodiment of the present application clusters sample standard cells into a standard cell set, so that the area of the clustered standard cell set is of the same order of magnitude as the area of the sample macro cell, and the standard cell set is treated as the sample macro cell in the same manner. The layout strategy of each macro cell and each standard cell set in the chip is predicted through a chip layout model, and the chip layout model is trained based on the predicted layout strategy, so that the chip layout model learns during the training process how to complete the chip layout according to the characteristics of the chip, the macro cell and the standard cell set, thereby improving the efficiency and accuracy of the chip layout.
[0133] Moreover, in the process of training the model, layout constraints are provided for the chip layout model based on the expert knowledge, so that when the chip layout model layouts macro cells and standard cells, macro cells are placed in non-central areas and standard cells are placed in central areas. This not only reduces the probability that the layout strategy predicted by the model will block the wiring path, but also reduces the search space for the layout strategy predicted by the chip layout model, so that the training process of the chip layout model converges faster, which is conducive to accelerating the training process of the model.
[0134] In the above Figure 3 Based on the embodiment shown, after predicting the first layout strategy, the performance of the chip after the first layout strategy is implemented is determined. The performance of the chip can represent the performance of the first layout strategy, thereby training the chip layout model. For details, see the following Figure 5 The embodiment shown. Figure 5is a flowchart of a chip layout model training method provided in an embodiment of the present application. The embodiment of the present application is executed by a computer device. Figure 5 , the method comprising:
[0135] 501. A computer device obtains sample chip information, sample macro cell information and sample standard cell information, wherein the sample chip information indicates a sample chip, the sample macro cell information indicates a plurality of sample macro cells for layout on the sample chip, and the sample standard cell information indicates a plurality of sample standard cells for layout on the sample chip.
[0136] The area of the sample standard cell is smaller than the area of the sample macro cell. The sample chip information, sample macro cell information and sample standard cell information in step 501 are the same as the chip information, macro cell information and standard cell information in step 201, and will not be described again.
[0137] 502. The computer device clusters the multiple sample standard cells based on the sample standard cell information to obtain standard cell set information, where the standard cell set information indicates multiple standard cell sets, the standard cell set includes multiple sample standard cells, and the sum of the areas of the multiple sample standard cells in the standard cell set is of the same order of magnitude as the area of the sample macro cell.
[0138] The process of step 502 is the same as the process of step 302, and will not be described again.
[0139] 503. The computer device predicts a first layout strategy and a value parameter through a chip layout model according to sample chip information, sample macro cell information, and standard cell set information. The value parameter indicates the quality of chip performance after layout according to the first layout strategy.
[0140] The computer device inputs the sample chip information, the sample macro cell information and the standard cell set information into the chip layout model, and the chip layout model predicts the first layout strategy and value parameters based on the sample chip information, the sample macro cell information and the standard cell set information. The first layout strategy indicates the position of the sample macro cell in the non-central area of the sample chip and the position of the standard cell set in the central area of the sample chip, and the value parameters indicate the degree of chip performance after layout according to the first layout strategy.
[0141] It should be noted that this value parameter is a parameter predicted by the chip layout model to indicate the degree of chip performance, rather than a real parameter used to indicate the degree of chip performance. The higher the performance of the chip layout model, the more accurate the predicted value parameter, and the lower the performance of the chip layout model, the less accurate the predicted value parameter.
[0142] In one possible implementation, the first layout strategy includes multiple layout sub-strategies arranged in sequence, the layout sub-strategy indicates the position of the next sample macro cell or the next standard cell set in the sample chip after layout is performed according to the previous layout sub-strategy, and the value parameters include value parameters of each layout sub-strategy, and the value parameters of the layout sub-strategy indicate the degree of chip performance after layout is performed according to the layout sub-strategy.
[0143] When predicting the layout strategy, the chip layout model predicts the position of each sample macro cell and standard cell set in the non-central area of the chip in order of the area of the sample macro cell and the standard cell set from large to small, until the position of all macro cells on the chip is obtained. For example, the devices to be laid out include sample macro cell A, sample macro cell B, and standard cell set C, etc. The first layout sub-strategy indicates the position of sample macro cell A in the sample chip, and the value parameter of the first layout sub-strategy indicates the performance of the chip after the layout is performed according to the first layout sub-strategy. The second layout sub-strategy indicates the position of sample macro cell B in the sample chip after the layout is performed according to the first layout sub-strategy, and the value parameter of the second layout sub-strategy indicates the performance of the chip after the layout is performed according to the second layout sub-strategy. The third layout sub-strategy indicates the position of standard cell set C in the sample chip after the layout is performed according to the first layout sub-strategy and the second layout sub-strategy, and the value parameter of the third layout sub-strategy indicates the performance of the chip after the layout is performed according to the third layout sub-strategy, and so on.
[0144] Optionally, the layout sub-strategy corresponds to a probability distribution, which is the probability of the next sample macro unit or the next standard unit set at each position in the remaining area of the sample chip after layout according to the previous layout sub-strategy, where the position with the highest probability is also the position of the next sample macro unit or the next standard unit set in the sample chip.
[0145] 504. The computer device generates a first layout result according to the first layout strategy, where the first layout result refers to a result of placing the sample macro cell and the standard cell set in the sample chip.
[0146] After determining the first layout strategy, the computer device places the netlists of the multiple sample macrocells indicated by the sample macrocell information and the netlists of the multiple standard cell sets indicated by the standard cell set information on the chip canvas according to the first layout strategy, thereby obtaining a first layout result, which represents the result of placing the multiple sample macrocells and the standard cell set in the sample chip.
[0147] 505. The computer device determines a sample standard cell layout strategy according to the first layout result, where the sample standard cell layout strategy indicates a position of the sample standard cell in a region where a corresponding standard cell set is located.
[0148] Among them, since multiple standard cells are clustered into a standard cell set, each standard cell in the first layout result is laid out in the sample chip based on the standard cell set. Therefore, only the positions of multiple sample standard cells in a standard cell set in the sample chip can be determined, but the precise position of each sample standard cell in the area where the standard cell set is located cannot be known. Therefore, it is also necessary to determine the position of each sample standard cell in each standard cell set in the area where the corresponding standard cell set is located based on the standard cell set.
[0149] The computer device determines the area of each standard cell set in the sample chip according to the first layout result, and determines the position of the sample standard cell in the area where the corresponding standard cell set is located based on the area of each standard cell set in the sample chip. In a possible implementation, the computer device uses an electrostatic-based layout analysis method to determine the position of each sample standard cell in the area where the corresponding standard cell set is located.
[0150] 506. The computer device adjusts the first layout result according to the sample standard cell layout strategy to obtain a second layout result, where the second layout result refers to a result of layout of the sample macro cells and the standard cells in the sample chip.
[0151] After determining the sample standard cell layout strategy, the computer device adjusts the position of each sample standard cell in the first layout result according to the sample standard cell layout strategy, thereby obtaining a second layout result, which represents the result of placing multiple sample macro cells and multiple sample standard cells in the sample chip.
[0152] 507. The computer device determines a reward parameter based on the second layout result, where the reward parameter indicates how good or bad the chip performance of the second layout result is.
[0153] In a possible implementation, the computer device determines a reward parameter based on the second layout result, including at least one of the following:
[0154] (1) The computer device determines the length of the semi-perimeter wire based on the second layout result, and determines a reward parameter based on the semi-perimeter wire length, wherein the reward parameter is negatively correlated with the semi-perimeter wire length, and the semi-perimeter wire length refers to the length of the connection between the sample macro unit and the sample standard unit laid out in the sample chip.
[0155] Among them, the semi-perimeter wire length refers to the interconnect wire length after chip wiring estimated according to the positions of the sample macro unit and the sample standard unit during the chip layout process. The semi-perimeter wire length is expressed as the numerical sum of the distances between the sample macro unit and the sample standard unit in the x-axis direction and the y-axis direction.
[0156] When measuring chip performance based on the length of the semi-circumference wire, the smaller the semi-circumference wire length, the better the chip performance, and the larger the semi-circumference wire length, the worse the chip performance. Therefore, the reward parameter is negatively correlated with the semi-circumference wire length. The smaller the semi-circumference wire length, the larger the reward parameter, and the larger the semi-circumference wire length, the smaller the reward parameter.
[0157] (2) The computer device determines a layout congestion parameter based on the second layout result, and determines a reward parameter based on the layout congestion parameter, wherein the reward parameter is negatively correlated with the layout congestion parameter, and the layout congestion parameter represents the degree of congestion between the sample macro cells and the sample standard cells laid out in the sample chip.
[0158] The layout congestion parameter may be determined according to the number of wires within a preset area. The more wires there are within the preset area, the greater the congestion level is, and the fewer wires there are within the preset area, the smaller the congestion level is.
[0159] When measuring chip performance based on the degree of congestion between sample macro cells and sample standard cells, the smaller the congestion, the better the chip performance, and the larger the congestion, the worse the chip performance. Therefore, the reward parameter is negatively correlated with the layout congestion parameter. The smaller the layout congestion parameter, the larger the reward parameter, and the larger the layout congestion parameter, the smaller the reward parameter.
[0160] (3) The computer device determines the chip usage area based on the second layout result, and determines the reward parameter based on the chip usage area, where the reward parameter is negatively correlated with the chip usage area, and the chip usage area refers to the area of the minimum area in the sample chip that covers all sample macro units and all sample standard units.
[0161] When measuring chip performance based on chip usage area, the smaller the chip usage area, the better the chip performance, and the larger the chip usage area, the worse the chip performance. Therefore, the reward parameter is negatively correlated with the chip usage area. The smaller the chip usage area, the larger the reward parameter, and the larger the chip usage area, the smaller the reward parameter.
[0162] (4) The computer device determines the path delay based on the second layout result, and determines the reward parameter based on the path delay, where the reward parameter is negatively correlated with the path delay. The path delay refers to the delay caused by the signal being transmitted between the sample macro unit and the sample standard unit in the sample chip.
[0163] When measuring chip performance based on path delay, the smaller the path delay, the better the chip performance, and the larger the path delay, the worse the chip performance. Therefore, the reward parameter is negatively correlated with the path delay. The smaller the path delay, the larger the reward parameter, and the larger the path delay, the smaller the reward parameter.
[0164] The chip layout experience can be called expert knowledge. According to expert knowledge, the smaller the path delay generated in the layout-completed chip, the better the performance of the chip, and the larger the path delay, the worse the performance of the chip. Therefore, based on this expert knowledge, the reward parameter can be determined based on the chip's path delay to reduce the path delay corresponding to the layout strategy predicted by the chip layout model.
[0165] Figure 6 is a schematic diagram of determining a path delay provided by an embodiment of the present application, such as Figure 6 As shown, Figure 6 (a) in the figure shows the layout result. P1, P2, P3 and P4 are the devices laid out in the chip, S1 and S2 are the connection points between the wires, Figure 6 (b) and (c) in the figure are directed acyclic graphs used to represent the signal flow in the chip. Figure 6 (d) in the figure represents the circuit diagram corresponding to the chip. Due to the resistance and capacitance in the circuit, the transmission of the signal will cause path delay. One of the training goals of the chip layout model in the embodiment of the present application is to minimize the path delay of the chip.
[0166] In an embodiment of the present application, the above four schemes (1)-(4) can be combined, and the reward parameters determined based on the semi-perimeter wire length, layout congestion parameters, chip usage area and path delay are weighted and summed as the final reward parameters for training to simulate the optimization of the chip's power consumption, performance and area indicators.
[0167] 508. The computer device determines the difference between the reward parameter and the value parameter as the target parameter, and trains the chip layout model based on the target parameter.
[0168] The computer device determines the difference between the reward parameter and the value parameter, determines the difference as the target parameter, and trains the chip layout model based on the target parameter. If the target parameter is a positive value, positive feedback is given to the chip layout model, so that the chip layout model changes in the direction of predicting the first layout strategy. If the target parameter is a negative value, negative feedback is given to the chip layout model, so that the chip layout model changes in the direction of not predicting the first layout strategy. By training the chip layout model, the reward parameter corresponding to the layout strategy obtained by the chip layout model is increased, so that the chip layout model changes in the direction of predicting a better layout strategy.
[0169] In the embodiment of the present application, considering that the reward parameter is a positive value, it is impossible to directly determine whether the currently obtained layout strategy is good or bad based on the reward parameter, so the difference between the reward parameter and the value parameter is determined as the target parameter. If the target parameter is a positive value, it is considered that the currently obtained layout strategy is good, so positive feedback is given to the chip layout model. If the target parameter is a negative value, it is considered that the currently obtained layout strategy is not good, so negative feedback is given to the chip layout model.
[0170] In another embodiment, the first layout strategy includes a plurality of layout sub-strategies arranged in sequence, the layout sub-strategies indicate the position of the next sample macro cell or the next standard cell set in the sample chip after layout is performed according to the previous layout sub-strategies, and the value parameters include the value parameters of each layout sub-strategy, and the value parameters of the layout sub-strategy indicate the degree of chip performance after layout is performed according to the layout sub-strategy. The computer device further performs the following steps: determining the parameter average of the value parameters of the plurality of layout sub-strategies, and training the chip layout model based on the value parameters of each layout sub-strategy and the parameter average, so that the difference between the value parameters of each layout sub-strategy obtained by the trained chip layout model and the parameter average is reduced.
[0171] In the embodiment of the present application, in order to improve the generalization ability of the chip layout model to predict value parameters, in addition to training the model according to the reward parameters, an additional path consistency constraint item is added during the training process of the chip layout model, so that the value parameters of multiple layout sub-strategies in the same layout strategy tend to be equal, thereby providing additional force to force the chip layout model to learn quickly and efficiently, which is conducive to improving the training efficiency of the chip layout model.
[0172] Figure 7 is a schematic diagram of a chip layout strategy provided in an embodiment of the present application, such as Figure 7 As shown in the figure, the nodes in the node tree represent layout sub-strategies. Starting from the root node, search downward along the arrow. After searching to the last reachable node, the layout sub-strategies represented by all searched nodes form a complete layout strategy. Figure 7 The shaded part in the middle is a complete layout strategy. One of the training objectives of the chip layout model is to make the value parameters of each layout sub-strategy in the complete layout strategy tend to be equal.
[0173] It should be noted that the embodiment of the present application only takes the difference between the reward parameter and the value parameter as the target parameter, and trains the chip layout model based on the target parameter as an example. In another embodiment, the computer device can also directly train the chip layout model based on the reward parameter to increase the reward parameter obtained by the trained chip layout model. By maximizing the reward parameter, the chip layout model can be trained in a reinforcement learning manner.
[0174] The method provided in the embodiment of the present application uses reinforcement learning to train the chip layout model, so that the chip layout model changes in the direction of predicting a layout strategy with better performance, which is conducive to improving the performance of the trained chip layout model. And by introducing a path consistency constraint, the value parameters of multiple layout sub-strategies in the same layout strategy tend to be equal, thereby providing additional force to force the chip layout model to learn quickly and efficiently, which is conducive to improving the training efficiency and generalization ability of the chip layout model.
[0175] In the above Figure 3 Based on the embodiment shown, after the first layout strategy is predicted, the layout strategy is determined based on the Monte Carlo tree search algorithm, and is used as a label to evaluate the quality of the first layout strategy, thereby realizing the training of the chip layout model in a supervised learning manner. The detailed process is shown below Figure 8 The embodiment shown. Figure 8 is a flowchart of a chip layout model training method provided in an embodiment of the present application. The embodiment of the present application is executed by a computer device. Figure 8 , the method comprising:
[0176] 801. A computer device obtains sample chip information, sample macro cell information and sample standard cell information, wherein the sample chip information indicates a sample chip, the sample macro cell information indicates a plurality of sample macro cells for layout on the sample chip, and the sample standard cell information indicates a plurality of sample standard cells for layout on the sample chip.
[0177] The area of the sample standard cell is smaller than the area of the sample macro cell. The sample chip information, sample macro cell information and sample standard cell information in step 801 are the same as the chip information, macro cell information and standard cell information in step 201, and will not be described again.
[0178] 802. The computer device clusters the multiple sample standard cells based on the sample standard cell information to obtain standard cell set information, where the standard cell set information indicates multiple standard cell sets, the standard cell set includes multiple sample standard cells, and the sum of the areas of the multiple sample standard cells in the standard cell set is of the same order of magnitude as the area of the sample macro cell.
[0179] The process of step 802 is the same as the process of step 302 above, and will not be repeated here.
[0180] 803. The computer device predicts a first probability distribution and a first value parameter through a chip layout model according to sample chip information, sample macro cell information and standard cell set information. The first value parameter indicates the quality of chip performance when the sample macro cell and the standard cell set are arranged at corresponding positions.
[0181] The computer device inputs the sample chip information, the sample macro cell information and the standard cell set information into the chip layout model, and the chip layout model predicts the first probability distribution and the first value parameter corresponding to the first layout strategy based on the sample chip information, the sample macro cell information and the standard cell set information. The first probability distribution represents the probability of the sample macro cell and the standard cell set at various positions on the sample chip, and the first value parameter represents the degree of chip performance when the sample macro cell and the standard cell set are arranged at corresponding positions.
[0182] The first layout strategy indicates the position of the sample macro unit in the non-central area of the sample chip and the position of the standard unit set in the central area of the sample chip. Therefore, the first layout strategy can be determined according to the first probability distribution. The position with the maximum probability in the first probability distribution is the position of the sample macro unit or the standard unit set in the central area of the sample chip.
[0183] In a possible implementation, the first layout strategy includes a plurality of layout sub-strategies arranged in sequence, and the layout sub-strategies indicate the position of the next sample macro cell or the next standard cell set in the sample chip after layout is performed according to the previous layout sub-strategies. The first value parameter includes a value parameter of each layout sub-strategy, and the value parameter of the layout sub-strategy indicates the degree of chip performance after layout is performed according to the layout sub-strategies.
[0184] The first probability distribution includes the probability distribution corresponding to each layout sub-strategy, and the probability distribution corresponding to the layout sub-strategy represents the probability of the next sample macro cell or the next standard cell set at each position in the remaining area of the sample chip after layout according to the previous layout sub-strategy.
[0185] 804. The computer device uses a Monte Carlo tree search algorithm to search for locations of the sample macrocell and the standard cell set on the chip according to the sample chip information, the sample macrocell information and the standard cell set information.
[0186] First, the initial state of the Monte Carlo tree includes a root node. The process of using the Monte Carlo tree search algorithm to search for the location of sample macro cells and standard cell sets on the chip is the process of creating a Monte Carlo tree. The nodes in the Monte Carlo tree can be regarded as a layout sub-strategy, that is, the location of the layout of a sample standard cell or a standard cell set. For example, the first row of nodes represents the first layout sub-strategy, the second node identifies the second layout sub-strategy, and the third row of nodes represents the third layout sub-strategy. The Monte Carlo tree search algorithm includes four steps: selection, expansion, simulation, and backtracking. The four steps are repeated until a complete layout strategy is obtained.
[0187] The first step is "selection", which walks downward from the root node, and each time the most valuable node is selected for search, until the node of "there are unexpanded child nodes" is searched, and the existence of unexpanded child nodes means that the current node still has a feasible layout sub-strategy that has not been searched. The second step is "expansion", if the node currently searched is a node of "there are unexpanded child nodes", then the feasible child nodes are expanded for the node. The third step is "simulation", starting from a node that has never been visited, a fast walking strategy is used to obtain a complete plurality of search results (that is, to determine the position of each sample macro unit and sample standard unit set on the chip). The fourth step is "backtracking", which counts the probability of each node being visited and determines the value parameter of each node (corresponding to the content of step 805 below) according to the currently obtained search results. For an embodiment of the present application, when searching using the Monte Carlo tree search algorithm, a node currently searched is the position of a sample macro unit or a standard unit set.
[0188] In one possible implementation, a computer device uses a Monte Carlo tree search algorithm to search for locations of sample macrocells and standard cell sets on a chip based on sample chip information, sample macrocell information, standard cell set information, and a first probability distribution, so that the probability of each location being searched is equal to the probability of each location in the first probability distribution.
[0189] The computer device uses the Monte Carlo tree search algorithm to perform the above-mentioned first step "selection". When searching for the most valuable node (that is, the location of the sample macro unit and the standard unit set on the chip), it uses the first probability distribution predicted by the chip layout model as a guide, and uses the probability of each position in the first probability distribution as the probability of each position being searched.
[0190] In the embodiment of the present application, the chip layout model is a reinforcement learning model created based on the AlphaZero framework, and the layout strategy obtained by the Monte Carlo tree search algorithm is used as a label to train the chip layout model. However, in the case of chip layout problems, the search space of the Monte Carlo tree search algorithm is very large. Fig. 9This is a comparison diagram of a chip layout and a Go game provided by an embodiment of the present application. The left side shows the result of the chip layout, and the right side shows the result of the Go game. Compared with the 19*19 scale of Go, the scale of the chip canvas after gridding is at least 128*128, so the number of processing times of the Monte Carlo tree search algorithm for each decision will far exceed the number required for Go. In order to reduce the search space and improve the search efficiency of the Monte Carlo tree search algorithm, the chip layout model provides the Monte Carlo tree search algorithm with a priori probability of the search node, thereby reducing the search width, and by providing the Monte Carlo tree search algorithm with a priori probability of the search node, it can avoid the evaluation only after the rapid simulation reaches the end state, thereby reducing the search depth and greatly improving the search efficiency of the Monte Carlo tree search algorithm.
[0191] 805. The computer device determines a second probability distribution and a second value parameter according to the search results.
[0192] Among them, the second probability distribution represents the probability of searching for each location of the sample macro cell and the standard cell set on the chip, the probability of a location is positively correlated with the number of times the location is searched, and the second value parameter represents the quality of chip performance when the sample macro cell and the standard cell set are placed at the searched location.
[0193] In the Monte Carlo search tree, each node corresponds to the number of searches, the second value parameter, and the prior probability provided by the chip layout model. According to the number of searches for each node, the probability of each node being searched can be determined, and the probability of each node being searched is used to represent the probability of being laid out at each position of the sample chip, thereby obtaining a second probability distribution. In each processing process, the search is performed starting from the root node of the Monte Carlo search tree. If the node currently searched is the last node, the second layout strategy formed by the current search path is determined, the value parameter is determined according to the second layout strategy, and then the value parameter of each node on the search path is updated according to the value parameter, and the number of searches for each node is updated. If the node currently searched is not the last node, the probability distribution and value function of the current node predicted by the chip layout model are determined, the child nodes of the current node are expanded based on the probability distribution, and then the value parameters of each node on the search path are updated according to the value parameter, and the number of searches for each node is updated.
[0194] In one possible implementation, the process of determining the second value parameter according to the search results by the computer device includes: determining the second layout strategy according to the search results, the second layout strategy indicating the position of the sample macro unit in the non-central area of the sample chip and the position of the standard unit set in the central area of the sample chip, generating a third layout result according to the second layout strategy, the third layout result refers to the result of placing the sample macro unit and the standard unit set in the sample chip. The computer device determines the sample standard unit layout strategy according to the third layout result, the sample standard unit layout strategy indicates the position of the sample standard unit in the area where the corresponding standard unit set is located, and adjusts the third layout result according to the sample standard unit layout strategy to obtain a fourth layout result, the fourth layout result refers to the result of placing the sample macro unit and the standard unit in the sample chip, and determining the second value parameter based on the fourth layout result. The process of determining the second value parameter is the same as the process of determining the reward parameter in the above steps 505-507, and will not be repeated here.
[0195] Optionally, the computer device determines a second value parameter based on the fourth layout result, including at least one of the following: (1) determining a half-perimeter wire length based on the fourth layout result, determining a second value parameter based on the half-perimeter wire length, the second value parameter being negatively correlated with the half-perimeter wire length, and the half-perimeter wire length refers to the length of the connection between the sample macro unit and the sample standard unit laid out in the sample chip. (2) determining a layout congestion parameter based on the fourth layout result, determining a second value parameter based on the layout congestion parameter, the second value parameter being negatively correlated with the layout congestion parameter, and the layout congestion parameter represents the degree of congestion between the sample macro unit and the sample standard unit laid out in the sample chip. (3) determining a chip usage area based on the fourth layout result, determining a second value parameter based on the chip usage area, the second value parameter being negatively correlated with the chip usage area, and the chip usage area refers to the area of the minimum area in the sample chip that covers all sample macro units and all sample standard units. (4) Based on the fourth layout result, determine the path delay, and based on the path delay, determine the second value parameter, the second value parameter is negatively correlated with the path delay, and the path delay refers to the delay caused by the signal being transmitted between the sample macro unit and the sample standard unit in the sample chip. The process of the computer device determining the second value parameter based on the fourth layout result is the same as the process of determining the reward parameter based on the second layout result in the above step 507, and will not be repeated here.
[0196] 806. The computer device trains a chip layout model based on the first probability distribution, the first value parameter, the second probability distribution, and the second value parameter.
[0197] In one possible implementation, a computer device trains a chip layout model based on the difference between the first probability distribution and the second probability distribution, and the difference between the first value parameter and the second value parameter, so that the difference between the first probability distribution and the second probability distribution obtained by the trained chip layout model is reduced, and the difference between the first value parameter and the second value parameter is reduced, thereby using the second probability distribution and the second value parameter as labels and performing supervised learning based on the first probability distribution and the first value parameter predicted by the chip layout model.
[0198] In another embodiment, the first layout strategy includes a plurality of layout sub-strategies arranged in sequence, the layout sub-strategy refers to the first probability distribution of the next sample macro cell or the next standard cell set after layout is performed according to the previous layout sub-strategy, and the second value parameter includes the value parameter of each layout sub-strategy, and the value parameter of the layout sub-strategy indicates the degree of chip performance after layout is performed according to the layout sub-strategy. The computer device further performs the following steps: determining the parameter average of the value parameters of the plurality of layout sub-strategies, and training the chip layout model based on the value parameter of each layout sub-strategy and the parameter average, so that the difference between the value parameter of each layout sub-strategy obtained by the trained chip layout model and the parameter average is reduced.
[0199] In the embodiment of the present application, in order to improve the generalization ability of the chip layout model to predict value parameters, in addition to training the model according to the reward parameters, an additional path consistency constraint item is added during the training process of the chip layout model, so that the value parameters of multiple layout sub-strategies in the same layout strategy tend to be equal, thereby providing additional force to force the chip layout model to learn quickly and efficiently, which is conducive to improving the training efficiency of the chip layout model.
[0200] One of the challenges in training chip layout models is sparse returns, which means that when collecting training sample data, the probability of the model generating high-return sample data is very small. When the chip layout model is just being trained and is in the early stages of training, the problem of sparse returns will be more obvious. The operation space of the chip layout problem is very large. For example, if 1,000 macro units are placed in 1,000 candidate locations, there are no less than 102,500 feasible layout methods. In the early stages of training, high-return sample data is almost never generated, so sparse returns are one of the problems that need to be solved urgently in the chip layout problem.
[0201] In the embodiment of the present application, the AlphaZero algorithm is used to train the chip layout model, and the chip layout model generates sample data through self-playing games. The generated sample data is used to update the chip layout model, and the updated chip layout model is used to generate new sample data, and it is continuously iterated. In the process of self-playing games, the chip layout model is supervised by the data obtained by the Monte Carlo tree search algorithm. Since the AlphaZero algorithm is trained by self-playing games, the generated samples always match the current capabilities of the chip layout model. Therefore, there is no need to generate high-return samples in the initial stage. It only needs to generate sample data of higher quality than its own level to be considered as a positive sample with learning value, and the Monte Carlo tree search algorithm improves the chip layout model, thereby ensuring that the chip layout model improves its layout capabilities and layout quality during learning.
[0202] The method provided in the embodiment of the present application predicts probability distribution and value parameters by a chip layout model, and then uses the probability distribution and value parameters obtained by the Monte Carlo tree search algorithm as labels, and uses supervised learning to train the chip layout model, thereby improving the layout capability and layout quality of the chip layout model. And by introducing path consistency constraints, the value parameters of multiple layout sub-strategies in the same layout strategy tend to be equal, thereby providing additional force to force the chip layout model to learn quickly and efficiently, which is conducive to improving the training efficiency and generalization ability of the chip layout model. In addition, the chip layout model provides the Monte Carlo tree search algorithm with a priori probability of the search node, thereby reducing the search space and improving the search efficiency of the Monte Carlo tree search algorithm.
[0203] Fig.10 is a flow chart of a chip layout method provided in an embodiment of the present application, such as Fig.10 As shown, firstly, the standard cells are clustered to obtain a standard cell set, and the macro cells are laid out through the chip layout model, and the standard cell set is laid out at the same time, and the standard cells in the standard cell set are quickly laid out according to the layout results of the clustered standard cell set. Among them, the layout through the chip layout model refers to determining the layout strategy and the corresponding value parameters through the chip layout model and introducing expert knowledge. After the layout is completed, a global layout approximation evaluation is performed, which is also evaluated from the perspectives of semi-perimeter wire length, layout congestion level, and chip usage area. The evaluation results are used to update the chip layout model. When testing the chip layout model later, the macro cells are laid out through the chip layout model, and then the standard cells are directly laid out in the remaining positions using the classical layout analysis method, and the standard cells are no longer clustered, and the performance of the chip layout model is tested based on the layout results.
[0204] Fig.11 is a flow chart of a chip layout method provided in an embodiment of the present application, such as Fig.11 As shown, the chip canvas is gridded into multiple grids, and the standard cell sets and macro cells are laid out in order of area from large to small through the chip layout model. After the positions of the standard cell sets and macro cells are determined, when the position of the macro is determined, the standard cell sets are removed, and the standard cells are laid out in the area where the standard cell sets are located, that is, each standard cell in the standard cell set is re-laid out to obtain the final layout result, and then the chip layout model is updated according to the layout result.
[0205] Fig.12 is a schematic diagram of the structure of a chip layout device provided in an embodiment of the present application. Fig.12 , the device comprises:
[0206] The information acquisition module 1201 is used to acquire chip information, macro cell information and standard cell information, wherein the chip information indicates a chip, the macro cell information indicates a plurality of macro cells for layout on the chip, and the standard cell information indicates a plurality of standard cells for layout on the chip, wherein the area of the standard cell is smaller than the area of the macro cell;
[0207] A strategy prediction module 1202 is used to predict a macrocell layout strategy based on chip information and macrocell information through a chip layout model, wherein the macrocell layout strategy indicates a location of a macrocell in a non-central area of the chip;
[0208] A strategy determination module 1203 is used to determine a standard cell layout strategy according to chip information, standard cell information and macro cell layout strategy, wherein the standard cell layout strategy indicates the location of the standard cell in the remaining area of the chip, and the remaining area refers to the area of the chip excluding the location of the macro cell;
[0209] The layout module 1204 is used to generate a layout result according to the macro cell layout strategy and the standard cell layout strategy. The layout result refers to the result of placing the macro cells and the standard cells in the chip.
[0210] The chip layout device provided in the embodiment of the present application divides the layout of macro cells and the layout of standard cells into two parts. First, the layout strategy of macro cells in the chip is predicted through the chip layout model, and the macro cells are arranged in the non-central area of the chip. Since the area of macro cells is large, the possibility of blocking the wiring path can be reduced by placing macro cells in the non-central area. After determining the layout strategy of macro cells, standard cells with smaller areas are arranged in the remaining areas of the chip, thereby achieving a reasonable distribution of macro cells and standard cells, which is conducive to improving the performance of chip layout results.
[0211] Alternatively, see Fig.13 The device further includes a model training module 1205, which is used to:
[0212] Acquire sample chip information, sample macrocell information and sample standard cell information, wherein the sample chip information indicates a sample chip, the sample macrocell information indicates a plurality of sample macrocells for layout on the sample chip, and the sample standard cell information indicates a plurality of sample standard cells for layout on the sample chip;
[0213] Based on the sample standard cell information, multiple sample standard cells are clustered to obtain standard cell set information, the standard cell set information indicates multiple standard cell sets, the standard cell set includes multiple sample standard cells, and the sum of the areas of the multiple sample standard cells in the standard cell set is of the same order of magnitude as the area of the sample macro cell;
[0214] Predicting a first layout strategy based on the sample chip information, the sample macrocell information and the standard cell set information through a chip layout model, wherein the first layout strategy indicates a position of the sample macrocell in a non-central area of the sample chip and a position of the standard cell set in a central area of the sample chip;
[0215] Based on the first layout strategy, a chip layout model is trained.
[0216] Optionally, the model training module 1205 is used to:
[0217] Generate a first layout result according to a first layout strategy, where the first layout result refers to a result of placing the sample macrocell and the standard cell set in the sample chip;
[0218] Determine, according to the first layout result, a sample standard cell layout strategy, wherein the sample standard cell layout strategy indicates a position of the sample standard cell in a region where a corresponding standard cell set is located;
[0219] According to the sample standard cell layout strategy, the first layout result is adjusted to obtain a second layout result, where the second layout result refers to a result of placing the sample macro cells and the standard cells in the sample chip;
[0220] Based on the second layout result, determining a reward parameter, the reward parameter indicating how good or bad the chip performance of the second layout result is;
[0221] Based on the reward parameters, the chip layout model is trained.
[0222] Optionally, the model training module 1205 is configured to perform at least one of the following:
[0223] Based on the second layout result, determine the length of the half-perimeter wire, and based on the half-perimeter wire length, determine the reward parameter, the reward parameter is negatively correlated with the half-perimeter wire length, and the half-perimeter wire length refers to the length of the connection between the sample macro unit and the sample standard unit laid out in the sample chip;
[0224] Based on the second layout result, determining a layout congestion parameter, and based on the layout congestion parameter, determining a reward parameter, wherein the reward parameter is negatively correlated with the layout congestion parameter, and the layout congestion parameter represents a degree of congestion between sample macro cells and sample standard cells laid out in the sample chip;
[0225] Based on the second layout result, determine the chip usage area, and based on the chip usage area, determine the reward parameter, the reward parameter is negatively correlated with the chip usage area, and the chip usage area refers to the area of the minimum area covering all sample macro units and all sample standard units in the sample chip;
[0226] Based on the second layout result, the path delay is determined. Based on the path delay, the reward parameter is determined. The reward parameter is negatively correlated with the path delay. The path delay refers to the delay caused by the signal being transmitted between the sample macro unit and the sample standard unit in the sample chip.
[0227] Optionally, the model training module 1205 is used to:
[0228] Predicting a first layout strategy and a value parameter based on sample chip information, sample macro cell information, and standard cell set information through a chip layout model, wherein the value parameter indicates the performance of the chip after layout according to the first layout strategy;
[0229] Based on the reward parameters, the chip layout model is trained, including:
[0230] The difference between the reward parameter and the value parameter is determined as the target parameter, and the chip layout model is trained based on the target parameter.
[0231] Optionally, the first layout strategy includes a plurality of layout sub-strategies arranged in sequence, the layout sub-strategy indicates the position of the next sample macro cell or the next standard cell set in the sample chip after layout is performed according to the previous layout sub-strategy, and the value parameter includes a value parameter of each layout sub-strategy, and the value parameter of the layout sub-strategy indicates the degree of chip performance after layout is performed according to the layout sub-strategy;
[0232] The model training module 1205 is also used for:
[0233] Determining a parameter average of value parameters of a plurality of layout sub-strategies;
[0234] Based on the value parameter and the parameter average of each layout sub-strategy, the chip layout model is trained so that the difference between the value parameter of each layout sub-strategy obtained by the trained chip layout model and the parameter average is reduced.
[0235] Optionally, the first layout strategy includes a first probability distribution, which represents the probability of each position of the sample macro unit and the standard unit set on the chip; the model training module 1205 is used to:
[0236] Predicting a first probability distribution and a first value parameter based on the sample chip information, the sample macrocell information and the standard cell set information through a chip layout model, wherein the first value parameter indicates the quality of chip performance when the sample macrocell and the standard cell set are laid out at corresponding positions;
[0237] Model training module 1205, used to:
[0238] Using a Monte Carlo tree search algorithm, according to sample chip information, sample macrocell information and standard cell set information, search for positions of sample macrocells and standard cell sets on the chip, and determine a second probability distribution and a second value parameter according to the search results, the second probability distribution represents the probability of searching for each position of the sample macrocell and standard cell set on the chip, the probability of a position is positively correlated with the number of times the position is searched, and the second value parameter represents the quality of chip performance when the sample macrocell and standard cell set are arranged at the searched position;
[0239] A chip layout model is trained based on the first probability distribution, the first value parameter, the second probability distribution, and the second value parameter.
[0240] Optionally, the model training module 1205 is used to:
[0241] Based on the difference between the first probability distribution and the second probability distribution, and the difference between the first value parameter and the second value parameter, the chip layout model is trained so that the difference between the first probability distribution and the second probability distribution obtained by the trained chip layout model is reduced, and the difference between the first value parameter and the second value parameter is reduced.
[0242] Optionally, the model training module 1205 is used to:
[0243] A Monte Carlo tree search algorithm is used to search for the locations of sample macrocells and standard cell sets on the chip based on sample chip information, sample macrocell information, standard cell set information and a first probability distribution, so that the probability of each location being searched is equal to the probability of each location in the first probability distribution.
[0244] Optionally, the first layout strategy includes a plurality of layout sub-strategies arranged in sequence, the layout sub-strategy refers to a first probability distribution of the next sample macro cell or the next standard cell set after layout is performed according to the previous layout sub-strategy, and the second value parameter includes a value parameter of each layout sub-strategy, and the value parameter of the layout sub-strategy indicates the degree of chip performance after layout is performed according to the layout sub-strategy;
[0245] Model training module 1205, used to:
[0246] Determining a parameter average of value parameters of a plurality of layout sub-strategies;
[0247] Based on the value parameter and the parameter average of each layout sub-strategy, the chip layout model is trained so that the difference between the value parameter of each layout sub-strategy obtained by the trained chip layout model and the parameter average is reduced.
[0248] Optionally, the model training module 1205 is used to:
[0249] Determining a second layout strategy based on the search results, the second layout strategy indicating the location of the sample macro unit in the non-central area of the sample chip and the location of the standard unit set in the central area of the sample chip;
[0250] According to the second layout strategy, a third layout result is generated, where the third layout result refers to a result of placing the sample macro cell and the standard cell set in the sample chip;
[0251] Determine, according to the third layout result, a sample standard cell layout strategy, where the sample standard cell layout strategy indicates a position of the sample standard cell in a region where a corresponding standard cell set is located;
[0252] According to the sample standard cell layout strategy, the third layout result is adjusted to obtain a fourth layout result, where the fourth layout result refers to a result of placing the sample macro cell and the standard cell in the sample chip;
[0253] Based on the fourth layout result, a second value parameter is determined.
[0254] Optionally, the model training module 1205 is used to:
[0255] Through the chip layout model, a first layout strategy is predicted according to the sample chip information, the sample macro unit information, the standard unit set information and the layout constraints, so that the first layout strategy satisfies the layout constraints, and the layout constraints include that the position of the sample macro unit is located in the non-central area of the sample chip, and the position of the standard unit set is located in the central area of the sample chip.
[0256] It should be noted that the chip layout device provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device is divided into different functional modules to complete all or part of the functions described above. In addition, the chip layout device provided in the above embodiment and the chip layout method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0257] An embodiment of the present application further provides a computer device, which includes a processor and a memory, wherein at least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor to implement the chip layout method of the above embodiment.
[0258] Optionally, the computer device is provided as a terminal. Fig.14 The schematic diagram of the structure of a terminal 1400 provided by an exemplary embodiment of the present application is shown. The terminal 1400 includes: a processor 1401 and a memory 1402 .
[0259] The processor 1401 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1401 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), and PLA (Programmable Logic Array). The processor 1401 may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 1401 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1401 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0260] The memory 1402 may include one or more computer-readable storage media, which may be non-transitory. The memory 1402 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1402 is used to store at least one computer program, which is used by the processor 1401 to implement the chip layout method provided in the method embodiment of the present application.
[0261] In some embodiments, the terminal 1400 may further optionally include: a peripheral device interface 1403 and at least one peripheral device. The processor 1401, the memory 1402 and the peripheral device interface 1403 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 1403 via a bus, a signal line or a circuit board. Optionally, the peripheral device includes: at least one of a radio frequency circuit 1404, a display screen 1405 and a power supply 1406.
[0262] The peripheral device interface 1403 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 1401 and the memory 1402. In some embodiments, the processor 1401, the memory 1402, and the peripheral device interface 1403 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1401, the memory 1402, and the peripheral device interface 1403 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
[0263] The radio frequency circuit 1404 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 1404 communicates with the communication network and other communication devices through electromagnetic signals. The radio frequency circuit 1404 converts the electrical signal into an electromagnetic signal for transmission, or converts the received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 1404 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. The radio frequency circuit 1404 can communicate with other devices through at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: a metropolitan area network, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 1404 may also include circuits related to NFC (Near Field Communication), which is not limited in this application.
[0264] The display screen 1405 is used to display a UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 1405 is a touch display screen, the display screen 1405 also has the ability to collect touch signals on the surface or above the surface of the display screen 1405. The touch signal can be input to the processor 1401 as a control signal for processing. At this time, the display screen 1405 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 1405 can be one, set on the front panel of the terminal 1400; in other embodiments, the display screen 1405 can be at least two, respectively set on different surfaces of the terminal 1400 or in a folding design; in other embodiments, the display screen 1405 can be a flexible display screen, set on a curved surface or a folding surface of the terminal 1400. Even, the display screen 1405 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 1405 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
[0265] The power supply 1406 is used to power various components in the terminal 1400. The power supply 1406 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 1408 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.
[0266] Those skilled in the art will understand that Fig.14 The structure shown in the figure does not constitute a limitation on the terminal 1400, and the terminal 1400 may include more or less components than those shown in the figure, or combine some components, or adopt a different component arrangement.
[0267] Optionally, the computer device is provided as a server. Fig.15 This is a schematic diagram of the structure of a server provided in an embodiment of the present application. The server 1500 may have relatively large differences due to different configurations or performances, and may include one or more processors (Central Processing Units, CPU) 1501 and one or more memories 1502, wherein the memory 1502 stores at least one computer program, and the at least one computer program is loaded and executed by the processor 1501 to implement the methods provided in the above-mentioned various method embodiments. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output, and the server may also include other components for implementing device functions, which will not be described in detail here.
[0268] An embodiment of the present application further provides a computer-readable storage medium, in which at least one computer program is stored. The at least one computer program is loaded and executed by a processor to implement the chip layout method of the above embodiment.
[0269] An embodiment of the present application further provides a computer program product, including a computer program, wherein the computer program is loaded and executed by a processor to implement the chip layout method of the above embodiment.
[0270] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0271] The above description is only an optional embodiment of the embodiments of the present application and is not intended to limit the embodiments of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the protection scope of the present application.
Claims
1. A chip layout method, characterized in that: The method comprises: Acquire chip information, macro cell information, and standard cell information, wherein the chip information indicates a chip, the macro cell information indicates a plurality of macro cells for layout on the chip, and the standard cell information indicates a plurality of standard cells for layout on the chip, wherein an area of the standard cell is smaller than an area of the macro cell; Predicting a macrocell layout strategy based on the chip information and the macrocell information by a chip layout model, wherein the macrocell layout strategy indicates a location of the macrocell in a non-central area of the chip; Determine a standard cell layout strategy according to the chip information, the standard cell information and the macro cell layout strategy, wherein the standard cell layout strategy indicates the position of the standard cell in the remaining area of the chip, and the remaining area refers to the area of the chip except the position of the macro cell; A layout result is generated according to the macro cell layout strategy and the standard cell layout strategy, wherein the layout result refers to a result of placing the macro cell and the standard cell in the chip.
2. The method according to claim 1, characterized in that The training process of the chip layout model includes: Acquire sample chip information, sample macrocell information and sample standard cell information, wherein the sample chip information indicates a sample chip, the sample macrocell information indicates a plurality of sample macrocells for layout on the sample chip, and the sample standard cell information indicates a plurality of sample standard cells for layout on the sample chip; Based on the sample standard cell information, clustering the plurality of sample standard cells to obtain standard cell set information, wherein the standard cell set information indicates a plurality of standard cell sets, the standard cell sets include the plurality of sample standard cells, and the sum of the areas of the plurality of sample standard cells in the standard cell set is of the same order of magnitude as the area of the sample macro cell; Predicting a first layout strategy through the chip layout model according to the sample chip information, the sample macrocell information and the standard cell set information, wherein the first layout strategy indicates the location of the sample macrocell in a non-central area of the sample chip and the location of the standard cell set in a central area of the sample chip; Based on the first layout strategy, the chip layout model is trained.
3. The method according to claim 2, characterized in that The step of training the chip layout model based on the first layout strategy includes: Generate a first layout result according to the first layout strategy, where the first layout result refers to a result of placing the sample macro cell and the standard cell set in the sample chip; Determining a sample standard cell layout strategy according to the first layout result, wherein the sample standard cell layout strategy indicates a position of the sample standard cell in a region where a corresponding standard cell set is located; According to the sample standard cell layout strategy, the first layout result is adjusted to obtain a second layout result, where the second layout result refers to a result of placing the sample macro cell and the standard cell in the sample chip; Based on the second layout result, determining a reward parameter, wherein the reward parameter indicates a degree of chip performance of the second layout result; The chip layout model is trained based on the reward parameter.
4. The method according to claim 3, characterized in that The step of determining a reward parameter based on the second layout result includes at least one of the following: Based on the second layout result, determine the length of the half-perimeter wire, and based on the half-perimeter wire length, determine the reward parameter, wherein the reward parameter is negatively correlated with the half-perimeter wire length, and the half-perimeter wire length refers to the length of the connection between the sample macro unit and the sample standard unit laid out in the sample chip; Based on the second layout result, determining a layout congestion parameter, and based on the layout congestion parameter, determining the reward parameter, wherein the reward parameter is negatively correlated with the layout congestion parameter, and the layout congestion parameter represents a degree of congestion between the sample macrocell and the sample standard cell laid out in the sample chip; Based on the second layout result, determine the chip usage area, and based on the chip usage area, determine the reward parameter, wherein the reward parameter is negatively correlated with the chip usage area, and the chip usage area refers to the area of the minimum area in the sample chip that covers all the sample macro units and all the sample standard units; Based on the second layout result, the path delay is determined, and based on the path delay, the reward parameter is determined, the reward parameter is negatively correlated with the path delay, and the path delay refers to the delay caused by the signal being transmitted between the sample macro unit and the sample standard unit in the sample chip.
5. The method according to claim 3, characterized in that: The predicting a first layout strategy by using the chip layout model according to the sample chip information, the sample macro cell information and the standard cell set information includes: By using the chip layout model, according to the sample chip information, the sample macro cell information and the standard cell set information, predicting the first layout strategy and value parameters, wherein the value parameters represent the quality of chip performance after layout according to the first layout strategy; The step of training the chip layout model based on the reward parameter comprises: The difference between the reward parameter and the value parameter is determined as a target parameter, and the chip layout model is trained based on the target parameter.
6. The method according to claim 5, characterized in that The first layout strategy includes a plurality of layout sub-strategies arranged in sequence, the layout sub-strategies indicating the position of the next sample macro cell or the next set of standard cells in the sample chip after layout is performed according to the previous layout sub-strategies, and the value parameters include the value parameters of each layout sub-strategy, and the value parameters of the layout sub-strategies indicate the degree of chip performance after layout is performed according to the layout sub-strategies; The method further comprises: Determining a parameter average of value parameters of a plurality of said layout sub-strategies; Based on the value parameter of each of the layout sub-strategies and the parameter average value, the chip layout model is trained so that the difference between the value parameter of each of the layout sub-strategies obtained by the trained chip layout model and the parameter average value is reduced.
7. The method according to claim 2, characterized in that The first layout strategy includes a first probability distribution, which represents the probability of each position of the sample macrocell and the standard cell set on the chip; the first layout strategy is predicted according to the sample chip information, the sample macrocell information and the standard cell set information by the chip layout model, including: By using the chip layout model, according to the sample chip information, the sample macrocell information and the standard cell set information, predicting the first probability distribution and a first value parameter, the first value parameter indicating the quality of chip performance when the sample macrocell and the standard cell set are arranged at corresponding positions; The step of training the chip layout model based on the first layout strategy includes: Using a Monte Carlo tree search algorithm, searching for the positions of the sample macrocells and the standard cell set on the chip according to the sample chip information, the sample macrocell information and the standard cell set information, determining a second probability distribution and a second value parameter according to the search results, wherein the second probability distribution represents the probability of searching for each position of the sample macrocell and the standard cell set on the chip, the probability of the position being positively correlated with the number of times the position is searched, and the second value parameter represents the quality of chip performance when the sample macrocell and the standard cell set are placed at the searched position; The chip layout model is trained based on the first probability distribution, the first value parameter, the second probability distribution, and the second value parameter.
8. The method according to claim 7, characterized in that The step of training the chip layout model based on the first probability distribution, the first value parameter, the second probability distribution, and the second value parameter includes: Based on the difference between the first probability distribution and the second probability distribution, and the difference between the first value parameter and the second value parameter, the chip layout model is trained so that the difference between the first probability distribution and the second probability distribution obtained by the trained chip layout model is reduced, and the difference between the first value parameter and the second value parameter is reduced.
9. The method according to claim 7, characterized in that: The Monte Carlo tree search algorithm is used to search for the positions of the sample macrocell and the standard cell set on the chip according to the sample chip information, the sample macrocell information and the standard cell set information, including: A Monte Carlo tree search algorithm is used to search the positions of the sample macrocells and the standard cell set on the chip based on the sample chip information, the sample macrocell information, the standard cell set information and the first probability distribution, so that the probability of each position being searched is equal to the probability of each position in the first probability distribution.
10. The method according to claim 7, characterized in that The first layout strategy includes a plurality of layout sub-strategies arranged in sequence, the layout sub-strategy refers to a first probability distribution of the next sample macro cell or the next set of standard cells after layout is performed according to the previous layout sub-strategy, and the second value parameter includes a value parameter of each layout sub-strategy, and the value parameter of the layout sub-strategy indicates the degree of chip performance after layout is performed according to the layout sub-strategy; The method further comprises: Determining a parameter average of value parameters of a plurality of said layout sub-strategies; Based on the value parameter of each of the layout sub-strategies and the parameter average value, the chip layout model is trained so that the difference between the value parameter of each of the layout sub-strategies obtained by the trained chip layout model and the parameter average value is reduced.
11. The method according to claim 2, characterized in that The predicting a first layout strategy by using the chip layout model according to the sample chip information, the sample macro cell information and the standard cell set information includes: The first layout strategy is predicted through the chip layout model according to the sample chip information, the sample macro unit information, the standard unit set information and the layout constraints, so that the first layout strategy satisfies the layout constraints, wherein the layout constraints include that the sample macro unit is located in a non-central area of the sample chip and the standard unit set is located in a central area of the sample chip.
12. A chip layout device, characterized in that: The device comprises: An information acquisition module, used to acquire chip information, macro cell information and standard cell information, wherein the chip information indicates a chip, the macro cell information indicates a plurality of macro cells for layout on the chip, and the standard cell information indicates a plurality of standard cells for layout on the chip, wherein an area of the standard cell is smaller than an area of the macro cell; A strategy prediction module, used for predicting a macrocell layout strategy based on the chip information and the macrocell information through a chip layout model, wherein the macrocell layout strategy indicates a location of the macrocell in a non-central area of the chip; a strategy determination module, configured to determine a standard cell layout strategy according to the chip information, the standard cell information and the macro cell layout strategy, wherein the standard cell layout strategy indicates a position of the standard cell in a remaining area of the chip, wherein the remaining area refers to an area of the chip excluding a position of the macro cell; The layout module is used to generate a layout result according to the macro cell layout strategy and the standard cell layout strategy, wherein the layout result refers to a result of placing the macro cell and the standard cell in the chip.
13. A computer device, characterized in that: The computer device includes a processor and a memory, wherein at least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor to implement the chip layout method according to any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one computer program, and the at least one computer program is loaded and executed by a processor to implement the chip layout method according to any one of claims 1 to 11.
15. A computer program product comprising a computer program, characterized in that The computer program is loaded and executed by a processor to implement the chip layout method according to any one of claims 1 to 11.
Citation Information
Cited By
Macro layout method based on combination of Monte Carlo tree search and Bayesian optimization
CN121189268A
A macro layout method based on combination of monte carlo tree search and bayesian optimization
CN121189268B
