End-to-end reinforcement learning mixed-scale placement method based on postprocessing

By introducing post-processing modules and prior knowledge of edge placement into the end-to-end reinforcement learning layout model, the component overlapping problem in mixed-scale layout is solved, the performance and regularity of chip layout are optimized, and a better layout is achieved. result.

WO2024217599A1PCT designated stage expired Publication Date: 2024-10-24SHANGHAI ARTIFICIAL INTELLIGENCE INNOVATION CENT

Patent Information

Application Number
PCT/CN2024/098899
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-04-17
Filing Date
2024-06-13
Publication Date
2024-10-24

AI Technical Summary

Technical Problem

Existing end-to-end reinforcement learning layout models fail to effectively consider the actual size of macro components in mixed-scale layout scenarios, resulting in component overlap problems and affecting chip performance and indicators such as actual line lengths.

Method used

An end-to-end reinforcement learning mixed-scale layout method based on post-processing is designed. By performing edge post-processing on all components after the layout is completed, the reward function is used to periodically update the policy network to reduce the overlapping area between components and optimize the components. Regularity.

Benefits of technology

It effectively reduces the overlapping area of ​​the layout results and improves component regularity and overall performance. The average overlap area is reduced by 2.14, the component regularity is increased by 2.67 times, and the bus length indicator is reduced by 0.2%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024098899_24102024_PF_FP_ABST
    Figure CN2024098899_24102024_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present invention is an end-to-end reinforcement learning mixed-scale placement method based on postprocessing. The method comprises: to address the problem of the placement of target elements on a chip, constructing a reinforcement learning placement model, wherein the reinforcement learning placement model includes a policy network and a postprocessing module, and the target elements include macro elements and standard elements; realizing the overall placement of all macro elements by using the policy network; by targeting a reduction in the overlapping area between the elements, the postprocessing module performing edge-joining postprocessing on all target elements, so as to obtain a placement result of all the target elements; and using a set reward function to calculate a reward value corresponding to the placement result, and periodically updating the policy network until a set optimization target is met. The present invention reduces the overlapping area of a placement result, and also improves indexes such as the element regularity.
Need to check novelty before this filing date? Find Prior Art

Description

A hybrid scale layout method based on end-to-end reinforcement learning and post-processing Technical Field

[0001] The present invention relates to the field of automated chip design technology, and more specifically, to a post-processing-based end-to-end reinforcement learning hybrid scale layout method. Background Art

[0002] The goal of chip layout is to place macro components and standard components onto the chip board, meeting density and congestion constraints while optimizing PPA (performance, power, and area) targets. Traditional algorithms for solving layout problems typically include heuristic algorithms, genetic algorithms, Monte Carlo sampling, or force-directed optimization algorithms. However, these algorithms have bottlenecks in time efficiency and the design complexity of specific layout problems, and are unable to effectively unleash the rapidly growing hardware computing power in the field of artificial intelligence.

[0003] In recent years, intelligent layout algorithms based on reinforcement learning have been gradually proposed. These algorithms use convolutional neural networks and graph neural networks to model the state space, achieving good fitting results. For example, the input of an end-to-end reinforcement learning layout model includes the size of each component and the connection relationship between components (i.e., the netlist diagram). Sequential decisions are made for each component. The policy network modules (convolutional neural networks and graph neural networks) respectively obtain global embedding features and node embedding features of varying granularity. The feature vectors obtained from the two networks are then fused to ultimately predict the probability distribution of the possible placement locations of the component at the current moment. Current end-to-end reinforcement learning layout models include those from Google and DeepPlace.

[0004] Analysis shows that existing end-to-end reinforcement learning layout models all assume that each macrocomponent occupies a single grid cell. However, in the context of mixed-scale layouts, macrocomponents often have large size differences. This means that the layout process doesn't consider the known size of the macrocomponents, leading to severe component overlap in the resulting layout. This affects metrics like actual line length and, ultimately, chip performance.

[0005] Summary of the Invention

[0006] The purpose of the present invention is to overcome the above-mentioned shortcomings of the prior art and provide an end-to-end reinforcement learning hybrid scale layout method based on post-processing. The method comprises the following steps:

[0007] For the layout problem of target components on the chip, an end-to-end reinforcement learning layout model is constructed, wherein the reinforcement learning layout model includes a policy network and a post-processing module, and the target components include macro components and standard components;

[0008] Implementing the overall layout of all macro components using the strategy network;

[0009] The post-processing module performs edge post-processing on all target components with the goal of reducing the overlapping area between components to obtain the layout results of all target components;

[0010] The reward value corresponding to the layout result is calculated using the set reward function, and the policy network is periodically updated until the set optimization goal is met.

[0011] Compared with the existing technology, the advantage of the present invention is that, for mixed-scale layout scenarios with large differences in macro component sizes, an end-to-end reinforcement learning layout model including a post-processing module is designed. After the overall layout of the intelligent agent is completed, all components are post-processed together. By introducing the prior knowledge of placing them as close to the edge as possible, the overlapping area of ​​the layout results is reduced while optimizing indicators such as component regularity.

[0012] Further features and advantages of the present invention will become apparent from the following detailed description of exemplary embodiments of the present invention with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention.

[0014] FIG1 is a flowchart of a post-processing-based end-to-end reinforcement learning hybrid scale layout method according to one embodiment of the present invention;

[0015] FIG2 is a general framework diagram of an end-to-end reinforcement learning hybrid scale layout method based on post-processing according to one embodiment of the present invention;

[0016] FIG3 is an overall simulation flow chart of a post-processing-based end-to-end reinforcement learning hybrid-scale layout method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0017] Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that unless otherwise specifically stated, the relative arrangement of components and steps, numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present invention.

[0018] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.

[0019] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered part of the specification.

[0020] In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not limiting. Therefore, other examples of the exemplary embodiments may have different values.

[0021] It should be noted that like reference numerals and letters refer to like items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0022] 1 and 2 , the provided post-processing-based end-to-end reinforcement learning hybrid scale layout method includes the following steps:

[0023] Step S110 : constructing an end-to-end reinforcement learning layout model for the layout problem of macro components and standard components, wherein the reinforcement learning layout model includes a post-processing module.

[0024] In the present invention, a reinforcement learning method is used to place macro components (such as SRAM) and standard components (such as logic gates, including NAND and NOR) on the chip board, thereby optimizing the power, performance and area (PPA) of the chip while complying with constraints such as layout density and routing congestion.

[0025] The designed end-to-end reinforcement learning layout model includes not only a policy network but also a post-processing module. In general, the policy network sequentially places macro components, which is then combined with the post-processing module to generate standard component placements. The post-processing process further optimizes the macro component positions.

[0026] In the reinforcement learning method provided by this invention, the layout area on the chip is used as the environment. A state is each possible partial placement of the netlist on the chip canvas, that is, the placement of macro components within the layout area is considered the state. For a given macro component currently to be placed, the available actions are the set of all possible locations in the discrete canvas space (grid cells) where the macro component can be placed, without violating any hard constraints such as density or congestion. The reward is the reward for taking an action in a given state.

[0027] Step S120 : For all macro components to be placed, the strategy network is used to realize the overall layout of the macro components.

[0028] The goal of learning a mixed-scale macro placement strategy is to learn a strategy π that makes placement decisions based on a given netlist and component size information, determining the placement of the macro components. For example, the strategy network consists of a convolutional neural network that generates a global feature vector from the layout image and a graph convolutional network that processes the graph structure extracted from the netlist to obtain local embedded features of the netlist. The two feature vectors are then concatenated to complete the macro placement.

[0029] In one embodiment, the reward function used for macro element placement is the negative weighted sum of line length, congestion, and density. The weights can be used to explore the trade-offs between the various metrics.

[0030] In step S130 , with the goal of reducing the overlapping area between components, all components are subjected to edge post-processing to obtain a layout result of all components.

[0031] To alleviate component overlap in the intermediate layout results and improve component regularity, a post-processing algorithm was developed that integrates the prior knowledge of traditional methods that prioritize close placement into the reinforcement learning layout framework. This involves introducing a post-processing module into the entire end-to-end learning process, as shown in Figure 2. After the overall macro component layout is complete, the post-processing module is combined with the edge post-processing to optimize the overlap area of ​​the resulting layout.

[0032] In step S140 , the line length and congestion index are estimated based on the layout results obtained by post-processing, and are fed back to the intelligent agent, and the policy network is periodically updated through the proximal policy optimization algorithm.

[0033] In this step, the reward value corresponding to the layout result is calculated using the set overall reward function, and the policy network is periodically updated until the set optimization goal is met.

[0034] In summary, the present invention first determines the placement of each macro component in turn through an intelligent agent. After the overall layout of the macro components is completed, all components are post-processed together. The line length and congestion index are estimated based on the layout results and fed back to the intelligent agent to update the policy network to obtain the intelligent agent for the next iteration. Specifically, it includes: (1) for the macro components at the current moment, the global embedding features and node embedding features of different coarse and fine granularity are obtained respectively according to the policy network module (convolutional neural network and graph neural network), and the feature vectors obtained by the two networks are fused to predict the probability distribution of the possible placement position of the component; (2) after the overall layout of the macro components is completed, all components are post-processed together to optimize the overlapping area of ​​the layout results; (3) based on the layout results obtained by post-processing, the line length and congestion index are estimated and fed back to the intelligent agent, and the policy network is periodically updated through (Proximal Policy Optimization).

[0035] For clarity, Figure 3 illustrates the simulation process of the proposed post-processing-based end-to-end reinforcement learning hybrid-scale layout method, which includes the following steps:

[0036] Step S31 , reading component data of the circuit to be laid out.

[0037] For example, a data file describing the components and netlist information in the circuit to be laid out is received through the data preprocessing module, and the extracted state is saved in the computer memory for processing by the reinforcement learning layout model.

[0038] Step S32: Select the component to be placed at the current moment.

[0039] For example, construct a blank chessboard grid, initialize the result list, and select a macro element to be placed.

[0040] Step S33: calling the strategy network to predict the location probability of the component.

[0041] For example, the strategy network predicts the placement location of a component and verifies whether the result is valid. If the selected location is already occupied, an alternative placement location is searched for and the next component to be placed is selected.

[0042] Step S34: determine whether all macro elements have been placed.

[0043] If there are still macro elements that have not been placed, go back to step S33; otherwise go to step S35.

[0044] Step S35 , running a post-processing algorithm to adjust component positions and calculate offset losses.

[0045] The process of running the post-processing algorithm includes: for each macro element, calculating the distance from its boundary to the nearest element (if there is no element, calculating the distance to the chip board boundary); moving the element in the direction of the nearest neighbor until it overlaps with another element or approaches the chip board boundary; calculating the horizontal and vertical movement distances of each element separately, and adding the sum of the squares of all movement distances as the offset loss to the reward function.

[0046] Step S36: Call the gradient-based layout optimization algorithm and calculate the reward value.

[0047] For example, the gradient-based layout optimization algorithm DREAMPlace is run to read the macro component positions in the result list. After iterative optimization, the standard component placement is completed. The reward value (including offset loss) is calculated based on the complete layout result, and the strategy for selecting the agent's actions is appropriately updated. If training is not completed, the algorithm returns to step S32. Training is completed after the set number of rounds.

[0048] To further validate the effectiveness of this invention, tests were conducted on the ISPD-2005 dataset, which contains eight different circuits with a total component count ranging from 200,000 to 2 million. The experimental results show that compared to an existing baseline model that doesn't use post-processing, the chip layouts obtained by this invention achieve a 2.14% reduction in average overlap area, a 2.67-fold improvement in component regularity, and a 0.2% reduction in total line length.

[0049] In summary, compared with the prior art, the present invention has the following advantages:

[0050] 1) This paper proposes for the first time a post-processing method based on the edge placement of traditional layouters in an end-to-end reinforcement learning layout model, thereby reducing the overlapping area of ​​the layout results and optimizing indicators such as component regularity.

[0051] 2) The present invention calculates the offset loss of the post-processing algorithm as part of the reward function, thereby organically combining the reinforcement learning agent with the post-processing algorithm and improving the overall performance of the chip layout.

[0052] The present invention may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present invention.

[0053] Computer-readable storage medium can be a tangible device that can keep and store the instructions used by the instruction execution device.Computer-readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device or any suitable combination thereof.More specific examples (non-exhaustive list) of computer-readable storage medium include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, for example, a punch card or a convex structure in a groove having instructions stored thereon, and any suitable combination thereof.Computer-readable storage medium used herein is not interpreted as a transient signal itself, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagated by waveguides or other transmission media (for example, light pulses by fiber optic cables), or electrical signals transmitted by wires.

[0054] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions to be stored in the computer-readable storage medium in the respective computing / processing device.

[0055] The computer program instructions for performing the operation of the present invention can be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, Python, and conventional procedural programming languages ​​such as "C" language or similar programming languages. The computer readable program instructions can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer via any type of network including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), can be personalized by utilizing the state information of the computer readable program instructions, and the electronic circuit can execute the computer readable program instructions, thereby realizing various aspects of the present invention.

[0056] Various aspects of the present invention are described herein with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present invention. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.

[0057] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device is generated that implements the functions / actions specified in one or more blocks in the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, where these instructions cause the computer, programmable data processing device, and / or other device to operate in a specific manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks in the flowchart and / or block diagram.

[0058] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more blocks in the flowchart and / or block diagram.

[0059] The flowcharts and block diagrams in the accompanying drawings show the possible implementation architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, program segment or part of an instruction, and the module, program segment or part of the instruction contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that implementation by hardware, implementation by software, and implementation by a combination of software and hardware are all equivalent.

[0060] While various embodiments of the present invention have been described above, the foregoing description is intended to be illustrative, non-exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is selected to best explain the principles of the embodiments, their practical applications, or technological improvements in the marketplace, or to enable others skilled in the art to understand the embodiments disclosed herein. The scope of the present invention is defined by the appended claims.

Claims

1. A post-processing based end-to-end reinforcement learning mixed-scale layout method, comprising the following steps: Aiming at the layout problem of the target components on the chip, an end-to-end reinforcement learning layout model is constructed, wherein the reinforcement learning layout model includes a strategy network and a post-processing module, and the target components include macro components and standard components; Using the strategy network to achieve the overall layout of all macro components; The post-processing module aims to reduce the overlapping area between components, performs edge post-processing on all target components together, and obtains the layout results of all target components; The reward value corresponding to the layout result is calculated using the set overall reward function, and the policy network is periodically updated until the set optimization goal is met.

2. The method according to claim 1, characterized in that The strategy network includes a convolutional neural network and a graph convolutional network. The convolutional neural network is used to extract the global feature vector of the layout image. The graph convolutional network is used to process the graph structure extracted from the netlist graph to obtain the local embedded feature vector of the netlist graph. The overall layout of the macro element is obtained by splicing the global feature vector and the local embedded feature vector.

3. The method according to claim 1, characterized in that In the process of realizing the overall placement of all macro elements using the policy network, the reward function is the negative weighted sum of wire length, congestion and density.

4. The method according to claim 3, characterized in that The overall reward function also includes an offset loss calculated during post-processing based on the element's movement distance.

5. The method according to claim 4, characterized in that The post-processing module performs the following process: For each macro element, calculate the distance from its boundary to the nearest element, and if there is no adjacent element, calculate the distance to the chip board boundary; Move the macro component toward its nearest neighbor until it overlaps another component or approaches the chip board boundary; Calculate the horizontal and vertical movement distances of each macro element respectively, add the square sum of all movement distances as offset loss to the reward function, and calculate the overall reward function; Run the gradient-based layout optimization algorithm to obtain the macro component position, and complete the placement of standard components after iterative optimization to obtain the layout results of all target components; A corresponding reward value is calculated according to the layout result, where the reward value includes the offset loss, and then the layout strategy is updated according to the reward value.

6. The method according to claim 1, characterized in that The optimization objectives of the reinforcement learning layout model include power consumption, performance and chip area.

7. The method according to claim 1, characterized in that The policy network is periodically updated using proximal policy optimization.

8. A computer-readable storage medium having a computer program stored thereon, wherein: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

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

Citation Information

Patent Citations

  • System and method for optimizing chip layout based on deep reinforcement learning

    CN114154412A

  • Post-processing-based end-to-end reinforcement learning mixed scale layout method

    CN116415541A

  • Layout design system and layout design method

    US20200184137A1

Cited By

  • Standard cell layout optimization method of FinFET process and related equipment

    CN119476185A

  • Pollution sensing physical design method of microfluidic FPVA biochip

    CN119578341A

  • Chip screening method and system based on deep Q learning

    CN120354912A

  • Wiring layout method based on reinforcement learning

    CN120706359A

  • Square placement recommendation method, device and equipment based on target area guidance

    CN122377128A