# 复旦2023光学荣誉课-光刻 **Repository Path**: bud-primordium/lithography ## Basic Information - **Project Name**: 复旦2023光学荣誉课-光刻 - **Description**: 2023复旦大学物理学系石老师光学荣誉课——光刻project,分为正问题与逆问题,集成为python小程序 - **Primary Language**: Python - **License**: GPL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 7 - **Forks**: 0 - **Created**: 2024-01-11 - **Last Updated**: 2024-02-09 ## Categories & Tags **Categories**: Uncategorized **Tags**: GUI, OTF, Python ## README # Fudan 2023 Optical Honor Course - Lithography ## Introduction The 2023 Optical Honor Course at the Physics Department of Fudan University, led by Professor Shi, is divided into two parts: the forward problem and the inverse problem, integrated through a Python small program. The aim is to assist in teaching the fundamental concepts related to lithography. ## Software Architecture 1. `main.py`: The main program utilizes Tkinter to create a GUI visualization interface, comprising four areas: "Device Schematic Area," "Mask Display Area," "Calculation Result Area," and "Control Area." - Device Schematic Area: Displays the optical system simulated by this program. - Mask Display Area: Shows the currently used mask, which changes when OPC is enabled. - Calculation Result Area: Displays the intensity distribution/boundary recognition on the image plane according to the specified output mode. - Control Area: Users can adjust simulation parameters and output modes. 2. `mask.npy`: Contains 10 numpy arrays of size 100*100. The first five are F/U/D/A/N normal binary masks, and the latter five are OPC-corrected masks. 3. `device.py`: Custom module for drawing the "Device Schematic Area." 4. `mask.py`: Custom module for drawing the "Mask Display Area." 5. `result.py`: Custom module for drawing the "Calculation Result Area." 6. `help.py`: Custom module for drawing the help window, assisting in rendering this document. 7. `README.(en.)md`: This help document.' ## Installation Guide An .exe distribution for the Windows platform is provided. Note that `main.py` binds the WM_DELETE_WINDOW event and utilizes the `screeninfo` library to obtain the actual size of the display. For other platforms, please adapt and modify the source code accordingly. ## User Instructions This program mainly simulates a low-pass filtering 4F system. The control area allows adjustment of "sinθ," "n," and "λ," representing the aperture size, immersion medium refractive index, and wavelength, respectively. The first two jointly determine the numerical aperture N.A. Button functionalities: - "Coherent/Incoherent": Controls coherent and incoherent light sources. - "Enable OPC": Enables/disables OPC correction. - "Display Intensity/Boundary": Switches result display between intensity distribution and boundary recognition. Notes: 1. When OPC is enabled, the sliders will be locked to the specified values. They can be unlocked by disabling OPC (clicking again). 2. When the button displays "Intensity," the "Calculation Result Area" shows the intensity distribution on the image plane. Otherwise, it shows the boundary recognition image. 3. When the wavelength is too long, purple areas and inaccurate boundary recognition may occur. It is recommended to reduce the wavelength. ## Introduction to Optical Proximity Correction (OPC) Optical Proximity Correction (OPC) is a technique used to address pattern offset and shape distortion issues in lithography. It involves local modifications to the lithography mask to correct variations in pattern shape and size caused by optical limitations, thereby improving the accuracy and reliability of chip manufacturing. ### Background As integrated circuit designs continue to evolve, chip feature sizes are becoming smaller. However, the resolution achievable by lithography is limited by optical physics, leading to problems such as pattern distortion, size variation, and interference between patterns. ### Objective The primary goal of OPC is to correct variations in pattern shape and size caused by optical limitations by locally modifying the mask, thereby improving the accuracy and reliability of chip manufacturing. ### Working Principle OPC works by introducing a series of minor modifications to the lithography mask, ensuring that the lithographic patterns on the chip maintain their intended shape and size during exposure. These minor modifications are typically implemented through software algorithms and can be optimized based on specific process requirements and lithography machine characteristics. ### Types OPC is generally divided into two types: rule-based OPC and model-based OPC. Rule-based OPC relies on a series of predefined rules and empirical laws for correction and is suitable for simple processes, while model-based OPC relies on physical models and simulations for correction, allowing for more precise adjustments to pattern shape and size. ### Correction Algorithm Used in this Program Targeting the minimization of variance in the intensity distribution between the target pattern and the projected pattern, we optimize based on the pixels of the mask. We employ two gradient-free optimization algorithms: 1. Setting the amplitude transmittance of each pixel on the mask to 0 or 1, using a genetic algorithm (Deap library) to iterate 10,000 generations to obtain the optimized mask. 2. Substituting the amplitude transmittance of each pixel with 0.5*(1+cos(t)), optimizing using CMA-ES (Covariance Matrix Adaptation Evolution Strategy) for 10,000 iterations, setting the pixels with amplitude transmittance greater than 0.5 on the resulting mask to 1, and the rest to 0, obtaining a mask that conforms to reality. The better-performing mask of the two is finally adopted. It can be observed that the intensity distribution of the optimized mask's projected pattern is more uniform, and the edges are closer to the expected pattern. It is important to note that the algorithms used in this program are only introductory examples. For more information, please refer to [Lithography Guru](https://www.lithoguru.com/). ## Contribution - Supervising Teachers: Professor Shi Lei, Professor A Guang - Project Participants: Guo Xinhui, Huo Jinyuan, Wu Yuzhang, Yang Yuanqing - Process handling method when closing the window is from [Zheng Zepeng](https://gitee.com/zhengzepeng668/honors-in-optics) - Inspiration for drawing colored intensity distribution graphs from [Xie Yuncheng](https://gitee.com/xie-yuncheng/xyc) - Fourier method reference from the repository recommended by [Wu Yuhang](https://github.com/rafael-fuente/diffractsim/) - Copyright belongs to the Physics Department of Fudan University. ## Special Features 1. GUI visualization interactive interface 2. Binary boundary recognition based on genetic algorithm 3. Function encapsulation, custom modules for enhanced code maintainability 4. Distribution of .exe files using pyinstaller 5. Synchronization of the three major image areas with adjustments in the control area 6. Built-in numpy binary files, extensive optimization of function functions, minimizing memory usage 7. Embeded bilingual help documentation based on Markdown, converting it to HTML using the markdown2 library, and then display it in a help window using the tkhtmlview library. ## References 1. [Hecht E. Optics[M]. 5th edition. Pearson, 2015.](https://www.pearson.com/en-us/subject-catalog/p/optics/P200000006793) 2. [Ma X, Zhang S, Pan Y, et al. Research and Progress in Computational Lithography. Laser & Optoelectronics Progress, 2022, 59(9): 122-170.](https://doi.org/10.3788/LOP202259.0922008) ## Project Repository Address You can visit the [repository of this project on Gitee](https://gitee.com/bud-primordium/lithography) and show your support by giving it a star~