In FIG. 11, element 36 is a latch circuit for producing the inspection start signal 130 and the gate width 133 based on the inspection control signal 128; element 37 is a variable gate generating circuit for generating the variable width gate signal 134; elements 38 and 42 are both AND gates; element 39 is a counter for counting the write clock 125; element 40 is a comparator; and element 41 is a