Wafer inspection method and device

By determining the grain registration path and detection path, calculating the deviation, and identifying the region of interest image, the problem of low detection accuracy caused by thermal expansion and contraction and process errors in wafer inspection is solved, thereby improving the accuracy and sensitivity of the inspection.

CN122312465APending Publication Date: 2026-06-30SHANGHAI JINGJI SEMICON TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411965784.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

In existing wafer inspection methods, the pitch of the grains changes in the scanning direction due to the thermal expansion and contraction of the wafer and process errors, resulting in inconsistent images during defect detection and affecting the accuracy and sensitivity of the detection.

Method used

By acquiring the grain registration mark and the grain to be detected, the grain registration path and detection path are determined. The grain registration image and the image of the grain to be detected are acquired using an image sensor. The deviation is calculated and the image of the region of interest is determined, thereby improving the consistency of the images.

Benefits of technology

It improves the accuracy and sensitivity of wafer inspection and solves the problem of low inspection accuracy caused by grain inconsistency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122312465A_ABST
    Figure CN122312465A_ABST
Patent Text Reader

Abstract

This invention discloses a method and apparatus for inspecting wafers. The inspection method includes: acquiring grain registration marks contained in the wafer and the wafer to be inspected; determining a grain registration path based on the wafer to be inspected and the grain registration marks; determining a detection path based on the wafer to be inspected; acquiring a grain registration image of the grain row while the wafer moves along the grain registration path; acquiring a grain registration mark template image; determining the deviation between the actual position and the theoretical position of the grain registration mark in each wafer row based on the grain registration image and the grain registration mark template image; when the wafer moves along the detection path and the wafer to be inspected image of the grain row is acquired, determining the region of interest image of each wafer based on the deviation; and determining the defect detection result of the wafer based on the region of interest image. The accuracy of wafer inspection can be improved by using the above inspection method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of wafer technology, and more particularly to a wafer inspection method and apparatus. Background Technology

[0002] Current wafer inspection methods involve capturing images of each die in the wafer through an imaging system and then comparing these images with a reference image of a reference die. Differences between the target die image and the reference die image in the same area can be identified as defects.

[0003] To minimize false positives and improve defect detection sensitivity, it is essential to ensure that the relative positions of the target grain images within the grains are strictly uniform during defect detection. Therefore, wafer alignment is required before defect detection. Alignment effectively corrects the angle between the wafer's horizontal axis and the scanning direction, and also corrects for changes in grain pitch in the scanning direction at the time of alignment.

[0004] However, as the defect detection time progresses or the temperature changes during the detection process, the wafer will expand and contract due to thermal expansion and contraction. At this time, the pitch of the dies in the scanning direction will change. In addition, the above alignment scheme does not consider compensating for the wafer's process error, that is, the inconsistency of the pitch of different dies in the scanning direction. In summary, this will lead to the images captured from each die during defect detection being not completely consistent, which in turn will lead to a decrease in defect detection sensitivity or even false detection. Summary of the Invention

[0005] This invention provides a wafer inspection method and apparatus to solve the problem of low inspection accuracy in existing wafer inspection methods.

[0006] In a first aspect, embodiments of the present invention provide a wafer inspection method, wherein the wafer includes at least one row of grains, each row of grains includes a plurality of grains, and the inspection method includes:

[0007] The process involves acquiring the grain registration marks contained in the grain and the grain to be detected in the wafer, determining the grain registration path based on the grain to be detected and the grain registration marks, and determining the detection path based on the grain to be detected.

[0008] As the wafer moves along the grain registration path, a grain registration image of the grain row is acquired, and the grain registration image contains grain registration marks.

[0009] Obtain the grain registration mark template image. Based on the grain registration image and the grain registration mark template image, determine the deviation between the actual position of the grain registration mark in each grain row and the theoretical position of the grain registration mark in each grain.

[0010] When the wafer moves along the detection path and acquires the image of the grain to be detected in the grain row, the region of interest image of each grain is determined from the image of the grain to be detected based on the deviation.

[0011] Determine the defect detection results of the grains based on the image of the region of interest.

[0012] In a second aspect, embodiments of the present invention provide a wafer inspection apparatus for performing the inspection method as described in the first aspect. The inspection apparatus includes: a controller, a workpiece stage, a synchronization module, an image sensor, and an image processing server; the workpiece stage is connected to the synchronization module, the synchronization module is connected to the image sensor, and the image sensor is connected to the image processing server.

[0013] The controller is used to acquire the grain registration marks contained in the die and the die to be detected in the wafer, determine the grain registration path based on the die to be detected and the grain registration marks, and determine the detection path based on the die to be detected.

[0014] The controller is connected to the workpiece stage and the synchronization module respectively. It controls the workpiece stage to carry the wafer and move it along the die registration path. The synchronization module controls the image sensor to acquire the die registration image of the die row and transmits it to the image processing server. The die registration image contains the die registration mark.

[0015] The controller is also used to control the workpiece stage to carry the wafer to move along the detection path, and to control the image sensor to acquire the image of the die to be detected through the synchronization module;

[0016] The controller is also connected to an image processing server and is used to obtain the defect detection results of the grains through the image processing server. The image processing server is used to determine the deviation between the actual position of the grain registration mark in each grain row and the theoretical position of the grain registration mark in each grain based on the grain registration image and the grain registration mark template image. Based on the deviation, it determines the region of interest image of each grain from the image of the grain to be detected, and determines the defect detection result of the grain based on the region of interest image.

[0017] The technical solution of this invention first determines the deviation between the actual position of the grain registration mark in each grain row and the theoretical position of the grain registration mark in each grain based on the grain registration image and the grain registration mark template image. Then, based on the deviation, the region of interest image of each grain is determined from the image of the grain to be inspected. This avoids the influence of changes in the coefficient of thermal expansion and process errors on the consistency of the region of interest image, improves the consistency of the region of interest images of each grain, and thus helps to improve the accuracy of wafer inspection. It solves the problem of low detection accuracy caused by grain inconsistency and improves the sensitivity of wafer defect detection.

[0018] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 A schematic diagram of a wafer structure provided in an embodiment of the present invention;

[0021] Figure 2 A flowchart illustrating a wafer inspection method provided in an embodiment of the present invention;

[0022] Figure 3 This is a schematic diagram of a method for determining a grain registration path according to an embodiment of the present invention;

[0023] Figure 4 This is a schematic diagram of another method for determining the grain registration path provided in an embodiment of the present invention;

[0024] Figure 5 This is a schematic diagram of another method for determining the grain registration path provided in an embodiment of the present invention;

[0025] Figure 6 This is a schematic diagram of another method for determining the grain registration path provided in an embodiment of the present invention;

[0026] Figure 7 This is a schematic diagram of another method for determining the grain registration path provided in an embodiment of the present invention;

[0027] Figure 8 A flowchart of another wafer inspection method provided in an embodiment of the present invention;

[0028] Figure 9 A flowchart illustrating another wafer inspection method provided in an embodiment of the present invention;

[0029] Figure 10 A schematic diagram of a grain row scanning sequence provided in an embodiment of the present invention;

[0030] Figure 11 A schematic diagram illustrating another grain row scanning sequence provided in an embodiment of the present invention;

[0031] Figure 12This is a schematic diagram of a wafer inspection device provided in an embodiment of the present invention. Detailed Implementation

[0032] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0033] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices. The terms "upper," "lower," "left," "right," etc., indicate orientation or positional relationships based on the orientation or positional relationships shown in the accompanying drawings and are only used to describe the relative positional relationships between components or constituent parts, and do not specifically limit the specific installation orientation of each component or constituent part.

[0034] Figure 1 This is a schematic diagram of a wafer structure provided in an embodiment of the present invention, with reference to... Figure 1 The wafer includes at least one row of grains 10, and each row of grains 10 includes a plurality of grains 11. Figure 1 The wafer shown includes multiple rows of grains.

[0035] Figure 2 A flowchart of a wafer inspection method provided in an embodiment of the present invention is shown below. Figure 2 The wafer inspection method in this embodiment of the invention includes:

[0036] S110. Obtain the grain registration mark contained in the grain and the grain to be detected in the wafer, determine the grain registration path according to the grain to be detected and the grain registration mark, and determine the detection path according to the grain to be detected.

[0037] It should be noted that the dies to be detected in the wafer are predefined. The dies to be detected can be selected from preset positions according to the detection needs, or they can be all dies in the wafer. The dies registration marks 111 on the dies 11 are predefined. The number of dies registration marks 111 contained in each die 11 can also be predefined. For example, it can be 1 or 2, but no more than 2. The dies registration marks 111 have the same position in the dies 11. In one example, in the dies 11 containing dies registration marks 111, the number of dies registration marks 111 in each die 11 is consistent, and the dies registration marks 111 have the same position in the dies 11.

[0038] As a feasible implementation method, the grain registration path is determined based on the grain to be detected and the grain registration mark, including:

[0039] In a grain to be tested containing grain registration marks, adjacent grain registration marks at the same position are sequentially connected to determine a grain registration path, wherein at least a portion of the grains to be tested in at least one row of grains contain grain registration marks.

[0040] It should be noted that the "die to be tested" refers to the dies that are pre-defined to be tested, and at least some of the dies to be tested contain die registration marks 111. This embodiment of the invention is illustrated by taking all dies 11 in the same die row 10 as dies to be tested, each die to be tested containing a die registration mark, wherein the die registration marks are marks with consistent patterns, the number of die registration marks contained in each die to be tested is consistent, and the position of each die registration mark within the die is consistent. Therefore, in the same grain row, each grain can contain one grain registration mark, and the position of a grain registration mark is consistent in each grain. Then, the grain registration path can be determined by sequentially connecting adjacent grain registration marks. Alternatively, in the same grain row, each grain can contain two grain registration marks, located at the first registration mark position and the second registration mark position on the wafer, respectively. The grain registration mark at the first registration mark position is denoted as the first grain registration mark, and the grain registration mark at the second registration mark position is denoted as the second grain registration mark. Therefore, adjacent first registration marks are sequentially connected, and adjacent second registration marks are sequentially connected to determine the grain registration path.

[0041] Figure 3 This is a schematic diagram of a method for determining a grain registration path according to an embodiment of the present invention. Figure 4 This is a schematic diagram of another method for determining the grain registration path provided in an embodiment of the present invention. Figure 3 and Figure 4 The methods shown are all for determining the grain registration path for single-row grains, the difference being that... Figure 3The grain to be tested shown, 11, contains one grain registration mark. Figure 4 The die to be inspected 11 shown includes two die registration marks. Furthermore, during defect detection, in this embodiment, since different detection paths exist within the same die row, and the wafer is moved along different detection paths, to ensure detection efficiency, adjacent detection paths will cause the wafer to move forward or backward along the first direction, respectively. Therefore, this embodiment will use the example of the wafer being moved forward or backward as an example for explanation.

[0042] refer to Figure 3 Each die to be detected 11 contains one die registration mark 111. The determined die registration path 20 includes a first scan path 21 and a second scan path 22. Both the first scan path 21 and the second scan path 22 pass through the die registration marks 111 of the die to be detected 11. Since each die to be detected 11 contains one die registration mark 111, the first scan path 21 and the second scan path 22 can overlap. In addition, the first scan path 21 is the scan path corresponding to the forward direction in the first direction, and the second scan path 22 is the scan path corresponding to the reverse direction.

[0043] refer to Figure 4 Each die to be tested 11 contains 2 die registration marks 111. The determined die registration path 20 includes a first scan path 21 and a second scan path 22. The first scan path 21 passes through one die registration mark 111 in the die to be tested 11, and the second scan path 22 passes through another die registration mark 111 in the die to be tested 11.

[0044] Figure 5 This is a schematic diagram of another method for determining the grain registration path provided in an embodiment of the present invention. Figure 6 This is a schematic diagram of another method for determining the grain registration path provided in an embodiment of the present invention. Figure 7 This is a schematic diagram of another method for determining the grain registration path provided in an embodiment of the present invention. Figure 5 , Figure 6 and Figure 7 The methods shown are for determining the grain registration path for multi-row grains. Figures 5 to 7 This explanation uses the example of two grain registration marks per grain. A single grain registration mark per grain can be used as follows: Figure 3 The same method is shown in the figure, and will not be described again in this embodiment.

[0045] refer to Figure 5In this embodiment of the invention, a grain registration path 20 is planned for each grain row 10. This requires the detection of the grains to be detected in all grain rows of the wafer, which helps to improve the accuracy of the detection.

[0046] Figure 6 The embodiment shown only plans the die registration path 20 for the die row 10 to be registered when the distance W1 between the die row 10 to be registered and the die row 10 to be registered is greater than a preset threshold. In this way, only the dies to be detected in a portion of the die rows in the wafer need to be detected, which helps to improve the detection efficiency.

[0047] It should be noted that a photomask 31 is used in the process of fabricating dies on the wafer. One photomask 31 corresponds to multiple dies 11 in multiple rows of dies. (Refer to...) Figure 7 The same photomask 31 corresponds to four chips 11 arranged in a two-row, two-column array, and the same photomask row 30 corresponds to two rows of chips 10. Figure 7 The illustrated embodiment plans the die registration path 20 for the same die row 10 within each row of mask 30. It is generally assumed that the process errors within the same mask are consistent, therefore this approach is adopted. Figure 7 The grain registration path planning shown can not only improve detection efficiency but also ensure detection accuracy.

[0048] Furthermore, Figures 3 to 7 The embodiments are all illustrated using a first scan path and a second scan path as examples. The deviation is then obtained on the first scan path to determine the image of the region of interest when the wafer is moved along the first direction during detection. Similarly, the deviation is obtained on the second scan path to determine the image of the region of interest when the wafer is moved in the opposite direction to the first direction. Of course, if the wafer is moved in the same direction along different scan paths during detection, then only one die registration path can be planned.

[0049] It should be noted that the die to be inspected contains a region of interest. As a feasible implementation, determining the detection path based on the die to be inspected includes: determining the detection path based on the region of interest on the die to be inspected. Specifically, the detection path is determined by connecting the regions of interest in the die to be inspected. The wafer is driven to move along the detection path, and an image sensor can obtain an image of the region of interest to achieve final defect detection. The region of interest can be pre-defined.

[0050] S120. When the wafer moves along the grain registration path, acquire the grain registration image of the grain row. The grain registration image contains grain registration marks.

[0051] For example, the wafer is typically placed on a wafer stage of the workpiece stage. After the die registration path is determined, the wafer stage can be controlled to move along the determined die registration path. While the wafer stage is moving along the die registration path with the wafer, a die registration image of the die row can be acquired by an image sensor. The image sensor can be a TDI (Time Delay Integration) camera, and the acquired die registration image contains die registration marks. By registering the die registration marks in the die registration image, the positional deviation of the die registration marks in the die can be obtained.

[0052] S130. Obtain the grain registration mark template image. Based on the grain registration image and the grain registration mark template image, determine the deviation between the actual position of the grain registration mark in each grain and the theoretical position of the grain registration mark in each grain.

[0053] For example, a grain registration image is acquired, the theoretical position of each grain registration mark is calculated, and a theoretical position image of the grain registration mark is obtained based on the theoretical position. Further, a pre-stored grain registration mark template image is acquired. The grain registration mark template image is then registered with the theoretical position image of the grain registration mark obtained from the grain registration image to obtain the actual position of each grain registration mark in the grain row. The deviation between the actual and theoretical positions is then determined. It should be noted that the actual position refers to the true position of the grain registration mark in the grain, while the theoretical position refers to the desired position of the grain registration mark in the grain. Both positions can be represented by image pixels. Of course, the actual and theoretical positions can also be converted into distance values ​​in the grain based on the image pixel size of the grain path image. Furthermore, the deviation between the actual and theoretical positions can be characterized as the number of image pixel deviations on the grain registration image. Alternatively, it can be converted into a deviation distance on the grain based on the image pixel size of the grain registration image to characterize the actual deviation of the grain registration mark in the grain.

[0054] S140. When the wafer moves along the detection path and acquires the image of the grain to be detected in the grain row, the region of interest image of each grain is determined from the image of the grain to be detected based on the deviation.

[0055] For example, after determining the detection path, the wafer stage can be controlled to move along the path. While the stage moves along the path with the wafer, an image sensor can acquire images of the wafers to be detected. After acquiring the image, the region of interest (ROI) image of the wafer can be adjusted based on the deviation of the wafer registration marks, ensuring consistency in the ROI images of each wafer. This improves detection accuracy and avoids false detections. It should be noted that the deviation obtained from the wafer registration marks represents the difference between the actual image acquired by the image sensor and the desired image. Therefore, the positional deviation of the ROI image can be directly compensated for using this deviation. Furthermore, the ROI refers to the area within each wafer that requires defect detection, and the same ROI is located consistently across different wafers; for example, the ROI can be a rectangular region.

[0056] S150. Determine the defect detection results of the grains based on the image of the region of interest.

[0057] For example, it can be determined whether a grain has defects by comparing a region of interest image with a reference region of interest image, wherein the reference region of interest image can be obtained by calculating a median image based on different region of interest images.

[0058] This invention determines the deviation between the actual position of the grain registration mark in each grain row and the theoretical position of the grain registration mark in each grain by using a grain registration image and a grain registration mark template image. Then, based on the deviation, the region of interest image of each grain is determined from the image of the grain to be inspected. This avoids the influence of changes in the coefficient of thermal expansion and process errors on the consistency of the region of interest image, improves the consistency of the region of interest images of each grain, and thus helps to improve the accuracy of wafer inspection. It solves the problem of low detection accuracy caused by grain inconsistency and improves the sensitivity of wafer defect detection.

[0059] Figure 8 The flowchart illustrates another wafer inspection method provided in this embodiment of the invention. Figure 8 The illustrated embodiments enrich the detection method flow, see reference. Figure 8 The wafer inspection method in this embodiment of the invention includes:

[0060] S210. Perform a centering and orientation operation on the wafer to obtain the orientation angle residual.

[0061] For example, before inspecting the wafer, the wafer is placed on a wafer stage that can move along a first direction and a second direction, and rotate around a third direction. The first, second, and third directions can intersect, and specifically, can be perpendicular to each other. For instance, within a row of dies, when a die registration image of the row is needed, the wafer stage is controlled to move along the first direction along a predetermined die registration path. This movement can be forward or reverse. When an image of the die to be inspected in a particular row of dies is needed, the wafer stage is controlled to move along the first direction along a predetermined inspection path, both forward and reverse. For the next row of dies, the wafer stage can be controlled to move forward or reverse along the second direction to the next row of dies, and then continue moving forward or reverse along the first direction. Understandably, in order to ensure the consistency of the images of the regions of interest of each die and improve the accuracy of wafer inspection, it is necessary to perform an alignment operation on the wafer. Specifically, this may include a centering and orientation operation to ensure that when the wafer stage moves along the first direction during scanning, the image sensor can acquire images of the dies along the arrangement direction of the same row of dies. In other words, it can ensure that the actual first direction of the wafer stage movement is consistent with the ideal first direction.

[0062] As one feasible implementation, the wafer centering and orientation operation includes: determining the center of the wafer; coarsely aligning the wafer at a first magnification of the optical device; and finely aligning the coarsely aligned wafer at a second magnification of the optical device, wherein the second magnification is greater than the first magnification.

[0063] It should be noted that the optical devices in the embodiments of the present invention include area scan cameras and line scan cameras. The optical imaging device containing the area scan camera has a lower optical magnification, which can be a first magnification. The line scan camera can be a time-delay integration camera, i.e., a TDI camera. The optical imaging device containing the TDI camera has a higher optical magnification, which can be a second magnification.

[0064] For example, determining the center of a wafer includes: acquiring multiple edge images of the wafer using an area array camera with low magnification; determining the wafer boundary using an image recognition algorithm; and determining the center of the wafer by fitting a circle equation to multiple points on the wafer boundary.

[0065] Understandably, the wafer also features a wafer notch, typically located at the edge of the wafer. This notch allows for rapid identification and positioning of the wafer, as well as determining its orientation during wafer mounting. Simultaneously, an image of the wafer notch is acquired using a planar array camera. This image, combined with image recognition algorithms, is then used to determine the wafer mounting orientation.

[0066] It should be noted that the wafer also includes low-magnification alignment marks selected by the user. All low-magnification alignment marks have the same pattern, and the straight line containing the low-magnification alignment marks located in the same grain row is parallel to the first direction. Coarse alignment of the wafer at the first magnification of the optical device includes: acquiring images of at least two low-magnification alignment marks located in the same grain row using a low-magnification area array camera; determining the angle between the ideal first direction and the actual first direction based on the positions of the captured low-magnification alignment marks, where the ideal first direction is the desired direction of movement of the wafer stage, typically the direction of grain arrangement in the wafer, and the actual first direction is the actual direction of movement of the wafer stage; and controlling the wafer to rotate around a third direction based on the angle to reduce the angle.

[0067] Specifically, the two low magnification alignment marks include a first low magnification alignment mark and a second low magnification alignment mark. The angle between the ideal first direction and the actual first direction can be calculated based on the positions of the first low magnification alignment mark and the second low magnification alignment mark.

[0068] It should be noted that the wafer also includes high-magnification alignment marks selected by the user. All high-magnification alignment marks have the same pattern, and the straight line containing the high-magnification alignment marks within the same die row is parallel to the first direction. The purpose of coarse alignment of the wafer at the first magnification of the optical device is to roughly correct the angle between the actual and ideal first directions, ensuring that the high-magnification alignment marks can enter the high-magnification field of view.

[0069] For a coarsely aligned wafer, fine alignment is performed at a second magnification of the optical device, including: acquiring images of at least two high-magnification alignment marks using a TDI camera with a higher magnification; determining the angle between the actual first direction and the ideal first direction of the coarsely aligned wafer based on the position of the high-magnification alignment marks; and controlling the wafer to rotate around a third direction based on the angle to reduce the angle between the actual first direction and the ideal first direction.

[0070] Furthermore, after controlling the wafer to rotate around a third direction, repeating the two steps before controlling the wafer to rotate around a third direction can obtain the orientation angle residual. Even after fine alignment, there is still a deviation between the actual first direction and the ideal first direction. Therefore, the orientation angle residual represents the angle residual between the actual first direction and the ideal first direction after fine alignment.

[0071] S220, Obtain the first position of the wafer in the first direction.

[0072] For example, an X-axis encoder is also provided on the workpiece stage where the wafer is located. The first position of the wafer in the first direction can be obtained by the X-axis encoder. At this time, the first position can be characterized as the first position of the wafer stage in the first direction.

[0073] S230. Based on the orientation angle residual, the first position, and the magnification of the optical device in the detection system, determine the offset of the image generated by the optical device in the second direction to compensate for the die registration image and the image of the die to be detected in the second direction, wherein the second direction intersects with the first direction. For example, the first direction is the direction in which the die row extends, and is also the direction of movement of the wafer stage when acquiring an image of a die row or a path. The second direction is the direction in which the die rows are arrayed, and is also the direction of movement of the wafer stage when acquiring an image of the die row in the next row or the next path. When moving to the next die row or the next path, the wafer stage continues to move along the first direction. The first direction and the second direction can be perpendicular.

[0074] It should be noted that after obtaining the offset in the second direction, it can be stored, and when needed, the offset in the second direction can be directly called.

[0075] As a feasible implementation, the offset of the image generated by the optical device in the second direction is determined based on the orientation angle residual, the first position, and the magnification of the optical device in the detection system, including:

[0076] Based on the orientation angle residual, the first position, the magnification of the optical device in the detection system, and the following correspondence, the offset of the image generated by the optical device in the second direction is determined:

[0077] Y offset =X×tanε×K.

[0078] Among them, Y offset X represents the offset of the image generated by the optical device in the second direction, ε represents the first position, K represents the angular residual, and K represents the magnification of the optical device.

[0079] In this embodiment, after determining the offset of the image generated by the optical device in the second direction, the grain registration image and the image of the grain to be detected can be controlled to move in the opposite direction of the second direction according to the offset. When the deviation in the second direction is compensated in the grain registration image or the image of the detected grain, the position change of the image in the second direction caused by the orientation angle residual is compensated, ensuring that the deviation range of the obtained grain registration mark position is smaller, thereby providing a premise for subsequent more precise compensation.

[0080] S240. Obtain the grain registration mark contained in the grain and the grain to be detected in the wafer, determine the grain registration path according to the grain to be detected and the grain registration mark, and determine the detection path according to the grain to be detected.

[0081] S250. When the wafer moves along the grain registration path, acquire the grain registration image of the grain row.

[0082] In this embodiment, in S260, when the grain registration image is obtained, the offset can be moved in the opposite direction of the second direction to compensate the grain registration image.

[0083] S260. Obtain the grain registration mark template image. Based on the grain registration image and the grain registration mark template image, determine the deviation between the actual position of the grain registration mark in each grain and the theoretical position of the grain registration mark in each grain.

[0084] S270. When the wafer moves along the detection path and acquires the image of the grain to be detected in the grain row, the region of interest image of each grain is determined from the image of the grain to be detected based on the deviation.

[0085] Similarly, in this embodiment, in S270, when the image of the grain to be detected is obtained, the offset can be moved in the opposite direction of the second direction to compensate for the image of the grain to be detected.

[0086] S280. Determine the defect detection results of the grains based on the image of the region of interest.

[0087] It should be noted that for a detailed description of steps S240 to S280, please refer to the description of steps S110 to S150 above, which will not be repeated here.

[0088] Figure 9 The flowchart illustrates another wafer inspection method provided in this embodiment of the invention. Figure 9 The illustrated embodiment details how to determine the deviation between the actual position of the grain registration mark in each grain row and the theoretical position of the grain registration mark in each grain, based on the grain registration image and the grain registration mark template image, and how to determine the region of interest image of each grain from the image of the grain to be detected based on the deviation. (Refer to...) Figure 9 The wafer inspection method in this embodiment of the invention includes:

[0089] S310. Obtain the grain registration mark contained in the grain and the grain to be detected in the wafer, determine the grain registration path according to the grain to be detected and the grain registration mark, and determine the detection path according to the grain to be detected.

[0090] S320. When the wafer moves along the grain registration path, acquire the grain registration image of the grain row.

[0091] S330, Obtain the grain registration marker template image.

[0092] S340. Calculate the theoretical image pixel position of each grain registration mark in each grain, and obtain the theoretical position image from the grain registration image based on the theoretical image pixel position.

[0093] Specifically, the theoretical image pixel position refers to the position obtained by converting the theoretical position of the grain registration mark on the grain and the image pixel size. This theoretical position in the grain registration image can be represented by a pixel position. A grain registration mark may correspond to multiple pixels in the grain registration image. In this case, some pixel positions can be selected as the corresponding image pixel positions of the grain registration mark in the grain registration image, or all pixel positions of the grain registration mark can be selected. For example, after obtaining the theoretical image pixel position corresponding to each grain registration mark in its respective grain, an image can be cropped from the grain registration image using a rectangle of a set size centered on the theoretical image pixel position as the theoretical position image. In other methods, as long as the cropped theoretical position image contains the image pixel position and the image pixel position is in the same position in its respective theoretical position image, it is acceptable.

[0094] As a feasible implementation, before obtaining the theoretical image pixel position corresponding to each grain registration mark in each grain, the detection method in this embodiment of the invention further includes: obtaining the thermal expansion coefficient of the wafer in a first direction. Specifically, during the fine alignment process, the spacing between patterns with the same structure in two or more grains in the same grain row is measured, and the thermal expansion coefficient of the wafer in the first direction is determined by calculating the ratio of this spacing to the grain pitch in the first direction. The grain pitch in the first direction can be obtained from a pre-stored detection formula or from the wafer design file.

[0095] In one embodiment, obtaining the theoretical image pixel position of each grain registration mark in each grain includes: determining the theoretical position of the grain registration mark in the grain registration image based on the coordinate position of the grain registration mark in the grain, the pitch of the grain in the first direction and the second direction and the coefficient of thermal expansion; and determining the theoretical image pixel position of the grain registration mark in the grain based on the theoretical position, the starting position of the grain registration image and the pixel size of the grain registration image.

[0096] In one embodiment, determining the theoretical position of the grain registration mark in the grain registration image based on the coordinate position of the grain registration mark in the grain, the pitch of the grain in a first direction and a second direction, and the coefficient of thermal expansion includes:

[0097] The theoretical position of the grain registration mark in the grain registration image is determined based on the coordinate position of the grain registration mark in the grain, the pitch of the grain in the first and second directions, the coefficient of thermal expansion, and the following correspondence:

[0098] X ideal =X i ×D x ×α+X die Y ideal =Y i ×D y +Y die .

[0099] Among them, (X) ideal Y ideal (X) represents the theoretical position of the grain registration marker in the grain registration image. die Y die ) represents the coordinate position of the grain registration mark in the grain, D x D represents the grain pitch in the first direction. y X represents the grain pitch in the second direction, α represents the coefficient of thermal expansion, and X represents the particle size distribution. i The Y indicates the grain number in the first direction where the grain registration mark is located. i This indicates the number of the grain in the second direction where the grain registration mark is located.

[0100] It should be noted that the coordinate position of the grain registration mark within the grain refers to its coordinate position in the grain coordinate system. The grain coordinate system is a coordinate system with a specific pattern location within the grain as its origin (usually the lower left corner of the grain), with the first direction as the X-axis and the second direction as the Y-axis, and the coordinate range being the size of the grain. The coordinate position of the grain registration mark within the grain, as well as the pitch of the grain in the first and second directions, are predefined and stored. For example, they can be stored in the testing formula or in the design file, and can be directly retrieved when needed.

[0101] Specifically, the position of the grain registration mark in the theoretical image pixel position of the grain is determined based on the theoretical position, the starting position of the grain registration image, and the pixel size of the grain registration image, including:

[0102] The theoretical image pixel position of the grain registration mark is determined based on the theoretical position, the starting position of the grain registration image, the pixel size of the grain registration image, and the following correspondence:

[0103] X pixel =(X ideal -S X ) / P x Y pixel =(X ideal -Sy ) / P y .

[0104] Among them, (X) pixel Y pixel ) represents the image pixel position of the grain registration mark, (S X S y P represents the starting position of the grain registration image. x P represents the pixel size in the first direction of the grain registration image. y This represents the pixel size in the second direction of the grain registration image.

[0105] It should be noted that the starting position of the die registration image refers to the position of the first pixel of the die registration image obtained by scanning along the die registration path in the wafer coordinate system. The wafer coordinate system is a coordinate system established with a certain position in a certain die of the entire wafer as the origin. The horizontal coordinate of the wafer coordinate system can be identified as the first direction, and the vertical coordinate of the wafer coordinate system can be identified as the second direction.

[0106] S350. Based on the theoretical position image and the grain registration mark template image, obtain the actual image pixel position of the grain registration mark of the grain row in the theoretical position image, and determine the deviation between the actual image pixel position and the theoretical image pixel position, so as to be the deviation between the actual position of the grain registration mark in the grain row and the theoretical position of the grain registration mark in each grain, and the deviation includes a first deviation and a second deviation.

[0107] For example, the actual image pixel position refers to the real position of the grain registration mark in the theoretical position image. In this case, the actual image pixel position can be represented by pixel position. Specifically, by performing a registration operation between each theoretical position image and a pre-stored grain registration mark template image, the actual image pixel position of each grain registration mark in the theoretical position image can be obtained. Since the theoretical position image corresponds to the grain, and since the theoretical image pixel position is the calculated expected position of the grain registration mark in the grain registration image, and the grain registration image can still correspond to the grain, the deviation between the theoretical image pixel position and the actual image pixel position can be used as the first deviation in the first direction and the second deviation in the second direction between the actual position of each grain registration mark corresponding to its respective grain (i.e., the actual image pixel position where the grain registration mark is located in the theoretical position image) and the theoretical position of the grain registration mark in each grain (i.e., the theoretical image pixel position corresponding to each grain registration mark in its respective grain). It should be noted that the unit of this deviation can be image pixels, or it can be converted to actual physical distance based on pixel size.

[0108] Because the coefficient of thermal expansion of a wafer in the first direction varies with time and temperature, if the coefficient of thermal expansion of the wafer in the first direction is inconsistent with the coefficient of thermal expansion during alignment when acquiring the wafer registration image and the image of the wafer to be detected, it may cause a shift in the theoretical position image. This shift is proportional to the starting position of the wafer in the wafer registration image. This shift will require expanding the search window when matching the theoretical position image and the wafer registration marker template image, thus reducing registration efficiency.

[0109] Therefore, embodiments of the present invention provide another method for obtaining the image pixel position corresponding to each grain registration mark in each grain. A grain row includes i grains. Determining the deviation between the actual position of the grain registration mark in each grain and the theoretical position of the grain registration mark in each grain includes:

[0110] S3501: Calculate the image pixel position of the grain registration mark corresponding to the j-th grain and the image pixel position of the grain registration mark corresponding to the (j+1)-th grain;

[0111] S3502: The theoretical position image is obtained based on the image pixel position of the grain registration mark corresponding to the j-th grain, and the theoretical position image is obtained based on the image pixel position of the grain registration mark corresponding to the (j+1)-th grain.

[0112] S3503: Using a grain registration mark template image, the actual position of the grain registration mark corresponding to the j-th grain and the actual position of the grain registration mark corresponding to the (j+1)-th grain are obtained through image registration. The deviation between the actual position and the theoretical position of the grain registration mark corresponding to the j-th grain and the deviation between the actual position and the theoretical position of the grain registration mark corresponding to the (j+1)-th grain are obtained. At the same time, the theoretical image pixel position of the grain registration mark corresponding to the (j+2)-th grain is obtained.

[0113] S3504: Take the (j+2)th grain as the jth grain, and repeat steps S3501 to S3503 until the deviation between the actual position and the theoretical position of the grain registration mark corresponding to the i-th grain in the grain is obtained, so as to obtain the deviation between the actual position and the theoretical position of the grain registration mark in each grain in the grain row, and the deviation includes the first deviation and the second deviation, where 1≤j≤i.

[0114] Taking the example of each grain including one grain registration mark, and using j=1 as an example, the theoretical image pixel positions of the grain registration marks in the first and second grains arranged along the first direction can be determined first using the method for determining the theoretical image pixel positions provided in the above embodiment. Then, based on the theoretical image pixel positions of the grain registration marks in the first and second grains, the theoretical position images containing the grain registration marks in the first grain and the theoretical position images containing the grain registration marks in the second grain are obtained from the grain registration image. Finally, by performing a registration operation between each of the above-obtained theoretical position images and the pre-stored grain registration mark template image, the actual image pixel positions of the grain registration marks in the first and second grains can be obtained. Since the theoretical position image corresponds to each grain, the actual position of the grain can be obtained. Therefore, by obtaining the deviation between the actual and theoretical pixel positions of the first grain, the deviation between the actual and theoretical positions of the grain registration mark corresponding to the first grain can be obtained. Similarly, by obtaining the deviation between the actual and theoretical pixel positions of the second grain, the deviation between the actual and theoretical positions of the grain registration mark corresponding to the second grain can be obtained. Then, using the actual positions of the grain registration marks in the first and second grains, the theoretical image pixel positions of the grain registration marks in the third grain arranged along the first direction can be predicted. The theoretical image pixel positions of the grain registration marks in the exemplary third grain satisfy the following correspondence:

[0115] X pixel3 =X real2 +(X real2 -X real1 ), Y pixel3 =Y real2 +(Y real2 -Y real1 ).

[0116] Among them, (X) real1 Y real1 (X) represents the actual position of the grain registration mark of the first grain. real2 Y real2 () indicates the actual location of the grain registration mark for the second grain. pixel3 Y pixel3 The image pixel position of the grain registration mark of the third grain is represented by the actual image pixel position mentioned above.

[0117] After obtaining the theoretical image pixel position of the grain registration mark of the third grain, the theoretical position image containing the grain registration mark of the third grain is obtained from the grain registration image based on the theoretical image pixel position of the grain registration mark of the third grain. The theoretical position image is then registered with the pre-stored grain registration mark template image to obtain the actual image pixel position of the grain registration mark of the third grain, which is used as the actual position of the grain registration mark of the third grain. At this time, the deviation between the actual position and the theoretical position of the grain registration mark of the third grain in the grain can also be obtained. Then, the theoretical image pixel position and the actual image pixel position of the grain registration mark of the fourth grain arranged along the first direction can be predicted by the actual pixel spacing of the grain registration marks in the second and third grains and the actual position of the grain registration mark in the third grain, thereby obtaining the deviation between the theoretical position and the actual position of the grain registration mark in the fourth grain in the grain. This process continues until the theoretical and actual image pixel positions of the grain registration mark in the last grain (i.e., the i-th grain) of the grain row are determined. This allows us to obtain the deviation of the grain registration mark in the last grain, which is the deviation between the actual position of the grain registration mark in each grain and the theoretical position of the grain registration mark in each grain.

[0118] The theoretical image pixel position corresponding to each grain registration mark in each grain is determined using the above method. Then, based on the theoretical image pixel position, the theoretical position image is cropped from the grain registration image to obtain the actual position of the grain registration mark. This yields the deviation of each grain registration mark. Because the theoretical image pixel position of the grain registration mark is predicted in real time, the obtained deviation is more effectively protected from the influence of temperature. This significantly reduces the search window size when matching the theoretical position image and the grain registration mark template image, thus improving registration efficiency.

[0119] S360. When the wafer moves along the detection path and acquires the image of the die to be detected in the die row, calculate the theoretical image pixel position of the region of interest, calculate the actual image pixel position of the region of interest based on the theoretical image pixel position of the region of interest, the first deviation and the second deviation, and acquire the image of the region of interest from the image of the die to be detected based on the actual image pixel position of the region of interest.

[0120] For example, the region of interest is typically defined as a rectangular area to be inspected, and this region of interest is pre-stored in the inspection formula or design file. Similarly, the theoretical position of the region of interest in the image of the grain to be inspected can be determined first based on the coordinate position of the region of interest in the grain, the pitch of the grain in the first and second directions, and the coefficient of thermal expansion. Then, based on the theoretical position of the region of interest in the image of the grain to be inspected, the starting position of the image of the grain to be inspected, and the pixel size of the image of the grain to be inspected, the theoretical image pixel position of the region of interest in the grain can be determined. Finally, based on the first and second deviations between the actual position of the grain registration mark in each grain and the theoretical position of the grain registration mark in each grain, and the obtained theoretical image pixel position of the region of interest in the grain, the actual image pixel position of the region of interest in the image of the grain to be inspected is calculated to obtain the true image of the region of interest. That is, the true position of the region of interest can be adjusted to obtain a region of interest image that has been compensated for the deviation, thus overcoming the wafer process error and the change of the coefficient of thermal expansion. It should be noted that the theoretical image pixel positions of the region of interest obtained above also include two directions, corresponding to the directions of the first and second deviations. Therefore, when obtaining the theoretical image pixel positions of the region of interest, adding or subtracting the first deviation and adding or subtracting the second deviation will yield the actual image pixel positions corresponding to the region of interest. The image of the region of interest can then be obtained based on the actual image pixel positions. It should also be noted that in this embodiment, since the region of interest is a rectangular area, the theoretical image pixel positions can be calculated using preset coordinate points of the region of interest, or using all coordinate points within the region of interest.

[0121] S370. Determine the defect detection results of the grains based on the image of the region of interest.

[0122] In one feasible implementation, steps S340-S370 are performed for all the rows of dies that need to be inspected in the wafer. Although this method has high inspection accuracy, it also has the problem of low efficiency.

[0123] To improve detection efficiency, this embodiment of the invention also provides another detection method. For example, the grain row is taken as the current grain row, and the theoretical image pixel position of the grain registration mark of the grain in the next grain row is determined according to the grain row scanning order of the wafer, the first deviation and the second deviation of the current grain row.

[0124] Furthermore, after obtaining the first and second deviations of the first row of grains (i.e., the current grain row) through steps S340-S370, the theoretical image pixel positions of the grain registration marks of the grains in other grain rows can be directly predicted using the first and second deviations of the grain registration marks of the grains in the current grain row. After the grain registration of the current grain row is completed, the first and second deviations between the actual and theoretical positions of the grain registration marks in the current grain row for each grain can be obtained. Then, position compensation and defect detection can be performed on the region of interest of the grain image to be detected in the current grain row based on the obtained first and second deviations. After the defect detection of the current grain row is completed, and before the theoretical image pixel positions of the grain registration marks in the next grain row are determined, the theoretical image pixel positions of the grain registration marks in the current grain row and the corresponding first and second deviations can be used to predict the theoretical image pixel positions of the grain registration marks in the next grain row that are located in the same column as the current grain registration mark. For example, the theoretical image pixel position of the grain registration mark in the next grain row is the sum of the theoretical image pixel positions and the deviation of the grain registration marks in the current grain row that are in the same column as the grain registration mark.

[0125] Understandably, different grain row scanning sequences require different grain position compensation methods. There are currently two main types of grain row scanning sequences. Figure 10 This is a schematic diagram of a grain row scanning sequence provided in an embodiment of the present invention. Figure 10 The grain row scanning sequence shown is from one end of the wafer to the other, as follows: Figure 10 The scan proceeds along direction S1. In this case, there may be a situation where the length of the next grain row 102 is greater than that of the current grain row 101, meaning that the grains 40 at both ends of the next grain row do not actually have registration results for the grain registration marks. To address this situation, the registration result of the current grain row 101 can be used to predict the theoretical image pixel positions of the grain registration marks 401 at both ends of the next grain row 102 through linear extrapolation.

[0126] Figure 11 This is a schematic diagram illustrating another grain row scanning sequence provided in an embodiment of the present invention. Figure 11 The shown grain row scanning order starts from the row with the most grains on the wafer and scans along direction S2 and direction S3 respectively. At this time, the number of grains scanned in the previous row is greater than the number of grains scanned in the next row. There is no case where the length of the next grain row 102 is greater than the current grain row 101. Therefore, there is no need to perform extrapolation prediction, which can improve the accuracy of prediction.

[0127] Based on the same inventive concept, embodiments of the present invention also provide a wafer inspection device. Figure 12This is a schematic diagram of a wafer inspection device provided in an embodiment of the present invention, with reference to... Figure 12 The detection device in this embodiment of the invention includes: a controller 51, a workpiece stage 52, a synchronization module 53, an image sensor 54, and an image processing server 55. The workpiece stage 52 is connected to the synchronization module 53, the synchronization module 53 is connected to the image sensor 54, and the image sensor 54 is connected to the image processing server 55.

[0128] The controller 51 is used to acquire the grain registration mark contained in the grain and the grain to be detected in the wafer, and to determine the grain registration path based on the grain to be detected and the grain registration mark, and to determine the detection path based on the grain to be detected.

[0129] For example, controller 51 can first acquire the predefined die registration marks contained in the die and the die to be detected in the wafer. Then controller 51 can determine the die registration path based on the die to be detected and the die registration marks, and determine the detection path based on the die to be detected.

[0130] The controller 51 is connected to the workpiece stage 52 and the synchronization module 53 respectively. It controls the workpiece stage 52 to carry the wafer and move it along the die registration path. The controller 51 controls the image sensor 54 to acquire the die registration image of the die row through the synchronization module 53 and transmits it to the image processing server 55. The die registration image contains die registration marks.

[0131] For example, the controller 51 is connected to the workpiece stage 52 and can control the wafer carrier on the workpiece stage 52 to move along the wafer registration path according to the wafer registration path. Simultaneously, it controls the line scan camera (e.g., a TDI camera) in the image sensor 54 via the synchronization module 53 to acquire the wafer registration image of the wafer rows and transmit the wafer registration image to the image processing server 55. Specifically, the synchronization control module 53 can provide an external trigger signal to the TDI camera according to the movement speed of the wafer carrier in the workpiece stage 51 (which matches the line frequency of the TDI camera) and a preset pixel size, thereby controlling the operation of the TDI camera.

[0132] The controller 51 is also used to control the workpiece stage 52 to carry the wafer and move it along the detection path, and to control the image sensor 54 to acquire the image of the die to be detected through the synchronization module 53.

[0133] For example, the controller 51 is connected to the workpiece stage 52 and can control the wafer carrier on the workpiece stage 52 to move along the detection path according to the detection path. At the same time, it controls the linear scan camera (e.g., TDI camera) in the image sensor 54 to work through the synchronization module 53 to obtain the image of the die to be detected in the die row and transmit the image of the die to be detected to the image processing server 55.

[0134] The controller 51 is also connected to the image processing server 55 and is also used to obtain the defect detection results of the grains through the image processing server 55. The image processing server 55 is used to determine the deviation between the actual position of the grain registration mark in each grain and the theoretical position of the grain registration mark in each grain based on the grain registration image and the grain registration mark template image, determine the region of interest image of each grain from the image of the grain to be detected based on the deviation, and determine the defect detection result of the grain based on the region of interest image.

[0135] The detection device provided in the embodiments of the present invention can execute the detection method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the method.

[0136] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A method for inspecting wafers, characterized in that, The wafer includes at least one row of grains, and each row of grains includes a plurality of grains. The detection method includes: The process involves acquiring the grain registration mark contained in the grain and the grain to be detected in the wafer, determining the grain registration path based on the grain to be detected and the grain registration mark, and determining the detection path based on the grain to be detected. As the wafer moves along the grain registration path, a grain registration image of the grain row is acquired, and the grain registration image includes the grain registration mark. Obtain a grain registration mark template image, and based on the grain registration image and the grain registration mark template image, determine the deviation between the actual position of the grain registration mark in each grain and the theoretical position of the grain registration mark in each grain in the grain row; When the wafer moves along the detection path and acquires the image of the grain to be detected in the grain row, the region of interest image of each grain is determined from the image of the grain to be detected based on the deviation. The defect detection result of the grain is determined based on the image of the region of interest.

2. The detection method according to claim 1, characterized in that, Determining the grain registration path based on the grain to be detected and the grain registration mark includes: In the dies to be tested that contain the grain registration marks, adjacent grain registration marks at the same position are sequentially connected to determine the grain registration path, wherein at least a portion of the dies to be tested in at least one row of dies contains grain registration marks.

3. The detection method according to claim 1, characterized in that, The detection method further includes, before determining the detection path based on the grain to be detected and the grain registration mark contained in the grain, and the grain registration mark in the wafer, acquiring the grain registration mark contained in the grain and the grain registration mark contained in the grain, and before determining the detection path based on the grain to be detected, the detection method further includes: The wafer is centered and oriented to obtain the orientation angle residual; Obtain the first position of the wafer in the first direction; Based on the orientation angle residual, the first position, and the magnification of the optical device in the detection system, the offset of the image generated by the optical device in the second direction is determined to compensate the grain registration image and the image of the grain to be detected in the second direction, wherein the second direction intersects with the first direction.

4. The detection method according to claim 3, characterized in that, Based on the directional angle residual, the first position, and the magnification of the optical device in the detection system, the offset of the image generated by the optical device in the second direction is determined, including: Based on the directional angle residual, the first position, the magnification of the optical device in the detection system, and the following correspondence, the offset of the image generated by the optical device in the second direction is determined: Y offset = X x tan ε x K; wherein Y offset represents an offset of an image generated by the optical device in the second direction, X represents the first position, ε represents the included angle residual, and K represents a magnification of the optical device.

5. The detection method according to claim 1, characterized in that, Based on the grain registration image and the grain registration mark template image, determine the deviation between the actual position of the grain registration mark in each grain and the theoretical position of the grain registration mark in each grain in the grain row, including: Calculate the theoretical image pixel position of each grain registration mark in each grain, and obtain the theoretical position image from the grain registration image based on the theoretical image pixel position; Based on the theoretical position image and the grain registration mark template image, the actual image pixel position of the grain registration mark in the theoretical position image of the grain row is obtained, and the deviation between the actual image pixel position and the theoretical image pixel position is determined as the deviation between the actual position of the grain registration mark in each grain and the theoretical position of the grain registration mark in each grain, and the deviation includes a first deviation and a second deviation; Determining the region of interest image for each grain from the image of the grain to be detected based on the deviation includes: Calculate the theoretical image pixel position of the region of interest, calculate the actual image pixel position of the region of interest based on the theoretical image pixel position of the region of interest, the first deviation and the second deviation, and obtain the image of the region of interest from the image of the grain to be detected based on the actual image pixel position of the region of interest.

6. The detection method according to claim 5, characterized in that, The detection method further includes: Obtain the coefficient of thermal expansion of the wafer in the first direction; Calculate the theoretical image pixel position of each grain registration marker in each grain, including: The theoretical position of the grain registration mark in the grain registration image is determined based on the coordinate position of the grain registration mark in the grain, the pitch of the grain in the first direction and the second direction, and the coefficient of thermal expansion. The position of the grain registration mark in the theoretical image pixel position of the grain is determined based on the theoretical position, the starting position of the grain registration image, and the pixel size of the grain registration image.

7. The detection method according to claim 6, characterized in that, Determining the theoretical position of the grain registration mark in the grain registration image based on the coordinate position of the grain registration mark in the grain, the pitch of the grain in the first direction and the second direction, and the coefficient of thermal expansion includes: The theoretical position of the grain registration mark in the grain registration image is determined based on the coordinate position of the grain registration mark in the grain, the pitch of the grain in the first direction and the second direction, the coefficient of thermal expansion, and the following correspondence: X ideal = X i × D x × a + X die ; Y ideal = Y i x D y + Y die ; Among them, (X) ideal Y ideal (X) represents the theoretical position of the grain registration mark in the grain registration image. die Y die ) represents the coordinate position of the grain registration mark in the grain, D x D represents the grain pitch in the first direction. y The pitch of the grains in the second direction represents the coefficient of thermal expansion, and X represents the coefficient of thermal expansion. i The Y indicates the index of the grain in the first direction where the grain registration mark is located. i This indicates the number of the grain in the second direction where the grain registration mark is located; Determining the position of the grain registration mark in the theoretical image pixel position of the grain based on the theoretical position, the starting position of the grain registration image, and the pixel size of the grain registration image includes: The position of the grain registration mark in the theoretical image pixel position of the grain is determined based on the theoretical position, the starting position of the grain registration image, the pixel size of the grain registration image, and the following correspondence: X pixel = (X ideal - S X ) / P x ; Y pixel = (X ideal - S y ) / P y ; Among them, (X) pixel Y pixel ) represents the theoretical image pixel position of the grain registration mark, (S) X S y P represents the starting position of the grain registration image. x P represents the pixel size in the first direction in the grain registration image. y This indicates the pixel size in the second direction in the grain registration image.

8. The detection method according to claim 1, characterized in that, The grain row comprises i grains; The determination of the deviation between the actual position of the grain registration mark in each grain and the theoretical position of the grain registration mark in each grain in the grain row includes: S3501: Calculate the theoretical image pixel position of the grain registration mark corresponding to the j-th grain and the theoretical image pixel position of the grain registration mark corresponding to the (j+1)-th grain; S3502: And obtain the theoretical position image based on the theoretical image pixel position of the grain registration mark corresponding to the j-th grain, and obtain the theoretical position image based on the theoretical image pixel position of the grain registration mark corresponding to the (j+1)-th grain; S3503: Using a grain registration mark template image, the actual position of the grain registration mark corresponding to the j-th grain and the actual position of the grain registration mark corresponding to the (j+1)-th grain are obtained through image registration, so as to obtain the deviation between the actual position and the theoretical position of the grain registration mark corresponding to the j-th grain and the deviation between the actual position and the theoretical position of the grain registration mark corresponding to the (j+1)-th grain, and at the same time, the theoretical image pixel position of the grain registration mark corresponding to the (j+2)-th grain is obtained. S3504: Take the (j+2)th grain as the jth grain, and repeat steps S3501 to S3503 until the deviation between the actual position and the theoretical position of the grain registration mark corresponding to the i-th grain in the grain is obtained, so as to obtain the deviation between the actual position of the grain registration mark in each grain and the theoretical position of the grain registration mark in each grain in the grain row, and the deviation includes a first deviation and a second deviation, wherein 1≤j≤i.

9. The detection method according to claim 5, characterized in that, After determining the deviation between the actual position of the grain registration mark in each grain and the theoretical position of the grain registration mark in each grain, based on the theoretical position image and the grain registration mark template image, the detection method further includes: The die row is taken as the current die row, and the theoretical image pixel position of the die registration mark of the die in the next die row is determined according to the die row scanning order of the wafer, the first deviation and the second deviation of the current die row.

10. The detection method according to claim 3, characterized in that, The centering and orientation operation of the wafer includes: Determine the center of the wafer; The wafer is coarsely aligned when the optical device is at the first magnification. For the wafer that has undergone coarse alignment, fine alignment is performed when the optical device is at a second magnification, wherein the second magnification is greater than the first magnification.

11. A wafer inspection device, characterized in that, For performing the detection method as described in any one of claims 1-10, the detection device includes: a controller, a workpiece stage, a synchronization module, an image sensor, and an image processing server; the workpiece stage is connected to the synchronization module, the synchronization module is connected to the image sensor, and the image sensor is connected to the image processing server; The controller is configured to acquire the grain registration mark contained in the grain and the grain to be detected in the wafer, and determine the grain registration path based on the grain to be detected and the grain registration mark, and determine the detection path based on the grain to be detected. The controller is connected to the workpiece stage and the synchronization module respectively, controls the workpiece stage to carry the wafer and move it according to the die registration path, and controls the image sensor to acquire the die registration image of the die row through the synchronization module, and transmits it to the image processing server. The die registration image contains the die registration mark. The controller is also used to control the workpiece stage to carry the wafer and move it along the detection path, and to control the image sensor to acquire the image of the die to be detected in the die row through the synchronization module; The controller is also connected to the image processing server and is further configured to obtain the defect detection results of the grains through the image processing server. The image processing server is configured to determine the deviation between the actual position of the grain registration mark in each grain and the theoretical position of the grain registration mark in each grain in the grain row, based on the grain registration image and the grain registration mark template image, determine the region of interest image of each grain from the image of the grain to be detected based on the deviation, and determine the defect detection results of the grains based on the region of interest image.