Patent ID: 8488367

Claim:
A method for controlling a semiconductor device, the method comprising: determining a select bit number for a group of memory cells each comprising a variable-resistance element; setting a first voltage corresponding to the select bit number; applying the set first voltage to the memory cell group; performing verify read on the memory cell group to which the first voltage has been applied and determining whether or not the memory cell group passes the verify read; and determining whether or not the select bit number for the memory cell group decreases during the applying the set first voltage, and if the select bit number for the memory cell group decreases, decreasing the first voltage without performing the verify read, and setting the first voltage corresponding to the select bit number again, wherein if the memory cell group is determined not to pass the verify read, the number of bits corresponding to passed memory cells is subtracted from the select bit number, and the first voltage corresponding to the decreased select bit number is set again.