A method and system for detecting defects in a physical mask used for
fabricating a semiconductor device having multiple layers is disclosed,
where each layer has a corresponding mask. The method and system include
receiving a digital image of the mask, and automatically detecting edges
of the mask in the image using pattern recognition. The detected edges,
which are stored in a standard format, are imported along with processing
parameters into a process simulator that generates an estimated aerial
image of the silicon layout that would be produced by a scanner using the
mask and the parameters. The estimated aerial image is then compared to
an intended aerial image of the same layer, and any differences found
that are greater than predefined tolerances are determined to horizontal
defects. In addition, effects that the horizontal defects may have on
adjacent layers are analyzed to discover vertical defects.