The embodiments of the present invention enable a new metal diagnosis
pattern based on a production test pattern to quickly identify open and
short circuits of metal lines which cannot be probed, such as the long
lines of a programmable logic device, and to further isolates the fault
location for physical failure analysis. According to one aspect of the
invention, a circuit locally drives a plurality of metal long line
segments to determine whether a defect in a line is a short circuit, or
further to identify the location of an open circuit.