Reinforcement learning-based DRC violation repairing method for GDS2 / OASIS layout
By introducing reinforcement learning into the GDS2/OASIS layout, DRC violation repair can be performed directly, solving the problems of low repair efficiency and poor adaptability in existing technologies. Self-learning and self-optimizing layout repair is achieved, which is suitable for automated repair of multiple process nodes and design rules.
Patent Information
- Application Number
- CN202510744960.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-05
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2045-06-05
AI Technical Summary
In the design of integrated circuits, the existing technology of DRC violation repair is inefficient and the quality is limited by personal experience. It is difficult to adapt to complex layout scenarios. In addition, the existing automated methods have the problems of high computational complexity and slow convergence speed.
A reinforcement learning-based approach is used to directly repair DRC violations in the GDS2/OASIS layout. By parsing the target layer graphics in the layout, an intelligent agent is constructed to perform repairs in the real physical coordinate space. The change in the number of DRC violations is used as reward feedback to achieve self-learning and self-optimization.
It improves the automation and intelligence level of DRC violation repair, maintains the actual physical size and accuracy of the layout, has strong versatility and engineering adaptability, and is suitable for automatic repair of multiple process nodes and design rules.
Smart Images

Figure CN120724964A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electronic design automation (EDA) and integrated circuit physical layout repair, and more specifically, to a GDS2 / OASIS layout DRC violation repair method based on reinforcement learning. Background Art
[0002] In the current field of integrated circuit design, error correction in the design rule check (DRC) of circuit layouts primarily relies on manual adjustments by engineers, who use experience to balance area, timing, and other factors. Manual repairs are highly reliable but inefficient, and the quality of repairs is limited by personal experience, making it difficult to guarantee efficient repairs in very large layouts. Automated repair scripts use predefined rules to make local adjustments to DRC violations such as line width and wrapping in the layout. Currently, there are two main methods for automated repair:
[0003] One is that engineers write automated scripts for back-end DRC repair of digital ICs. These scripts are primarily based on predefined rules, employing a series of fixed graphical operation templates to attempt to eliminate DRC errors. However, due to the static nature and limited coverage of the rule base, they struggle to adapt to violations in complex layouts, often leading to repeated iterations or failure to converge.
[0004] The second is that DRC hotspot prediction tools use convolutional neural networks [1][2] or graph neural networks [3] to predict the probability of DRC violations after the current layout is routed, thereby reducing the probability of DRC errors by optimizing the initial layout or routing. However, they cannot handle real DRC errors in the generated layout, nor can they directly operate on GDS2 / OASIS layout files.
[0005] However, both approaches are limited by the static nature and coverage of their rule bases, making them inadequate for complex layouts and often resulting in repeated iterations or failure to converge. Other studies have employed global optimization algorithms, such as genetic algorithms and simulated annealing, to search for feasible solutions, but these suffer from high computational complexity and slow convergence.
[0006] References:
[0007] [1] LIANG R J, XIANG H, PANDEY D, REDDY L, RAMJI S, NAM G J, HU J. Design rule violation prediction at sub-10-nm process nodes using customized convolutional networks[J]. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, 2022. https: / / ieeexplore.ieee.org / document / 9608975.
[0008] [2] LIN J G, CHEN Y G, YANG YW, HUNG W T, TSAI C H, FU D S, CHAO M C T. DRC violation prediction with pre-global-routing features through convolutional neural network[C] / / Proceedings of the Great Lakes Symposium on VLSI 2023(GLSVLSI'23). 2023:
[0009] 313-319. https: / / doi.org / 10.1145 / 3583781.3590216.
[0010] [3] BAEK K, PARK H, KIM S, CHOI K, KIM T. Pin accessibility and routing congestion aware DRC hotspot prediction using graph neural network and U-Net[C] / / 2022 IEEE / ACM International Conference On Computer Aided Design(ICCAD). 2022. https: / / ieeexplore.ieee.org / document / 10070024. Summary of the Invention
[0011] The technical problem to be solved by the present invention is to address the shortcomings of the existing technology and provide a GDS2 / OASIS layout DRC violation repair method based on reinforcement learning. It proposes to use the GDS2 / OASIS format layout as the basis of the reinforcement learning environment without converting it into an image format. By analyzing the target layer graphics in the layout, an operable and feedback-capable layout repair environment is established in the real physical coordinate space. It has strong versatility, accuracy and scalability, and can effectively improve the automation and intelligence level of back-end design.
[0012] The present invention provides a GDS2 / OASIS layout DRC violation repair method based on reinforcement learning, which comprises:
[0013] Read GDS2 / OASIS layout files and extract the graphics set of the target layer;
[0014] Counting the number of DRC violations in the GDS2 / OASIS layout using a DRC detection module to obtain a region to be repaired in the GDS2 / OASIS layout;
[0015] Converting a graphic set of the area to be repaired in the GDS2 / OASIS layout into a state representation of the layout;
[0016] Constructing a repair strategy module for generating a graphic adjustment action according to the state representation of the layout;
[0017] Apply the graphic adjustment action to the target graphic in the GDS2 / OASIS layout.
[0018] Preferably, the repair strategy module includes the following steps:
[0019] The first step is to extract the current layout state s from the state representation of the layout t ;
[0020] The second step is to define an action space A, based on the current state of the map s t Extract action a from action space A t , and perform action a t , to get the new state s t+1 ;
[0021] Step 3: Call the DRC detection module to obtain the execution action a t The number of DRC violations after
[0022] Step 4: According to the current layout state s t , new state s t+1 , perform action a t The reward r is calculated based on the number of DRC violations after t ;
[0023] Step 5: Based on the current layout state s t , new state s t+1 , perform action a t , reward r t Build sample(s t ,a t ,r t ,s t+1 ), and the sample (s t ,a t ,r t ,s t+1 ) is stored in the experience pool and allowed to participate in subsequent training;
[0024] Step 6. Repeat steps 1 to 5 until the number of DRC violations stabilizes below the set threshold, the repair strategy converges, or the training cycle limit is reached.
[0025] Through the above method, the present invention uses reinforcement learning to construct an intelligent agent, namely the repair strategy module, which enables the layout to be modified directly at the GDS2 / OASIS graphic level without being converted into image data. The change in the number of DRC violations in the layout is used as reward feedback, realizing a self-learning and self-optimizing layout repair process.
[0026] Preferably, in the fourth step, the reward r t Calculated by the following formula:
[0027] r t =R(s t , a t )=γ·[E(s t )-E(s t+1 )];
[0028] Where, E(s t ) represents the total number of DRC errors in the current state; γ represents the variable coefficient.
[0029] Preferably, in the second step, perform the action a t After that, the new state s t+1 Expressed as:
[0030] s t+1 =T(s t , a t );
[0031] Where T is the state transition function.
[0032] Preferably, in the second step, the action space A is expressed as:
[0033]
[0034] in, Represents the i-th rectangular metal figure P i Along direction Translation distance Δ; Represents a sub-region R in the j-th complex polygonal metal figure j (The rectangular segment marked as illegal by the DRC detection module) performs local translation;
[0035] ResizeBox(i, edge, Δ) means adjusting the i-th rectangular metal graphic P i Specify the size of the edge, increase or decrease Δ; ResizeSubPolygon(j, R j , edge, Δ) represents the sub-rectangular area R of the j-th complex polygonal metal graphic j Resize the specified edge of the image; NoOp means keep the current shape unchanged.
[0036] Preferably, in the sixth step, the repair strategy converges as follows:
[0037] The reward r t The fluctuation range is lower than the preset range.
[0038] Preferably, the preset range is ±1% to ±2%.
[0039] Preferably, in the sixth step, the set threshold is 3-10.
[0040] Preferably, the graphic adjustment action is applied to the target graphic in the GDS2 / OASIS layout via the Python API of KLayout or the gdspy library.
[0041] Preferably, if the GDS2 / OASIS layout file modified by the graphic adjustment action still has DRC violations, the GDS2 / OASIS layout file modified by the graphic adjustment action is read again and the violation repair is performed thereon.
[0042] Beneficial effects
[0043] The advantages of the present invention are:
[0044] 1. The repair strategy is intelligent and self-optimizing:
[0045] By introducing a reinforcement learning framework, the intelligent agent continuously optimizes its strategy in the process of "observing the layout status → executing repair actions → receiving DRC feedback". It can adapt to different types of DRC errors and different process rules, has self-learning and migration capabilities, and can continuously improve the repair effect based on historical experience.
[0046] 2. Directly work on GDS2 / OASIS layout files to avoid information loss:
[0047] Compared with the solution of rasterizing or converting the GDS2 / OASIS layout into image processing, the present invention is directly based on the operation and repair of GDS2 / OASIS format files, maintaining the actual physical size, accuracy and layer information of the layout, and avoiding the problem of loss of layout accuracy due to discretization or pixelation.
[0048] 3. Motion space modeling meets actual engineering needs:
[0049] The present invention abstracts common manual graphic repair actions, such as fine-tuning graphic boundaries and adjusting local polygon areas, and defines the actions in a parameterized form in the algorithm. This not only meets the requirements of the reinforcement learning algorithm for discrete actions, but also is close to the actual repair process, improving operability.
[0050] 4. Constructed a DRC feedback-driven reinforcement learning closed loop:
[0051] The reward function is constructed by analyzing the change in the number of DRC violations after each action is executed, forming a reinforcement learning closed loop of "graph modification-verification-reward feedback". This allows the repair behavior to be guided in real time and the repair effect to be gradually optimized, which is significantly better than traditional static heuristic methods.
[0052] 5. The system structure is open, easy to integrate and expand:
[0053] The present invention is based on programmable layout interfaces such as KLayout and gdspy. The reinforcement learning model part is not bound to the platform and can be embedded in any layout processing flow. It can be applied to automatic repair tasks of various process nodes, layers and design rules, and has strong versatility and engineering feasibility. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 This is a block diagram of the overall structure of the GDS2 / OASIS layout DRC violation repair method based on reinforcement learning of the present invention;
[0055] Figure 2 This is a schematic diagram of the repair strategy module process structure of the present invention. DETAILED DESCRIPTION
[0056] The present invention will be further described below in conjunction with the embodiments, but this does not constitute any limitation to the present invention. Any limited number of modifications made by anyone within the scope of the claims of the present invention are still within the scope of the claims of the present invention.
[0057] The present invention provides a reinforcement learning-based GDS2 / OASIS layout DRC violation repair method. The core of the method is to build a reinforcement learning environment compatible with GDS2 / OASIS files by training an intelligent agent, so that the intelligent agent can perceive the DRC violation status and perform legal modification actions in the GDS2 / OASIS format layout. The DRC engine provided by the EDA tool (such as KLayout) is then used for feedback to construct a reward function that can drive learning, thereby automatically repairing the design rule check (DRC) violation problems in the layout.
[0058] like Figure 1 As shown in the figure, the GDS2 / OASIS layout DRC violation repair method based on reinforcement learning is introduced in detail through the following modular process.
[0059] GDS2 / OASIS parsing module: reads GDS2 / OASIS layout files, extracts the graphics set of the target layer, and converts them into operable objects.
[0060] DRC Check Module: After each action, the internal DRC check function (based on the KLayout Python interface) calculates the number of DRC violations of the current GDS2 / OASIS layout (hereafter referred to as layout) in real time.
[0061] State encoding module: Converts the set of graphics in the area to be repaired in the layout into a state representation acceptable to the agent, such as feature vectors, image matrices, topological maps, etc., to represent the spatial layout and violation locations of the metal graphics in the area.
[0062] To automatically repair DRC errors in layouts, this paper constructs a reinforcement learning-based agent training framework. This framework enables the agent to learn repair strategies in a simulated environment and output modification actions that directly affect the GDS2 / OASIS layout. This framework offers strong versatility, flexible architecture, and excellent scalability, adapting to a wide range of layout graphics and design rules.
[0063] In the present invention, the reinforcement learning agent is mainly embodied in the repair strategy module. The repair strategy of the present invention can be implemented based on any mainstream reinforcement learning algorithm, including but not limited to value function-based algorithms (such as DQN), policy optimization-based algorithms (such as PPO), and combination algorithms based on the Actor-Critic architecture (such as A2C, TD3, etc.). Among them, the value function-driven algorithm (such as DQN) selects the optimal action by estimating the action value function Q(s,a); the policy optimization algorithm (such as PPO) improves the overall benefit by optimizing the action distribution strategy π(a|s); the Actor-Critic algorithm (such as A2C, TD3) combines the policy network with the value network to improve the training stability and policy accuracy. The specific model structure can be flexibly set according to the training efficiency, state dimension and project scale, and the agent can continuously improve the performance of its repair strategy through sampling and training.
[0064] In this embodiment, the repair strategy module generates graphic adjustment actions accordingly based on the positional relationship, direction, and size of the illegal graphics. Depending on the type of DRC violation, the adjustment action can be driven by rules or output by a reinforcement learning model. Furthermore, the present invention abstracts basic actions (such as translating local graphics and fine-tuning boundaries) from manual repair behaviors, combines design rule feedback information, and constructs a reinforcement learning training framework, so that the intelligent agent can continuously optimize its repair strategy in the manner of "observing the layout state - executing repair actions - accepting DRC feedback", thereby realizing a fully automatic and generalizable DRC violation repair process.
[0065] The present invention models the layout DRC repair as a Markov decision process (MDP), such as Figure 2 The specific process is as follows:
[0066] Step 1: Observe the current layout status s t Current layout status t The state generator extracts the boundaries and positional relationships of all graphics in the target layer of the layout, as well as DRC violations, to generate a state representation that can be used for model input.
[0067] Each layout state s∈S represents the location set of all metal graphics in the target layer in the current layout:
[0068] s t ={P1, P2, ..., P n}.
[0069] Among them, P i represents the boundary coordinates of the ith metal figure. S is the state space.
[0070] Step 2: Output repair action a t And execute, get the new state st+1 .
[0071] To better fit the actual map repair scenario, the action space A is defined as:
[0072]
[0073] in, Represents the i-th rectangular metal figure P i Along direction Translation distance Δ; Represents a sub-region R in the j-th complex polygonal metal figure j (The rectangular segment marked as illegal by the DRC detection module) performs local translation;
[0074] ResizeBox(i, edge, Δ) means adjusting the i-th rectangular metal graphic P i Specify the size of the edge, increase or decrease Δ; ResizeSubPolygon(j, R j , edge, Δ) represents the sub-rectangular area R of the j-th complex polygonal metal graphic j NoOp means keeping the current graph unchanged, which is used for action exploration or placeholder in reinforcement learning training.
[0075] Action a t The agent is at time t according to the current state s t The specific action selected from the action space A, that is, a t ∈A. Action a t By the policy network π(a t |s t ) or action selection mechanism (ε-greedy, softmax, etc.).
[0076] Action a t The execution of is realized by the action executor. The action executor transforms the coordinates of the target figure (rectangle or polygon) according to the action output by the agent. Specifically, the execution of action a t After that, the state changes from s t Transition to a new state:
[0077] s t+1 =T(s t , a t ).
[0078] That is, coordinate transformation is performed on the corresponding polygon in the layout. Where T is the state transition function.
[0079] Step 3: Call the DRC detection module to obtain the execution action a t DRC violations after.
[0080] Step 4: Calculate the reward function. Specifically, the reward value is calculated based on the changes in DRC violations to guide the agent to optimize the repair strategy.
[0081] Rewards are determined by the number of DRC violations:
[0082] r t =R(s t , a t )=γ·[E(s t )-E(s t+1 )].
[0083] Among them, E(s t ) represents the total number of DRC errors in the current state; γ is a variable coefficient whose value depends on E(s t )-E(s t+1 ) value.
[0084] Step 5: Sample (s t ,a t ,r t ,s t+1 ) is stored in the experience pool and enables it to participate in subsequent batch training.
[0085] In this step, the sample (s t ,a t ,r t ,s t+1 ) is used as one of the inputs of the repair strategy module in the training phase and participates in the subsequent strategy update process. More specifically, these samples (s t ,a t ,r t ,s t+1 ) will be stored in the experience pool. In each batch training, the system will randomly sample a certain number of historical samples from the experience pool to calculate the loss function of the current policy network and update the network parameters through optimization methods such as gradient descent.
[0086] Step 6: Repeat the above process, i.e., steps 1 to 5, until the number of DRC violations stabilizes below the set threshold, the agent's repair strategy converges, or the training cycle limit is reached. More specifically, the training termination conditions are: ① The number of DRC violations stabilizes below the preset threshold, for example, less than 5, or training is terminated when the errors are completely eliminated; ② The fluctuation range of the average reward value in the sliding window is lower than the preset range (for example, ±1%), the agent's repair strategy converges, and training can be terminated; ③ The training cycle limit is reached.
[0087] The present invention models the design rule repair process as a Markov decision process (MDP), defines the modification of graphics as the action of the agent, makes different rewards according to the changes in DRC violations, and constructs a complete reinforcement learning solution process. In addition, the action space design takes into account the differences between various graphics in the layout, constructs an action space similar to the manual repair operation, simulates the manual repair operation, and improves the effectiveness and explainability of the action. More importantly, the efficient environment-agent interaction framework proposed in the present invention supports rapid layout updates, DRC detection and reward feedback after each step of action, ensuring data consistency and layout integrity during reinforcement learning training. In theory, this method can adapt to DRC rule types and layout structures under any process, does not rely on specific rule templates, and has good generalization and industrial applicability.
[0088] Once the agent is trained, the repair strategy module can be deployed into the GDS2 / OASIS layout DRC error automatic repair process to directly perform repair operations on the layout. This involves executing layout operations and writing modules. Because both the action space and state representation are deeply bound to the GDS2 / OASIS data structure, this approach has strong engineering adaptability.
[0089] Layout operation and writing module: The graphic adjustment actions generated by the repair strategy module are directly applied to the layout graphics through KLayout's Python API or gdspy library to modify and write back the original layout file.
[0090] This invention not only overcomes the strategic and intelligent limitations of existing DRC repair methods, but also, for the first time, implements reinforcement learning-based DRC automatic repair strategy modeling and execution mechanisms on real GDS2 / OASIS data structures. This innovation offers significant technological innovation and broad application prospects in the field of EDA automation. Furthermore, the method can be used in the back-end design process for both digital and analog circuits, and is of great significance in process migration, chip iteration, or batch optimization. It is particularly well-suited for automated optimization and DRC repair of layouts such as standard cell libraries and IP modules.
[0091] The above is only a preferred embodiment of the present invention. It should be pointed out that for those skilled in the art, several modifications and improvements can be made without departing from the structure of the present invention. These modifications and improvements will not affect the effect of the implementation of the present invention and the practicality of the patent.
Claims
1. A GDS2 / OASIS layout DRC violation repair method based on reinforcement learning, characterized in that: The method is: Read GDS2 / OASIS layout files and extract the graphics set of the target layer; Counting the number of DRC violations in the GDS2 / OASIS layout using a DRC detection module to obtain a region to be repaired in the GDS2 / OASIS layout; Converting a graphic set of the area to be repaired in the GDS2 / OASIS layout into a state representation of the layout; Constructing a repair strategy module for generating a graphic adjustment action according to the state representation of the layout; Apply the graphic adjustment action to the target graphic in the GDS2 / OASIS layout.
2. A GDS2 / OASIS layout DRC violation repair method based on reinforcement learning according to claim 1, characterized in that: The repair strategy module includes the following steps: The first step is to extract the current layout state s from the state representation of the layout t ; The second step is to define an action space A, based on the current state of the map s t Extract action a from the action space A t , and perform action a t , to get the new state s t+1 ; Step 3: Call the DRC detection module to obtain the execution action a t The number of DRC violations after Step 4: According to the current layout state s t , new state s t+1 , perform action a t The reward r is calculated based on the number of DRC violations after t ; Step 5: Based on the current layout state s t , new state s t+1 , perform action a t , reward r t Build sample(s t ,a t ,r t ,s t+1 ), and the sample (s t ,a t ,r t ,s t+1 ) is stored in the experience pool and allowed to participate in subsequent training; Step 6. Repeat steps 1 to 5 until the number of DRC violations stabilizes below the set threshold, the repair strategy converges, or the training cycle limit is reached.
3. A GDS2 / OASIS layout DRC violation repair method based on reinforcement learning according to claim 2, characterized in that: In the fourth step, the reward r t Calculated by the following formula: r t =R(s t ,a t )=γ·[E(s t )-E(s t+1 )]; Where, E(s t ) represents the total number of DRC errors in the current state; γ represents the variable coefficient.
4. A GDS2 / OASIS layout DRC violation repair method based on reinforcement learning according to claim 2, characterized in that: In the second step, perform the action a t After that, the new state s t+1 Expressed as: s t+1 =T(s t ,a t ); Where T is the state transition function.
5. The GDS2 / OASIS layout DRC violation repair method based on reinforcement learning according to claim 2, characterized in that: In the second step, the action space A is expressed as: in, Represents the i-th rectangular metal figure P i Along direction Translation distance Δ; Represents a sub-region R in the j-th complex polygonal metal figure j (The rectangular segment marked as illegal by the DRC detection module) is locally translated; ResizeBox(i, edge, Δ) represents the adjustment of the i-th rectangular metal graphic P i Specify the size of the edge, increase or decrease Δ; ResizeSubPolygon(j, R j , edge, Δ) represents the sub-rectangular area R of the j-th complex polygonal metal graphic j Resize the specified edge of the image; NoOp means keep the current shape unchanged.
6. A GDS2 / OASIS layout DRC violation repair method based on reinforcement learning according to claim 2, characterized in that: In the sixth step, the repair strategy converges as follows: The reward r t The fluctuation range is lower than the preset range.
7. A GDS2 / OASIS layout DRC violation repair method based on reinforcement learning according to claim 6, characterized in that: The preset range is ±1% to ±2%.
8. The GDS2 / OASIS layout DRC violation repair method based on reinforcement learning according to claim 2, characterized in that: In the sixth step, the threshold is set to be 3-10.
9. The GDS2 / OASIS layout DRC violation repair method based on reinforcement learning according to claim 1, characterized in that: The graphic adjustment action is applied to the target graphic in the GDS2 / OASIS layout through the Python API of KLayout or the gdspy library.
10. The GDS2 / OASIS layout DRC violation repair method based on reinforcement learning according to claim 1, characterized in that: If there are still DRC violations in the GDS2 / OASIS layout file modified by the graphic adjustment action, continue to read the GDS2 / OASIS layout file modified by the graphic adjustment action and perform violation repair on it.
Citation Information
Patent Citations
Image restoration method and system of interactive network based on deep learning
CN116051392A
Simulation dead pixel correction method, neural network training method and storage medium
CN117391040A
Integrated circuit layout repairing method and equipment
CN118333005A
Machine Learning-Based Clustering For Curvilinear Layout Designs
US20230289497A1