Reinforcement learning macro-module layout method based on curiosity driving

Through a curiosity-driven reinforcement learning method, combined with proximal strategy optimization and feature extraction technology, the problem of unsatisfactory macromodule layout in VLSI is solved, achieving high-quality layout results and optimization of mixed-size layout.

CN118536458APending Publication Date: 2024-08-23SOUTHEAST UNIV
View PDF 0 Cites 6 Cited by

Patent Information

Application Number
CN202410412463.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-08
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

The existing technology has the problem of unsatisfactory results in macro module layout of very large scale integrated circuits. Especially when the size difference between macro modules and standard cells is large, it is difficult to effectively place them, resulting in limited optimization of power consumption, performance and chip area.

Method used

Adopt a curiosity-driven reinforcement learning method, establish a policy network and a value network through a proximal policy optimization algorithm, combine convolutional neural networks and edge-based graph neural networks to extract features, use a fast non-overlapping algorithm to block illegal placement locations, and use Internal and external reward value networks optimize placement strategies to achieve high-quality layout of macro modules.

Benefits of technology

This method can quickly generate high-quality macro layout results, avoid human interference, provide better layout results than traditional algorithms, and meet the optimization needs of mixed-size layout.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118536458A
    Figure CN118536458A
Patent Text Reader

Abstract

The invention discloses a reinforcement learning macro-module layout method based on curiosity driving, which comprises the following steps: dividing a layout area into a plurality of grids, clustering standard units into blocks, and updating a netlist; establishing a reinforcement learning model, and designing a strategy network, a value network and a reward value function; extracting global image features and graph features; an illegal placement position is shielded through a rapid non-overlapping algorithm, and a strategy network samples according to extracted features to obtain a legal placement position; evaluating each step of placement of the intelligent agent by applying an internal reward value network based on curiosity driving; all macro-modules and clustering blocks are placed, an external reward value algorithm based on the line length is applied to evaluate a layout result, and an intelligent agent is guided to update a strategy network and a value network; and obtaining the trained macro-module layout device. According to the method, the reinforcement learning technology is combined with the EDA field, and the high-quality macro layout result can be quickly generated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of integrated circuits, relates to very large scale integrated circuit (VLSI) physical design automation technology, and specifically relates to a curiosity-driven reinforcement learning macromodule layout method. Background Art

[0002] The VLSI layout problem is one of the most important steps in the VLSI design process, and it is also a relatively complex and time-consuming step. The purpose of the VLSI layout problem is to place the macro modules (such as SRAM) and standard cells (logic gates, such as NAND gates, NOR gates, XOR gates, etc.) in the wire network within the chip layout area to optimize power consumption, performance, and chip area while complying with the constraints of layout density and routing congestion. The sizes of macro modules and standard cells are often very different, so this type of VLSI layout problem is also called a mixed-size layout problem.

[0003] The mainstream algorithms for solving mixed-size layout problems are divided into three categories according to different macromodule processing methods: placing macromodules and standard cells at the same time, placing macromodules constructively, and placing macromodules first and then placing standard cells. When the chip utilization rate is high or there are individual macromodules of huge size, macromodules are very easy to overlap, and it is extremely difficult to legalize the placement results. The method of constructively placing macromodules can ensure that the process does not overlap, but the total line length is usually much longer than the first type. The third type divides the mixed-size layout problem into two stages: macromodule placement and standard cell placement. This type of placement can ensure a feasible solution as long as the macromodule placement does not overlap. Therefore, the two-stage method is widely used in the industry. Macromodule placement is crucial for mixed-size layout because the macromodule position will significantly affect the layout of standard cells and the final layout and routability quality. In the prior art, the macromodule placement results are not ideal. Summary of the invention

[0004] In view of the problems existing in the prior art, the present invention provides a curiosity-driven reinforcement learning macro module layout method.

[0005] In order to achieve the above object, the technical solution adopted by the present invention is:

[0006] A curiosity-driven reinforcement learning macromodule layout method includes the following steps:

[0007] Step S1, according to the given circuit netlist, module size and initial position information, the layout area is divided into a number of grids, and the standard cells in the circuit netlist are clustered into blocks, and the netlist is updated;

[0008] Step S2, establishing a reinforcement learning model based on the proximal policy optimization (PPO) algorithm, and designing a strategy network, a value network, and a reward value function;

[0009] Step S3, jointly extracting global image features and graph features through a convolutional neural network and an edge-based graph neural network;

[0010] Step S4, using a fast non-overlapping algorithm to shield illegal placement positions, the policy network obtains legal placement positions based on the extracted feature sampling, and the agent places the module based on the probability distribution of the legal position;

[0011] Step S5, applying the curiosity-driven internal reward value network to evaluate each step of the agent's placement;

[0012] Step S6, repeating S3 to S5 until all macro modules and cluster blocks are placed, applying the line length-based external reward value algorithm to evaluate the layout results, and guiding the agent to update the strategy network and value network;

[0013] Step S7, repeating S6 until the maximum training cycle is reached, and obtaining a trained macromodule placer.

[0014] Furthermore, the method also includes the following steps: using the trained macro module layout device to generate a macro layout result.

[0015] Furthermore, in step S2, the policy network includes 4 deconvolution layers, the value network includes a multilayer perceptron consisting of 3 fully connected layers, and the reward value Reward is calculated by formula (1):

[0016] Reward=R e +R i (1)

[0017] Among them, R i Internal rewards driven by curiosity are provided by random network distillation. The network structure that generates internal rewards includes a fixed and randomly initialized target network and a trainable prediction network. The output of the network structure that generates internal rewards is the mean square error between the inputs of the two networks to the same state.

[0018] R e is the external reward value based on line length, calculated by formula (2):

[0019]

[0020] Among them, λ and ∈ are two coefficients that balance external rewards and internal rewards; W HPWL Calculated by formula (3):

[0021]

[0022] Among them, x j and j It is a wire network i The endpoint v j The x- and y-coordinates of N netlist is the number of nets in the netlist.

[0023] Furthermore, in step S3, a convolutional neural network and an edge-based graph neural network are used simultaneously to extract global image information and placement feature information.

[0024] Furthermore, the step S4 includes the following process: before the agent places the module, the environment returns a shielding layer according to a fast non-overlapping method; then, the shielding layer is used to determine the legal position in the policy network.

[0025] Furthermore, the fast non-overlapping method specifically includes the following process:

[0026] Divide the canvas [0, W]×[0, H] into an N×N grid, where W is the width of the canvas and H is the height of the canvas; the width and height of each grid are and Set the current module b i The width and height are w i and h i , b i The coordinates of the lower left corner are x i and i ; Illegal grid B illegal is defined as follows:

[0027] B illeagl =B out ∪B occupied ∪B overlap (4)

[0028] Among them, B out Indicates that if the current module b i Occupying these grids will cause the module to exceed the layout area; B occupied Indicates the grid that has been occupied by the previous module; B overlap Indicates that if the module b currently to be placed i Occupying these grids will make b i Overlapping with previously placed modules;

[0029] Use p[0, 1, 2, ..., N-1] and q[0, 1, 2, ..., N-1] to represent the grid numbers in the x and y directions respectively;

[0030] B out The following definition:

[0031]

[0032]

[0033]

[0034] Among them, bin p,q Indicates the grid numbered p in the x-direction and q in the y-direction;

[0035] B occupied The following definition:

[0036]

[0037]

[0038]

[0039] in Indicates that these grids are j Occupancy, 0≤j≤i-1;

[0040] B overlap The following definition:

[0041]

[0042]

[0043] in, If these grids are i Occupancy will make module b i With module b j Overlap, 0≤j≤i-1;

[0044]

[0045]

[0046] in, In the x direction, these grids are i When occupied, module b i With module b j overlapping, In the y direction, these grids are i When occupied, module b i With module b j Overlap, p j_L and p j_U Indicates the x direction The minimum and maximum sequence numbers, qj_L and q j_U Indicates the y direction The minimum and maximum sequence numbers.

[0047] Furthermore, in step S5, the curiosity-driven internal reward value network includes a fixed and randomly initialized target network and a trainable prediction network.

[0048] Furthermore, in step S6, the agent is guided to update the policy network and the value network according to the proximal policy optimization (PPO) algorithm.

[0049] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0050] The curiosity-driven reinforcement learning macro module layout method provided by the present invention shields illegal placement positions through a fast non-overlapping algorithm and obtains legal placement positions through a policy network. The present invention combines reinforcement learning technology with the EDA field, can quickly generate high-quality macro layout results, and adopts an unsupervised learning method to avoid human interference and obtain better results than traditional algorithms. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 A schematic diagram of the flow of the curiosity-driven reinforcement learning macromodule layout method provided by the present invention;

[0052] Figure 2 It is the overall network structure diagram of the present invention;

[0053] Figure 3 This is a diagram of the internal reward value network structure of the present invention. DETAILED DESCRIPTION

[0054] The technical solution provided by the present invention will be described in detail below in conjunction with specific embodiments. It should be understood that the following specific implementation methods are only used to illustrate the present invention and are not used to limit the scope of the present invention.

[0055] The present invention provides a curiosity-driven reinforcement learning macromodule layout method, which first performs standard cell clustering based on connection perception and type balance according to a given netlist and architecture, then uses a reinforcement learning method to place macromodules and standard cell clustering blocks, and finally retains the layout of the macromodule. The method includes multiple advantages, such as jointly extracting global image features and graph features through convolutional neural networks and edge-based graph neural networks, shielding illegal placement positions with a fast non-overlapping algorithm, and applying an internal reward value network driven by curiosity. The process of the method of the present invention is as follows Figure 1 As shown, the overall network structure is as follows Figure 2 Specifically, the method of the present invention comprises the following steps:

[0056] S1, according to the given circuit netlist, module size and initial position information, the layout area is divided into 32×32 grids, and the standard cells in the circuit netlist are clustered into blocks. Each cluster block is composed of about 300 standard cells, and the netlist is updated with clustering. The circuit netlist contains macro modules and standard cells.

[0057] S2, establish a reinforcement learning model based on the proximal policy optimization (PPO) algorithm, and design the policy network, value network, and reward value function.

[0058] The policy network consists of 4 deconvolution layers, with an original input dimension of (16, 4, 4) and an output dimension of (1, 32, 32). The value network consists of a multi-layer perceptron consisting of 3 fully connected layers, with an input dimension of 128 and an output dimension of 1. The reward value is calculated by formula (1):

[0059] Reward=R e +R i (1)

[0060] Among them, the curiosity-driven internal reward R i Provided by random network distillation, the network structure that generates internal rewards consists of a fixed and randomly initialized target network and a trainable prediction network. The output result is the mean square error between the inputs of the two networks to the same state. External reward value R based on line length e Calculated by formula (2):

[0061]

[0062] Where λ and ∈ are two coefficients that balance external rewards and internal rewards. HPWL Calculated by formula (3):

[0063]

[0064] Among them, x j and j It is a wire network i The endpoint v j The x-coordinate and y-coordinate of N netlist is the number of nets in the netlist.

[0065] S3, extract global image features and graph features jointly through convolutional neural networks and edge-based graph neural networks. Among them, the convolutional neural network extracts image features in the macromodule layout image, and the edge-based graph neural network extracts features in the graph with adjacency relationships in the circuit netlist as edges and macromodules and standard cell clustering blocks as nodes. In this step, convolutional neural networks and edge-based graph neural networks are used simultaneously to extract global image information and placement feature information (placement feature information is included in the graph features). Afterwards, the features extracted from the two networks are connected and passed through a policy network composed of multiple deconvolution layers to obtain a probability distribution in order to shield illegal actions in S4.

[0066] S4, shielding illegal placement positions through a fast non-overlapping algorithm, and the policy network obtains legal placement positions based on the extracted feature sampling. The fast non-overlapping algorithm means that before the agent places the module, the environment will return a shielding layer according to the fast non-overlapping method of the present invention. Then, the shielding layer is used to determine the legal position in the policy network. The agent will place the module according to the probability distribution of the legal position. Specifically, it includes the following process:

[0067] First, the present invention divides the placement canvas [0, W]×[0, H] into N×N grids (32×32 grids in this embodiment), where W is the width of the canvas and H is the height of the canvas. The width and height of each grid are respectively and Set the current module b i The width and height are w i and h i , b i The coordinates of the lower left corner are x i and i Illegal Grid B illegal is defined as follows:

[0068] B illeagl =B out ∪B occupied ∪B overlap (4)

[0069] Among them, B out Indicates that if the current module b i Occupying these grids will cause the module to exceed the layout area; B occupied Indicates the grid that has been occupied by the previous module; B overlap Indicates that if the module b currently to be placed i Occupying these grids will make b i Overlaps with previously placed modules.

[0070] In the present invention, p[0, 1, 2, ..., N-1] and q[0, 1, 2, ..., N-1] are used to represent the grid numbers in the x and y directions respectively.

[0071] B out The following definition:

[0072]

[0073]

[0074]

[0075] Among them, bin p,q Represents a grid numbered p in the x direction and q in the y direction.

[0076] Then B occupied The following definition:

[0077]

[0078]

[0079]

[0080] in Indicates that these grids are j Occupies, 0≤j≤i-1.

[0081] Then B overlap The following definition:

[0082]

[0083]

[0084] in If these grids are i Occupancy will make module b i With module b j Overlap, 0≤j≤i-1.

[0085]

[0086]

[0087] in, In the x direction, these grids are i Occupancy will make module b i With module b j overlapping, In the y direction, these grids are iOccupancy will make module b i With module b j Overlap, p j_L and p j_U Indicates the x direction The minimum and maximum sequence numbers of . Similarly, q j_L and q j_U Indicates the y direction The minimum and maximum sequence numbers.

[0088] S5, applies the curiosity-driven internal reward value network to evaluate each step of the agent’s placement. Figure 3 As shown in the figure, the curiosity-driven internal reward value network consists of a fixed and randomly initialized target network and a trainable prediction network. Initially, the prediction network is randomly initialized, and the training of the prediction network is to minimize the mean square error between the results and the results of the target network. For the same repeated state, the outputs of the two networks will gradually become similar, which means that the internal reward decreases. Therefore, if the state is less familiar to the prediction network, the environment will feedback a higher internal reward, thereby encouraging the agent to visit new states.

[0089] S6, repeat S3 to S5 until all macro modules and cluster blocks are placed, apply the line length-based external reward value algorithm, evaluate the layout results, and guide the agent to update the policy network and value network according to the proximal policy optimization (PPO) algorithm.

[0090] S7, repeatedly executing S6 until the maximum training cycle is reached, and a trained macro module placer is obtained, which can be used to quickly generate high-quality macro layout results.

[0091] It should be noted that the above content merely illustrates the technical idea of ​​the present invention and cannot be used to limit the protection scope of the present invention. For ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications all fall within the protection scope of the claims of the present invention.

Claims

1. A curiosity-driven reinforcement learning macromodule layout method, characterized in that: The following steps are involved: Step S1, according to the given circuit netlist, module size and initial position information, the layout area is divided into a number of grids, and the standard cells in the circuit netlist are clustered into blocks, and the netlist is updated; Step S2, establishing a reinforcement learning model based on the proximal policy optimization PPO algorithm, and designing a strategy network, a value network, and a reward value function; Step S3, jointly extracting global image features and graph features through a convolutional neural network and an edge-based graph neural network; Step S4, using a fast non-overlapping algorithm to shield illegal placement positions, the policy network obtains legal placement positions based on the extracted feature sampling, and the agent places the module based on the probability distribution of the legal position; Step S5, applying the curiosity-driven internal reward value network to evaluate each step of the agent's placement; Step S6, repeating S3 to S5 until all macro modules and cluster blocks are placed, applying the line length-based external reward value algorithm to evaluate the layout results, and guiding the agent to update the strategy network and value network; Step S7, repeating S6 until the maximum training cycle is reached, and obtaining a trained macromodule placer.

2. The curiosity-driven reinforcement learning macromodule layout method according to claim 1, characterized in that: The following steps are also included: Generate macro placement results using the trained macroblock placer.

3. The curiosity-driven reinforcement learning macromodule layout method according to claim 1, characterized in that: In step S2, the policy network includes 4 deconvolution layers, the value network includes a multi-layer perceptron consisting of 3 fully connected layers, and the reward value Reward is calculated by formula (1): Reward=R e +R i (1) Among them, R i Internal rewards driven by curiosity are provided by random network distillation. The network structure that generates internal rewards includes a fixed and randomly initialized target network and a trainable prediction network. The output of the network structure that generates internal rewards is the mean square error between the inputs of the two networks to the same state. R e is the external reward value based on line length, calculated by formula (2): Among them, λ and ∈ are two coefficients that balance external rewards and internal rewards; W HPWL Calculated by formula (3): Among them, x j and j It is a wire network i The endpoint v j The x- and y-coordinates of N netlist is the number of nets in the netlist.

4. The curiosity-driven reinforcement learning macromodule layout method according to claim 1, characterized in that: In step S3, a convolutional neural network and an edge-based graph neural network are used simultaneously to extract global image information and placement feature information.

5. The curiosity-driven reinforcement learning macromodule layout method according to claim 1, characterized in that: The step S4 includes the following process: before the agent places the module, the environment returns a shielding layer according to the fast non-overlapping method; then, the shielding layer is used to determine the legal position in the policy network.

6. The curiosity-driven reinforcement learning macromodule layout method according to claim 1 or 5, characterized in that: The fast non-overlapping method specifically includes the following process: Divide the canvas [0,W]×[0,H] into an N×N grid, where W is the width of the canvas and H is the height of the canvas; the width and height of each grid are and Set the current module b i The width and height are w i and h i , b i The coordinates of the lower left corner are x i and i ; Illegal grid B illegal is defined as follows: B illeagl =B out ∪B occupied ∪B overlap (4) Among them, B out Indicates that if the current module b i Occupying these grids will cause the module to exceed the layout area; B occupied Indicates the grid that has been occupied by the previous module; B overlap Indicates that if the module b currently to be placed i Occupying these grids will make b i Overlapping with previously placed modules; Use p[0,1,2,...,N-1] and q[0,1,2,...,N-1] to represent the grid numbers in the x and y directions respectively; B out The following definition: Among them, bin p,q Indicates the grid numbered p in the x direction and q in the y direction; B occupied The following definition: in Indicates that these grids are j Occupancy, 0≤j≤i-1; B overlap The following definition: in, In the x direction, these grids are i When occupied, module b i With module b j overlapping, In the y direction, these grids are i When occupied, module b i With module b j overlapping, If these grids are i Occupancy will make module b i With module b j Overlap, 0≤j≤i-1; Among them, p j_L and p j_U Indicates the x direction The minimum and maximum sequence numbers, q j_L and q j_U Indicates the y direction The minimum and maximum sequence numbers.

7. The curiosity-driven reinforcement learning macromodule layout method according to claim 1, characterized in that: In step S5, the curiosity-driven internal reward value network includes a fixed and randomly initialized target network and a trainable prediction network.

8. The curiosity-driven reinforcement learning macromodule layout method according to claim 1, characterized in that: In step S6, the agent is guided to update the policy network and the value network according to the proximal policy optimization PPO algorithm.

Citation Information

Cited By

  • Placement method of design unit and related equipment

    CN119378487A

  • Macro-cell layout method for integrated circuit design

    CN119514467A

  • System for developing operation planning optimization algorithm under intelligent game

    CN119918572A

  • An Operational Optimization Algorithm Development System under Intelligent Games

    CN119918572B

  • Chip layout method and system based on reinforcement learning and back-end optimization

    CN120235107A