Patent ID: 8572517

Claim:
A method for optical compensation comprising: using a computer system to create a simulated circuit pattern using a lithography process, wherein the lithography process uses a photomask defined by a data set having a plurality of polygons that define patterns on the photomask; calculating a cost function based on an electrical parameter of the simulated circuit pattern, wherein the cost function comprises terms defined by at least one of: (a) a sum of squares of normalized differences between simulated and designed values of electrical parameters for a multitude of circuit components, (b) an amount by which the simulated value of the electrical parameter exceeds a maximum allowable value, (c) an amount by which the simulated value of the electrical parameter falls below a minimum allowable value, (d) the difference of simulated values of a first and a second electrical parameter of a simulated circuit pattern, (e) a change in the simulated value of the electrical parameter in response to a change in a condition of the lithography process, and (f) a restricted simulated value of the electrical parameter that is not larger than a maximum allowable value or not smaller than a minimum allowable value, and wherein the electrical parameter describes an electrical operational characteristic of the simulated circuit pattern; and adjusting the polygons based on the calculated cost function in order to reduce the value of the cost function.