For clarity of the explanation, the following description will be discussed with reference to ICs which are a typical example of semiconductor devices, but it is needless to say that the present invention can be also applied to semiconductor devices other than ICs.